SQL Server Agent Jobs are not logging history

  • A few days ago, my SQL Agent Jobs stopped logging to the history table. They don't show up in view-history and they are not in the sysjobhistory table.  I do limit to 10000 rows with max 500 rows per job, but  I've also tried not limiting it at all.  The SQL Agent servers runs under NT Service\SQLSERVERAGENT and I've made it a sysadmin and local administrator just to test.

    The jobs do run. I created a test job that just does a "select 1", however I notice it takes at least 1 minute for the job to complete.  I tried running a trace, but don't see anything in it - maybe I filtered it too much or am not capturing the right fields.

    I am using SQL 2017 standard (14.0.3401.7) with Windows 2016.

    Any help would be much appreciated.

    Thanks!

     

  • Is your msdb data or log file full?

    Do you see any errors in the SQL error log that could be related to the issue?

    SQL DBA,SQL Server MVP(07, 08, 09) Prosecutor James Blackburn, in closing argument in the Fatal Vision murders trial: "If in the future, you should cry a tear, cry one for them [the murder victims]. If in the future, you should say a prayer, say one for them. And if in the future, you should light a candle, light one for them."

  • Thank you for that.  I've been looking in the SQL error log where there were no errors, but forgot that there was also a SQL agent error log.  In it, I saw

    [382] Logon to server 'xxxxxxxxx' failed (ConnAttemptCachableOp)

    Which was not the same name of the server.  I did a sp_dropserver/sp_addserver, restarted SQL and it's working now.

    Thanks so much!

     

  • Well, you fixed it, but glad I helped in some way :-).

    SQL DBA,SQL Server MVP(07, 08, 09) Prosecutor James Blackburn, in closing argument in the Fatal Vision murders trial: "If in the future, you should cry a tear, cry one for them [the murder victims]. If in the future, you should say a prayer, say one for them. And if in the future, you should light a candle, light one for them."

Viewing 4 posts - 1 through 4 (of 4 total)

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