如何在使用SQL Server作为数据库时保护或隐藏后端数据?

时间:2020-12-10 01:44:25

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 Server管理工作室时,他不应该看到我在C#和VB6中开发的应用程序中使用的数据库

4 个解决方案

#1


4  

There are 2 ways to forbid access to db content:

有两种方法可以禁止访问db内容:

  • Encrypting db content : will decrease performance
  • 加密数据库内容:会降低性能
  • Autorisations: you create a user specifically for your application, put it as db owner, and remove access for all users. And also you need to disable Windows Authentication connection in MsSQL server, so that admin cannot connect this way.
  • 自动清除:您专门为应用程序创建用户,将其作为数据库所有者,并删除所有用户的访问权限。此外,您还需要在MsSQL服务器中禁用Windows身份验证连接,以便管理员无法以这种方式连接。

#2


1  

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

#3


0  

You would need to revoke the permission 'VIEW ANY DATABASE' from the role PUBLIC (SQL SERVER 2005 onwards).From *. For more details see a ans Hide SQL database from Management Studio

您需要从角色PUBLIC(SQL SERVER 2005以后)撤消权限“查看任何数据库”。从*。有关更多详细信息,请参阅Management Studio中的ans Hide SQL数据库

#4


0  

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.

不授予用户访问数据库的权限。而是将凭据嵌入到您的程序中,以允许它通过专用帐户访问数据库。当用户使用您的程序时,程序的用户被授予访问权限,但如果用户尝试直接连接,则拒绝访问。

#1


4  

There are 2 ways to forbid access to db content:

有两种方法可以禁止访问db内容:

  • Encrypting db content : will decrease performance
  • 加密数据库内容:会降低性能
  • Autorisations: you create a user specifically for your application, put it as db owner, and remove access for all users. And also you need to disable Windows Authentication connection in MsSQL server, so that admin cannot connect this way.
  • 自动清除:您专门为应用程序创建用户,将其作为数据库所有者,并删除所有用户的访问权限。此外,您还需要在MsSQL服务器中禁用Windows身份验证连接,以便管理员无法以这种方式连接。

#2


1  

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

#3


0  

You would need to revoke the permission 'VIEW ANY DATABASE' from the role PUBLIC (SQL SERVER 2005 onwards).From *. For more details see a ans Hide SQL database from Management Studio

您需要从角色PUBLIC(SQL SERVER 2005以后)撤消权限“查看任何数据库”。从*。有关更多详细信息,请参阅Management Studio中的ans Hide SQL数据库

#4


0  

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.

不授予用户访问数据库的权限。而是将凭据嵌入到您的程序中,以允许它通过专用帐户访问数据库。当用户使用您的程序时,程序的用户被授予访问权限,但如果用户尝试直接连接,则拒绝访问。