2
Reply

What command do we use to rename a db?

Dinesh Beniwal

Dinesh Beniwal

18y
6.4k
0
Reply

    USE master; GO ALTER DATABASE AdventureWorks2012 Modify Name = Northwind ; GOsp_renamedb [ @dbname = ] 'old_name' , [ @newname = ] 'new_name' is second option But Avoid it bcz This feature will be removed in a future version of Microsoft SQL Server. Use ALTER DATABASE MODIFY NAME instead.

    sp_renamedb ‘oldname’ , ‘newname’