How can we help you today? How can we help you today?
dterrie
Peter, Thanks for the help. Just to complete the loop, since I've run the command once and created the target db, I need to replace WITH RECOVERY with WITH RECOVERY, REPLACE yes? / comments
Peter, Thanks for the help. Just to complete the loop, since I've run the command once and created the target db, I need to replace WITH RECOVERY with WITH RECOVERY, REPLACE yes?
0 votes
RE the MOVE clauses, I'm not actually trying to change any file paths. Both servers are identical - so I'm just tying to restore the database backed up from server A onto server B with all files residing in the same drives/folders. Based on your reply, I tried this (actual DB name and file names): EXEC master..sqlbackup '-sql "RESTORE DATABASE California FROM DISK = [h:\backup\database\California.sqb] WITH MOVE [California.mdf] TO [F:\FileGroups\Data], MOVE [California_Data.ndf] TO [F:\FileGroups\Data], MOVE [California_Indexes.ndf] TO [G:\FileGroups\Indexes], MOVE [California_Log.ldf] TO [H:\FileGroups\Logs]"' And get this error: SQL error 3013: SQL error 3013: RESTORE DATABASE is terminating abnormally. SQL error 3234: SQL error 3234: Logical file 'California.mdf' is not part of database 'California'. Use RESTORE FILELISTONLY to list the logical file names. If I remove the file name extensions, like this: EXEC master..sqlbackup '-sql "RESTORE DATABASE California FROM DISK = [h:\backup\database\California.sqb] WITH MOVE [California] TO [F:\FileGroups\Data], MOVE [California_Data] TO [F:\FileGroups\Data], MOVE [California_Indexes] TO [G:\FileGroups\Indexes], MOVE [California_Log] TO [H:\FileGroups\Logs]"' I get the same error: SQL error 3234: SQL error 3234: Logical file 'California_Data' is not part of database 'California'. Use RESTORE FILELISTONLY to list the logical file names. Clearly, I'm missing something here... / comments
RE the MOVE clauses, I'm not actually trying to change any file paths. Both servers are identical - so I'm just tying to restore the database backed up from server A onto server B with all files re...
0 votes