Get Job Details from Sql Server 2005

We are doing a database audit and we had to get all the jobs running on a particular server and the time at which it is run. So wrote a quick script as given below to get it:

 'Scheduled at ' + LEFT(RIGHT('000000' + CAST(next_run_time AS VARCHAR(10)),6),2) + ':' +
 SUBSTRING(RIGHT('000000' + CAST(next_run_time AS VARCHAR(10)),6),3,2) + ':' +
 RIGHT(RIGHT('000000' + CAST(next_run_time AS VARCHAR(10)),6),2)
 dbo.sysjobs j LEFT OUTER JOIN dbo.sysJobSchedules s ON

Hope it helps.

Happy Programming!!!




0 Responses to “Get Job Details from Sql Server 2005”

  1. Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: