Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

RAISEERROR not shown in Agent Job Log File Viewer

$
0
0

I use a RAISEERROR for a critical error in a CATCH. When the Job is run, it does fail but it gives the following message. How do i get my @Note to show in the Log File Viewer? Also, where is the log referenced 'WITH LOG'. I looked at the SQL Server Agent Log and did not see anything.

Message
Executed as user: NT AUTHORITY\SYSTEM. TCP Provider: The specified network name is no longer available. [SQLSTATE 08S01] (Error 64)  Communication link failure [SQLSTATE 08S01] (Error 64).  The step failed.

DECLARE @Note VARCHAR(500) = 'RAISEERROR due to Critical error'
RAISERROR (@Note, 20, 127) WITH LOG


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>