Monday, August 02, 2021

How to connect to a SQL Server instance on a different domain and a non default port number?

 

We have several domains at my job, we have a dev domain, a prod domain and then several other domains. Recently we had some domain changes where we would connect to a different domain when logging in from the laptops.

When opening up SSMS and connecting to the SQL Server instances, we now need to use a fully qualified domain name (FQDN) and also specify the port number and the instance name. This could seem a little confusing if you have never done this


Here is what it looks like if for example your instance is listening on port 8000, the instance name is SQL01, the server name is DevSQL01 and the domain name is SQLRules.net


You would put the following in server name

DevSQL01.SQLRules.net,8000\SQL01



SQLServerConnection


To make is easier to see... here it is again with different colors for the different parts

DevSQL01.SQLRules.net,8000\SQL01

The server name is DevSQL01

The domain name is SQLRules.net

The port number is 8000

The instance name in SQL01


The fully qualified domain name (FQDN) in this case is of course DevSQL01.SQLRules.net

Hopefully this helps someone in the future





1 comment:

Anonymous said...

Thank you very much for this descriptive solution. This worked very well when firewall rules only allow for the base port (i.e. 1433)