I have a Dev server that has been running without issue for at least 2 years. This dev machine was a VM Clone of the Production server.

On 2021-06-05 something happened on this server that altered its behavior. From this time forward, SQL Agent does not record Job History or send Email notifications. It has one daily job that does run, it successfully updates the tables as designed but the OnSuccess Email is not sent and from the 5th forward, no history is recorded.

I've created a few test jobs, with and ran them to identify any patterns between the job execution and the error log rows.

Test Job #1 was a single step containing a TSQL script that sends an email using msdb.dbo.sp_send_dbmail scripted within the step as well as Notification email OnSuccess email.

When executed, it generates no history and no OnSuccess email but the TSQL Step does send an email.

When the job is executed, error rows are generated in the SQL Server Agent log file in pairs:

Message [298] SQLServer Error: 18456, Login failed for user 'DOMAIN\MACHINENAME$'. [SQLSTATE 28000]

Message [382] Logon to server 'PARENTCLONEMACHINE' failed (ConnLogJobHistory)

I've restarted the services and bounced the server (for lack of any other course of action) but no difference was noted.

Please, Oh Worthy DBA Gods of SE, give this humble accidental-DBA a clue to restoring SQL Agent to normal behavior.

  • 1
    Hi, does @@SERVERNAME return correct results? If not see here Otherwise perhaps look into this thread Commented Jun 14, 2021 at 22:46
    – MBuschi
    Commented Jun 15, 2021 at 6:29
  • Perhaps the machine was cloned from another machine, and SQL Server now believes that it is a target server, where the MSX suddenly no longer exists. This was an issue a long time ago. I haven't seen this as an issue for a very long time, but I would still look in that general direction as a first step. Checking the @@SERVERNAME as suggested by Randi is a good start. Commented Jun 15, 2021 at 14:07
  • @RandiVertongen Thanks for the suggestion! @@SERVERNAME returns the name of the parent from which this machine was cloned. I did not check prior and now that I know, I'm still not sure how to proceed. Thank you for the insight. Commented Jun 15, 2021 at 14:19
  • @TiborKaraszi Thank you for the response, you and Randi are on the right track. Now I'm not sure how to proceed with this additional piece of information. Commented Jun 15, 2021 at 14:22

1 Answer 1


Thank you to all who answered, the solution turned out to be changing registry entries. As I mentioned, this development server was a VM Clone of the production server. Although it ran without issue for 18 months (or so), on 5 June SQL Agent ceased functioning properly.

@randi-vertongen suggested I execute @@SERVERNAME, the result was the name of the parent clone server. A search of the registry revealed several legacy entries naming the old, cloned server where the name of the current Dev server label should be.

As I work in a professional office, I can't merely edit the registry of a server, I created a work ticket for our SysAdmin team with a copy of this link and my request to update the registry which was ultimately done, solving the problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.