Rename SQL Azure database?

Arun Rana picture Arun Rana · Oct 10, 2011 · Viewed 38.6k times · Source

How can i rename the database in sql Azure?

I have tried Alter database old_name {MODIFY NAME = new_name} but not worked.

Is this feature available in SQL Azure or not?

Answer

Brett picture Brett · Feb 9, 2012

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.)