Thursday, March 29, 2012

Determine when currently executed job started

Hello!
I am trying to determine whether currently executed job is taking longer
than usual. I was wondering whether there is a way to determine start time
of currently executed job. I can use sp_help_job or xp_sqlagent_enum_jobs
but none of them reports this information.
Any advice is greatly appreciated,
Igor
Hi,
Query the MSDB..sysjobschedules table for below fields:-
active_start_date
active_end_date
active_start_time
active_end_time
Thanks
Hari
SQLServer MVP
"imarchenko" <igormarchenko@.hotmail.com> wrote in message
news:e8XavO6lFHA.1148@.TK2MSFTNGP12.phx.gbl...
> Hello!
> I am trying to determine whether currently executed job is taking longer
> than usual. I was wondering whether there is a way to determine start time
> of currently executed job. I can use sp_help_job or xp_sqlagent_enum_jobs
> but none of them reports this information.
> Any advice is greatly appreciated,
> Igor
>
>
|||Hari,
Sorry, I didn't make myself clear. I would like to determine when job
that is running at this moment started. Unfortunately, fields you mentioned
do not provide this information. For example, I just scheduled a job to run
every 2 minutes continuously and I see that active_start_date=20050802 and
active_start_time=0.
I can collect data about currently running jobs using
xp_sqlagent_enum_jobs or sp_help_job but data I need is not reported by
those procedures.
Thanks,
Igor
"Hari Prasad" <hari_prasad_k@.hotmail.com> wrote in message
news:e6dVhS6lFHA.3380@.TK2MSFTNGP12.phx.gbl...
> Hi,
> Query the MSDB..sysjobschedules table for below fields:-
> active_start_date
> active_end_date
> active_start_time
> active_end_time
> Thanks
> Hari
> SQLServer MVP
>
> "imarchenko" <igormarchenko@.hotmail.com> wrote in message
> news:e8XavO6lFHA.1148@.TK2MSFTNGP12.phx.gbl...
>

No comments:

Post a Comment