views:

19

answers:

1

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?

A: 

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'
Tom H.