使用密码保护SQL(2005)数据库不被更新 [英] Protect SQL (2005) database with password from updating

查看:74
本文介绍了使用密码保护SQL(2005)数据库不被更新的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
我正在使用具有SQL数据库的C#开发应用程序,我使用Linq连接与数据库进行通信.
我想用密码保护数据库,以防止任何主体形式更新它(插入/删除记录),我不在乎是否有人看到记录.
我正在使用SQL Server 2005,并且数据库文件位于客户端的同一台PC上(因为我的应用程序不是客户端/服务器应用程序),因此任何人都可以安装SQL Manager并对其进行访问.
有人可以给我一种防止数据库使用密码更新的方法吗?

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?

推荐答案

设置仅具有SELECT权限的用户,并通过该用户进行连接.
http://www.databasejournal.com/features/mssql/article.php/2246271/Managing-Users-Permissions-on-SQL-Server.htm [
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.


这篇关于使用密码保护SQL(2005)数据库不被更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆