Click here to Skip to main content
15,888,461 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi everybody,
I'm working on application in C# that has SQL database, I used the Linq connection to communicate with the database.
I want to protect the database with password to prevent any body form Updating it (insert/remove records) I don't care if anybody saw the records.
I'm using SQL server 2005, and the database file is on the same PC of the client (because my application is not client/server application) so any one can install SQL manager and have access to it.
can someone give me a way of protecting database from updating using password?
Posted

1 solution

Set up a user that has only SELECT permissions, and connect via that.
http://www.databasejournal.com/features/mssql/article.php/2246271/Managing-Users-Permissions-on-SQL-Server.htm[^]
You will need to create a separate user with full permissions with a different password.
 
Share this answer
 
Comments
thatraja 14-Dec-10 7:52am    
[Comment from OP(Moved from Answer)]
Execuse me, I want to give my application full access to the database so user can do anything with database through my application.
But what I want to prevent is the access to the database through Management tool and updating the database.

you said that if I created user with password and let my application connect through this user with full permissions, then how to prevent the system user who can access with full permissions?

thank you for being helpful..

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900