Hello folks,
I'm trying to use RAISERROR on my stored proc to log an error message to the event log. This is fine. The problem is, when I use SQLServerAgent to run the stored proc, the sqlagentjob reports failure everytime. How can I use the raiserror command and have the sqlagent job reports success?
Here's a sample (part) of the stored proc.
I'm trying to use RAISERROR on my stored proc to log an error message to the event log. This is fine. The problem is, when I use SQLServerAgent to run the stored proc, the sqlagentjob reports failure everytime. How can I use the raiserror command and have the sqlagent job reports success?
Here's a sample (part) of the stored proc.
Code:
raiserror('Test Error Message', 16,1) with log