hi,
[quoted text, click to view] et wrote:
> How do I rename a database on sql server 2000? I have a database I
> brought up from a backup and has the same name as the current
> database. I don't want to detach the current one because I have to
> get data from both databases. I tried renaming the file name of the
> backup copy, and in the attach database dialog box, renaming the
> database, but it won't let me, since the "OriginalFileName" is the
> same name as the current one. If we can't rename a database, then
> why give us the option??? Thanks for your help.
you have to specify the MOVE part of the RESTORE syntax..
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/howtosql/ht_7_backpc_6ng9.asp
you do not need to modify he logical names but only the "physical" files( as
long as providing a new database name), so that the "new" database will
point to other physical files...
--
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtm http://italy.mvps.org DbaMgr2k ver 0.18.0 - DbaMgr ver 0.62.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
--------- remove DMO to reply