SA to be denied Access

  • I want to create a database whose owner will be a login having the "Database Creators" Server Role. Take for example the database created is named "market" created by the login "amit" so invariably the dbo for "market" is "amit".

    No other user is granted access to this database. The DB is created in Enterprise Manager. Now I want to restrict the sa of the SQL Server from gaining access to this DB.

    Can this be done. Is it mandatory that the sa be treated as the "GOD" having access to all the databases in the SQL Server he is the administrator of.

    Regards,

    Amit Prabhu


    Regards,
    Amit Prabhu

  • Accounts with SA rights have access to the lot. I don't know of a way to restrict sa access

    Steven

  • Hi Amit,

    sa is a member of the SYSADMIN role and this can't be changed. Can you clarify a bit more what you're trying to do. You see, the "owner" will always be a login that is a member of "dbo" database role while the "database creator" is a separate issue. What is the need to restrict the sa from the database

    Regards,

    DeltaKilo

  • Can't restrict sa, similar to the inability of restricting the domain admin. what is missing, however, is the auditing ability (or the take ownership tracking) in SQL. I've seen this quite a bit and I hope it gets corrected, in disallowing sysadmins to "read" all data by default.

    Steve Jones

    steve@dkranch.net

  • You can sort of restrict 'domain admins' by removing the builtin/admin for the admin group (not exactly advisable) as this can cause problems with full text indexing etc.

    Steven

  • There are a few articles on removing admins from SQL. Not too bad in SS2K.

    I was more referring to restricting admins on the network,not SQL.

    Steve Jones

    steve@dkranch.net

  • sa is the owner of all the objects.But when the user say amit, if he creates the tables you can see him under the owner column in the EM.So, instead of dbo you can see him as the owner of those tables,but you cannot restrict the sa from accessing those objects.

    As others have mentioned you can simply restrict buitin\admins accounts from accessing the objects by removing them.

  • My understanding of the SA user account is that it should be used sparingly. As in, give it a complex password, lock it up in a safe and use it only in emergencies. If no one knows the password, the account theoretically can't be used to access the server/s.

    If you can do the above and make all of your Administrators members of the "sysadmin" fixed server role, will this accomplish what's being discussed? If you need to restrict all Administrators from this specific database, don't assign anyone to the "sysadmin" role. However, this will probably complicate your life as you try to administer your system/s.

    Any thoughts on the SA account use, and how much it should be used, or is commonly used?

    cabby2583

    caballero@mediaone.net

    Always Learn!

  • Hi Cabby,

    you can't restrict access to an sa user or a member of the Sysadmin role. I see where you're coming from but if you remove people from the sysadmin role that removes "God" access on all databases .... so yep, a complication indeed 🙂

  • Hi

    Its not a problem really, the DBA is the DBA and should be GOD when its comes the DB management and administration. To achieve this, only the DBA uses and knows the SA account (in dev/test/prod) and reworks the BUILTIN\Administrators login account to remove sysadmin access or possibly delete it all together and create a new custom version associated with better defined domain and local groups. In the case where mixed mode is used, the same ideas apply.

    Dont be bullied into giving away the SA account, it should remain flexible enough to alter its password at any time (ie, dont go embedding it into dts jobs etc), look at it as your super account for emergancies and "dba" fixes only.

    Like in oracle with the sys account, its not going away, so they create a "system" account with slightly different privs etc (but still basically king). So manage the DB and the SA account as such.

    My big gripe is auditing in SQL-Server, its basically totally crap and needs a lot more time spent on it, including additional triggers for "on login", etc etc for custom jobs.

    Cheers

    Chris


    Chris Kempster
    www.chriskempster.com
    Author of "SQL Server Backup, Recovery & Troubleshooting"
    Author of "SQL Server 2k for the Oracle DBA"

  • I tend to agree with Chris. SQL needs some work in autditing, but the system admin account is not going away. I understand that people want to restrict the data that a sys admin can view, but the reality is that a DBA is charged with maintaining the data and will need access at some point to be able to troubleshoot or verify behavior.

    As such, the DBA must be trusted to not abuse this power. Encryption will solve some of that, but that is an extremely complicated infrastructure and one would not want to use it for data that needs to be joined or queried as part of a WHERE clause.

    I think you will have to handle this administratively.

    Steve Jones

    steve@dkranch.net

Viewing 11 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic. Login to reply