[Mssqlcompressed-users] norecovery, replace and move?
Brought to you by:
xclayl
From: Antonio R. Z. <Ant...@me...> - 2010-03-12 16:51:20
|
Hi, Is it possible to use the NORECOVERY, REPLACE AND MOVE restore commands with msbp? For example, currently I have a job setup which restores a database using this command: ------------------ RESTORE DATABASE myDatabase FROM BDVmyDatabase1,BDVmyDatabase2,BDVmyDatabase3 with move 'mydb_primary_data' to 'd:\myDatabase\mydb_primary_data.mdf', move 'mydb_daily_data1' to 'd:\myDatabase\mydb_daily_data1.ndf', move 'mydb_daily_data2' to 'd:\myDatabase\mydb_daily_data2.ndf', move 'mydb_daily_data3' to 'd:\myDatabase\mydb_daily_data3.ndf', move 'mydb_daily_data4' to 'd:\myDatabase\mydb_daily_data4.ndf', move 'mydb_rare_data20' to 'd:\myDatabase\mydb_rare_data20.ndf', move 'mydb_indx' to 'd:\myDatabase\mydb_indx.ndf', move 'mydb_log' to 'd:\myDatabase\mydb_log.ldf', REPLACE, NORECOVERY ------------------ The database uses three Backup devices: ------------------ BDVmyDatabase1 D:\backup_files\BDVmyDatabase1.bak BDVmyDatabase2 D:\backup_files\BDVmyDatabase2.bak BDVmyDatabase3 D:\backup_files\BDVmyDatabase3.bak ------------------ Those backup devices are getting pretty big, so I would prefer to keep them compressed as .bak.gz files, and use msbp to restore the database directly from the compressed files. However, I have not been able to figure out how the restore command would look like. I.e. ------------------------- msbp.exe restore "local(path=D:\backup_files\BDVmyDatabase1.bak.gz;path=D:\backup_files\BDVmyDatabase2.bak.gz;path=D:\backup_files\BDVmyDatabase3.bak.gz;)" "gzip()" "db(database=myDatabase)" ------------------------- but where do I state the MOVE, REPLACE and NORECOVERY options? Thanks for your time! Cheers, Antonio |