using RAISERROR sev 16 | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

using RAISERROR sev 16

i am wondering about the behvaiour of SQL Server in different conditions using RAISERROR. i am using RAISERROR (msg, 16,1) at the beginning of a stored proc. In query analyzer, if the error is raised, the msg is output and the sp continues on. In a job however, when the error is raised, the job fails immediately without continuing on. Why does it do this? thx in advance
A severity of 16 produces a warning message in the event log. If its an informational message SQL tasks will be carried further and its a warning I think SQL stops the job functioning.
Can you post the TSQL used at your end. Satya SKJ
This posting is provided “AS IS” with no rights for the sake of knowledge sharing.
basically its something like this.. @p is a parameter to a SP if @p not in (‘a’,’b’,’c’)
raiserror (‘failed’,16,1) with log BACKUP DATABASE…