RMAN question

  • From: "Sweetser, Joe" <JSweetser@xxxxxxxx>
  • To: "oracle-l" <oracle-l@xxxxxxxxxxxxx>
  • Date: Wed, 30 Sep 2009 13:59:55 -0600

Here's the scenario: Oracle 10.2.0.2 Enterprise on RH 5.  RMAN backups
are done to disk and I am using a 10.2.0.3 recovery catalog.  We are
building a lab environment and the systems group is using VMConverter to
clone this particular server.  Pretty nifty technology to clone a
running server but, as expected, not so nifty for copying open database
files.  But that's OK since I have my trusty RMAN backups on disk.  I
have done this before with a 9.2.0.6 database and it worked fine.  With
this database, I had to physically restore the archive logs before
recovering the database.  With 9i, RMAN was smart enough to pull the
archive logs from existing backups....or so I recall.  I do not have
that log file anymore so I can't be 100% sure.  With 10g, I had to
restore the archive logs first.  Is that expected behavior?

Here are a few snippets from my log file (with the RMAN commands added
in).  

Side question: Is there a way to make RMAN echo the commands typed into
the log file?  

I had to do the restore without the catalog since the lab environment is
on a completely separate network.  Command to invoke RMAN was "rman
target / nocatalog".  I deleted all the datafiles, redo logs, and
controfiles before starting.  Archivelogs one disk started from sequence
45161 and went to 45248.  Hope this formats OK.

Thanks,
-joe

Spooling started in log file: /tmp/restore-iap1.log

Recovery Manager10.2.0.2.0

RMAN> startup nomount;
Oracle instance started

Total System Global Area    1224736768 bytes

Fixed Size                     1260540 bytes
Variable Size                520094724 bytes
Database Buffers             687865856 bytes
Redo Buffers                  15515648 bytes

RMAN> set dbid <some fun number>
executing command: SET DBID

RMAN> set controlfile autobackup format for device type disk to '
/u04/oradata/backup/iap1/ctl_file/%F';
executing command: SET CONTROLFILE AUTOBACKUP FORMAT

RMAN> restore controlfile from autobackup;
Starting restore at 29-SEP-09
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=321 devtype=DISK

recovery area destination: /opt/app/oracle/flash_recovery_area
database name (or database unique name) used for search: IAP1
channel ORA_DISK_1: no autobackups found in the recovery area
channel ORA_DISK_1: looking for autobackup on day: 20090929
channel ORA_DISK_1: looking for autobackup on day: 20090928
channel ORA_DISK_1: looking for autobackup on day: 20090927
channel ORA_DISK_1: looking for autobackup on day: 20090926
channel ORA_DISK_1: looking for autobackup on day: 20090925
channel ORA_DISK_1: autobackup found:
/u04/oradata/backup/iap1/ctl_file/c-2661973255-20090925-07
channel ORA_DISK_1: control file restore from autobackup complete
output filename=/u01/oradata/iap1/control01.ctl
output filename=/u02/oradata/iap1/control02.ctl
output filename=/u03/oradata/iap1/control03.ctl
output filename=/u04/oradata/iap1/control04.ctl
Finished restore at 29-SEP-09

RMAN> alter database mount;
database mounted
released channel: ORA_DISK_1

RMAN> list backup of database summary;

List of Backups
===============
Key     TY LV S Device Type Completion Time #Pieces #Copies Compressed
Tag
------- -- -- - ----------- --------------- ------- ------- ----------
---
8814    B  0  A DISK        22-SEP-09       1       1       NO
TUE_DB_L0_SEP_22_2009_0225AM
8815    B  0  A DISK        22-SEP-09       1       1       NO
TUE_DB_L0_SEP_22_2009_0225AM
8816    B  0  A DISK        22-SEP-09       1       1       NO
TUE_DB_L0_SEP_22_2009_0225AM
8842    B  0  A DISK        23-SEP-09       1       1       NO
WED_DB_L0_SEP_23_2009_0225AM
8843    B  0  A DISK        23-SEP-09       1       1       NO
WED_DB_L0_SEP_23_2009_0225AM
8844    B  0  A DISK        23-SEP-09       1       1       NO
WED_DB_L0_SEP_23_2009_0225AM
8870    B  0  A DISK        24-SEP-09       1       1       NO
THU_DB_L0_SEP_24_2009_0225AM
8871    B  0  A DISK        24-SEP-09       1       1       NO
THU_DB_L0_SEP_24_2009_0225AM
8872    B  0  A DISK        24-SEP-09       1       1       NO
THU_DB_L0_SEP_24_2009_0225AM
8900    B  0  A DISK        25-SEP-09       1       1       NO
FRI_DB_L0_SEP_25_2009_0225AM
8901    B  0  A DISK        25-SEP-09       1       1       NO
FRI_DB_L0_SEP_25_2009_0225AM
8902    B  0  A DISK        25-SEP-09       1       1       NO
FRI_DB_L0_SEP_25_2009_0225AM

RMAN> restore database from tag='FRI_DB_L0_SEP_25_2009_0225AM';
Starting restore at 29-SEP-09
Starting implicit crosscheck backup at 29-SEP-09
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=321 devtype=DISK
Crosschecked 105 objects
Finished implicit crosscheck backup at 29-SEP-09

Starting implicit crosscheck copy at 29-SEP-09
using channel ORA_DISK_1
Finished implicit crosscheck copy at 29-SEP-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 backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to /u01/oradata/iap1/system01.dbf

<snip>

channel ORA_DISK_1: restored backup piece 1
piece handle=/u04/oradata/backup/iap1/data/iap1_m8kq3hct_1_1
tag=FRI_DB_L0_SEP_25_2009_0225AM
channel ORA_DISK_1: restore complete, elapsed time: 00:01:05
Finished restore at 29-SEP-09

RMAN> recover database;
Starting recover at 29-SEP-09
using channel ORA_DISK_1

starting media recovery

Oracle Error: 
ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error
below
ORA-01194: file 2 needs more recovery to be consistent
ORA-01110: data file 2: '/u01/oradata/iap1/undotbs01.dbf'

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 09/29/2009 14:16:18
RMAN-06053: unable to perform media recovery because of missing log
RMAN-06025: no backup of log thread 1 seq 45161 lowscn 5967013526447
found to restore

RMAN> list backup of archivelog all;


List of Backup Sets
===================

BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
8905    411.98M    DISK        00:00:10     25-SEP-09      
        BP Key: 8905   Status: AVAILABLE  Compressed: NO  Tag:
FRI_ARCH_SEP_25_2009_0635AM
        Piece Name: /u04/oradata/backup/iap1/arch/iap1_mbkq3um7_1_1

  List of Archived Logs in backup set 8905
  Thrd Seq     Low SCN    Low Time  Next SCN   Next Time
  ---- ------- ---------- --------- ---------- ---------
  1    45082   5967013004087 25-SEP-09 5967013012139 25-SEP-09
  1    45083   5967013012139 25-SEP-09 5967013018893 25-SEP-09
  1    45084   5967013018893 25-SEP-09 5967013022273 25-SEP-09
  1    45085   5967013022273 25-SEP-09 5967013025558 25-SEP-09
  1    45086   5967013025558 25-SEP-09 5967013035521 25-SEP-09
  1    45087   5967013035521 25-SEP-09 5967013042353 25-SEP-09
  1    45088   5967013042353 25-SEP-09 5967013049138 25-SEP-09
  1    45089   5967013049138 25-SEP-09 5967013049298 25-SEP-09
  1    45090   5967013049298 25-SEP-09 5967013052690 25-SEP-09
  1    45091   5967013052690 25-SEP-09 5967013064712 25-SEP-09

<snip>

RMAN> restore archivelog from sequence 45082 until sequence 45160;

<snip>

RMAN> recover database;

RMAN> 
Starting recover at 29-SEP-09
using channel ORA_DISK_1

starting media recovery

archive log thread 1 sequence 45092 is already on disk as file
/u04/oradata/arch/iap1_1_45092_643985223.arc
archive log thread 1 sequence 45093 is already on disk as file
/u04/oradata/arch/iap1_1_45093_643985223.arc
archive log thread 1 sequence 45094 is already on disk as file
/u04/oradata/arch/iap1_1_45094_643985223.arc
archive log thread 1 sequence 45095 is already on disk as file
/u04/oradata/arch/iap1_1_45095_643985223.arc

<snip>

archive log filename=/u04/oradata/arch/iap1_1_45245_643985223.arc
thread=1 sequence=45245
archive log filename=/u04/oradata/arch/iap1_1_45246_643985223.arc
thread=1 sequence=45246
archive log filename=/u04/oradata/arch/iap1_1_45247_643985223.arc
thread=1 sequence=45247
archive log filename=/u04/oradata/arch/iap1_1_45248_643985223.arc
thread=1 sequence=45248
archive log filename=/u04/oradata/arch/iap1_1_45248_643985223.arc
thread=1 sequence=45249
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 09/29/2009 14:55:48
RMAN-11003: failure during parse/execution of SQL statement: alter
database recover logfile '/u04/oradata/arch/iap1_1_45248_6
43985223.arc'
ORA-00310: archived log contains sequence 45248; sequence 45249 required
ORA-00334: archived log: '/u04/oradata/arch/iap1_1_45248_643985223.arc'

RMAN> alter database open resetlogs;
database opened

RMAN> list incarnation of database;

List of Database Incarnations
DB Key  Inc Key DB Name  DB ID            STATUS  Reset SCN  Reset Time
------- ------- -------- ---------------- --- ---------- ----------
1       1       IAP1     2661973255       PARENT  1          14-JAN-08
2       2       IAP1     2661973255       CURRENT 5967014115461
29-SEP-09

RMAN>

--
//www.freelists.org/webpage/oracle-l


Other related posts: