Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HowTo Generate List of SQL Server Jobs and their owners

Tags:

sql-server

How would I go about generating a list of sql jobs and their owners? I would also like to be able to generate this list for SSIS packages also.

Thanks

like image 709
Mike Murphy Avatar asked Sep 21 '10 13:09

Mike Murphy


People also ask

How do you find who created jobs in SQL Server?

You can query in msdb sysjobs to get the name of the job and then using where condition you can find out which other server have the same job. If you have many database server then you can use cursor to run through all your listed server and get the required information. Thanks.

How do I get a list of jobs and schedules in SQL Server?

EVENTS table, so you can run "SELECT * FROM INFORMATION_SCHEMA. EVENTS" to see the list of scheduled jobs and information about them.


1 Answers

try this

Jobs

select s.name,l.name  from  msdb..sysjobs s   left join master.sys.syslogins l on s.owner_sid = l.sid 

Packages

select s.name,l.name  from msdb..sysssispackages s   left join master.sys.syslogins l on s.ownersid = l.sid 
like image 57
SQLMenace Avatar answered Sep 21 '22 07:09

SQLMenace