SQL Server Performance

Capturing error messages in SQL Server

Discussion in 'General DBA Questions' started by siddhartha20, May 3, 2004.

  1. siddhartha20 New Member

    Hi,
    I want to capture error messages from within a stored procedure and parse it to extract table names and constraints from the message.Which could be used to feed the same stored proc again for recursive programming.It looks like this is not possible as BOL says.

    @@ERROR is the only part of a Microsoft® SQL Server™ 2000 error available within the batch, stored procedure, or trigger that generated the error. All other parts of the error, such as its severity, state, and message text containing replacement strings such as object names, are returned only to the application in which they can be processed using the API error handling mechanisms

    Does anyone know of an alternative way of doing it ?

Share This Page