Friday, March 30, 2012

restore with replace

I was testing a restore using a backup of db1 and
restoring to db2. Both db1 and db2 already exist and have
the same file structure. The restore was also moving the
db1 files to the db2 file locations. I did not specify
with replace. I expected the restore to fail, but it
didn't. What am I missing?Through a job in EM. Below is sql.
restore database SynComp_219
from disk = '\\hfddbms1p\d-
drive\mssql\backup\synygy_1t_1206a_0711.bak'
with
move 'metadata_001' to 'D:\MSSQL$INST1
\Data\metadata_IC_APP\metadata_001.mdf',
move 'datasets_001' to 'D:\MSSQL$INST1
\Data\metadata_IC_APP\datasets_001.ndf',
move 'indexes_001' to 'D:\MSSQL$INST1
\Data\metadata_IC_APP\indexes_001.ndf',
move 'logs_001' to 'E:\MSSQL$INST1\log\logs_001.ldf',
recovery,
stats = 5
>--Original Message--
>GM
>How did you perform restore command ? by T-SQL or EM.
>"GM" <gamaglia@.lnc.com> wrote in message
>news:9cf201c35c29$0ee50350$a001280a@.phx.gbl...
>> I was testing a restore using a backup of db1 and
>> restoring to db2. Both db1 and db2 already exist and
have
>> the same file structure. The restore was also moving the
>> db1 files to the db2 file locations. I did not specify
>> with replace. I expected the restore to fail, but it
>> didn't. What am I missing?
>
>.
>

No comments:

Post a Comment