Rename a Database in SQL Server

sam
sam
378 Points
48 Posts

How we can change database name in SQL Server?

Views: 8547
Total Answered: 1
Total Marked As Answer: 0
Posted On: 17-Aug-2016 02:53

Share:   fb twitter linkedin
Answers
NiceOne Team
NiceOne...
1390 Points
18 Posts
         

Use following T-SQL

USE master;
GO
ALTER DATABASE ExistingDatabaseName
Modify Name = NewDatabaseName ;
GO

Where

ExistingDatabaseName=> the name of existing database
NewDatabaseName=> the new name of database

Posted On: 17-Aug-2016 06:13
 Log In to Chat