Hi,
Is there anyway that we would be able to get the start time of the job
when it was started manually..I already looked into all the tables related
to jobs and everything gets updated only after the completion of the job.But
i would like to know the start time as soon as the job is started..Not aware of any. A work around:
add a step at the very beginning of the job, put something like "select 1"
in it. Then check job history after starting the job.
HTH
Quentin
"Karthik" <nkvatsan@.hotmail.com> wrote in message
news:eoOSuHHTDHA.2120@.TK2MSFTNGP10.phx.gbl...
> Hi,
> Is there anyway that we would be able to get the start time of the job
> when it was started manually..I already looked into all the tables related
> to jobs and everything gets updated only after the completion of the
job.But
> i would like to know the start time as soon as the job is started..
>|||Click on the job in Enterprise manager and view job history
It gets the time from sysjobhistory in the msdb database.
Regards
John|||sysjobhistory is not updated after the completion of the job. It gets an
update (or insert) after the completion of every step of every job.
"Karthik" <nkvatsan@.hotmail.com> wrote in message
news:eoOSuHHTDHA.2120@.TK2MSFTNGP10.phx.gbl...
> Hi,
> Is there anyway that we would be able to get the start time of the job
> when it was started manually..I already looked into all the tables related
> to jobs and everything gets updated only after the completion of the
job.But
> i would like to know the start time as soon as the job is started..
>|||Thanks for the reply...Well thats what i meant.I dont want to add a step at
the beginning of every job because we have 300 jobs...But i was thinking of
modifying the sp_start_job proc..But was just wondering is there any
undocumented sp that will give the start time of the job as soon as it is
started..
"Quentin Ran" <quentinran@.yahoo.com> wrote in message
news:OJ6TXgHTDHA.2260@.TK2MSFTNGP12.phx.gbl...
> sysjobhistory is not updated after the completion of the job. It gets an
> update (or insert) after the completion of every step of every job.
> "Karthik" <nkvatsan@.hotmail.com> wrote in message
> news:eoOSuHHTDHA.2120@.TK2MSFTNGP10.phx.gbl...
> > Hi,
> > Is there anyway that we would be able to get the start time of the job
> > when it was started manually..I already looked into all the tables
related
> > to jobs and everything gets updated only after the completion of the
> job.But
> > i would like to know the start time as soon as the job is started..
> >
> >
>|||The reason i wanted to know the start time is that i want to send
notification to the right group about the jobs that are taking more time
than the average run duration.I did already write scripts for that. But it
works only if the jobs are on their normal schedule because i can get the
next_run_time from sysjobschedule table. But if somebody starts the job
manually, i would like to know the start time for that so that i would be
able to calculate the rest of the information based on the start time of the
job..I hope i am clear on what i said...
"Quentin Ran" <quentinran@.yahoo.com> wrote in message
news:u2wkO$HTDHA.2148@.TK2MSFTNGP11.phx.gbl...
> Don't see why you need to do such check for so many jobs. A couple or
many,
> you may look at sp_add_jobstep to add the dummy step if so desire.
> I believe you are aware of the fact that if you need to start a job after
> another one, you can do it in a separate job to launch them one after the
> other.
> Quentin
>
> "Karthik" <nkvatsan@.hotmail.com> wrote in message
> news:e26Rx4HTDHA.1576@.TK2MSFTNGP12.phx.gbl...
> > Thanks for the reply...Well thats what i meant.I dont want to add a step
> at
> > the beginning of every job because we have 300 jobs...But i was thinking
> of
> > modifying the sp_start_job proc..But was just wondering is there any
> > undocumented sp that will give the start time of the job as soon as it
is
> > started..
> > "Quentin Ran" <quentinran@.yahoo.com> wrote in message
> > news:OJ6TXgHTDHA.2260@.TK2MSFTNGP12.phx.gbl...
> > > sysjobhistory is not updated after the completion of the job. It gets
> an
> > > update (or insert) after the completion of every step of every job.
> > >
> > > "Karthik" <nkvatsan@.hotmail.com> wrote in message
> > > news:eoOSuHHTDHA.2120@.TK2MSFTNGP10.phx.gbl...
> > > > Hi,
> > > > Is there anyway that we would be able to get the start time of the
> job
> > > > when it was started manually..I already looked into all the tables
> > related
> > > > to jobs and everything gets updated only after the completion of the
> > > job.But
> > > > i would like to know the start time as soon as the job is started..
> > > >
> > > >
> > >
> > >
> >
> >
>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment