Rename an SSMS DB connection name

Right, so anyway what you have to do is the following

  1. Get the name of the server the IP address points to. You can do this via the command prompt using nsLookup [ipaddress]
  2. use the name instead of the IP address

Alternatively, if you want to control what the actual displayed name is, you could add an entry for each of the IP addresses in your HOSTS file:

  1. Run any text editor as administrator
  2. browse to c:\windows\system32\drivers\etc (etc is a hidden directory) and open the HOSTS file
  3. for each IP address, add a record like such: 1.2.3.4 MyFancyServerName
  4. You can now use MyFancyServerName instead of the IP Address 1.2.3.4.

Adding on to James Barnard's answer.

With SSMS 18.7.1 (and maybe earlier versions) you can actually right click the connection in your Object Explorer and select the Register... option. This way you don't have to retype your connection details in the Registered Servers window. SMSS 18.7 server registration steps


I've struggled for years with SSMS database connections that don't have friendly names but are stuck with an IP address or a server/database name. You'd think MS would have provided ways for users to manage these by now, but no.

Something you might consider is using registered servers. SSMS 17 (I don't know about earlier versions) has these and I find them easier to use because you name them whatever you want.

Invoke View/Registered servers to show that pane, then expand the Database Engine node. Right-click the Local Server Groups node and then New Server Registration. Fill out the fields putting whatever you want for a name in the Registered server name box, and test the connection. Once it works, click the save button and you're done. Double-clicking the new registered server connection connects you to the database and opens up the object explorer.

I also switched my startup options (Tools/Options.../Environment/Startup) "At startup" choice to "Open empty environment". This brings up the IDE without prompting me to immediately connect to a database.

Tags:

Ssms