By default, clients have TCP and Named Pipes as available protocols. You can manipulate the protocol ordering by using the SQL Server Client utility. The client application uses the protocols in the order specified on the client computer. The protocol order is stored at the following registry key location under the value ProtocolOrder:
If you are using SQL Server 2005, the protocol order is stored in the ProtocolOrder registry entry under the following registry subkey:
For example, if a client computer has both TCP and Named Pipes available, and the order is:
- Named Pipes
Note The client does not receive an error that indicates the first protocol failed.
If the client application uses the second protocol, and it also returns an error, an error is returned to the client.
If you make an alias by using one of the following methods, the client application uses the alias information to establish a connection to the server and does not use any additional protocols.
- By using the SQL Server Client Network utility
- By using SQL Server Configuration Manager (SQL Server 2005)
- When you create an ODBC data source name (DSN)
- Use the SQL Client Network utility or SQL Server Configuration Manager to create an alias by specifying the protocol you prefer.
- Specify the protocol in your connection string. For example:In this example, you specify the network protocol as "DBMSSOCN", which means that you want to use the TCP/IP protocol. If you specify the protocol inside your connection string, Dbnetlib only uses the specified protocol and does not try any other protocol. Similarly, to enable Named Pipe protocol only, use a connection string similar to this:
- Use the Client Network utility to remove other protocols.
REFERENCESSQL Server Books Online; topic: "SQL Server Client Network utility"
Article ID: 328383 - Last Review: Sep 12, 2008 - Revision: 1