oracle-databaseoracle11grecoveryrman

Lost Redologs and Archivelogs


I am using Oracle XE 11g R2 and due to a mistake all the archivelogs where deleted by running delete archivelog all; command on RMAN.

Also one set of redo logs were deleted i.e. redo_g02a.log, redo_g02b.log and redo_g02c.log

Other redolog are available i.e. redo_g01a.log, redo_g01b.log, redo_g01c.log and redo_g03a.log, redo_g03b.log and redo_g03c.log

Is there a way I can startup the database now? It is a production database and I am really worried.

I tried copying from redo_g01a.log to redo_g02a.log ... but alert logs say:

ORA-00312: online log 2 thread 1: '/u01/app/oracle/fast_recovery_area/XE/onlinelog/redo_g02a.log' USER (ospid: 30663): terminating the instance due to error 341

Any help will be much much appreciated.


Solution

  • First make a copy of your datafiles, redo logs, and control file. That way you can get back to this point.

    If the database was shut down clean you can try clearing the group and it will be recreated for you.

    SQL> connect / as sysdba
    Connected to an idle instance.
    SQL> startup mount;
    ORACLE instance started.
    
    Total System Global Area 1068937216 bytes
    Fixed Size                  2260048 bytes
    Variable Size             675283888 bytes
    Database Buffers          385875968 bytes
    Redo Buffers                5517312 bytes
    Database mounted.
    SQL> alter database clear logfile group 2;
    
    Database altered.
    
    SQL> alter database open;
    
    Database altered.
    
    SQL>
    

    If not you will need to recover and open with the resetlogs option. Unfortunately because you lost an entire log group you may also have lost data.