John
John

Reputation: 721

Transaction Log Backup

How can I check with SQL query whether transaction log backup every 15 minutes JOB is created or not?

Upvotes: 1

Views: 103

Answers (1)

Jonathan
Jonathan

Reputation: 26609

You could try looking in msdb.dbo.sysjobsteps and msdb.dbo.sysjobs for one with either the correct name or the correct command.

SELECT j.name, js.step_name, js.command
FROM msdb.dbo.sysjobs j
INNER JOIN msdb.dbo.sysjobsteps js ON j.job_id = js.job_id
INNER JOIN msdb.dbo.sysjobschedules jsch ON j.job_id = jsch.job_id
INNER JOIN msdb.dbo.sysschedules sch ON jsch.schedule_id = sch.schedule_id
WHERE sch.freq_subday_type = 4
AND sch.freq_subday_interval = 15

The documentation for freq_subday_type and freq_subday_interval can be found on the Microsoft Site.

freq_subday_type of 4 = minutes
freq_subday_interval = how many minutes

Upvotes: 1

Related Questions