且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

与 SQL Server 连接的初始连接很慢.为什么?

更新时间:2023-02-02 23:02:36

在连接字符串上的服务器前面,添加np:

In front of the server on the connection string, add np:

这变成了 Server=np:serverinstance 并强制命名管道而不是 TCP 的默认值.

This becomes Server=np:serverinstance and forces the Named Pipes instead of the default of TCP.

我可能会更改优先级以在 TCP 之前使用命名管道......但我不想在服务器上弄乱它.

I could of probably changed the priority to use Named Pipes before TCP... but I did not want to mess with that on the server.