4

我可以根据客户端 IP 地址限制对 SQL Server 2008 数据库中特定数据库的访问吗?如果是这样,我该怎么做?此服务器上有多个数据库,因此我们无法根据 IP 阻止对 SERVER 的访问,只能阻止特定的 DATABASE。

4

3 回答 3

2

You absolutely cannot do this at database granularity. You are talking about detecting things like queries using three part names ([banned_db].[dbo].[table]) and synonyms referencing the protected DB while using an unprotected DB. There just isn't any framework in place to do such. You must rely on access security (GRANT/DENY/REVOKE). At best, do what gbn suggests and separate the protected DB into it's own instance and then use Firewall rules to protect its ports.

于 2012-08-10T14:35:12.687 回答
1

目前无法根据您来自的网段限制对特定数据库的访问。我可以看到需要限制从阶段服务器对生产数据库的访问。我想这就是为什么需要为每个环境构建不同的 SQL 服务器的原因。

我相信您可以通过应用程序限制 SQL 访问http://msdn.microsoft.com/en-us/library/bb669062.aspx

于 2012-11-15T21:33:21.590 回答
1

就个人而言,我会使用安全性来做到这一点。通过权限而不是通过 IP 限制访问。

如果您确实需要 IP 地址安全(例如,对于瑞士或新加坡等银行保密司法管辖区),请使用单独的服务器

于 2012-08-10T14:28:58.167 回答