1

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"?

0

2 Answers 2

0

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

Sign up to request clarification or add additional context in comments.

Comments

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

the are synonymous

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

“Server” vs “Data Source” in connection string

SqlConnection.ConnectionString Property

4 Comments

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
@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.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.