Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents
maxLevel2
minLevel2

Verifying the configuration of a SQL Server port is a two-step process:
Finding the TCP/IP Port
Verifying the Configuration of the Port
Related Documentation: SQL Server Locks and Configuring SQL Server Ports

...

Finding the TCP/IP

...

port

To find the TCP/IP port of a SQL Server instance:

  1. Start SQL Query Analyzer, and then connect to the SQL Server instance.
  2. Run the following Transact-SQL statement in SQL Query Analyzer:
    Code Block
    languagesql
    Use master 
    Go

...

  1. 
    Xp_readerrorlog
  2. In the Results pane, locate the following text:
    SQL server listening on X.X.X.X: Y
    Where X.X.X.X is the IP address of the SQL Server instance and Y is the TCP/IP port on which SQL Server is listening.
    For example, if SQL server is listening on 10.150.158.246: 1433, 10.150.158.246 is the IP address of the SQL Server and 1433 is the TCP/IP port on which the SQL Server instance is listening.

...

Verifying the

...

configuration of the

...

port

To verify the port configuration of a SQL Server instance:

  1. Start the Windows Registry Editor.
  2. In Registry Editor, locate the following registry key:
    Code Block
    languagesql
    HKEY_LOCAL_MACHINESOFTWAREMicrosoft

...

  1. 
    Microsoft SQL Server 
    MSSQLServerSuperSocketNetLibTcp

    The TCPDynamicPorts and TCPPort values appear as follows, depending on your port allocation method:

Image Modified Static Port Allocation

If you configure an instance of SQL Server to use a static port, and you have not yet restarted the SQL Server instance, the registry values are set as follows:
TCPDynamicPorts = Last port used
TCPPort = New static port that you set by using the Server Network Utility.
If you configure an instance of SQL Server to use a static port, and you restart the SQL Server instance, the registry values are set as:
TCPDynamicPorts = Blank
TCPPort = New static port that you set by using the Server Network Utility.

...

Image Added Dynamic Port Allocation

If you configure an instance of SQL Server to use dynamic port allocation, and you have not yet restarted the SQL Server instance, the registry values are set as follows:
TCPDynamicPorts = Blank
TCPPort = 0
However, if you configure an instance of SQL Server to use dynamic port allocation, and you restart the SQL Server instance, the registry values are set as follows:
TCPDynamicPorts = Current port used
TCPPort = Current port used