how to protect database from windows authentication

戏子无情 提交于 2021-02-11 15:32:10

问题


I want to deploy .net application on client machine.I don't know how to protect my database from from windows authentication. I want to access my database only from defined sqlserver authenticated user. I am Using sqlserver 2008 R2.


回答1:


From MSDN discussion:

You cannot disable Windows Authentication on SQL Server. In fact, SQL Server recognizes two modes of security: 1) Windows Authentication 2) SQL Server AND Windows Authentication

There's a way out, however. Users of the Adminstrators group of Windows are able to connect to the SQL Server because there's a login account in SQL Server for it and is assigned the System Administrators role. You'll need to delete that login. But before you do so, please be sure that 1) the security mode is set to SQL Server and Windows, and 2) you know the password of SQL Server's sa login Otherwise, you'll render your SQL Server inaccessible!

To do so, follow these steps: 1) Open SQL Server Enterprise Manager 2) Expand the nodes to reveal your SQL Server instance 3) Expand your SQL Server instance node to reveal the various nodes 4) Expand the Security node and click Logins 5) Right-click the BUILTIN\Administraors login and click Delete, click Yes when prompted for confirmation



来源:https://stackoverflow.com/questions/21700337/how-to-protect-database-from-windows-authentication

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!