Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 querying the schedule for jobs

Author  Topic 

harshal_in
Aged Yak Warrior

633 Posts

Posted - 2003-04-25 : 08:31:54
hi,
is there any to get the info about the jobs that are running on the server by querying the database?
which tables are used to store all the info fo the schedule and steps to be executed?
thnxs in advance,
harshal.

Expect the UnExpected

ValterBorges
Master Smack Fu Yak Hacker

1429 Posts

Posted - 2003-04-25 : 08:37:43
look into


sp_help_jobschedule
sp_help_jobhistory
sp_help_jobstep

use msdb database





Edited by - ValterBorges on 04/25/2003 08:38:23
Go to Top of Page

harshal_in
Aged Yak Warrior

633 Posts

Posted - 2003-04-25 : 08:43:04
quote:

look into


sp_help_jobschedule
sp_help_jobhistory
sp_help_jobstep

use msdb database





Edited by - ValterBorges on 04/25/2003 08:38:23



yes I am aware of those but the timing they return is in numbers and
I wanted the time in proper format .is it possible?
regards,
harshal.

Expect the UnExpected
Go to Top of Page

ValterBorges
Master Smack Fu Yak Hacker

1429 Posts

Posted - 2003-04-25 : 08:58:07
Here Create A Temp table with all the right columns

INSERT INTO #Temp
EXEC sp_help_jobschedule


SELECT *, convert(datetime,date_created,103)
from #Temp


Also that is a good format that the sp's return it is the ISO date format.




Edited by - ValterBorges on 04/25/2003 09:01:54
Go to Top of Page

harshal_in
Aged Yak Warrior

633 Posts

Posted - 2003-04-25 : 09:21:06
quote:

Here Create A Temp table with all the right columns

INSERT INTO #Temp
EXEC sp_help_jobschedule


SELECT *, convert(datetime,date_created,103)
from #Temp


Also that is a good format that the sp's return it is the ISO date format.




Edited by - ValterBorges on 04/25/2003 09:01:54




ok thanks ,
I check it out.
regards,

harshal.

Expect the UnExpected
Go to Top of Page
   

- Advertisement -