Restrict DBA from viewing Database user tables
It is possible to encrypt by using a symmetric key with a password as described here: http://www.mssqltips.com/sqlservertip/2840/sql-server-encryption-to-block-dbas-data-access/
February 11th, 2015 6:55am

That is DBA having all DB administration rights but cannot view user data.

Its impossible to restrict a DBA having sysadmin to restrict from viewing objects. 
Free Windows Admin Tool Kit Click here and download it now
February 11th, 2015 7:08am

...That is DBA having all DB administration rights but cannot view user data....

Hello Rishi,

as others have pointed out, if "all administration rights" means they indeed are members of the sysadmin server role, there is no chance.

But lets assume you are open and able to change that fact (which is why you are here I hope :). Then things become different.

You could work out a custom server role and respective SQL Agent role, to allow just the necessary tasks, and deny all others.

Especially when you are under SQL Server 2014, you can use the "DENY SELECT ALL USER SECURABLES".

Whilst this is not 100% secure - there are some ways to escape from such a "sandboxed" server role - it is not so obvious and easy to trick it without leaving traces. - So make sure you also have auditing set up in place and preventing access to the audit log files for the very same administrators.

I would also recommend you this article of mine as a starting point, to get an idea about the complexity of limiting permissions for administrators: New Permissions in SQL Server 2014: IMPERSONATE ANY LOGIN, SELECT ALL USER SECURABLES, CONNECT ANY DATABASE and the old CONTROL SERVER

February 11th, 2015 8:18am

Yes, you can restrict the DBA with sysadmin permissions from viewing data. See this:  http://www.mssqltips.com/sqlservertip/2840/sql-server-encryption-to-block-dbas-data-access/
Free Windows Admin Tool Kit Click here and download it now
February 11th, 2015 10:23am

Exactly!  And what happens when something goes wrong?  Who will diagnose and resolve the problem?
Free Windows Admin Tool Kit Click here and download it now
February 11th, 2015 10:49am

Thanks Andreas for your advice but unfortunately the sql server version are 2005-2008 and I believe custom server roles are possible only in sql 2012 and above. 

February 11th, 2015 11:55pm

column level encryption is a very complex and not feasible option as it all depends  destination colums which is varbinary and table in different databases and on multiple instances and very much sure this is going to effect application as well.
Free Windows Admin Tool Kit Click here and download it now
February 12th, 2015 12:00am

column level encryption is a very complex and not feasible option as it all depends  destination colums which is varbinary and table in different databases and on multiple instances and very much sure this is going to effect application as well.

Your best option would be to make a process to audit who and when sensitive data gets accessed through an audit mechanism instead of looking to close access doors for DBA which is close to impossible as you can see from numerous suggestions above. Audit info will make them accountable for their actions and would make sure they adhere to process.
February 12th, 2015 12:03am

Thanks Andreas for your advice but unfortunately the sql server version are 2005-2008 and I believe custom server roles are possible only in sql 2012 and above. 

That is correct. Unfortunately that information was missing.

SQL Server 2005-2008 are out of mainstream support for a reason. Too bad. Then you will have a hard time creating customized Logins. Not impossible but even more tricky and in the end most often not practical. Starting with SQL Server 2008 you at least have auditing. in 2005 you only have SQL Trace...

I can only advise to get an upgrade to the current version rolling. Good Luck.

Free Windows Admin Tool Kit Click here and download it now
February 12th, 2015 4:55am

Hi Specialists,

                   My Client does not want DBA to view user tables/Data in Sql server database on every instances  but can do all sql administration task like Backup/Restore,Database maintenance ,SqlAgent Jobs,Index maintenance,sql Cluster administartion.That is DBA having all DB administration rights but cannot view user data.

Let us know how this can be reached.

Regards

Rishi

February 12th, 2015 6:08am

My Client does not want DBA to view user tables/Data

Hello Rishi,

This is absolutely not possible, you can not restrict members of the SysAdmin role in any way. You would have to remove the user from SysAdmin role and grant otherwise permissions; but at lease one user must have SysAdmin permission.

Free Windows Admin Tool Kit Click here and download it now
February 12th, 2015 6:16am

Sorry this is not completely possible.

You will have access to all tables so long as you're the db owner. AFter all you should trust somebody. If DBAs want to their normal activties they would definitely require db owner level access which will also include access to these tables too.

What you can do alternatively is to have audit mechanism to audit who is accessing the sensitive tables if you want.

February 12th, 2015 6:18am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics