关于Sqlserver的连接问题。

iamluodong 2002-03-06 10:25:00
1。命名管道的和Tcp/ip的连接方式的区别
2。在用查询分析器进行数据库连接的时候,敲入机器名和Ip地址,Sqlserver将
如何识别用何种协议来进行连接。
3。为什么我敲入Ip,有的机器可以连通,有的机器不能连通。Sqlserver自带的客户端和服务端工具有什么作用。
...全文
27 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
iamluodong 2002-03-06
  • 打赏
  • 举报
回复
为什么通过Ip有的机器可以连通,有的机器不能连通,如果我敲入的是IP,那么此时进行的连接是否用的就是Tcp/ip协议呢。
darkroad 2002-03-06
  • 打赏
  • 举报
回复
1.Sql server自带的客户端和服务端工具,就是用来配置连接协议。例如,如果在服务端选择了TCP/IP协议,则客户端也同样要选择这个协议。这些工具还能配置协议的细节,例如Tcp/ip使用哪个端口。有时候为了防止攻击,会将缺省的1433端口改成其它值。
2.即便你选择了TCP/IP而禁止NamedPipe,有时候仍然可以通过名字进行访问,这回取决于你的域中有没有DNS的配置。有了DNS后,可以将名字映射成IP。
3.采用TCP/IP还是NamedPipe还会取决于你在工具中采用的顺序
40Star 2002-03-06
  • 打赏
  • 举报
回复
如果不在同一个域中又没有信任关系也连不通
warning 2002-03-06
  • 打赏
  • 举报
回复
1、本地管道和网络管道的区别在于是否使用网络。如果在连接到本地 SQL Server 实例时不指定服务器名,所使用的就是本地管道。如果在连接到本地 SQL Server 实例时显式指定了服务器名,所使用的就是网络管道或另一种网络进程间通讯 (IPC) 机制
darkroad 2002-03-06
  • 打赏
  • 举报
回复
两者在使用上和性能上的区别:
Named Pipes vs. TCP/IP Sockets
In a fast local area network (LAN) environment, Transmission Control Protocol/Internet Protocol (TCP/IP) Sockets and Named Pipes clients are comparable in terms of performance. However, the performance difference between the TCP/IP Sockets and Named Pipes clients becomes apparent with slower networks, such as across wide area networks (WANs) or dial-up networks. This is because of the different ways the interprocess communication (IPC) mechanisms communicate between peers.

For named pipes, network communications are typically more interactive. A peer does not send data until another peer asks for it using a read command. A network read typically involves a series of peek named pipes messages before it begins to read the data. These can be very costly in a slow network and cause excessive network traffic, which in turn affects other network clients.

It is also important to clarify if you are talking about local pipes or network pipes. If the server application is running locally on the computer running an instance of Microsoft® SQL Server™ 2000, the local Named Pipes protocol is an option. Local named pipes runs in kernel mode and is extremely fast.

For TCP/IP Sockets, data transmissions are more streamlined and have less overhead. Data transmissions can also take advantage of TCP/IP Sockets performance enhancement mechanisms such as windowing, delayed acknowledgements, and so on, which can be very beneficial in a slow network. Depending on the type of applications, such performance differences can be significant.

TCP/IP Sockets also support a backlog queue, which can provide a limited smoothing effect compared to named pipes that may lead to pipe busy errors when you are attempting to connect to SQL Server.

In general, sockets are preferred in a slow LAN, WAN, or dial-up network, whereas named pipes can be a better choice when network speed is not the issue, as it offers more functionality, ease of use, and configuration options.

For more information about TCP/IP, see the Microsoft Windows NT® documentation.
piaorenqian 2002-03-06
  • 打赏
  • 举报
回复
关注高手解答
darkroad 2002-03-06
  • 打赏
  • 举报
回复
Sorry,如果配置了DNS的话,好像对于是否同一个nt域并没有特别的要求。
40Star 2002-03-06
  • 打赏
  • 举报
回复
同一个域中吗?
同一个网段吗?

34,588

社区成员

发帖
与我相关
我的任务
社区描述
MS-SQL Server相关内容讨论专区
社区管理员
  • 基础类社区
  • 二月十六
  • 卖水果的net
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧