Rename SQL Azure database?

Just so people don't have to search through the comments to find this... Use:

ALTER DATABASE [dbname] MODIFY NAME = [newdbname]

(Make sure you include the square brackets around both database names.)


Please check that you've connected to master database and you not trying to rename system database.

Please find more info here: https://msdn.microsoft.com/en-US/library/ms345378.aspx


You can also connect with SQL Server Management Studio and rename it in Object Explorer. I just did so and the Azure Portal reflected the change immediately.

Do this by clicking on the database name (as the rename option from the dropdown will be greyed out)