question

sunithalee143 avatar image
sunithalee143 asked

logins to sa

hello all, i am new to sql server admin, is it possible to add users to sa login in sql server 2005. please reply, its urgent.
sql-server-2005securitylogin
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Usman Butt avatar image
Usman Butt answered
First of all I would like to make the correction, that you do not add users to the logins but you create users for the logins. Moreover, a login can have associated users in different databases, but only **one user per database**. Since dbo user is already mapped to the "sa" login by default in each database, so you cannot add users to sa login until the default dbo user is there. And AFAIK, you cannot drop it since all members of the sysadmin fixed server role are always mapped to dbo.
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

ThomasRushton avatar image
ThomasRushton answered
"sa" in SQL Server is a login ID, not a user group. You could give out the password for sa so that many people can use it, however, this is security nightmare. Marginally less nightmarish is to add the users you want to the local admin group on the server hosting SQL Server, and make sure that that group is in the serveradmin role on SQL Server. A better approach is to set up a user group in Active Directory, and setting that group up as a member of the serveradmin role; then all you have to do is add the appropriate users to that AD group. Alternatively, you could create one user ID for each person and assign each of those to the serveradmin role. This makes it more obvious to the DBA who has access, but increases the management overhead. However, what you should definitely be doing is ensuring that only DBAs have serveradmin rights over your SQL Server(s), and assign other rights to users accordingly. See also: * sp_addsrvrolemember documentation: * CREATE LOGIN documentation: (look at the `WINDOWS` argument)
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

salum avatar image
salum answered
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.