Asked Tom the below question. I don't understand his response (I just don't get it - how?!). I don't wanna pest him anymore. Can someone enlighten this dim wit (me)?
Thanks.
Excerpt :
"Just to replay the case - A single machine hosted the target and the catalog. The catalog was last backed up at 10pm last night. The target was backed up at 8am this morning (and at 8am yesterday, using the catalog). Target archivelogs were backed up every hour (using RMAN). The machine blew this afternoon at 4pm. I've lost EVERYTHING (including all controlfiles) concerning the target and the catalog. Unfortunately, I was then only able to restore the catalog as of a point in time - 10pm last night. Now, using this catalog - I can only restore an OLD target controlfile. No matter what, I would only be able to restore/recover the target database as of 10pm (or earlier) yesterday. Correct?" Note : Controlfile auto backup feature was NOT turned on for target
His response :
"you would get everything -- everything would be recoverable. The backed up data exists, it is out there. rman knows what it would have called it.
See chapter 10 of the 9ir2 rman guide -- various scenario's are played out there. In particular:
Performing Recovery with a Backup Control File and No Recovery Catalog"
-------------------
I've read the User guide. I've re-read the chapter 10 over and over again. I simply don't get it!! How would I be able to perform a complete recovery (excluding online logs ofcourse) with an outdated catalog and/or an old target controlfile?
OK: if the control file is old, you restore and roll forward to the last archive you have on disk. Even if the control file has no entries of this "new archives" created after the backups, it will allow you to roll past this point. "Recover using backup controlfile".
If you have all the archivelogs on tape, you can restore them to disk, "catalog" them and you will be able to recover.
Oracle Certified Master
Oracle Certified Professional 6i,8i,9i,10g,11g
email: ocp_9i@yahoo.com
The reason being RMAN always includes the control file in a backup operation that includes file 1 (system data file),regardless of the autobackup setting.
so u will be able to recover completely in your case.
for extracting the controlfile from the backupset when not using a catalog you need to do this
DECLARE
v_dev varchar2(50); -- device type allocated for restore
v_done boolean; -- has the controlfile been fully extracted yet
type t_fileTable is table of varchar2(255)
index by binary_integer;
v_fileTable t_fileTable; -- Stores the backuppiece names
v_maxPieces number:=1; -- Number of backuppieces in backupset
BEGIN
-- Initialise the filetable & number of backup pieces in the backupset
-- This section of code MUST be edited to reflect the available
-- backupset before the procedure is compiled and run.
-- In this example, the backupset consists of 4 pieces:
v_fileTable(1):='CCE_arfoc0fh_1_1';
v_fileTable(2):='CCE_asfoc125_1_1';
v_fileTable(3):='CCE_asfoch76_1_1';
v_fileTable(4):='CCE_asfockkj_1_1';
v_maxPieces:=4;
-- Allocate a device. In this example, I have specified 'sbt_tape' as I am
-- reading backuppieces from the media manager. If the backuppiece is on disk,
-- specify type=>null
v_dev:=sys.dbms_backup_restore.deviceAllocate(type=>'sbt_tape',ident=>'t1');
-- Begin the restore conversation
sys.dbms_backup_restore.restoreSetDatafile;
-- Specify where the controlfile is to be recreated
sys.dbms_backup_restore.restoreControlfileTo(cfname=>'/u02/oralog1/CCE/new_control.ora');
-- Restore the controlfile
FOR i IN 1..v_maxPieces LOOP
sys.dbms_backup_restore.restoreBackupPiece(done=>v_done,handle=>v_fileTable(i),params=>null);
IF v_done THEN
GOTO all_done;
END IF;
END LOOP;
<>
-- Deallocate the device
sys.dbms_backup_restore.deviceDeallocate;
END;
/
Oracle Certified Master
Oracle Certified Professional 6i,8i,9i,10g,11g
email: ocp_9i@yahoo.com
Originally posted by jmodic Ahem.... This kind of loop structure must have been copy-pasted from one of Feuerstein's examples of good programing pracztices.
No, from METALINK:
Note:60545.1
Oracle Certified Master
Oracle Certified Professional 6i,8i,9i,10g,11g
email: ocp_9i@yahoo.com
Bookmarks