Re: RMAN questions

From: Steve Baldwin <stbaldwin_at_multiservice.com>
Date: Tue, 5 May 2009 15:33:26 +1000
Message-ID: <1D0A519D-5513-4E8F-840B-25F8CEA5BADE_at_multiservice.com>



Thanks for the reply Jared. I discovered that rman was seeing a newer control file than the one stored with the latest backup and was getting confused (that makes two of us).

Anyway, I found I *could* do a complete recovery if I copied all the archived logs from node 2 to node 1.

What I'm now trying is to do a complete recovery from the rman backup set only. I have renamed the directory containing archived logs and started again.

Here's my rman recovery session. I removed all files from ASM before I started ...

[oracle_at_opbld05 backup-scripts]$ rman target=/

Recovery Manager: Release 11.1.0.7.0 - Production on Mon May 4 22:50:48 2009

Copyright (c) 1982, 2007, Oracle. All rights reserved.

connected to target database (not started)

RMAN> _at_set-dbid.rman

RMAN> set DBID=1460247643
executing command: SET DBID

RMAN> **end-of-file**

RMAN> startup pfile=/tmp/sb.ora nomount

Oracle instance started

Total System Global Area 8150720512 bytes

Fixed Size                     2161152 bytes
Variable Size               4630513152 bytes
Database Buffers            3489660928 bytes
Redo Buffers                  28385280 bytes

RMAN> _at_restore-control.rman

RMAN> run {
2> set controlfile autobackup format for device type disk to '/var/ oracle/rman-backup/%F';

3> allocate channel c1 device type disk;
4> restore spfile to '+DATA/rac01d/spfilerac01d.ora' from autobackup;
5> restore controlfile from autobackup maxseq 200 maxdays 100;
6> }

executing command: SET CONTROLFILE AUTOBACKUP FORMAT using target database control file instead of recovery catalog

allocated channel: c1
channel c1: SID=16353 instance=rac01d1 device type=DISK

Starting restore at 04-MAY-09

recovery area destination: +FRA
database name (or database unique name) used for search: RAC01D

channel c1: no AUTOBACKUPS found in the recovery area
channel c1: looking for AUTOBACKUP on day: 20090504
channel c1: looking for AUTOBACKUP on day: 20090503
channel c1: AUTOBACKUP found: /var/oracle/rman-backup/ 
c-1460247643-20090503-00
channel c1: restoring spfile from AUTOBACKUP /var/oracle/rman-backup/ c-1460247643-20090503-00
channel c1: SPFILE restore from AUTOBACKUP complete Finished restore at 04-MAY-09

Starting restore at 04-MAY-09

recovery area destination: +FRA
database name (or database unique name) used for search: RAC01D

channel c1: no AUTOBACKUPS found in the recovery area
channel c1: looking for AUTOBACKUP on day: 20090504
channel c1: looking for AUTOBACKUP on day: 20090503
channel c1: AUTOBACKUP found: /var/oracle/rman-backup/ 
c-1460247643-20090503-00
channel c1: restoring control file from AUTOBACKUP /var/oracle/rman- backup/c-1460247643-20090503-00
channel c1: control file restore from AUTOBACKUP complete output file name=+DATA/rac01d/controlfile/current.260.686011903 output file name=+FRA/rac01d/controlfile/current.260.686011905 Finished restore at 04-MAY-09
released channel: c1

RMAN> **end-of-file**

RMAN> mount database;

database mounted

RMAN> run {

2> set until time "to_date('20090503003000', 'YYYYMMDDHH24MISS')";
3> restore database;
4> recover database;
5> }

executing command: SET until clause

Starting restore at 04-MAY-09
Starting implicit crosscheck backup at 04-MAY-09 allocated channel: ORA_DISK_1
Crosschecked 141 objects
Finished implicit crosscheck backup at 04-MAY-09

Starting implicit crosscheck copy at 04-MAY-09 using channel ORA_DISK_1
Crosschecked 4 objects
Finished implicit crosscheck copy at 04-MAY-09

searching for all files in the recovery area cataloging files...
no files cataloged

using channel ORA_DISK_1

channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00001 to +DATA/rac01d/datafile/ 
system.264.683508483
channel ORA_DISK_1: restoring datafile 00002 to +DATA/rac01d/datafile/ sysaux.263.683508483
channel ORA_DISK_1: restoring datafile 00003 to +DATA/rac01d/datafile/ undotbs1.261.683508483
channel ORA_DISK_1: restoring datafile 00004 to +DATA/rac01d/datafile/ undotbs2.260.683508483
channel ORA_DISK_1: restoring datafile 00005 to +DATA/rac01d/datafile/ users.259.683508483
channel ORA_DISK_1: reading from backup piece /var/oracle/rman-backup/ nbke29ei_1_1
channel ORA_DISK_1: piece handle=/var/oracle/rman-backup/nbke29ei_1_1 tag=TAG20090503T001201
channel ORA_DISK_1: restored backup piece 1 channel ORA_DISK_1: restore complete, elapsed time: 00:00:55 Finished restore at 04-MAY-09

Starting recover at 04-MAY-09
using channel ORA_DISK_1

starting media recovery

channel ORA_DISK_1: starting archived log restore to default destination channel ORA_DISK_1: restoring archived log archived log thread=1 sequence=827
channel ORA_DISK_1: restoring archived log archived log thread=2 sequence=797
channel ORA_DISK_1: reading from backup piece /var/oracle/rman-backup/ ncke29fp_1_1
channel ORA_DISK_1: piece handle=/var/oracle/rman-backup/ncke29fp_1_1 tag=TAG20090503T001241
channel ORA_DISK_1: restored backup piece 1 channel ORA_DISK_1: restore complete, elapsed time: 00:00:01 archived log file name=+FRA/rac01d/archivelog/2009_05_04/ thread_1_seq_827.258.686012229 thread=1 sequence=827 archived log file name=+FRA/rac01d/archivelog/2009_05_04/ thread_2_seq_797.259.686012229 thread=2 sequence=797 channel default: deleting archived log(s) archived log file name=+FRA/rac01d/archivelog/2009_05_04/ thread_2_seq_797.259.686012229 RECID=3737 STAMP=686012229 unable to find archived log

archived log thread=2 sequence=798
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 05/04/2009 22:57:10 RMAN-06054: media recovery requesting unknown archived log for thread 2 with sequence 798 and starting SCN of 16941747

RMAN> Note that rman recovered the spfile and control file from 20090503 (which is what I wanted), but for some reason is processing archivelogs from 2009_05_04. Here are a list of the files from the latest backup ...

[oracle_at_opbld05 rman-backup]$ ls -lt | head -20 total 6770444

-rw-rw-r-- 1 root   bacula      393669 May  3 00:13 rman- 
backup-0-20090503000932.log
-rw-r----- 1 oracle oinstall  26804224 May  3 00:12  
c-1460247643-20090503-00
-rw-r----- 1 oracle oinstall    130560 May  3 00:12 ncke29fp_1_1
-rw-r----- 1 oracle oinstall 214597632 May  3 00:12 nbke29ei_1_1
-rw-r----- 1 oracle oinstall  24673280 May  3 00:11 nake29e9_1_1
-rw-r----- 1 oracle oinstall  35804160 May  3 00:11 n9ke29e0_1_1
-rw-r----- 1 oracle oinstall  38232576 May  3 00:11 n8ke29do_1_1
-rw-r----- 1 oracle oinstall  39112192 May  3 00:11 n7ke29dg_1_1
-rw-r----- 1 oracle oinstall  46446080 May  3 00:11 n6ke29d0_1_1
-rw-r----- 1 oracle oinstall  50897408 May  3 00:11 n5ke29cg_1_1
-rw-r----- 1 oracle oinstall  58066944 May  3 00:10 n4ke29c0_1_1
-rw-r----- 1 oracle oinstall  58874880 May  3 00:10 n3ke29bh_1_1
-rw-r----- 1 oracle oinstall  59238912 May  3 00:10 n2ke29b1_1_1
-rw-r----- 1 oracle oinstall  60470784 May  3 00:10 n1ke29ai_1_1

Do you have any idea why I'm seeing this behaviour?

BTW, I'm using the DB control file as the backup 'repository'.

Thanks a lot for your help.

Steve

On 05/05/2009, at 10:09 AM, Jared Still wrote:

>
> comments inline
>
> On Mon, May 4, 2009 at 3:42 PM, Steve Baldwin <stbaldwin_at_multiservice.com
> > wrote:
>
> :
> RMAN-06025: no backup of archived log for thread 1 with sequence 829
> and starting SCN of 16945318 found to restore
> RMAN-06025: no backup of archived log for thread 1 with sequence 828
> and starting SCN of 16941751 found to restore
>
> [oracle_at_opbld05 archive-duplex]$ ls -la *833* *832* *828* *829*
> -rw-r----- 1 oracle oinstall 687104 May 3 00:42 1_828_683508574.dbf
> -rw-r----- 1 oracle oinstall 1489920 May 3 01:12 1_829_683508574.dbf
> ..
> What have I missed?
>
> The files seem to be there.
>
> What does the 'list backup of database'
> and 'list backup of archive log all' show?
>
>
> Secondly, is there any way to tell RMAN where to backup its archived
> logs from? I have duplexed archive logs - I'm logging to FRA (on
> shared storage) and to local storage on each cluster node. I want
> RMAN to backup the archived logs from the FRA so that I get a full
> complement of logs, but it seems that it is instead choosing to
> backup from the other destination so is only backing up log files
> from one node.
>
> My backup commands look like this :
>
> RMAN> run {
> 2> _at__at_config.rman
> 3> configure controlfile autobackup on;
> 4> configure controlfile autobackup format for device type disk to '/
> var/oracle/rman-backup/%F';
> 5> configure archivelog deletion policy to backed up 5 times to
> device type disk;
> 6> configure retention policy to recovery window of 10 days;
>
> You only need to run the configure commands once, not
> every time you run a backup.
>
>
> 7> **end-of-file**
> 8> _at__at_alloc.rman
> 9> allocate channel c1 device type disk format '/var/oracle/rman-
> backup/%U';
> 10> **end-of-file**
> 11> backup as compressed backupset incremental level 0 database plus
> archivelog;
>
> when doing 'plus archivelog', rman automagically does a number of
> other things.
> one of them is "Runs the BACKUP ARCHIVELOG ALL command" check the
> Recover
> Admin Guide under BACKUP for the others.
>
> backup archivelog all does this:
> If you specify BACKUP ARCHIVELOG ALL, then RMAN backs up exactly one
> copy of each distinct log sequence number. For example, if you
> archive to multiple destinations, RMAN backs up one copy of each log
> sequence number—not each copy of each log sequence number. For other
> commands, such as DELETE, ALL does refer to every log, even
> duplicate log sequences.
>
> Doesn't seem to be any method to specify source.
>
> You are on RAC and ASM, so there may be some differences.
>
> I remain gleefully ignorant of both RAC and ASM. :)
>
>
> 12> _at__at_crosscheck.rman
> 13> crosscheck backup;
> 14> crosscheck archivelog all;
> 15> **end-of-file**
> 16> _at__at_purge.rman
> 17> delete archivelog all;
> 18> delete expired backup;
> 19> delete obsolete;
>
> No need to run these during every backup.
>
> Do you know that by setting the window to N days, and running
> delete expired/obsolete, your backups will no longer be in the
> catalog?
>
> And that you won't be able to restore backups greater than N days old?
>
> Well, you may be able to, but getting the backup files back into the
> catalog
> probably requires help from support.
>
> Sorry, don't have an idea for your specific problem of not finding
> the archive
> log during restored.
>
> Jared
>

This email is intended solely for the use of the addressee and may contain information that is confidential, proprietary, or both. If you receive this email in error please immediately notify the sender and delete the email.

--
http://www.freelists.org/webpage/oracle-l
Received on Tue May 05 2009 - 00:33:26 CDT

Original text of this message