I'm having trouble getting my SQL Server client tools to connect to a default instance of SQL Server 2000 through a dynamically determined TCP/IP port. The SQL Server has the TCP/IP Net-Library enabled. I installed SQL Server 2000 using the default port 1433, then changed the port number to 15000. I restarted my SQL Server and used the SQL Server 2000 Client Network Utility to set up an alias on my client. For my alias settings, I selected the TCP/IP Net-Library and specified the SQL Server name. Finally, I selected Dynamically determine port rather than entering 15000 as the port number.
With this configuration, I can't get a connection through Query Analyzer. I've tried specifying the actual IP address of the server from within the Client Network Utility rather than the NetBIOS name of the server, which doesn't work either. When I add the port number and clear the Dynamically determine port check box, I can connect to the default instance of SQL Server. However, I can connect to other instances of SQL Server 2000 only when the Dynamically determine port option is selected. How can I connect to my default instance using the same configuration that I use for other instances?
The short answer is that dynamic port detection is available only for named instances of SQL Server 2000. The behavior of default instances for SQL Server 2000 is the same as it is for earlier SQL Server releases, so earlier versions of the client tools reliably connect to the default instance. If the default instance is listening on a port other than 1433, you must create an alias that includes the port number, change the global default port specified in the TCP/IP Properties tab of the Client Configuration Utility, or create an alias that specifically references the port number. You could search SQL Server Books Online (BOL) indefinitely without finding the answer to this question. However, the Microsoft article "INF: Behavior of SQL Server 2000 Network Library During Dynamic Port Detection" (http://support.microsoft.com/default.aspx?scid=kb;en-us;q286303) clearly explains the behavior.