💡 Learn more : Azure SQL Database Documentation (opens new window).
# Rename an Azure SQL database
Last week, I did a SQL post on Easily reset the Administrator password for an Azure SQL database (opens new window) and it did rather well. So I'm back with another SQL post that addresses another common scenario that folks ask "How do I rename an Azure SQL database"?
# Rename with command-line - TSQL
Connect with SQL Server Management Studio to your Azure database server
Right-click on the master database and select New Query
In the New Query window type
ALTER DATABASE [dbname] MODIFY NAME = [newdbname]. (Make sure you include the square brackets around both database names.)
# Rename with a GUI - SQL Server Management Studio
Connect with SQL Server Management Studio
Make sure Object Explorer pane is open.
Click on the database name (as the rename option from the dropdown will be greyed out) and type in the new name.
The Azure Portal should show the reflected the change almost immediately.