Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

It is possible to find out if a specified MS SQL job is running or not 2

Status
Not open for further replies.

pmscraiova

Programmer
Dec 8, 2001
86
RO
Hello,
It is possible to find out if a specified MS SQL job is running or not?
Best regards,
Eugen
 
This might not be what you mean, but if you go to Management - SQL Server Agent in Enterprise Manager, and choose Jobs, you get a list of Jobs, and whether they are running.
 
If you put a dummy first step into the job then you can check msdb..sysjobhistory for that.

You can also use masdb..sp_help_job and look at current_execution_status

Have a look at sp_get_composite_job_info to see how it gets the execution status.

======================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
 
Thank you for your answers.
Actually I am talking about a replication job, and I want to programmatically test to see if the job is in progress from a client application.
Best regards,
Eugen
 
Call msdb..sp_help_job is probably best.

======================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top