Blog Post

How to configure a static port for SQL Server?

,

One of the first things to do for securing your SQL Server is to change its default TCP port. You can configure a static or dynamic port for SQL Server network configuration.

To view the default port, launch SQL Server Configuration Manager and click on SQL Server Network Configuration and Protocols for MSSQLSERVER. For the named instance, you will see option – Protocols for

As shown below, my SQL Instance is running on port 1433.

Check default port in SQL Server

Specify a new port in the TCP Port section to change a static port. As shown below, I changed the default TCP port to 1201.

Specify a new Static port

It requires SQL Service restart to take the change into effect. Click Ok and restart SQL Service.

Restart SQL Service

Once done, verify the connection SQL Instance with the new port number.

Specify new port number for DB connection

As shown below, we connected successful to our SQL Server instance with non-default(static) port.

SSMS connection

You can view the configured port in SQL Server error logs. Expand the SQL Server Logs folder and double-click on Current, and you can see entries in the logs as shown below.

Verify SQL Server port from error logs

Original post (opens in new tab)

Rate

You rated this post out of 5. Change rating

Share

Share

Rate

You rated this post out of 5. Change rating