RAISERROR not showing custom message in job history

  • So I have two steps in my job that check conditions and call RAISERROR to gracefully complete the job if those conditions are met (meaning I only want the final step to run in a specific situation). Works great, except for some reason my messages are not making it into the log. It is appending the SQLSTATE, and a default error instead of anything that I'm putting into RAISERROR.

    Does someone have the appropriate proper syntax of making sure that your error code and message appear in the job history log?

  • Did you use WITH LOG ..

    RAISERROR('text', 16, 1) WITH LOG

    --

    SQLBuddy

  • Yeah, I just noticed I forgot that on there 🙁 Ugh.! Thanks 🙂

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

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