Have a Question?
< All Topics
Print

Change Microsoft SQL Always On Port

Tutorial on how to change Microsoft SQL Always On Port based on my previous tutorial on Setup SQL 2017 Always On with PowerShell

It is recommended to change the MSSQL default port from TCP 1433 to custom port for security compliance

Change the SQL Default Port from 1433 to 1715 on Passive Node

Verify Listen All is set to Yes in SQL Server Configuration Manager – SQL Server Network Configuration – Protocols for MSSQLSERVER

Change Microsoft SQL Always On Port

If the Listen All setting on the Protocol tab is set to "Yes", then only TCP Port and TCP Dynamic Port values under the IPAll section will be used and individual IPn sections will be ignored in their entirety. – Configure a Server to Listen on a Specific TCP Port

Change the TCP Port from 1433 to 1715 and ensure that no value is set for TCP Dynamic Ports.

Change Microsoft SQL Always On Port

Restart SQL Service

Change Microsoft SQL Always On Port

Create a new file called Sql.udl with NotePad to verify the SQL Server is listening on Port 1715

Change Microsoft SQL Always On Port

Database Failover to Passive Node

Create Aliases which is an alternate name that can be used to make a connection in SQL Server Configuration Manager – SQL Native Client 11.0 Configuration (32bits) – Aliases on the computer where SQL Management Studio installed

Install Client Tools Connectivity for SQL 2017 ISO if SQL Server Configuration Manager is NOT available on your management station

Connect to UAT-SQL01 with SQL Management Studio

Not required to specify the custom Port, 1715 as Aliases had been defined

Failover the Databases to Passive Node by following Database Failover

Change Microsoft SQL Always On Port

Change the SQL Always On Listener Port from 1433 to 1715 in SQL Management Studio

Verify the ODBC Connection with Sql.udl file with Provider = SQL Server Native Client 11.0

Lastly, change the SQL Port no to 1715 on UAT-SQL02 Server which is a Passive Node now and verify the ODBC connectivity with UDL file

We had changed the SQL Default Port to Custom Port successfully on SQL Always On Cluster with minimum downtime required.

Table of Contents
Scroll to Top