Tuesday, November 5, 2013

Rename Stand-Alone Instance of SQL Server 2012 Database

Are you looking for an option to rename the SQL 2012 database? If you have an existing stand-alone instance of an SQL 2012 database you wanted to rename the database then this cannot be down from object explorer. When you right click on your database you will be surprised that Rename option will be disabled. Ok, don’t get panic we an do this renaming by running simple query.

Let’s how does it looks if you right click on your database in SQL Server 2012,

image

Since this is disabled we will use SQL query to rename the database.

USE master;
GO
ALTER DATABASE DemoRename
Modify Name = DemoRenameDB ;
GO

image 

Now just refresh your Database and see the result,

image

No comments: