Got dizzy the other day when, after moving around backup files, a final “restore database preview summary;
” got me a :
A web search straight away pointed me to Restore Database Preview Not Working (Doc ID 2652539.1) on metalink, proposing a solution. First off, rman
needs to be started in debug/trace mode as follows (credits to https://oraclespin.com/2010/11/28/how-to-turn-on-debugtrace-when-running-rman) :
We’ll now need to identify the backup piece causing the problem by looking out for some pattern like “... getBackupPiece with error 20216
“. In this case, a backup piece in backup set 6803 was incorrectly registered obviously :
ID 2652539.1 now recommends to do a crosscheck on the backup piece by tag name, followed by an uncatalog and a (re-)catalog. The tag name can be found by executing a "list backup of database;"
, the “select * from RC_BACKUP_PIECE where BS_KEY = 6803;” from the document didn’t work for me.
…
Now the crosscheck and the uncatalog :
The (re-)catalog, as given, failed due to a language error, maybe the document is already out of date in that respect :
I instead just did the well-known cataloging by file pattern and succeeded :
Yet another “crosscheck
…” of the backup piece only returned one file, as compared to the output above :
And now, finally, the “restore … preview …” is working again :
Enjoy