How do we find out all the jobs related to the single database in a sql server?

How do we find out all the jobs related to the single database in a sql server?



USE msdb

GO

SELECT * FROM sysjobs (NOLOCK) WHERE job_id IN

(SELECT job_id FROM sysjobsteps (NOLOCK) WHERE database_name

 = 'database_name' OR step_name LIKE '%database_name%')













Share me any others methods ?

Comments

Popular posts from this blog

SSIS2008R2 Error: 0xC0209303 at Package:

SQL2008R2 Error: The remote copy of database "XXXXX" has not been rolled forward to a point in time that is encompassed in the local copy of the database log. (Microsoft SQL Server, Error: 1412)