码迷,mamicode.com
首页 > 数据库 > 详细

[转】[tip] localhost vs. (local) in SQL Server connection strings

时间:2016-03-22 12:14:04      阅读:175      评论:0      收藏:0      [点我收藏+]

标签:

主要区别在于连接协议不同,前者(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

[转】[tip] localhost vs. (local) in SQL Server connection strings

标签:

原文地址:http://www.cnblogs.com/rader/p/5305651.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!