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


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

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