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.
| Author |
Topic |
|
HSSona
Starting Member
5 Posts |
Posted - 2007-08-28 : 05:13:11
|
| Hi,I have a backup (.bak) of one 'AdventureWorks' database with me and need to restore it to the AdventureWorks database I have created in my SQL Server 2005 database. I go by the normal process --> restore from device and then select the path of the .bak file in my hard drive but it is giving the error "The backup set holds a backup of a database other than the existing database AdventureWorks".Obviously I have got the backup file from a different source and would like to replicate the same database in my own machine.Can anyone please help me find out why is this not working?Regards. |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2007-08-28 : 05:32:09
|
| you don't have to have a database with the same name onthe server to do a restore of it.or check the owerwrite existing db option._______________________________________________Causing trouble since 1980blog: http://weblogs.sqlteam.com/mladenp |
 |
|
|
HSSona
Starting Member
5 Posts |
Posted - 2007-08-28 : 06:20:58
|
| Thanks mate, but where do I set that option of overwriting existing db option?In the meantime I was going through the MSDN Help and have seen that this one is deliberately done to avoid overwriting the database by mistake (ie, you cannot restore from a backup that was not taken from the database that is being restored). To avoid it, one is required to specify something likeRESTORE DATABASE AdventureWorksFROM "C:\AdventureWorks.bak"but then again it throws the error "No entry in sysdevices for backup device 'C:\AdventureWorks.bak'. Update sysdevices and rerun statement."So the challenge still persists. |
 |
|
|
HSSona
Starting Member
5 Posts |
Posted - 2007-08-28 : 06:30:45
|
| Got it at last!Need to check the "Force overwrite over existing database" option during the restoration process. |
 |
|
|
|
|
|