1

This question regards SQL Server 2005 and 2012.

I have a database server with two instances of SQL Server. Through SQL Server Management Studio I was able to connect to both instances by providing "IP-Address"\"InstanceName" and user ID/password. But, I was not able to telnet the server on port 1433 from command prompt of the client PC.

Finally, when I specified TCP port 1433 through "SQL Server Configuration Manager" on the server and restart SQL Server services I was able to telnet to server on port 1433.

I want to know how "SQL Server Management Studio" was able to make a connection with SQL Server even if port 1433 was not active on SQL Server? And, the sequence of activities that takes place in background when Management Studio initiates connection with SQL Server?

2 Answers 2

1

Please do not change Sql Server's TCP port unless you know what you are doing. This needs to be done only in specific scenarios like manual SPN registrations with failover cluster setups or restricted environments.

Sql Server installations contain a special service called Sql Browser Service. When a client tries to connect to a named instance, it will ask connection details from the browser service. As per the documentation:

Upon startup, SQL Server Browser starts and claims UDP port 1434. SQL Server Browser reads the registry, identifies all instances of SQL Server on the computer, and notes the ports and named pipes that they use --

When SQL Server clients request SQL Server resources, the client network library sends a UDP message to the server using port 1434. SQL Server Browser responds with the TCP/IP port or named pipe of the requested instance. The network library on the client application then completes the connection by sending a request to the server using the port or named pipe of the desired instance.

1
  • I changed TCP port to 1433 in order to setup port monitoring from a tool. Thanks for the information... this is exactly the information I was looking for. Oct 25, 2013 at 7:12
1

The port 1433 is reserved for the default instance (MSSQLSERVER). When you have a named instance, where you can connect via "IP-Address"\"InstanceName", the port number is different. You can see the actual port number when you look into your SQL Server Logfile.

1
  • ,the other way is using sql server configuration manager where you can see the port used for TCP/IP protocol under sql server network configuraion
    – Biju jose
    Oct 24, 2013 at 15:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.