开发者

Setting a password for a DB in SQL 2005

开发者 https://www.devze.com 2023-01-08 21:16 出处:网络
I am writing a program in VS 2005 and I wanna control the access to one of the DBs in SQL Server 开发者_如何转开发2005 (Express)

I am writing a program in VS 2005 and I wanna control the access to one of the DBs in SQL Server 开发者_如何转开发2005 (Express) I mean, I do not like let other applications to connect to this server an access the data in this DB. What can I do?


Look into Application Roles. Once you set up a role, the application has to use a password to set that role. You would then need to restrict everything in your database to that role. The user would still connect as themselves, but they would also log in with the application role.

CREATE APPLICATION ROLE application_role_name
WITH PASSWORD = 'password'
0

精彩评论

暂无评论...
验证码 换一张
取 消