SQL Server Performance Forum – Threads Archive
Alter the Existing Database name
Dear Expert’sHow to alter the existing Database Name in sql server .
Thanks & Regards,
Pinky[:I]
Check out the ALTER DATABASE syntax in the online manual. [<img src=’/community/emoticons/emotion-1.gif’ alt=’

If it is sql server 2005, you can find a rename option if you right click the dbname at SQL Server Management Studio —————————————-
Contributing Editor, Writer & Forums Moderator
http://www.SQL-Server-Performance.Com Visit my Blog at
http://dineshasanka.spaces.live.com/
Also make sure that the applications connected to that db are not affected [<img src=’/community/emoticons/emotion-1.gif’ alt=’

You need to kill all users before renaming the database… ALTER DATABASE <DB NAME>
SET SINGLE_USER
WITH ROLLBACK IMMEDIATE;
GO
ALTER DATABASE MODIFY …. OR
EXEC sp_renamedb N’db name’, N’new db name’;
MohammedU.
Moderator
SQL-Server-Performance.com All postings are provided “AS IS†with no warranties for accuracy.
thank u it’s working.
]]>