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 2005 Forums
 SQL Server Administration (2005)
 backup to new database

Author  Topic 

esthera
Master Smack Fu Yak Hacker

1410 Posts

Posted - 2009-03-29 : 03:50:01
I have a backup (full backup and transaction logs) of a database called users.
I want to restore the copy to users2

how do I do this -- if I try now it gives me a message the backup set holds a database other then the existing users2

jackv
Master Smack Fu Yak Hacker

2179 Posts

Posted - 2009-03-29 : 06:08:19
Use the RESTORE DATABASE , and the WITH REPLACE command. Note: you may have to kill users on user2 prior to the restore

Jack Vamvas
--------------------
http://www.ITjobfeed.com
Go to Top of Page

esthera
Master Smack Fu Yak Hacker

1410 Posts

Posted - 2009-03-29 : 06:15:44
it still doesn't work - no one is using the database.
Go to Top of Page

TonyTheDBA
Posting Yak Master

121 Posts

Posted - 2009-03-30 : 07:56:26
[code]RESTORE DATABASE Users2 FROM DISK = 'Users Backup Filename Here' WITH REPLACE[/code]
If that Does not work post the error message from the command here

--
Regards
Tony The DBA
Go to Top of Page
   

- Advertisement -