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)
 How to restore backup on different db name

Author  Topic 

rajkumarrai_bis
Yak Posting Veteran

78 Posts

Posted - 2007-03-30 : 18:25:38
How to restore backup on different db name
Backup is of DB Practical
now when i am trying to restore over PracticalFinal on the same server it is giving me error
I read somewhere that i should use move option
but i dont how to apply that
can any one tell me how can i can do that from enterprise manager
I m using SQL Server 2000

snSQL
Master Smack Fu Yak Hacker

1837 Posts

Posted - 2007-03-30 : 18:40:03
In Books Online you'll find two topics
How to restore a database backup (Enterprise Manager)
How to restore a database with a new name (Transact-SQL)

The first one tells you how to do it in Enterprise Manager, step 3 tells you how to change the name.

You'll find Books Online surprisingly helpful!
Go to Top of Page

suresha_b
Yak Posting Veteran

82 Posts

Posted - 2007-03-31 : 05:48:29
RESTORE DATABASE PracticalFinal -- Different database name
FROM DISK = 'D:\SQL\Practical.bak'
WITH MOVE 'Practical_Data' TO 'D:\SQL\PracticalFinal_Data.mdf',
MOVE 'Practical_Data1' TO 'D:\SQL\PracticalFinal_Data1.ndf',
MOVE 'Practical_Log' TO 'D:\SQL\PracticalFinal_Log.ldf'

Suresh B.
Go to Top of Page
   

- Advertisement -