Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

sa vs sysadmin

Posted on 2010-09-13
19
Medium Priority
?
1,247 Views
Last Modified: 2012-05-10
are both these the same or 2 different things in SQL Server?

Thanks
0
Comment
Question by:anushahanna
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 10
  • 7
  • 2
19 Comments
 
LVL 60

Expert Comment

by:chapmandew
ID: 33661637
same thing.
0
 
LVL 23

Expert Comment

by:Racim BOUDJAKDJI
ID: 33661644
sa is a login, meaning that it can establish a connection to the server AND that login has sysadmin level of priviledge.  sysadmin is a server level priviledge that allows any login which has it do pretty much anything no the server.  You may create a login with sysadmin priviledge that is different from sa.  sa is the just the default sysadmin of the server.
0
 
LVL 6

Author Comment

by:anushahanna
ID: 33661748
OK. so sa does not have anything to do with 'service account', right?
0
10 Questions to Ask when Buying Backup Software

Choosing the right backup solution for your organization can be a daunting task. To make the selection process easier, ask solution providers these 10 key questions.

 
LVL 60

Expert Comment

by:chapmandew
ID: 33661765
functionally, they do the same thing.  Racimo is correct in terms of login vs group

No, neither have anything to do with service accounts.
0
 
LVL 6

Author Comment

by:anushahanna
ID: 33662085
OK- the reason I ask is this:

I use the following SP to change the owner of the job to sa - this is the default sysadmin login that Racimo mentioned, right?
EXEC MSDB.dbo.sp_update_job @job_name = 'JobName', @owner_login_name = 'sa'

but in auditing i see that the account that ran the job was 'NT AUTHORITY\NETWORK SERVICE'. this is actually the service account on which SQL Server was started and is running on.

that is why i asked about the connection between sa (sysadmin) and sa (service/start account)..

can you see why it may shift like the above?
0
 
LVL 60

Expert Comment

by:chapmandew
ID: 33662095
I am assuming that the network service account is a member of the sysadmin group, right?
0
 
LVL 6

Author Comment

by:anushahanna
ID: 33662288
sysjobs also shows the job having sa as the owner of the job.
0
 
LVL 6

Author Comment

by:anushahanna
ID: 33662290
these are the sysadmins in the server

sa
BUILTIN\Administrators
NT AUTHORITY\SYSTEM
2 Local Users
1 Domain User
0
 
LVL 6

Author Comment

by:anushahanna
ID: 33662296
>>I am assuming that the network service account is a member of the sysadmin group

you want to check who is listed under BUILTIN\Administrators?
0
 
LVL 60

Expert Comment

by:chapmandew
ID: 33662314
So, NT AUTHORITY\SYSTEM is a sysadmin.  What user runs the SQLAgent service?

Can find this by running services.msc
0
 
LVL 6

Author Comment

by:anushahanna
ID: 33662419
NT AUTHORITY\NetworkService
runs both SQL and Agent Service.
0
 
LVL 60

Expert Comment

by:chapmandew
ID: 33662444
I suspected.  That is why you're seeing that account as running the job.  
0
 
LVL 6

Author Comment

by:anushahanna
ID: 33662556
so service account of Agent will override the owner of a job at any time?
0
 
LVL 60

Accepted Solution

by:
chapmandew earned 1000 total points
ID: 33662626
In this case, they are the same thing.
0
 
LVL 6

Author Comment

by:anushahanna
ID: 33662665
>>In this case, they are the same thing.

in every case, right?

->even if we gave a diff user here:
EXEC MSDB.dbo.sp_update_job @job_name = 'JobName', @owner_login_name = 'Tim'

it still would override and default to the service account of the agent?
0
 
LVL 60

Expert Comment

by:chapmandew
ID: 33662711
Good question.  My guess is that the service account would still show...but there is only one way to find out. :)
0
 
LVL 6

Author Comment

by:anushahanna
ID: 33662996
OK. I tried-I added a test login called Tim, added the same as user in the DB with read/write/exec (what is needed within the job), and the job has finished executing as Tim.
how do you understand that, in relation to our discussion?
0
 
LVL 23

Assisted Solution

by:Racim BOUDJAKDJI
Racim BOUDJAKDJI earned 1000 total points
ID: 33663379
<<OK. so sa does not have anything to do with 'service account', right?>>
As the name says, a service account is an account related to the OS rather than a sa which is exclusively related to SQL.
0
 
LVL 6

Author Comment

by:anushahanna
ID: 33663426
>>As the name says, a service account is an account related to the OS rather than a sa which is exclusively related to SQL.

thanks for the clarification, Racimo.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question