In Transactional Replication of SQL Server, Synchronization job starts well and proceeds a while. However, in middle of the work it shows this error:

The job failed. The Job was invoked by User WIN-XXXXX\Administrator. The last step to run was step 3 (Detect nonlogged agent shutdown.).

It's a very generic error message. How can I get more details about the error?

  • This is a generic error message. Enable verbose agent logging to get the additional details. If I were to guess it is likely a permissions issue. Jul 14 '20 at 17:16

I found the SQL job (under SQL Server Agent, Jobs folder at the left pane of SQL Server Management Studio) associated to Distribution Agent which is in charge of running Synchronization job. I edited the 2nd step of the job i.e. Run agent step (available in the Job Properties dialog that appears by double clicking the job or by right click on the job and selecting Properties).

enter image description here

In the Job Step Properties dialog, I added two parameters to get more log messages:

-OutputVerboseLevel 2 -Output F:\log_dir\snapshotagent.log 

enter image description here

I re-run the Synchronization job and after seeing the error, the details were available in F:\log_dir\snapshotagent.log. I hope it is useful for you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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