KB: How to specify the static port when connecting to a SQL Server instance?

To specify the static port when connecting to a SQL Server instance using SQL Authentication, the format is {server name},{port number}.

For example:

  • server name: WIN2012R2STD,1433
  • IP address (IPv4): 192.1.1.1,1433

Note that SQL Authentication uses a comma (“,”) and not a *** (“:”) to specify the static port.

Refer also to the Microsoft Developer Network documentation Logging In to SQL Server and the Microsoft Developer Network blog Using SQL instance name when using a static port.

Some free database tools currently do not support SQL Authentication with IPv4,port. This table lists the free tools and whether support SQL Authentication with IPv4,port:

 

Accepts SQL Authentication with IPv4,port

Monitoring & Performance

 

SQL Check

yes

SQL Fragmentation Analyzer

yes

SQL Instance Check

n/a

SQL BI Check

no (requires Windows Authentication)

SQL XEvent Profiler

yes

SQL Heat Map

no

SQL Statistics Aggregator

n/a (no connection needed)

SQL Update Statistics

yes

SQL Query Store Optimizer

no

SQL Hekaton Memory Check

no

SQL Page Viewer

 yes

MySQL Query Explorer

 n/a

Backup & Administration

 

SQL Job Manager

yes

SQL Backup Status Reporter

yes

SQL Integrity Check

 yes

Security & Compliance

 

SQL Column Search

no

SQL Permissions Extractor

yes

Development

 

Rapid Database Extractor

n/a (connect dialog has a separate port field)

As a workaround, create an alias that includes the port number and then connect to the instance via the alias. That way, there is no need enter the port number in the instance field. Refer also to Microsoft's "Set a SQL Server Alias for the SQL Server Agent Service (SQL Server Management Studio)" and Microsoft's "Create or Delete a Server Alias for Use by a Client" for SQL Server Configuration Manager.

Refer also to the post Can I connect to servers with a fully qualified domain name?.