forvaidya
forvaidya

Reputation: 3315

Connection to SQL Server on non standard port using SSMS

I have a SQL Server in RDS in private subnet on port 1433.

I open a SSH tunnel and use local port 21433.

I am not able to connect it using SSMS if I give db host as localhost,21433 or .21433

Please advise what the connection string needs to be in this case, even sqlcmd did not work.

enter image description here

I am able to connect same DB using another clinet "Dbever"

Upvotes: 0

Views: 12801

Answers (1)

Reza Faghani
Reza Faghani

Reputation: 161

Follow this steps :

  1. Open the SQL Server Configuration Manager and expand the node SQL Server Network Configuration. Then Select Protocols for SQLEXPRESS (or whatever the name of your SQL Server instance is). Make sure that TCP/IP protocol is enabled.
  2. Right click on TCP/IP and choose Properties. In the TCP/IP Properties dialog box, click on the IP Addresses tab and scroll down to IPAII section. Make sure TCP Dynamic Ports is blank and that TCP Port is set to 1433 (or whatever you want to set TCP Port). 3.First Click on Apply button and then the OK button to save your changes. After that restart your SQL Server instance.

Now you are able to connect to your SQL Server instance remotely using SQL Server Management Studio.

If there is problem persist in remote connection, you most likely need to configure your firewall settings. Make sure the TCP port 21433 is not blocked by your firewall.

Upvotes: 3

Related Questions