连接字符串中数据源和服务器之间的区别

时间:2014-02-15 05:21:31

标签: sql-server connection-string

为什么某些连接字符串Data Source = address; Initial Catalog = dbname;....而其他字符串为Server=address;database=dbname;...?使用“数据源”和“服务器”有什么区别?

2 个答案:

答案 0 :(得分:0)

答案 1 :(得分:0)

there is no difference between Server and Data Source as they represent 
the same thing for SQL Server : the full name of the SQL Server instance with 
the syntax "MyComputerName\MyShortInstanceName" , potentially including the 
port used by the SQL Server instance to communicate.

Data Source
-or-
Server
-or-
Address
-or-
Addr
-or-
Network Address

是同义词

what is the difference between using data source = and using server = in connection string

“Server” vs “Data Source” in connection string

SqlConnection.ConnectionString Property