Forum Discussion
Connecting to offsite SQL server - translating server name/port issue
- 3 years ago
Just to follow up: I got this working in the end, with some help from IT support. They had to create a rule on the virtual machine which would direct SQL traffic coming from someone in the management group - i.e. me - to go to the right port number. That meant I no longer have to define the port number, when connecting from the laptop.
That combined with the edited hosts file meant that I could connect using just the SQL server name, because the hosts file points that traffic at the right IP address.
I found this only works if I use basic authentication and a service account set up on the database, rather than my usual Microsoft 365 credentials.
Just to follow up: I got this working in the end, with some help from IT support. They had to create a rule on the virtual machine which would direct SQL traffic coming from someone in the management group - i.e. me - to go to the right port number. That meant I no longer have to define the port number, when connecting from the laptop.
That combined with the edited hosts file meant that I could connect using just the SQL server name, because the hosts file points that traffic at the right IP address.
I found this only works if I use basic authentication and a service account set up on the database, rather than my usual Microsoft 365 credentials.