Can I include port numbers in the hosts file? The reason I'm asking for is because I have sites that I'm trying to switch from one hosting server to another, and the sites point to an old SQL server that uses the standard TCP / IP port (1433). On the new server, the SQL Server port is different, and I do not want to change the connection strings for these sites.
Thanks!
You can configure an alias in the SQL configuration management tool. Designed to cover just this scenario.
. DNS .
hosts IP- ( ). .
, , .
-, , : hosts:
xxx.xxx.xxx.xxx MyServer
MyServer .
SQL Server 2005 " " , "Myserver, 1234", 1234 .
Since he remembers them in the fall the next time, that was enough for me.