原文出处:http://blog.csdn.net/dba_huangzj/article/details/38489765,专题目录:http://blog.csdn.net/dba_huangzj/article/details/37906349

未经作者同意,任何人不得以“原创”形式发布,也不得已用于商业用途,本人不负责任何法律责任。

前一篇:http://blog.csdn.net/dba_huangzj/article/details/38438363

前言:

SQL Server端点(Endpoint)是出入SQL Server的门户,通过端点,任何东西可以在网络和SQL Server之间传输。端点可以是系统或者用户自定义的,其中系统端点允许使用T-SQL连接SQL Server并发送查询。

端点使用特定的协议定义,可以是HTTP或者TCP,从SQL Server 2012开始HTTP端点被移除出内置的Web Services功能中,仅能使用TCP端点。

通常使用自定义端点的目的有:

  1. TCP 请求。本文介绍这种,可以用于建立专用或安全的SQL Server连接。
  2. Service Broker
  3. 数据库镜像

实现:

1. 在查询窗口中输入下面语句:

CREATE ENDPOINT myTSQLEndpoint
STATE = started
AS TCP (
  LISTENER_PORT = 8080,
  LISTENER_IP = (127.0.0.1)
  )
FOR TSQL ();

2. 执行后会收到消息如下,意味着所有通过默认T-SQL端点连接的登录都会失去所有权限,你需要使用下面语句授权:

GRANT CONNECT ON ENDPOINT::[TSQL Default TCP] to [public];

消息:

创建 TSQL 端点将导致撤销 'TSQL Default TCP' 端点上的所有 'Public' 连接权限。如果此端点上需要 'Public' 访问权限,请使用'GRANT CONNECT ON ENDPOINT::[TSQL Default TCP] to [public]'重新应用此权限。

3. 可以使用下面语句查询端点情况:

SELECT * FROM sys.tcp_endpoints;

4. 可以使用ALTER ENDPOINT命令启动或停止端点:

ALTER ENDPOINT [TSQL Default TCP] STATE = STOPPED;

原理:

当SQL Server 安装完毕是,会为每个网络协议创建对应的SQL Server系统端点。访问端点的权限是赋予给Public 服务器角色。每个SQL Server登录都具有Public角色权限,可以通过下面语句进行授权和回收:

REVOKE CONNECT ON ENDPOINT::[TSQL Default TCP] to [public];
GRANT CONNECT ON ENDPOINT::[TSQL Default TCP] to [a_specific_login];

下一篇:http://blog.csdn.net/dba_huangzj/article/details/38656615

Chapter 1 Securing Your Server and Network(13):配置端点安全性的更多相关文章

  1. Chapter 1 Securing Your Server and Network(10):使用扩展保护避免授权中继攻击

    原文:Chapter 1 Securing Your Server and Network(10):使用扩展保护避免授权中继攻击 原文出处:http://blog.csdn.net/dba_huang ...

  2. Chapter 1 Securing Your Server and Network(9):使用Kerberos用于身份验证

    原文:Chapter 1 Securing Your Server and Network(9):使用Kerberos用于身份验证 原文出处:http://blog.csdn.net/dba_huan ...

  3. Chapter 1 Securing Your Server and Network(8):停止未使用的服务

    原文:Chapter 1 Securing Your Server and Network(8):停止未使用的服务 原文出处:http://blog.csdn.net/dba_huangzj/arti ...

  4. Chapter 1 Securing Your Server and Network(7):禁用SQL Server Browse

    原文:Chapter 1 Securing Your Server and Network(7):禁用SQL Server Browse 原文出处:http://blog.csdn.net/dba_h ...

  5. Chapter 1 Securing Your Server and Network(6):为SQL Server访问配置防火墙

    原文:Chapter 1 Securing Your Server and Network(6):为SQL Server访问配置防火墙 原文出处:http://blog.csdn.net/dba_hu ...

  6. Chapter 1 Securing Your Server and Network(5):使用SSL加密会话

    原文:Chapter 1 Securing Your Server and Network(5):使用SSL加密会话 原文出处:http://blog.csdn.net/dba_huangzj/art ...

  7. Chapter 1 Securing Your Server and Network(4):使用虚拟服务帐号

    原文:Chapter 1 Securing Your Server and Network(4):使用虚拟服务帐号 原文出处:http://blog.csdn.net/dba_huangzj/arti ...

  8. Chapter 1 Securing Your Server and Network(3):使用托管服务帐号

    原文:Chapter 1 Securing Your Server and Network(3):使用托管服务帐号 原文出处:http://blog.csdn.net/dba_huangzj/arti ...

  9. Chapter 1 Securing Your Server and Network(1):选择SQL Server运行账号

    原文:Chapter 1 Securing Your Server and Network(1):选择SQL Server运行账号 原文出处:http://blog.csdn.net/dba_huan ...

随机推荐

  1. Linux下SonarQube代码质量平台的安装和使用方法

    Sonar简介: Sonar是一个用于代码质量管理的开源平台,用于管理源代码的质量,可以从七个维度检测代码质量 通过插件形式,可以支持包括java,C#,C/C++,PL/SQL,Cobol,Java ...

  2. Sharding-jdbc实现分库分表

    首先在pom文件中引入需要的依赖 <dependency> <groupId>io.shardingjdbc</groupId> <artifactId> ...

  3. Dynamics CRM2016 The value of field on record of type entity is outside the valid range问题的解决方法

    今天在用web api创建一条记录时报了个标题里的错,咋看这错说的很明白了,属性字段的值超范围了,但咱们看下具体的问题 请求url是这样的http://xx/api/data/v8.0/new_rec ...

  4. JVM的Server与Client运行模式区别与切换

    概述 JVM有两种运行模式Server与Client.两种模式的区别在于,Client模式启动速度较快,Server模式启动较慢:但是启动进入稳定期长期运行之后Server模式的程序运行速度比Clie ...

  5. 让你的代码量减少3倍!使用kotlin开发Android(四) kotlin bean背后的秘密

    上一篇我们介绍了缩短五倍的java bean,不知道你在看的时候有没有一种疑问捏? 本文同步自博主的私人博客wing的地方酒馆 再来回顾一下,两种代码的对比 public class User { p ...

  6. 1小时学会JQuery

    ---------------------------------------------------------------------------------------------------- ...

  7. Swift中的可选协议和方法的历史渊源

    @objc protocol Transaction { func commit() -> Bool optional func isComplete() -> Bool } 以上协议被标 ...

  8. Spark技术内幕:Shuffle Read的整体流程

    回忆一下,每个Stage的上边界,要么需要从外部存储读取数据,要么需要读取上一个Stage的输出:而下边界,要么是需要写入本地文件系统(需要Shuffle),以供childStage读取,要么是最后一 ...

  9. EBS多组织结构

    1. 业务组: 它代表组织结构的最高层次, 它分离了人力资源的信息. 例如, 当你查询人员时, 它会列出所有分配给相应业务组的成员, 而你自己所属于的组织只不过是业务组的一份子. 这样说可能造成一种误 ...

  10. ROS_Kinetic_x ROS栅格地图庫 Grid Map Library

    源自:https://github.com/ethz-asl/grid_map Grid Map Overview This is a C++ library with ROS interface t ...