Chapter 1 Securing Your Server and Network (13): Configuring Endpoint Security

Source: Internet
Author: User

Original source:, featured catalogue:

No person shall, without the consent of the author, be published in the form of "original" or used for commercial purposes, and I am not responsible for any legal liability.

Previous article:


SQL Server Endpoint (Endpoint) is a portal to and from SQL Server, with endpoints, anything that can be transferred between the network and SQL Server. The endpoint can be either system-or user-defined, where the system endpoint allows SQL Server to connect using T-mail and send a query.

The endpoint uses a specific protocol definition, which can be HTTP or TCP, starting with SQL Server 2012, the HTTP endpoint is removed from the built-in Web Services feature, and only the TCP endpoint can be used.

Custom endpoints are typically used for the purpose of:

    1. TCP requests. This article describes this and can be used to establish a private or secure SQL Server connection.
    2. Service Broker
    3. Database Mirroring

1. Enter the following statement in the query window:

CREATE ENDPOINT Mytsqlendpoint state = started as TCP (   listener_port = 8080,   listener_ip = (   ) for TSQL ();

2. After execution, you will receive a message like this, which means that all logins through the default T-SQL endpoint connection will lose all permissions, and you need to use the following statement to authorize:

GRANT CONNECT on Endpoint::[tsql Default TCP] to [public];


Creating a TSQL endpoint will cause all the ' public ' connection permissions on the ' TSQL Default TCP ' endpoint to be revoked. If ' Public ' access is required on this endpoint, reapply this permission using ' GRANT CONNECT on Endpoint::[tsql Default TCP ' to [public].

3. You can use the following statement to query the endpoint condition:

SELECT * from sys.tcp_endpoints;

4. You can start or stop the endpoint using the ALTER ENDPOINT command:



When SQL Server installation is complete, the corresponding SQL Server system endpoint is created for each network protocol. Permissions to access the endpoint are assigned to the public server role. Each SQL Server login has the public role permission and can be authorized and recycled through the following statement:

REVOKE CONNECT on Endpoint::[tsql Default TCP] to [public]; GRANT CONNECT on Endpoint::[tsql Default TCP] to [a_specific_login];

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: 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.