How to find the Creator of an Agent Job

  • 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

  • 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

  • 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'

  • 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. 😀

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply