Wednesday, March 28, 2012

help with SQL Agent job status

I have been using XP_SQLAGENT_ENUM_JOBS to get info on my jobs to see where
they are at in the process. It doesnt seem to always becorrect in its output,
however. XP_SQLAGENT_ENUM_JOBS is an undocumented proc inside of sp_help_jobs
and is used extensivly internally to get sql agent job info.
I am creating a web status page that is trying to emulate the
EM-->management-->sql server agent -->jobs status field. I would like to
reproduce the same info myself instead of relying on this sproc.
Thanks in advance!!
The SQL Server Agent jobs run in a job cache. Statuses are
written to the tables after the fact so you can't query
system tables. You can use sp_help_job as this executes the
extended stored procedure xp_sqlagent_enum_jobs to obtain
the current job status from the job cache.
Enterprise Manager uses sp_help_job.
-Sue
On Wed, 11 Aug 2004 13:49:02 -0700, "Carl Henthorn"
<CarlHenthorn@.discussions.microsoft.com> wrote:

>I have been using XP_SQLAGENT_ENUM_JOBS to get info on my jobs to see where
>they are at in the process. It doesnt seem to always becorrect in its output,
>however. XP_SQLAGENT_ENUM_JOBS is an undocumented proc inside of sp_help_jobs
>and is used extensivly internally to get sql agent job info.
> I am creating a web status page that is trying to emulate the
>EM-->management-->sql server agent -->jobs status field. I would like to
>reproduce the same info myself instead of relying on this sproc.
>Thanks in advance!!
sql

No comments:

Post a Comment