简体   繁体   中英

How to deny database access to login user sa and windows mode in SQL Server 2008 R2

I have create a username 'Rohi' and password 'Rohi@21' in SQL Server 2008 R2. Also set their roles like sysadmin and db_owner. Also have create the database and tables for this user. All this things I have done programatically using vb.net.

Now I am facing the issue that How to prevent the database from SQL server users like sa and Windows mode?

This database should only be accessible to user Rohi and not to anyone else. The database should not be accessible to SQL Server Logins (SA) or Windows Authentication Logins.

Is there a way to deny access to the database for other users ?

  • Contact Microsoft
  • Have them rewrite SQL Server.

This is the ONLY way to do it. By design, the SA and other server level administrators have access to all databases. If this is not acceptable, the only way to get this changed is to change the design of SQL Server.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM