To rename a database from Management studio, right click the database from the Databases folder and select Rename. The name comes in editable mode, change the name and click Enter.
Please note that the database can’t be renamed if the database is already being used in any application or some operations is being performed in the database.
To force rename, we can stop the SQL Server service running on the machine by going to the Services from control panel and restarting it or stopping it.
This ensures that any users of the database blocked and all process going on have been aborted. Then try to rename the database and it should be renamed.Views: 2904 | Post Order: 5