Which protocol is used if not specified in connection string?

  • Thread starter Thread starter Ira Gladnick
  • Start date Start date
I

Ira Gladnick

Say you have a SQL Server connection string in the following format,
where MySqlServer is a server connected a local network

"data source=MySqlServer; Initial Catalog=MyDatabase; Integrated
Security=FALSE; User ID=MyUserName; Password=MyPassword; Pooling=True;
Connect Timeout=50"

I am wondering what protocol (tcp, named pipes, etc.) would be used
with a connection string in this format.

If MySqlServer supports both named pipes and tcp, is the protocol
indeterminant? Or is there a default protocol?

BOL doesn't seem very clear about this.
 
TCP is the default protocol.

--
__________________________________________________________________________
William R. Vaughn
President and Founder Beta V Corporation
Author, Mentor, Dad, Grandpa
Microsoft MVP
(425) 556-9205 (Pacific time)
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
____________________________________________________________________________________________
 
My question is, what problem are you trying to solve?

--
__________________________________________________________________________
William R. Vaughn
President and Founder Beta V Corporation
Author, Mentor, Dad, Grandpa
Microsoft MVP
(425) 556-9205 (Pacific time)
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
____________________________________________________________________________________________
 
The sysadmin in my shop seemed to be under the impression that if TCP
was not specified in the connection string, then named pipes would be
the default protocol. So it was requested that we change connection
strings to explcitly specify TCP as the protocol.

I was curious if named pipes actually was the default. Did some
searches, but couldn't seem to find a solid reference one way or the
other.

Is it documented somewhere that TCP is the default?
 
It's been some time since I had to figure this out (over 5 years) so this is
just my recollection.

--
__________________________________________________________________________
William R. Vaughn
President and Founder Beta V Corporation
Author, Mentor, Dad, Grandpa
Microsoft MVP
(425) 556-9205 (Pacific time)
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
____________________________________________________________________________________________
The sysadmin in my shop seemed to be under the impression that if TCP
was not specified in the connection string, then named pipes would be
the default protocol. So it was requested that we change connection
strings to explcitly specify TCP as the protocol.

I was curious if named pipes actually was the default. Did some
searches, but couldn't seem to find a solid reference one way or the
other.

Is it documented somewhere that TCP is the default?
 
Got it, thanks to all.

This is actually a SQL Server 2000 installation, so the SQL Server
Network Utility rather than the SQL Server
Configuration Manager.
 
Back
Top