Renaming your SQL Server Database
Renaming your SQL Server Database
Renaming a SQL Server database is more difficult than you might be thinking. Sure, it is easy to change the name of the database in SSMS, or even by executing a script:
USE master GO ALTER DATABASE YOURDATABASENAME SET SINGLE_USER WITH ROLLBACK IMMEDIATE GO EXEC master..sp_renamedb 'YOURDATABASENAME','YOUR_NEW_DATABASE_NAME' GO ALTER DATABASE YOUR_NEW_DATABASE_NAME SET MULTI_USER GO
View On WordPress












