Problem applying archivelogs using RMAN
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: Problem applying archivelogs using RMAN

  1. #1
    Join Date
    Sep 2003
    Posts
    2

    Problem applying archivelogs using RMAN

    Hi,

    Am using RMAN to perform a hot (online) backup of the database and the archivelogs :

    RMAN hot backup script :

    connect target;
    report schema;
    run {
    allocate channel d1 type disk;
    sql 'alter system archive log current';
    backup skip inaccessible archivelog all delete input format '/opt/abc/backup/arch%n%s%t.dmp';
    backup database format '/opt/abc/backup/db%n%s%t.dmp';
    copy current controlfile to '/opt/abc/backup/control_bck_hot.ctl';
    }
    exit

    RMAN restore script :

    connect target;
    shutdown;
    startup nomount;
    run {
    allocate channel d1 type disk;
    replicate controlfile from '/opt/abc/backup/control_bck_hot.ctl';
    }
    alter database mount;
    run {
    allocate channel d1 type disk;
    restore database;
    recover database;
    sql 'alter database open resetlogs';
    }
    exit

    Now, the restore of the datafiles work, but the archivelogs do not get applied :

    RMAN-06005: connected to target database: CTRLM (DBID=3024875402)
    RMAN-06009: using target database controlfile instead of recovery catalog

    RMAN-06404: database dismounted
    RMAN-06402: Oracle instance shut down

    RMAN-06193: connected to target database (not started)
    RMAN-06196: Oracle instance started

    Total System Global Area 328444392 bytes

    Fixed Size 104936 bytes
    Variable Size 75624448 bytes
    Database Buffers 251658240 bytes
    Redo Buffers 1056768 bytes

    RMAN-03022: compiling command: allocate
    RMAN-03023: executing command: allocate
    RMAN-08030: allocated channel: d1
    RMAN-08500: channel d1: sid=10 devtype=DISK

    RMAN-03022: compiling command: replicate
    RMAN-03023: executing command: replicate
    RMAN-08058: replicating controlfile
    RMAN-08506: input filename=/opt/abc/backup/control_bck_hot.ctl
    RMAN-08505: output filename=/opt/abc/control01.ctl
    RMAN-08505: output filename=/opt/abc/control02.ctl
    RMAN-08031: released channel: d1

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

    RMAN-03022: compiling command: allocate
    RMAN-03023: executing command: allocate
    RMAN-08030: allocated channel: d1
    RMAN-08500: channel d1: sid=10 devtype=DISK

    RMAN-03022: compiling command: restore

    RMAN-03022: compiling command: IRESTORE
    RMAN-03023: executing command: IRESTORE
    RMAN-08016: channel d1: starting datafile backupset restore
    RMAN-08502: set_count=620 set_stamp=505668073 creation_time=25-SEP-03
    RMAN-08089: channel d1: specifying datafile(s) to restore from backup set
    RMAN-08523: restoring datafile 00001 to /opt/abc/system01.dbf
    RMAN-08523: restoring datafile 00002 to /opt/abc/rbs01.dbf
    RMAN-08523: restoring datafile 00003 to /opt/abc/temp01.dbf
    RMAN-08523: restoring datafile 00004 to /opt/abc/indx01.dbf
    RMAN-08523: restoring datafile 00005 to /opt/abc/data01.dbf
    RMAN-08023: channel d1: restored backup piece 1
    RMAN-08511: piece handle=/opt/abc/backup/dbCTRLMxxx620505668073.dmp tag=null params=NULL
    RMAN-08024: channel d1: restore complete

    RMAN-03022: compiling command: recover

    RMAN-03022: compiling command: recover(1)

    RMAN-03022: compiling command: recover(2)

    RMAN-03022: compiling command: recover(3)
    RMAN-03023: executing command: recover(3)
    RMAN-08054: starting media recovery

    RMAN-03022: compiling command: recover(4)
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure during compilation of command
    RMAN-03013: command type: recover
    RMAN-03002: failure during compilation of command
    RMAN-03013: command type: recover(4)
    RMAN-06054: media recovery requesting unknown log: thread 1 scn 67315480

    Recovery Manager complete.
    The backup script cannot be changed, and no catalog'ing is enabled for RMAN.

    Is there anything I need to change in the restore script to restore and apply the archivelogs? If not, Is there a way I can extract the archivelogs from archXXX.dmp file and apply them manually? Else I will not be able to get a consistent db.

    Any help is appreciated. Thanks in advance.

  2. #2
    Join Date
    Oct 2002
    Location
    Ljubljana,Slovenia
    Posts
    28
    Yes, you can restore archivelog manually with command :

    rman> restore archivelog all;
    If you don't have all archivelogs in the backupsets, you can issue command :

    rman> restore archivelog from time="dd.mm.yyyy"
    or
    rman> restore archivelog until scn 123123
    or
    rman> restore archivelog until time="dd.mm.yyyy"
    ....

    check documentation of RMAN !
    Aleš Orehek

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width