We can listout what are all the JOBs scheduled in our Instance.
1. To listout scheduled jobs in current instance:
USE master
Go
EXEC msdb.dbo.sp_help_job
(or)
SELECT * FROM msdb.dbo.sysjobs_view
2. To listout particular JOB's Steps, Schedules,...Etc
DECLARE @JOBID UNIQUEIDENTIFIER
SELECT @JOBID = job_id FROM msdb.dbo.sysjobs_view
WHERE name = 'JOB Name'
EXEC msdb.dbo.sp_help_jobstep @job_id=@JOBID
EXEC msdb.dbo.sp_help_jobschedule @job_id=@JOBID
No comments:
Post a Comment