June 24, 2009 at 3:10 pm
Hi Guys,
I have an job that is running on one of our servers and I need to find out who created it. What is the best way to go about doing this? I scripted the job to a window and looked through it all but found nothing.
Thanks,
Code
June 24, 2009 at 3:43 pm
Try this:
SELECT J.name AS JobName
, L.name AS JobOwner
FROM msdb.dbo.sysjobs_view J
INNER JOIN
master.dbo.syslogins L
ON J.owner_sid = L.sid
June 24, 2009 at 3:47 pm
You can run this, but it will only tell you the current owner of the job, not who created it. If that person authenticated with Windows credentials when creating it, they will default to the owner of the job, but most SQL DBA's I know change that to SA to avoid issues with windows acocunts becoming inactive causing the job to fail.
exec msdb..sp_help_job @job_name = 'Some Job Name'
June 24, 2009 at 4:32 pm
Thanks guys. It's standard practice for our programmers to set the job owner as SA before deploying to production for the reasons you just mentioned, so unfortunately I'm still in a bind. Tanks for that proc though, it's definately handy. 😀
October 24, 2022 at 11:01 am
This was removed by the editor as SPAM
October 24, 2022 at 11:03 am
This was removed by the editor as SPAM
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply