16 January,2014 by Jack Vamvas
Question : Does SQL Server allow a sql server agent job to write the job status to the Windows Application log?
Answer: Writing a message to the Windows Application log is configured via the Notifications tab on the SQL Server Agent job window.
There are 3 options:
When the Job fails
When the job succeeds
When the job completes
I prefer to manage by exception – so usually only write to the application log if the job fails. There are circumstances where it is necessary to report a job success – in that case , use the When the job succeeds option.
Once the status is written to the Windows Application Log , you can use various methods to retrieve the error message.
SQL Server - DBCC ERRORLOG or exec master..sp_cycle_errorlog
SQL Server - Powershell and SQL Error Logs - SQL Server DBA
SQL Server Error Log Check - SQL Server DBA
This is only a preview. Your comment has not yet been posted.
As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.
Having trouble reading this image? View an alternate.
Posted by: |