主要区别在于连接协议不同,前者(localhost)使用TCP协议,后者(“(local)”)使用NamedPipe协议。

 

Sample code with SQL Server connection strings often use localhost and (local) interchangeably. They're different.

Server=(local);Database=DotNetNuke;Trusted_Connection=True
Uses named pipes

Server=localhost;Database=DotNetNuke;Trusted_Connection=True
Uses a TCP port negotiated on port 1434 udp, which defaults to 1433

原文链接:http://weblogs.asp.net/jongalloway/432062

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-06-26
  • 2021-10-28
  • 2021-09-07
  • 2021-12-07
  • 2022-12-23
  • 2022-02-17
猜你喜欢
  • 2021-05-22
  • 2021-11-05
  • 2022-12-23
  • 2022-12-23
  • 2021-12-26
  • 2021-11-17
  • 2022-12-23
相关资源
相似解决方案