How to restrict SQL Server to only the specified machine connection

Source: Internet
Author: User
Tags connect sql client client firewall
Server Q. How can I restrict access to me SQL Server so, it only allows certain machines to connect?
(v1.0 19.10.1998)


How can I restrict my SQL Server to only the specified machine connection


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

SQL Server does not have such a feature, nor does it provide the ability to perform a specific procedure when connected. Here are some ways to implement

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

Using a firewall, it provides security and the tools you want to use.

2. Write your own ODS gateway and point the clients in that instead of the SQL server-the ODS Gateway would then do the C Hecking. However, there is no stopping clients figuring out of correct SQL Client-config to point entries at the SQL Server. There are examples of the ODS code in the SQL programmers toolkit-available to free download to the the MS website.

Write your own ODS gateways instead of SQL Server clients-check in the ODS gateway. However, this does not stop the normal client from connecting to SQL Server. There is an example in SQL Programmers Toolkit that can be downloaded free of charge from the Microsoft site.

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

Write a stored procedure to check the corresponding column (net_address) in the sysprocesses

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.