Tuesday, May 24, 2011

Another RMAN Confusion

There is a general thinking that as long as we backup the database using RMAN, whether to tape or disk, we should be able to use RMAN restore command to restore the backupset to whichever server we want, and use that backupset to recover the database on a different server.

This is completely false. RMAN restore command is not same as OS level 'restore a file' command. RMAN restore reads out the datafiles from the backupset and lays them out under data directories specified by db_file_name_convert and log_file_name convert.

Having said that, there is absolutely no way to restore a RMAN backupset from a tape to disk and then use it to build the database.

When RMAN creates a backup directly on tape, it's header will be different than a backupset created by rman to disk. Thus, if that tape backup is manually copied to disk, RMAN will not recognize the backupset header and will report it as corrupted.

So real solution is, configure Media Management software to the alternate server and restore the db using "duplicate" command.