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) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • 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) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

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

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