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
======================================
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.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.