Showing posts with label idle. Show all posts
Showing posts with label idle. Show all posts

Wednesday, March 28, 2012

job status

Hi,
Is it possible to find out the current status of a job (sql 2000 sql job),
i.e. whether it is idle/running/failed, etc
Thanks in advance!!Try giving select privilages to msdb..sysjobhistory and msdb..sysjobs
tables.
select name,run_status from msdb..sysjobhistory a,sysjobs b
where a.job_id=b.job_id
and name='name of the job'
explanation for run_status:- You could write a case statement with
run_status with below description.
0 = Failed
1 = Succeeded
2 = Retry
3 = Canceled
4 = In progress
Thanks
Hari
"AppleDopod" <hk_007@.hotmail.com> wrote in message
news:%23NlymnYUHHA.4872@.TK2MSFTNGP03.phx.gbl...
> Hi,
> Is it possible to find out the current status of a job (sql 2000 sql job),
> i.e. whether it is idle/running/failed, etc
> Thanks in advance!!
>|||Please have a look at this script:
http://www.replicationanswers.com/Downloads/KillRunningJobs.txt. You can
use -- 1 = Executing, 2 = Waiting For Thread, 3 = Between Retries, 4 = Idle,
5 = Suspended, 6 = [obsolete], 7 = PerformingCompletionActions to modify it
as you like.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.comsql

job status

Hi,
Is it possible to find out the current status of a job (sql 2000 sql job),
i.e. whether it is idle/running/failed, etc
Thanks in advance!!Try giving select privilages to msdb..sysjobhistory and msdb..sysjobs
tables.
select name,run_status from msdb..sysjobhistory a,sysjobs b
where a.job_id=b.job_id
and name='name of the job'
explanation for run_status:- You could write a case statement with
run_status with below description.
0 = Failed
1 = Succeeded
2 = Retry
3 = Canceled
4 = In progress
Thanks
Hari
"AppleDopod" <hk_007@.hotmail.com> wrote in message
news:%23NlymnYUHHA.4872@.TK2MSFTNGP03.phx.gbl...
> Hi,
> Is it possible to find out the current status of a job (sql 2000 sql job),
> i.e. whether it is idle/running/failed, etc
> Thanks in advance!!
>|||Please have a look at this script:
http://www.replicationanswers.com/D...unningJobs.txt. You can
use -- 1 = Executing, 2 = Waiting For Thread, 3 = Between Retries, 4 = Idle,
5 = Suspended, 6 = [obsolete], 7 = PerformingCompletionActions to modify
it
as you like.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com

job status

Hi,
Is it possible to find out the current status of a job (sql 2000 sql job),
i.e. whether it is idle/running/failed, etc
Thanks in advance!!
Try giving select privilages to msdb..sysjobhistory and msdb..sysjobs
tables.
select name,run_status from msdb..sysjobhistory a,sysjobs b
where a.job_id=b.job_id
and name='name of the job'
explanation for run_status:- You could write a case statement with
run_status with below description.
0 = Failed
1 = Succeeded
2 = Retry
3 = Canceled
4 = In progress
Thanks
Hari
"AppleDopod" <hk_007@.hotmail.com> wrote in message
news:%23NlymnYUHHA.4872@.TK2MSFTNGP03.phx.gbl...
> Hi,
> Is it possible to find out the current status of a job (sql 2000 sql job),
> i.e. whether it is idle/running/failed, etc
> Thanks in advance!!
>
|||Please have a look at this script:
http://www.replicationanswers.com/Downloads/KillRunningJobs.txt. You can
use -- 1 = Executing, 2 = Waiting For Thread, 3 = Between Retries, 4 = Idle,
5 = Suspended, 6 = [obsolete], 7 = PerformingCompletionActions to modify it
as you like.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com

Friday, March 23, 2012

job run when idle

I'm trying to get a SQL Agent scheduled job working using the Schedule
Type of 'Start whenever the CPUs become idle', but it doesn't seem to
be working.
I setup a maintenance task to check db integrity (as a test), set it
to run today in about 2 minutes, changed the Schedule type to 'Start
on idle' and the 'Define idle CPU condition' and watched CPU
utilization and the monitor to see if it runs, but it never does.
What step am I missing?
Thanks!
Chris
I don't use this feature, and don't know anybody who uses this feature
(though that doesn't mean nobody uses it). The reason is that for a SQL
Server job, it's better to know when it'll run than it is to leave it to
'random' chances.
Linchi
"cbtechlists@.gmail.com" wrote:

> I'm trying to get a SQL Agent scheduled job working using the Schedule
> Type of 'Start whenever the CPUs become idle', but it doesn't seem to
> be working.
> I setup a maintenance task to check db integrity (as a test), set it
> to run today in about 2 minutes, changed the Schedule type to 'Start
> on idle' and the 'Define idle CPU condition' and watched CPU
> utilization and the monitor to see if it runs, but it never does.
> What step am I missing?
> Thanks!
> Chris
>
|||I'm with Linchi, CPU utilization jobs generally shouldn't be used. I
would use the performance counters on the machine to keeps a log for
an average day/week of work and design a date/time strategy around
that. It should give you the best times to run these types of things,
i.e. low cpu + low I/O + low users @. 4:00 am everyday. Also take into
account any data loads or batch executions of programs or ones that
users manually do.
On Mar 20, 9:44Xam, Linchi Shea <LinchiS...@.discussions.microsoft.com>
wrote:
> I don't use this feature, and don't know anybody who uses this feature
> (though that doesn't mean nobody uses it). The reason is that for a SQL
> Server job, it's better to know when it'll run than it is to leave it to
> 'random' chances.
> Linchi
>
> "cbtechli...@.gmail.com" wrote:
>
>
> - Show quoted text -

job run when idle

I'm trying to get a SQL Agent scheduled job working using the Schedule
Type of 'Start whenever the CPUs become idle', but it doesn't seem to
be working.
I setup a maintenance task to check db integrity (as a test), set it
to run today in about 2 minutes, changed the Schedule type to 'Start
on idle' and the 'Define idle CPU condition' and watched CPU
utilization and the monitor to see if it runs, but it never does.
What step am I missing?
Thanks!
ChrisI don't use this feature, and don't know anybody who uses this feature
(though that doesn't mean nobody uses it). The reason is that for a SQL
Server job, it's better to know when it'll run than it is to leave it to
'random' chances.
Linchi
"cbtechlists@.gmail.com" wrote:
> I'm trying to get a SQL Agent scheduled job working using the Schedule
> Type of 'Start whenever the CPUs become idle', but it doesn't seem to
> be working.
> I setup a maintenance task to check db integrity (as a test), set it
> to run today in about 2 minutes, changed the Schedule type to 'Start
> on idle' and the 'Define idle CPU condition' and watched CPU
> utilization and the monitor to see if it runs, but it never does.
> What step am I missing?
> Thanks!
> Chris
>|||I'm with Linchi, CPU utilization jobs generally shouldn't be used. I
would use the performance counters on the machine to keeps a log for
an average day/week of work and design a date/time strategy around
that. It should give you the best times to run these types of things,
i.e. low cpu + low I/O + low users @. 4:00 am everyday. Also take into
account any data loads or batch executions of programs or ones that
users manually do.
On Mar 20, 9:44=A0am, Linchi Shea <LinchiS...@.discussions.microsoft.com>
wrote:
> I don't use this feature, and don't know anybody who uses this feature
> (though that doesn't mean nobody uses it). The reason is that for a SQL
> Server job, it's better to know when it'll run than it is to leave it to
> 'random' chances.
> Linchi
>
> "cbtechli...@.gmail.com" wrote:
> > I'm trying to get a SQL Agent scheduled job working using the Schedule
> > Type of 'Start whenever the CPUs become idle', but it doesn't seem to
> > be working.
> > I setup a maintenance task to check db integrity (as a test), set it
> > to run today in about 2 minutes, changed the Schedule type to 'Start
> > on idle' and the 'Define idle CPU condition' and watched CPU
> > utilization and the monitor to see if it runs, but it never does.
> > What step am I missing?
> > Thanks!
> > Chris- Hide quoted text -
> - Show quoted text -sql