问题
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