Log return value from exec sp in job agent (step) history?

  • Hi,
    I wonder if there's a quick way to have the return value from an EXEC stored-procedure Statement logged automatically in the Job steps history table...

    just before I construct my very own Tools 😉

    Thanks,
    Roer

  • DECLARE @Return int;
    EXEC @Return = MyProc;
    SELECT @Return; -- or try PRINT or RAISERROR

    John

  • I see, raising an exception could do the trick and produce an entry in the log...

  • --Deleted

    If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.

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

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