Had a job failure but it doesn't appear in the job history

  • Hello,

    I am documenting job failures in the last two months and I cannot find the one that we had in that period. I looked in the job history and also in the event logs. Can a job fail without recording it? Is there something I have to set to make it write to the job history (I've never known that to be the case)?

    Thank you in advance.

  • The job history cycles, ensure that the retention period is high enough and rows per job is set. This can be tricky if you have loads of jobs on your server.

    [font="Times New Roman"]There's no kill switch on awesome![/font]
  • Hi,

    There is a default trace available You can use the sys.traces table to see the max file size and no of file allowed before recycling of error logs using the below query

    select * from sys.traces

    max_size colum is Maximum trace file size limit in megabytes (MB). And max_files colum specifies the maximum number of rollover files in case the trace is a rollover.

    If you want to find the location where your error logs are stored , you can use the below query and make modifications accordingly to find the type of event you are looking into :

    --list current file path, events and columns of the default trace

    SELECT t.id AS TraceId ,

    path AS TraceFilePath ,

    tcat.name AS EventCategory ,

    tevent.name AS EventClassName ,

    tcolumn.name AS ColumnName

    FROM sys.traces AS t

    CROSS APPLY FN_TRACE_GETEVENTINFO(t.id) AS tdef

    JOIN sys.trace_events AS tevent ON tdef.eventid = tevent.trace_event_id

    JOIN sys.trace_categories AS tcat ON tcat.category_id = tevent.category_id

    JOIN sys.trace_columns AS tcolumn ON tcolumn.trace_column_id = tdef.columnid

    WHERE t.is_default = 1 --default trace

    AND t.status= 1 --running

    --AND tevent.name like 'Object:Deleted' -- Use this filter to filter out specific incidents

    ORDER BY TraceFilePath ,

    EventCategory ,

    EventClassName ,

    ColumnName ;

    Hope this helps you..!!

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply