简体   繁体   English

如何在SQL Server 2008 R2中拒绝对登录用户sa和Windows模式的数据库访问

[英]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. 我在SQL Server 2008 R2中创建了用户名“ Rohi”和密码“ Rohi @ 21”。 Also set their roles like sysadmin and db_owner. 还设置他们的角色,例如sysadmin和db_owner。 Also have create the database and tables for this user. 还必须为此用户创建数据库和表。 All this things I have done programatically using vb.net. 我使用vb.net以编程方式完成了所有这些工作。

Now I am facing the issue that How to prevent the database from SQL server users like sa and Windows mode? 现在,我面临一个问题,即如何防止SQL Server用户(如sa和Windows模式)使用数据库?

This database should only be accessible to user Rohi and not to anyone else. 该数据库只能由Rohi用户访问,其他任何人都不能访问。 The database should not be accessible to SQL Server Logins (SA) or Windows Authentication Logins. SQL Server登录名(SA)或Windows身份验证登录名不应访问该数据库。

Is there a way to deny access to the database for other users ? 有没有办法拒绝其他用户访问数据库?

  • Contact Microsoft 与微软联系
  • Have them rewrite SQL Server. 让他们重写SQL Server。

This is the ONLY way to do it. 这是唯一的方法。 By design, the SA and other server level administrators have access to all databases. 通过设计,SA和其他服务器级别的管理员可以访问所有数据库。 If this is not acceptable, the only way to get this changed is to change the design of SQL Server. 如果这是不可接受的,则更改此内容的唯一方法是更改​​SQL Server的设计。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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