How to Query a sql job

J

JC

I start a job on sql server via sp_start_job, i then need to wait until that
job completes and run some other jobs, how can i get the job history from
this job via a stored proc in c#.

jc
 
D

Doug Perkes

JC,

All job histories are stored in the MSDB.dbo.syshobhistory table. You can
query that database and check the run_status field to determine if the job
has completed or failed.

HTH,

Doug Perkes
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top