I am having sysadmin privileges on SQL instance but i want to revoke the access on XYZ database only.
Simple answer you cannot. A sysadmin will have full access on all the SQL Server objects and resources.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
How to restrict sysadmin login(like: DBA Team member) access for any specific database.
eg: I am having sysadmin privileges on SQL instance but i want to revoke the access on XYZ database only.
Could you please help.
Thank you!!
Best Regards,
Nirvesh Kumar
I am having sysadmin privileges on SQL instance but i want to revoke the access on XYZ database only.
Simple answer you cannot. A sysadmin will have full access on all the SQL Server objects and resources.
For most scenarios, the answer is "no", because as a sysadmin you would have the ability to undo whatever restrictions were put into place.
However, if you are trying to restrict access to a specific column, for example, then the answer is "yes". You could use Always Encrypted on a column and not share the client certificate with that team member. They would only ever be able to see the encrypted values. You can test this yourself by viewing the AdventureWorks2016CTP3.Sales.CustomerPII column. It's encrypted, and you will never see the decrypted data unless the developer at Microsoft that deployed AdventureWorks2016CTP3 gives you the column master key.
HTH
Hi @Nirvesh Kumar ,
>>eg: I am having sysadmin privileges on SQL instance but i want to revoke the access on XYZ database only.
You cannot restrict sysadmin login access for specific database. The sysadmin role members have irrevocable administrative privileges on all server databases and resources.
Server and Database Roles in SQL Server
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.