Find out the Owners of SQL Server Agent Jobs Using TSQL

Find out who are the owners of the SQL Server agent jobs with the help of below script.

SELECT    
J.name AS [Job Name]
,L.name AS [Job Owner]
FROM
msdb.dbo.sysjobs_view J
INNER JOIN master.dbo.syslogins L
ON J.owner_sid = L.sid
GO
Job NameJob Owner
DatabaseBackup – USER_DATABASES – DIFFsa
sp_delete_backuphistorysa
syspolicy_purge_historysa
DatabaseBackup – USER_DATABASES – FULLsa
sp_purge_jobhistorysa
CommandLog Cleanupsa
DatabaseBackup – SYSTEM_DATABASES – FULLsa

Leave a Reply

Your email address will not be published. Required fields are marked *