Sunday, February 19, 2012

How to know a Job Status from Stored Procedure

To execute a job from VB, I use stored procedure with T-SQL :

EXEC sp_start_job @.job_name = 'DTSName'

>From BOL, I know that procedure return 0 (success) or 1 (failure), but
that's only to tell user that job successfully started, right?
What I need is how to know is that job have already executed
successfully or
failed, so if success i will execute another code.

Please help me, thanksyou might want your DTS package to tell you when it fails or not and
based on that execute your next step of code. just a thought.

No comments:

Post a Comment