SQL Server 2005: Rename DB Server Instance Name?
Posted
by Code Sherpa
on Stack Overflow
See other posts from Stack Overflow
or by Code Sherpa
Published on 2010-03-13T20:30:32Z
Indexed on
2010/03/13
22:05 UTC
Read the original article
Hit count: 160
sql-server-2005
|database-administration
Hi,
Can somebody tell me how to rename the DB server instance name and a DB name in SQL Server 2005?
Right Now I Have
SERVER/OLDNAME
-- oldnameDB
I want to change the server instance and also change the db name.
I have tried:
EXEC sp_renamedb 'oldName', 'newName'
and that has changed the dbname as it appers in the tree directory. But, when I do "select @@servername" it is the old name. Also, the MDF and LDF files are still the old name.
How do change instance and db names as a clean sweep across the server?
Thanks.
© Stack Overflow or respective owner