限制SQL Server只能让指定的机器连接

2016-01-29 16:01 2 1 收藏

限制SQL Server只能让指定的机器连接,限制SQL Server只能让指定的机器连接

【 tulaoshi.com - SQLServer 】

A. SQL Server has no built-in tools/facilities to do this. It also does not have the facility to run a stored-procedure on connection that could be written/used to do this. Therefore you have the following choices :-

SQL Server没有这样的功能,也没有提供在连接时执行某一特定过程的功能。这里介绍几种实现的方法

(本文来源于图老师网站,更多请访问https://www.tulaoshi.com/sqlserver/)

1. Put the SQL Server behind a firewall and use that to restrict access. This is the most secure and functional way to do what you want.

使用防火墙,它提供了安全和你想用的工具。

2. Write your own ODS Gateway and point the clients at that instead of the SQL Server - the ODS Gateway will then do the checking. However, there is nothing stopping clients figuring out the correct SQL client-config entries to point straight at the SQL Server. There are examples of ODS code in the SQL Programmers Toolkit - available for free download from the MS website.

写自己的ODS网关代替SQL Server的客户端 - 在ODS网关中检查。不过,这并不能停止正常的客户端连接SQL Server。在SQL Programmers Toolkit中有一个这样的例, 可以从微软站点免费下载。

(本文来源于图老师网站,更多请访问https://www.tulaoshi.com/sqlserver/)

3. Write a constantly running/scheduled stored-procedure that checks the relevant column in sysprocesses (net_address), and then issues a KILL command for any processes that should not be running. Note that this only works for MAC addresses. This way allows people to connect and possibly make changes before they are spotted and killed.

写一个存储过程检查sysprocesses中的相应列(net_address)

来源:https://www.tulaoshi.com/n/20160129/1497112.html

延伸阅读
在使用 SQL Server 的过程中,用户遇到的最多的问题莫过于连接失败了。一般而言,有以下两种连接 SQL Server 的方式,一是利用 SQL Server 自带的客户端工具,如企业管理器、查询分析器、事务探查器等;二是利用用户自己开发的客户端程序,如ASP 脚本、VB程序等,客户端程序中又是利用 ...
在发现了global.asa+.htr的bug之后,往往sql server数据库的ID和密码以明文的形式暴露在我们眼前,(写程序时候应该注意啦!)我试过几个国内知名的网站,象蚁盟的, 都可以得到他的数据库密码。于是如何进一步取得数据库的控制权限成为我们关注的问题。 有的朋友常常有了密码确连不进对方主机,下面我来说说连接时候需要注意的问题和...
标签: MySQL mysql数据库
一.设置客户端网络实用工具 点击“开始”-“程序”,在“Microsoft SQL Server”菜单中选择“客户端网络实用工具”。 screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='点击在新窗口查看全图\nCTRL+鼠标滚轮放大或缩小';}" border=0>  在“别名”选项中点击“添加”。 screen.width*0.7) {this.resize...
标签: SQLServer
错误提示:"An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Se...
在使用 SQL Server 的过程中,用户遇到最多的问题莫过于连接失败了。一般而言,有两种连接SQL Server 的方式,一是利用 SQL Server 自带的客户端工具,如企业管理器、查询分析器、事务探查器等;二是利用用户自己开发的客户端程序,如ASP 脚本、VB程序等,客户端程序中又是利用 ODBC 或者OLE DB等连接 SQL Server。下面,我们将就这两种连...

经验教程

217

收藏

90
微博分享 QQ分享 QQ空间 手机页面 收藏网站 回到头部