Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Renaming databases

Author  Topic 

tribune
Posting Yak Master

105 Posts

Posted - 2004-12-03 : 17:02:27
How do you rename the filenames for the data and transaction log? I'm not talking about the actual .MDF or .LDF, but rather the database's internal filename. I guess this is called the logical name?

robvolk
Most Valuable Yak

15732 Posts

Posted - 2004-12-03 : 17:03:47
ALTER DATABASE...MODIFY FILE
Go to Top of Page

Bustaz Kool
Master Smack Fu Yak Hacker

1834 Posts

Posted - 2004-12-03 : 18:31:11
Per BOL: (Under ALTER DATABASE...MODIFY FILE)

FILENAME can be specified only for files in the tempdb database, and the new name does not take effect until Microsoft SQL Server is restarted.

If this solution does not work you can try to use either BACKUP/RESTORE or DETATCH/ATTACH using the full file specification options. As always, See BOL for details...

HTH

HTH

Go to Top of Page
   

- Advertisement -