Error Handling

  • I am looking for suggestions as to how best to handle errors (i.e., data row not found; database corrupted; etc.) from within a stored procedure run as a batch job via DTS.

    To date, I have only used raiserror to send a message to the .Net application (not in batch mode) and xp_sendmail to email the user. How do I send SQL errors to a system file or otherwise "collect" errors during the batch job and notify the user or the devloper? I suppose I could write the error messages to a database table and then send them via email. Is there an easier way?

    Thank you.

  • Raiserror can log them. Look at the options in BOL.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply