• wolfkillj (6/20/2013)


    Well, I have to say I'm stumped.

    Just to clarify, I understood from what you've posted that the SQL Agent service startup account is a Windows domain account that is part of the sysadmin role, that the SQL Agent job is owned by a Windows domain account that is part of the sysadmin role, and that you run the job manually under your Windows domain account that is part of the sysadmin role. I can't think of any reason that the context would switch to sa for any reason.

    Your clarification is correct and I'm just as stumped as you are.

    BTW, I'm running that "other similar job" manually and it's running under the context of the SQL Server Agent domain account (the job's owner).

    Interesting note. There are multiple threads going on for it. I ran SP_WHO2 and SELECT * FROM sys.dm_exec_sessions and the code for pulling from sysprocesses.

    In the catalog view, everything looks correct. It has the domain account as the loginame and only one line in the view for the SPID (not multiple lines).

    In sysprocesses, it shows multiple lines with the first one having the proper loginame while the second one has a blank value for loginame.

    Not sure that means anything but throwing it out there anyway. I've got a second job that I'll need to run manually in a minute. I'll see if that does the same or different. BTW, this first job failed on multiple manual runs before I posted this, so it could have reset like the link Jason gave me mentioned.

    We'll see what the second job does.

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.