I want to find all the jobs which are created by anyone other than sa.
I'm using below query:
select s.name,l.name
from msdb..sysjobs s
left join master.sys.syslogins l on s.owner_sid = l.sid
But owner name comes as null for users who are not part of server log in. Will the name or user id will be stored in any sys tables?
Aucun commentaire:
Enregistrer un commentaire