Why are some connection strings Data Source = address; Initial Catalog = dbname;.... while others are Server=address;database=dbname;...? What is the difference between using "Data Source" and "Server"?
2 Answers
Please see below link, hope you will easily get answer to your question.
https://www.connectionstrings.com/sql-server/
"Server" vs "Data Source" in connection string
http://msdn.microsoft.com/en-gb/library/system.data.sqlclient.sqlconnection.connectionstring.aspx
Comments
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
the are synonymous
what is the difference between using data source = and using server = in connection string
“Server” vs “Data Source” in connection string
4 Comments
Shantanu Gupta
How about any other provider like Oracle or TeraData. Which was is standard or which one will work for most of the DB providers? Any references will be greatly appreciated
Nagaraj S
Nagaraj S
msdn.microsoft.com/en-us/library/… @ShantanuGupta
Shantanu Gupta
@Nagraj: I know connectionStrings site. I am particularly interested in knowing if there is some standard defined or some sort of guidelines defined which is commonly used between different providers.