
How SQL Server Browser Works
When an instance of SQL Server starts, if the TCP/IP or VIA protocols are enabled for SQL Server, the server is assigned a TCP/IP port. If the named pipes protocol is enabled, SQL Server listens on a specific named pipe. This port or pipe will be used by that specific instance to exchange data with client applications. During installation, port 1433 and pipe \sql\query are assigned to the default instance, but those can be changed later by the server administrator by using SQL Server Configuration Manager. Because only one instance of SQL Server can use a port or pipe, different port numbers and pipe names are assigned for named instances, including SQL Server Express. By default, named instances are configured to use dynamic ports, so an available port is assigned when SQL Server starts. A specific port can be assigned to a SQL Server instance. When connecting, clients can specify the desired port. However, if the port is dynamically assigned, the port number can change any time SQL Server is restarted, so the correct port number is unknown to the client.
On startup, SQL Server Browser starts and claims UDP port 1434. SQL Server Browser reads the registry, identifies all SQL Server instances on the computer, and notes the ports and named pipes that they use. When a server has two or more network cards, SQL Server Browser will return all ports enabled for SQL Server. SQL Server 2005 and SQL Server Browser support ipv6 and ipv4.
When SQL Server 2000 and SQL Server 2005 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.