What if you need to create a duplicate database from RMAN backup on tape but because of your redundancy policy your backup is gone from RMAN catalog?
The steps below will guide you on how to do it. Same steps are applicable to a plain restore, with running restore controlfile from autobackup & restore database commands rather than a duplicate script.
Just use catalog command.
Let's assume you are doing backupsets (the approach will be the same if your are not). Copy (or ask yor sysadmin to copy) all the contents of your backup directory from tape into some location on the server, say /db/backup/DB1/. Also, copy init.ora file into $ORACLE_HOME/dbs/ and entire archive log directory into /db/archives/DB1. You will need to specify fully qualified backup piece name in the catalog command.
1.Do export ORACLE_SID=DB1
2. Connect to recovery catalog and use catalog command on every backup piece & if you want (but not necessary) on every archive log.
3. Run you duplicate script (see example in my blog).
In the script you will need to use "set until". You could do something like that:
set until time "to_date('10-01-2008' 09:05:00','mm-dd-yyyy hh24:mi:ss')";
4. If the script is missing some archive logs, you still can go into sqlplus and do:
recover database until cancel using backup controlfile;
and use cancel with no ";".
5. Alter database open resetlogs
6. Voila!
One of the reasons your script would fail is that: if you do controlfile autobackup by default it goes into $ORACLE_HOME/dbs (unless you specified differently). Catalog this piece as well. On my system it is name something like "c-167655678-85745849843-00. RMAN will tell you if the one you are trying to catalog is the wrong one.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment