[英]How to protect or hide backend data while using SQL server as Database?
Is it possible to hide the databases used in my application from the user.是否可以向用户隐藏我的应用程序中使用的数据库。 What I need is that when user opens SQL Server management studio, he should not see the databases used in my application developed in C# and VB6
我需要的是,当用户打开 SQL 服务器管理工作室时,他不应该看到我在 C# 和 VB6 中开发的应用程序中使用的数据库
There are 2 ways to forbid access to db content:有两种方法可以禁止访问数据库内容:
Accessing the database with a user login only gives access to the databases for which that use has been given permission.使用用户登录访问数据库只能访问已被授予权限的数据库。 Different users have access to different databases.
不同的用户可以访问不同的数据库。 Perhaps you have 3 users: root, admin, user.
也许您有 3 个用户:root、admin、user。
As a start point, try looking at http://msdn.microsoft.com/en-us/library/ms187936.aspx作为起点,请尝试查看http://msdn.microsoft.com/en-us/library/ms187936.aspx
You would need to revoke the permission 'VIEW ANY DATABASE' from the role PUBLIC (SQL SERVER 2005 onwards).From Stackoverflow.您需要从 PUBLIC 角色(从 SQL SERVER 2005 开始)撤销“查看任何数据库”的权限。来自 Stackoverflow。 For more details see a ans Hide SQL database from Management Studio
有关更多详细信息,请参阅 ans Hide SQL database from Management Studio
Don't grant the user permission to access the database.不要授予用户访问数据库的权限。 Instead embed credentials in to your program that allow it to access the DB via a dedicated account.
而是将凭据嵌入到您的程序中,以允许它通过专用帐户访问数据库。 When the user uses your program the program's user is granted access, but if the user tries connect directly he is denied access.
当用户使用你的程序时,程序的用户被授予访问权限,但如果用户尝试直接连接,他将被拒绝访问。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.