Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> QUESTION - rman 8i - how to capture last backed up sequence number...?

QUESTION - rman 8i - how to capture last backed up sequence number...?

From: BD <bobby_dread_at_hotmail.com>
Date: 7 Jun 2006 15:37:03 -0700
Message-ID: <1149719823.733761.155970@g10g2000cwb.googlegroups.com>


Hi, all.

I'm using 8.1.7.4 on AIX 5.2.0.2.

I'm working to automatically generate an rman recovery script, when my backup runs.

At this point, the shell script that I use to run the backup job also logs into sqlplus and creates an rman script, that contains all the 'set newname' commands required - it renames data files, online redo files for their eventual recreation, with 'alter database' commands, and creates a new tempfile in the temp tablespace.

After that is generated, I have a separate script, which runs 'sed' against that initial script, and substitutes volume names where necessary for the server which will be used for the recovery.

Best of all, it actually works!! ;-)

The only thing left for me to wrestle with here is how to capture the most recent backed-up sequence number, for the 'until' clause in my recover statement, as in

recover database until logseq 3344 thread 1;

I know one way I _could_ do it, would be: in rman, run a 'list backupset of archivelog all', spool that out to a file, then somehow using shell scripting, parse out the last sequence number in the list, and get that into my restore script when it's generated. I imagine it's doable that way, but haven't really worked out the logic yet.

Before I take that on, I figured it would be worth checking to see if anyone else had any suggestions, assuming I want an incomplete recovery that will bring me as up to date as the most recent sequence number that was backed up...

Thanks for any suggestions!

BD Received on Wed Jun 07 2006 - 17:37:03 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US