SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


working with sa account


working with sa account

Author
Message
sej2008
sej2008
Mr or Mrs. 500
Mr or Mrs. 500 (551 reputation)Mr or Mrs. 500 (551 reputation)Mr or Mrs. 500 (551 reputation)Mr or Mrs. 500 (551 reputation)Mr or Mrs. 500 (551 reputation)Mr or Mrs. 500 (551 reputation)Mr or Mrs. 500 (551 reputation)Mr or Mrs. 500 (551 reputation)

Group: General Forum Members
Points: 551 Visits: 394
I am working with sql 2008 and using all features of security but not able to understand the need and usage of "sa" account can anyone throw light on it
and also the actual use of "public" role which exists in all databases in sql?
Thanks
Orlando Colamatteo
Orlando Colamatteo
SSCoach
SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)

Group: General Forum Members
Points: 19587 Visits: 14398
sa is like the Windows "Administrator" account for the instance. When logged in as sa you can do any action on the instance. Lots of people, including myself, like to disable the Login since it is a well known attack vector. If your instance is in Mixed Security Mode (most are), the sa Login is enabled and someone can crack the password they can gain control of the instance.

The public Database Role is a role all Users are a member of. Think of it as the "Everyone" group you see in Windows. It has limited privileges but all Users are a member of it and they cannot be removed from the Role.

__________________________________________________________________________________________________
There are no special teachers of virtue, because virtue is taught by the whole community. --Plato
sej2008
sej2008
Mr or Mrs. 500
Mr or Mrs. 500 (551 reputation)Mr or Mrs. 500 (551 reputation)Mr or Mrs. 500 (551 reputation)Mr or Mrs. 500 (551 reputation)Mr or Mrs. 500 (551 reputation)Mr or Mrs. 500 (551 reputation)Mr or Mrs. 500 (551 reputation)Mr or Mrs. 500 (551 reputation)

Group: General Forum Members
Points: 551 Visits: 394
yes I got your answer but still why public role exists when we have fixed database roles and user defined roles.what are the permission given to this role.
and regarding "sa" account when it is best to use this account.
Orlando Colamatteo
Orlando Colamatteo
SSCoach
SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)

Group: General Forum Members
Points: 19587 Visits: 14398
sej2008 (3/14/2013)
yes I got your answer but still why public role exists when we have fixed database roles and user defined roles.what are the permission given to this role.

It's like the "Everyone" Windows group. Members of public (i.e. everyone) inherits a base set of permissions all users need in order to work within the database. Things like SELECT on the Catalog View sys.tables.

The public Role can be used to also grant everyone a permission to a User-defined Object. Say you had a Stored Procedure you wanted everyone to be able to execute. You have the option of granting EXEC on that Stored Procedure to public, although that practice is discouraged in favor or creating a User-defined Database Role, granting EXEC on the Stored Procedure to the new Role, and then adding public as a member of the new Role, i.e. do not change the set of permissions granted directly to the public Role.

and regarding "sa" account when it is best to use this account.

You would use the sa Login when you needed to access the database instance as an "Administrator." Ideally though, I recommend adding specific Windows Domain Logins to the sysadmin Fixed Server Role and disabling the sa Login for the reasons previously mentioned.

__________________________________________________________________________________________________
There are no special teachers of virtue, because virtue is taught by the whole community. --Plato
sej2008
sej2008
Mr or Mrs. 500
Mr or Mrs. 500 (551 reputation)Mr or Mrs. 500 (551 reputation)Mr or Mrs. 500 (551 reputation)Mr or Mrs. 500 (551 reputation)Mr or Mrs. 500 (551 reputation)Mr or Mrs. 500 (551 reputation)Mr or Mrs. 500 (551 reputation)Mr or Mrs. 500 (551 reputation)

Group: General Forum Members
Points: 551 Visits: 394
Thanks so much
kevaburg
kevaburg
SSCrazy
SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)

Group: General Forum Members
Points: 2333 Visits: 1025
Just to clarify: When you change to mixed-mode authentication from Integrated Security the 'sa' account is by default disabled. If it is enabled then it is because a SYSADMIN has enabled it.....
kevaburg
kevaburg
SSCrazy
SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)

Group: General Forum Members
Points: 2333 Visits: 1025
opc.three (3/14/2013)
sa is like the Windows "Administrator" account for the instance. When logged in as sa you can do any action on the instance. Lots of people, including myself, like to disable the Login since it is a well known attack vector. If your instance is in Mixed Security Mode (most are), the sa Login is enabled and someone can crack the password they can gain control of the instance.

The public Database Role is a role all Users are a member of. Think of it as the "Everyone" group you see in Windows. It has limited privileges but all Users are a member of it and they cannot be removed from the Role.




Just to clarify: When you change to mixed-mode authentication from Integrated Security the 'sa' account is by default disabled. If it is enabled then it is because a SYSADMIN has enabled it.....
Orlando Colamatteo
Orlando Colamatteo
SSCoach
SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)

Group: General Forum Members
Points: 19587 Visits: 14398
kevaburg (3/20/2013)
opc.three (3/14/2013)
sa is like the Windows "Administrator" account for the instance. When logged in as sa you can do any action on the instance. Lots of people, including myself, like to disable the Login since it is a well known attack vector. If your instance is in Mixed Security Mode (most are), the sa Login is enabled and someone can crack the password they can gain control of the instance.

The public Database Role is a role all Users are a member of. Think of it as the "Everyone" group you see in Windows. It has limited privileges but all Users are a member of it and they cannot be removed from the Role.




Just to clarify: When you change to mixed-mode authentication from Integrated Security the 'sa' account is by default disabled. If it is enabled then it is because a SYSADMIN has enabled it.....

That is not my experience but I waited to respond so I could verify. When switching from Windows Authentication Mode to Mixed Mode the status of the sa Login is not changed. If it was enabled before the change it stays enabled.

__________________________________________________________________________________________________
There are no special teachers of virtue, because virtue is taught by the whole community. --Plato
kevaburg
kevaburg
SSCrazy
SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)

Group: General Forum Members
Points: 2333 Visits: 1025
Good point. I actually just wanted to say that if was disabled in Windows authentication it would remain disabled in mixed-mode. You have cleared that point up!
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search