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

Deny member of sysadmin user access to databases Expand / Collapse
Author
Message
Posted Tuesday, March 12, 2013 9:18 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: 2 days ago @ 9:25 AM
Points: 194, Visits: 535
Hi, I am not sure if this is possible, but here goes.

Can a user who is a member of the sysadmin role have specific access rights revoked to restrict their access?

The problem I have is, we recently moved a number of databases from our 2005 instance to a new 2008 instance. One of the applications used a sql login which I configured and gave dbowner rights on its database and public rights on the server login. When the application was tested it kept failing with failed logins to SQL Server. After speaking with the application's support team they asked about the SQL Login and said the login should be a member of the sysadmin server role. I said I didn't want it to be as it is a security risk to our database server which is used by lots of other applications. I asked if they could tell me what specific rights the login needed, but they didn't know, only that it needed sysadmin rights. For the minute I have given it sysadmin rights and the application is working fine.

Obviously, I would like to restrict this user a bit, but it is difficult to know what rights it requires as the application company wont/cant tell me. Can you give a login sysadmin roles, but revoke access to the login for certain databases?

Any help would be great.
Post #1429894
Posted Tuesday, March 12, 2013 9:24 AM


SSCoach

SSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoach

Group: General Forum Members
Last Login: Today @ 12:05 AM
Points: 17,710, Visits: 15,580
No. You cannot prevent sa from accessing the databases through permissions.





Jason AKA CirqueDeSQLeil
I have given a name to my pain...
MCM SQL Server


SQL RNNR

Posting Performance Based Questions - Gail Shaw
Posting Data Etiquette - Jeff Moden
Hidden RBAR - Jeff Moden
VLFs and the Tran Log - Kimberly Tripp
Post #1429898
Posted Tuesday, March 12, 2013 9:33 AM


Keeper of the Duck

Keeper of the Duck

Group: Moderators
Last Login: Friday, September 26, 2014 7:52 AM
Points: 6,624, Visits: 1,873
In this scenario you would want to look at setting up a separate database instance. You could even run on the same server.


K. Brian Kelley, CISA, MCSE, Security+, MVP - SQL Server
Regular Columnist (Security), SQLServerCentral.com
Author of Introduction to SQL Server: Basic Skills for Any SQL Server User
| Professional Development blog | Technical Blog | LinkedIn | Twitter
Post #1429904
Posted Friday, March 15, 2013 3:14 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, May 19, 2014 12:53 PM
Points: 1, Visits: 27
Hi,

I would like to know what is the user's role .. basically on that particular db what the user does?? We don't prefer giving sysadmin rights to everyone .
I advice you if a user executing,reading, writing ,give him individual access else create a separate database , name it with different name,keep updating the data depending on the user requirement and give them complete rights.

Let me know if you got any other solution.


Thanks,
Swathi
Post #1431786
Posted Wednesday, March 20, 2013 3:37 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Today @ 12:34 AM
Points: 319, Visits: 524
You have fallen into a trap that I did some time ago. At least that is how it sounds.

A software vendor says "I need sysadmin/db_owner" or this software won't run"! I gave them those rights and ended up having to explain why one of them deleted a database they shouldn't have. Embarassing.

Now I ask the vendors what their application user needs to do and use a strict policy based on the application of minimum privilege. They don't like it (especially as most of the vendors don't really know what level of permission their user really needs!) and it makes me unpopular with some developers but then, they aren't the ones that have to pick up the pieces when they make a mistake.

The 'sa' account, sysadmin fixed server role and db_owner fixed database role should never be given out where it isn't strictly needed simply because they can do absolutely everything and privileges cannot be revoked from any of them.

It is always better to create a tailored account even if it means spending time on the phone treaking it until it does exactly what it is supposed to.
Post #1433089
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse