sql 2005 应选择哪一种网络协议

freeflying1222 2010-03-28 11:11:52
sql server 2005可以启用多种网络协议:shared memory、TCP/IP、Named Pipe、VIA和Named Pipes与TCP/IP套接字协议。

问题是我该选用哪一种呢?

网上查到一种说法:只启用自己需要的,越少越好,因为启用越多的协议,就约占带宽。是这样吗?

如果我启用了所有的协议,sql server 内部如何选择呢?排队、先到先得还是……


...全文
301 12 打赏 收藏 转发到动态 举报
写回复
用AI写文章
12 条回复
切换为时间正序
请发表友善的回复…
发表回复
永生天地 2010-03-29
  • 打赏
  • 举报
回复
lz e文很强啊
freeflying1222 2010-03-29
  • 打赏
  • 举报
回复
In a fast local area network (LAN) environment, Transmission Control Protocol/Internet Protocol (TCP/IP) Sockets and Named Pipes clients are comparable with regard to 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 starts 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 that is running an instance of SQL Server, the local Named Pipes protocol is an option. Local named pipes runs in kernel mode and is very 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. This can be very helpful in a slow network. Depending on the type of applications, such performance differences can be significant.

TCP/IP Sockets also support a backlog queue. This can provide a limited smoothing effect compared to named pipes that could lead to pipe-busy errors when you are trying to connect to SQL Server.

Generally, TCP/IP is 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.

--答案居然在msdn上,舍近求远呀
永生天地 2010-03-29
  • 打赏
  • 举报
回复
属于个人看法,lz真要知道原理就要好好看看socket通讯了
永生天地 2010-03-28
  • 打赏
  • 举报
回复
如果是这样的话,那就要涉及到windows的socket设计了。
当然使用不是tcp就udp了,所以使用name就要进行gethostbyname的过程,
但是当socket建立之后就是一样了
freeflying1222 2010-03-28
  • 打赏
  • 举报
回复
原理级别的,为什么,谁能给点提示或者线索?
东那个升 2010-03-28
  • 打赏
  • 举报
回复
协议只是一个开关,打开这个开关才可以做相关的事。
--小F-- 2010-03-28
  • 打赏
  • 举报
回复
shared memory (共享内存) 可供使用的最简单协议,没有可配置的设置
Named Pipes(命名管道) 为局域网开发的协议
TCP/IP是互联网中应用最广泛的协议,它可以实现与网络中各种不同硬件结果和操作系统的设备进行通信
VIA 虚拟接口适配器协议需要和VIA硬件配合使用
永生天地 2010-03-28
  • 打赏
  • 举报
回复
[Quote=引用楼主 freeflying1222 的回复:]
sql server 2005可以启用多种网络协议:shared memory、TCP/IP、Named Pipe、VIA和Named Pipes与TCP/IP套接字协议。

问题是我该选用哪一种呢?

网上查到一种说法:只启用自己需要的,越少越好,因为启用越多的协议,就约占带宽。是这样吗?

如果我启用了所有的协议,sql server 内部如何选择呢?排队、先到先得还是……

……
[/Quote]
全选上,应该没有问题,我想微软不会那么弱。不会因为这个增加带宽吧
freeflying1222 2010-03-28
  • 打赏
  • 举报
回复
感谢楼上的回答,但是没有解决我想问的问题。下面链接就是我想问的,但回答的我没怎么看懂:
http://stackoverflow.com/questions/345450/sql-server-2005-enabling-both-named-pipes-tcp-ip-protocols
东那个升 2010-03-28
  • 打赏
  • 举报
回复
Shared Memory
允许连接到在同一台计算机上运行的 SQL Server 实例。不能用于通过网络上的其他计算机访问。
TCP/IP
允许通过指定计算机名称和实例名或 IP 地址和实例名,对 SQL Server Express 进行网路访问。

黄_瓜 2010-03-28
  • 打赏
  • 举报
回复
shared memory 和TCP/IP吧
东那个升 2010-03-28
  • 打赏
  • 举报
回复
TCP/IP,shared memory一般是这2种

34,590

社区成员

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

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