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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2003-08-26 : 08:12:43
|
| John writes "A customer has sent me a copy of two db's in .bak form. I need to import those db's into existing ones for use on their website. I have created 2 db's with the same names as the ones on their old providers SQL server. If I try to Restore the .bak file to one of the newly created db's, it errors out. Am I going about this wrong, or am I just missing something? Any help or pointing in the right direction would really be appreciated. Thanks." |
|
|
shsmonteiro
Constraint Violating Yak Guru
290 Posts |
Posted - 2003-08-26 : 09:00:12
|
| What is your SQL version? And what is the error message?regards,Sérgio MonteiroTrust in no Oracle |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2003-08-26 : 12:38:36
|
| Here is an example of the RESTORE command to run inside Query Analyzer:RESTORE DATABASE DBNameGoesHereFROM DISK = 'F:\MSSQL\Backup\FileName.bak'WITH REPLACE, STATS, MOVE 'DBNameGoesHere_Data' TO 'E:\MSSQL\Data\DBNameGoesHere_Data.MDF',MOVE 'DBNameGoesHere_Log' TO 'F:\MSSQL\Data\DBNameGoesHere_Log.LDF'What is the command that you are running?Tara |
 |
|
|
mohdowais
Sheikh of Yak Knowledge
1456 Posts |
Posted - 2003-08-26 : 13:05:28
|
Most of the time, the only error I get while restoring a database backup from another machine is regarding invalid file paths caused by the difference in SQL Server installation paths. If you donot change the file path to restore the data and log files to, it'll try to restore to the paths recorded in the backup file, which might be an invalid folder or file name on the current machine.Owais Make it idiot proof and someone will make a better idiot |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2003-08-26 : 13:34:17
|
| The MOVE command in the above example shows how to correct the problem that Owais mentioned.Tara |
 |
|
|
shsmonteiro
Constraint Violating Yak Guru
290 Posts |
Posted - 2003-08-26 : 22:45:08
|
| Another possible error is to have 2 backups in one physical device and do not specify the FILE paremeter in restore operation, or choose the right backup in EM, qhen you want to restore the second(and son on...) backup.Not sure if it would return an error or just restore over and over the same backupset.regards,Sérgio MonteiroTrust in no Oracle |
 |
|
|
|
|
|
|
|