欢迎来到尧图网

客户服务 关于我们

您的位置:首页 > 房产 > 建筑 > Sqlserver安全篇之_启用和禁用Named Pipes的案列介绍

Sqlserver安全篇之_启用和禁用Named Pipes的案列介绍

2025/3/20 20:05:04 来源:https://blog.csdn.net/lusklusklusk/article/details/146349707  浏览:    关键词:Sqlserver安全篇之_启用和禁用Named Pipes的案列介绍

https://learn.microsoft.com/zh-cn/sql/tools/configuration-manager/named-pipes-properties?view=sql-server-ver16
https://learn.microsoft.com/zh-cn/sql/tools/configuration-manager/client-protocols-named-pipes-properties-protocol-tab?view=sql-server-ver16

默认情况下, SQL Server 侦听:\.\pipe\sql\query(对于默认实例)和 \.\pipe\MSSQL$\sql\query(对于命名实例)

Unless changed by the user, when the default instance of Microsoft SQL Server listens on the named pipes protocol, it uses \.\pipe\sql\query as the pipe name. The period indicates that the computer is the local computer, pipe indicates that the connection is a named pipe, and sql\query is the name of the pipe. To connect to the default pipe, the alias must have \<computer_name>\pipe\sql\query as the pipe name. If SQL Server has been configured to listen on a different pipe, the pipe name must use that pipe. For instance, if SQL Server is using \.\pipe\unit\app as the pipe, the alias must use \<computer_name>\pipe\unit\app as the pipe name.

At the time of connection, the SQL Server Native Client component reads the server, protocol, and pipe name values from the registry for the specified alias name, and creates a pipe name in the format np:\<computer_name>\pipe<pipename> or np:\\pipe<pipename>. For a named instance, the default pipe name is \<computer_name>\pipe\MSSQL$<instance_name>\sql\query.

SSMS如何以Named pipe方式连接sqlserver,直接在SSMS的Servername一栏填上np:servername
在这里插入图片描述

SELECT session_id, net_transport,auth_scheme,client_net_address,client_tcp_port,local_net_address,local_tcp_port FROM sys.dm_exec_connections
session_id	net_transport	auth_scheme	client_net_address	client_tcp_port	local_net_address	local_tcp_port
54	TCP	KERBEROS	172.22.136.35	55293	172.22.136.187	1433
58	Named pipe	KERBEROS	<named pipe>	NULL	NULL	NULL
63	Session	NTLM	<local machine>	NULL	NULL	NULL
64	Shared memory	NTLM	<local machine>	NULL	NULL	NULL
--net_transport值为TCP的表示是TCP连接,值为Named pipe的表示是Named pipe连接,值为Shared memory的一般是在数据库本地的连接类似mysql的socket连接且auth_scheme一般是NTLM

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com

热搜词