原文出处: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. Java编写高质量代码改善程序的151个建议

    第一章  Java开发中通用的方法和准则 建议1:不要在常量和变量中出现易混淆的字母: (i.l.1:o.0等). 建议2:莫让常量蜕变成变量: (代码运行工程中不要改变常量值). 建议3:三元操作符 ...

  2. 记录 Python3 安装 Scrapy 遇到的问题

    开发环境:Windows 10 + Python 3 使用 pip 去安装 Scrapy,  pip install scrapy , 报了一个错误. 原因:加 --user 的作用是显式指定安装在用 ...

  3. Appium--入门demo

    Appium环境搭建已经在在博客中写出 http://www.cnblogs.com/feimaoyuzhubaobao/p/5057832.html   那么本篇博客主要介绍java版本的appiu ...

  4. ACM 饭卡

    Problem Description 电子科大本部食堂的饭卡有一种很诡异的设计,即在购买之前判断余额.如果购买一个商品之前,卡上的剩余金额大于或等于5元,就一定可以购买成功(即使购买后卡上余额为负) ...

  5. 什么是 Docker

    Docker 是一个开源项目,诞生于 2013 年初,最初是 dotCloud 公司内部的一个业余项目.它基于 Google 公司推出的 Go 语言实现. 项目后来加入了 Linux 基金会,遵从了 ...

  6. Android Studio精彩案例(七)《ToolBar使用详解<一>》

    转载本专栏文章,请注明出处,尊重原创 .文章博客地址:道龙的博客 本文参考博客:http://blog.csdn.net/h_zhang/article/details/51232773 http:/ ...

  7. 虚拟机克隆,并设置新的ip

    6.1克隆新的虚拟机 选中某个虚拟机-à右键à管理à克隆 选择下一步 选择下一步 点击完成 6.2修改主机名 [root@hadoop3 ~]# vim/etc/sysconfig/network 将 ...

  8. CentOS 7 下使用虚拟环境Virtualenv安装Tensorflow cpu版记录

    1.首先安装pip-install 在使用centos7的软件包管理程序yum安装python-pip的时候会报一下错误: No package python-pip available. Error ...

  9. Android图表库MPAndroidChart(八)——饼状图的扩展:折线饼状图

    Android图表库MPAndroidChart(八)--饼状图的扩展:折线饼状图 我们接着上文,饼状图的扩展,增加折现的说明,来看下我们要实现的效果 因为之前对MPAndroidChart的熟悉,所 ...

  10. Linux 环境下一些常用的命令(二)

    11. chown命令 "chown"命令就是改变文件拥有者和所在用户组.每个文件都属于一个用户组和一个用户.在你的目录下,使用"ls -l",你就会看到像这样 ...