The title may be a bit misleading, so let me clarify: I don't want to know how to rename a connection string or db name. What I'm trying to find out is how would I create a friendly label for my database connections in SQL Management Studio?
e.g. I have the following connections:
I want to rename them to something else, e.g. "dev server", "PreProd", "Live", or whatever the case may be. I thought I could easily do this in SSMS, but apparently I can't.
I'm always worried that I may inadvertently make a change on the wrong server and having a nice friendly name will go a long way in preventing it.
Go to start-administrative tools and open the data sources(odbc) then click on system dsn, here you will find the linked server dsn name. From here you can edit the properties of linked server. You can also test the connection.
To rename a DB instanceIn the navigation pane, choose Databases. Choose the DB instance that you want to rename. Choose Modify. In Settings, enter a new name for DB instance identifier.
Open Microsoft SQL Server Management Studio. Connect to the server wherein the DB you want to rename is located. Go to the location that MDF and LDF files are located and rename them exactly as you specified in first two alter commands. If you changed the folder path, then you need to move them there.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With