Showing posts with label status. Show all posts
Showing posts with label status. Show all posts

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

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_job
s
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 outpu
t,
>however. XP_SQLAGENT_ENUM_JOBS is an undocumented proc inside of sp_help_jo
bs
>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!!

Monday, March 26, 2012

Help with sp_lock output

I am trying to figure out something in the dump of my sp_lock output
(sql server 2000)
spid Db Objectid IndId Type
Resource Mode Status
373 QADB 0 0 PAG
1:204097 S WAIT
What does an object id = 0 mean? i thought this always show the id of
an actual tableHi Derek,
The output you provided means that a shared lock is held on a page, not on a
table, hence the 0 value for objectid. Resource column states that the lock
is held on file id 1 page number 204097.
To easily work with locks and/or deadlocks, I suggest you try out the tool
called SQL Deadlock Detector. It monitors your database for locks and
deadlocks and
provides complete information on captured events. It tells you everything
you need to know (locked objects, blocked statements, blocking statements,
etc.) to solve your blocking/deadlock problems. The great thing about this
tool is it's event diagram which makes it exremely easy to see what exactly
is going on.
You can download it from here:
http://lakesidesql.com/downloads/DLD2/2_0_2007_809/DeadlockDetector2_Setup_08-09-2007.zip.
I've been using it for quite a while now (I purchased it) and find it very
handy and useful.
HTH.
"Derek" <gepetto_2000@.yahoo.com> wrote in message
news:1187376178.875402.209170@.d55g2000hsg.googlegroups.com...
>I am trying to figure out something in the dump of my sp_lock output
> (sql server 2000)
> spid Db Objectid IndId Type
> Resource Mode Status
> 373 QADB 0 0 PAG
> 1:204097 S WAIT
> What does an object id = 0 mean? i thought this always show the id of
> an actual table
>