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 -> RMAN-06023 in Recovery after a total loss of data

RMAN-06023 in Recovery after a total loss of data

From: Sergio Ginja <sginja_at_hotmail.com>
Date: 31 Aug 2001 03:46:40 -0700
Message-ID: <4bf58d47.0108310246.3d2bbf0d@posting.google.com>


I'm doing tests with RMAN to validate total online Backup/Restore (after a total media failure). The backup finishes ok, but the recovery process fails with the following error: Can you help me, please?

Thanks in advance



/oracle/bd/OraHome1/bin/rman cmdfile
'/oracle/bd/scripts/database_restore_database.rcv'

  Sun Microsystems Inc. SunOS 5.8 Generic February 2000

  Recovery Manager: Release 8.1.7.0.0 - Production

  RMAN> connect target 'rmandba/rmandba_at_PROD'

  2> connect catalog 'rman_db1/rman_db1_at_RMANDB'
  3> 
  4> # THE DB MUST BE IN _nomount_ MODE BEFORE RUNNING THIS SCRIPT
  5> 
  6> run {
  7> #
  8> #
  9> # Restore datafiles and recovers them completely to the
_higher_logseq_id selected
  10> # 
  11> # 
  12> allocate channel t1 type 'SBT_TAPE'; 
  13> allocate channel t2 type 'SBT_TAPE'; 
  14> #
  15> # Restore Database
  16> alter database mount;
  17> #
  18> #
  19> set until logseq=23 thread=1;
  20> restore database;
  21> #
  22> # Uncomment the next line and replace <...> parameters with the
correct values
  23> #
  24> #
  25> # Recover Database
  26> recover database;
  27> #
  28> # Open DB
  29> alter database open resetlogs;
  30> }
  31> 

  RMAN-06006: connected to target database: PROD (not mounted)

  RMAN-06008: connected to recovery catalog database

  RMAN-03022: compiling command: allocate
  RMAN-03023: executing command: allocate
  RMAN-08030: allocated channel: t1
  RMAN-08500: channel t1: sid=10 devtype=SBT_TAPE
  RMAN-08526: channel t1: VERITAS NetBackup for Oracle8 - Release
3.4GA (030800)
  RMAN-03022: compiling command: allocate
  RMAN-03023: executing command: allocate
  RMAN-08030: allocated channel: t2
  RMAN-08500: channel t2: sid=8 devtype=SBT_TAPE
  RMAN-08526: channel t2: VERITAS NetBackup for Oracle8 - Release
3.4GA (030800)

  RMAN-03022: compiling command: alter db   RMAN-06199: database mounted

  RMAN-03022: compiling command: set

  RMAN-03022: compiling command: restore
  RMAN-03025: performing implicit partial resync of recovery catalog
  RMAN-03023: executing command: partial resync
  RMAN-08003: starting partial resync of recovery catalog
  RMAN-08005: partial resync complete

  RMAN-03022: compiling command: IRESTORE
  RMAN-00571: ===========================================================
  RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS

  RMAN-00571: ===========================================================
  RMAN-03002: failure during compilation of command
  RMAN-03013: command type: restore
  RMAN-03002: failure during compilation of command
  RMAN-03013: command type: IRESTORE
  RMAN-06026: some targets not found - aborting restore
  RMAN-06023: no backup or copy of datafile 6 found to restore
  RMAN-06023: no backup or copy of datafile 5 found to restore
  RMAN-06023: no backup or copy of datafile 4 found to restore
  RMAN-06023: no backup or copy of datafile 3 found to restore
  RMAN-06023: no backup or copy of datafile 2 found to restore   RMAN-06023: no backup or copy of datafile 1 found to restore

This is the script used to perform the backup:

connect target 'rmandba/rmandba_at_PROD'
  connect catalog 'rman_db1/rman_db1_at_RMANDB'

  run {
# Hot database level 0 whole backup

  allocate channel t1 type 'SBT_TAPE';
  allocate channel t2 type 'SBT_TAPE';
  backup
    incremental level 0
    skip inaccessible
    tag hot_db_bk_level0
    filesperset 50
    # recommended format
    format 'bk_%s_%p_%t'
      (database);
    sql 'alter system archive log current';     # backup all archive logs
    backup

     filesperset 100
     format 'al_%s_%p_%t'
     (archivelog all
      delete input);

  backup current controlfile;
  }

The restore/recovery are done with these scripts:

  1. Restore Control files

  connect target 'rmandba/rmandba_at_PROD'
  connect catalog 'rman_db1/rman_db1_at_RMANDB'

# THE DB MUST BE IN _close_ MODE LISTENER UP BEFORE RUNNING THIS
SCRIPT
# Start the DB in _nomount_ mode

  startup nomount;

  run {

  #

# Restore control files;
#
#

  allocate channel t1 type 'SBT_TAPE';
  allocate channel t2 type 'SBT_TAPE';
  #
# Restore Controlfiles and mount the DB to restore
  restore controlfile;
  }

2.Restore/recover database
connect target 'rmandba/rmandba_at_PROD'
  connect catalog 'rman_db1/rman_db1_at_RMANDB'

  run {

  #

#
#

  allocate channel t1 type 'SBT_TAPE';
  allocate channel t2 type 'SBT_TAPE';
  #
# Restore Database

  alter database mount;
  set until logseq=23 thread=1;
  restore database;
  #
# Uncomment the next line and replace <...> parameters with the
correct values
# Recover Database

  recover database;
  #
# Open DB

  alter database open resetlogs;
  }

This is the output to some list commands in the catalog:

RMAN> list backup;    

  RMAN-03022: compiling command: list    

  List of Backup Sets
  Key Recid Stamp LV Set Stamp Set Count Completion Time

      List of Backup Pieces
      Key     Pc# Cp# Status      Completion Time        Piece Name
      ------- --- --- ----------- ----------------------
------------------------
      31      1   1   AVAILABLE   Aug 30 2001 16:34:53  
bk_1_1_439144374    
      List of Datafiles Included
      File Name                                  LV Type Ckp SCN   
Ckp Time
      ---- ------------------------------------- -- ---- ----------
-------------
      1    /oracle/bd/oradata/PROD/system01.dbf  0  Full 33538     
Aug 30 2001 16:32:54
      2    /oracle/bd/oradata/PROD/tools01.dbf   0  Full 33538     
Aug 30 2001 16:32:54
      5    /oracle/bd/oradata/PROD/users01.dbf   0  Full 33538     
Aug 30 2001 16:32:54    

  List of Backup Sets
  Key Recid Stamp LV Set Stamp Set Count Completion Time

      List of Backup Pieces
      Key     Pc# Cp# Status      Completion Time        Piece Name
      ------- --- --- ----------- ----------------------
------------------------
      32      1   1   AVAILABLE   Aug 30 2001 16:35:30  
bk_2_1_439144374    
      List of Datafiles Included
      File Name                                  LV Type Ckp SCN   
Ckp Time
      ---- ------------------------------------- -- ---- ----------
-------------
      3    /oracle/bd/oradata/PROD/rbs01.dbf     0  Full 33539     
Aug 30 2001 16:32:54
      4    /oracle/bd/oradata/PROD/temp01.dbf    0  Full 33539     
Aug 30 2001 16:32:54
      6    /oracle/bd/oradata/PROD/indx01.dbf    0  Full 33539     
Aug 30 2001 16:32:54

  RMAN> list backup of archivelog all
  2> ;    

  RMAN-03022: compiling command: list    

  List of Backup Sets
  Key Recid Stamp LV Set Stamp Set Count Completion Time

      List of Backup Pieces
      Key     Pc# Cp# Status      Completion Time        Piece Name
      ------- --- --- ----------- ----------------------
------------------------
      46      1   1   AVAILABLE   Aug 30 2001 16:36:14  
al_3_1_439144537    
      List of Archived Logs Included
      Thrd Seq     Low SCN    Next SCN   Low Time        Next Time
      ---- ------- ---------- ---------- ---------------
---------------
      1    22      33056      33536      Aug 28 2001 20:36:09 Aug 30
2001 16:32:13    

  List of Backup Sets
  Key Recid Stamp LV Set Stamp Set Count Completion Time

      List of Backup Pieces
      Key     Pc# Cp# Status      Completion Time        Piece Name
      ------- --- --- ----------- ----------------------
------------------------
      47      1   1   AVAILABLE   Aug 30 2001 16:36:38  
al_4_1_439144537    
      List of Archived Logs Included
      Thrd Seq     Low SCN    Next SCN   Low Time        Next Time
      ---- ------- ---------- ---------- ---------------
---------------
  1    23      33536      33542      Aug 30 2001 16:32:13 Aug 30 2001
16:35:36 Received on Fri Aug 31 2001 - 05:46:40 CDT

Original text of this message

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