snippetsqlMinor
How to connect to remote SQL server instance by IP
Viewed 0 times
connectserversqlinstancehowremote
Problem
I have a remote development box with SQL 2016 installed. Remotely, I can access that server by IP just fine. Let's assume for my question that IP address is 1.1.1.1.
Now I have installed a new SQL 2019 version with an instance name of 'newinstance'. I am trying to access that remotely with 1.1.1.1\newinstance, but I get a network error stating it can't connect.
Again, I can access the 2016 default instance by IP just fine. I can't access the 2019 named instance.
Can someone give some reasons why this isn't working?
Now I have installed a new SQL 2019 version with an instance name of 'newinstance'. I am trying to access that remotely with 1.1.1.1\newinstance, but I get a network error stating it can't connect.
Again, I can access the 2016 default instance by IP just fine. I can't access the 2019 named instance.
- I verified the 2019 instance has remote connections enabled.
- I am able to connect to the 2019 instance just fine when logged in locally to the remote machine.
Can someone give some reasons why this isn't working?
Solution
Named instances are listening on a TCP port randomly assigned at installation. If SQL Browser service is disabled, the client must know the port number. If your sql2019 instance is listening on port 59036, you would connect to 1.1.1.1,59036.
You can find out the port in SQL Server 2019 Configuration Manager.(sorry, I don’t have a SQL Server nearby at the moment to give the exact instructions to find it)
If SQL Browser service is active, you may have a firewall issue as suggested by J.D.
You can find out the port in SQL Server 2019 Configuration Manager.(sorry, I don’t have a SQL Server nearby at the moment to give the exact instructions to find it)
If SQL Browser service is active, you may have a firewall issue as suggested by J.D.
Context
StackExchange Database Administrators Q#315590, answer score: 5
Revisions (0)
No revisions yet.