Web Development

General discussion


how to know if the sqlagent is started

By rene_chapuis ·
There is a procedure ' xp_sqlagent_is_started' which makes it possible to know to it agent sql is started.
but the returns value is always 0 , whatever the state of the agent. Why ?

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Comments

Collapse -

by AaronH In reply to how to know if the sqlage ...

The closest thing I could find was xp_sqlagent_is_starting. It is undocumented and doesn?t seem to be very friendly. What you can try doing is querying the sysprocesses table. If you look under the program_name column you can see how many occurrences of SQLAgent there are when nothing special is running. Then query the same value when something is running and see if it is a higher count. As an example: I typically have two entries for SQLAgent when my box is idle. If I start a SQLAgent backup job and look at the table again, I now have three entries for SQLAgent. The new one shows what step of the job the agent is on.

Hope that helps.

Related Discussions

Related Forums