Rename SQL Azure database?

后端 未结 7 1102
南旧
南旧 2020-12-08 09:04

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 avail

相关标签:
7条回答
  • 2020-12-08 09:23

    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 that will open type ALTER DATABASE [dbname] MODIFY NAME = [newdbname].

    0 讨论(0)
  • 2020-12-08 09:26

    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

    0 讨论(0)
  • 2020-12-08 09:27

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

    0 讨论(0)
  • 2020-12-08 09:34

    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)

    0 讨论(0)
  • 2020-12-08 09:34

    It's Very simple for now - Connect to DB via SQL Management Studio and Just rename as you generally doing for DB [Press F2 on DB name]. It will allow you to do this and it will immediately reflect the same.

    0 讨论(0)
  • 2020-12-08 09:34

    You can easily do it from SQL Server Management Studio, Even from the community edition.

    0 讨论(0)
提交回复
热议问题