Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««123»»

SQL Server Agent jobs running under SA Expand / Collapse
Author
Message
Posted Thursday, June 20, 2013 7:11 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: 2 days ago @ 7:14 AM
Points: 7,197, Visits: 6,341
I don't believe it's on a DMZ, but that's something I'd need to ask the server team.

EDIT: I'm pretty sure it's not as our corporate security guidelines are specifically against allowing a SQL Server on the DMZ. But I'm still going to ask the question of the server team just to be sure.


Brandie Tarvin, MCITP Database Administrator

Webpage: http://www.BrandieTarvin.net
LiveJournal Blog: http://brandietarvin.livejournal.com/
On LinkedIn!, Google+, and Twitter.

Freelance Writer: Shadowrun
Latchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.
Post #1465676
Posted Thursday, June 20, 2013 9:20 AM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Friday, August 15, 2014 5:01 PM
Points: 1,613, Visits: 1,539
Brandie Tarvin (6/20/2013)
[quote]wolfkillj (6/19/2013)

2) Database ownership? You mean as in who owns MSDB? Well, now that I look at it, the SA account does own MSDB. I wonder if that's the issue.

Does this make sense to everyone? MSDB being owned by SA would force other accounts to use its credentials when running jobs?


No. msdb is always owned by the sa account.




My blog: SQL Soldier
Twitter: @SQLSoldier
My book: Pro SQL Server 2008 Mirroring
Microsoft Certified Master: SQL Server 2008
Principal DBA: Outerwall, Inc.
Also available for consulting: SQL DBA Master
Post #1465768
Posted Thursday, June 20, 2013 9:38 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: 2 days ago @ 7:14 AM
Points: 7,197, Visits: 6,341
Robert Davis (6/20/2013)
msdb is always owned by the sa account.


Not true, actually.


Brandie Tarvin, MCITP Database Administrator

Webpage: http://www.BrandieTarvin.net
LiveJournal Blog: http://brandietarvin.livejournal.com/
On LinkedIn!, Google+, and Twitter.

Freelance Writer: Shadowrun
Latchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.
Post #1465788
Posted Thursday, June 20, 2013 9:48 AM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Friday, August 15, 2014 5:01 PM
Points: 1,613, Visits: 1,539
Please tell us when it is not owned by sa barring someone doing something stupid like manually changing the owner from sa to another account.



My blog: SQL Soldier
Twitter: @SQLSoldier
My book: Pro SQL Server 2008 Mirroring
Microsoft Certified Master: SQL Server 2008
Principal DBA: Outerwall, Inc.
Also available for consulting: SQL DBA Master
Post #1465793
Posted Thursday, June 20, 2013 1:25 PM


SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Today @ 8:55 AM
Points: 980, Visits: 5,106
OK, I don't know if this might help, but I found a similar issue elsewhere:
Link to topic

Yes, it's from 1999 and concerns Sybase, but it sure sounds like a similar issue. It also sounds like there was never really a "fix" for the issue.

Not sure if this will help, but it likely won't hurt...

Jason
(PS, I do see on one of my servers in sysprocesses an NTLogin showing a LoginName of SA right now. This is for the "FSAgent Task" which some quick Googleing shows as being used by the FileStream feature (which we are using))
Post #1465908
Posted Thursday, June 20, 2013 1:28 PM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Friday, August 22, 2014 8:05 AM
Points: 1,222, Visits: 2,545
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.


Jason Wolfkill
Blog: SQLSouth
Twitter: @SQLSouth
Post #1465909
Posted Thursday, June 20, 2013 1:45 PM


SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Today @ 8:10 AM
Points: 944, Visits: 2,964
This may be a bit of a DUHHHHH, but who owns these jobs???

I seem to remember, a long time ago, in a galaxy far away, the same issue when the user who owned the job ran it manually.


Michael L John
To properly post on a forum:
http://www.sqlservercentral.com/articles/61537/
Post #1465915
Posted Thursday, June 20, 2013 2:34 PM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Friday, August 22, 2014 12:19 PM
Points: 2,107, Visits: 3,582
From the first post. Easy to overlook with all the discussion though. :)

They are owned by the same domain account that the SQL Server Agent uses.


Good thought though.


David

@SQLTentmaker
SQL Tentmaker
“He is no fool who gives what he cannot keep to gain that which he cannot lose” - Jim Elliot
Post #1465942
Posted Friday, June 21, 2013 12:02 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: 2 days ago @ 6:54 PM
Points: 1,193, Visits: 1,666
I'd like to question if it is actually running as sa.
Is it the same if you use sys.dm_exec_sessions rather than the old sysprocesses?

Also can you write the current security context info to a table from the job? Or add a jobstep with
print SUSER_SNAME()

and tick "include step output in history"
Post #1466053
Posted Friday, June 21, 2013 4:43 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: 2 days ago @ 7:14 AM
Points: 7,197, Visits: 6,341
foxxo (6/21/2013)
I'd like to question if it is actually running as sa.
Is it the same if you use sys.dm_exec_sessions rather than the old sysprocesses?

Also can you write the current security context info to a table from the job? Or add a jobstep with
print SUSER_SNAME()

and tick "include step output in history"


You know, that's a very good question (about the sys catalog thing). I need to check that out.

I did add the PRINT code to one of the other jobs (which has a similar setup) and got back the domain account instead of SA. We have several of these restore jobs, which we only need to run manually if they fail for some reason. We've gotten the SA account notification for those other jobs on intermittent occasions too.

So I'll test this on the job I am having to run manually today and compare the two table views.


Brandie Tarvin, MCITP Database Administrator

Webpage: http://www.BrandieTarvin.net
LiveJournal Blog: http://brandietarvin.livejournal.com/
On LinkedIn!, Google+, and Twitter.

Freelance Writer: Shadowrun
Latchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.
Post #1466125
« Prev Topic | Next Topic »

Add to briefcase ««123»»

Permissions Expand / Collapse