Total Pageviews

Monday, January 30, 2017

Loss of all redolog file

Scenario:Loss of all redolog file.
**********************************

1)details of logfile
select GROUP#,STATUS,MEMBER,IS_RECOVERY_DEST_FILE,TYPE from v$logfile;


   GROUP# STATUS  MEMBER                                             IS_ TYPE
---------- ------- -------------------------------------------------- --- -------
         3         /home/cybage/app/cybage/oradata/temp/redo03.log    NO  ONLINE
         2         /home/cybage/app/cybage/oradata/temp/redo02.log    NO  ONLINE
         1         /home/cybage/app/cybage/oradata/temp/redo01.log    NO  ONLINE

2)renaming the redo log
[cybage@oracle temp]$ mv redo01.log redo01.log.old
[cybage@oracle temp]$ mv redo02.log redo02.log.old
[cybage@oracle temp]$ mv redo03.log redo03.log.old


3) select * from v$Log;

GROUP#    THREAD#  SEQUENCE#      BYTES  BLOCKSIZE    MEMBERS ARC STATUS     FIRST_CHANGE# FIRST_TIM NEXT_CHANGE# NEXT_TIME
---------- ---------- ---------- ---------- ---------- ---------- --- ---------- ------------- --------- ------------ ---------
         1          1         19   52428800        512          1 NO  ACTIVE           1944580 17-JAN-17      1945263 17-JAN-17
         2          1         20   52428800        512          1 NO  ACTIVE           1945263 17-JAN-17      1945269 17-JAN-17
         3          1         21   52428800        512          1 NO  CURRENT          1945269 17-JAN-17   2.8147E+14

4)SQL> archive log list;
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            /home/cybage/app/cybage/product/11.2.0/dbhome_3/dbs/arch
Oldest online log sequence     19
Next log sequence to archive   19
Current log sequence           21

5)errors in aleart log
Errors in file /home/cybage/app/cybage/diag/rdbms/temp/temp/trace/temp_lgwr_1157                                             8.trc:
ORA-00313: open failed for members of log group 1 of thread 1
ORA-00312: online log 1 thread 1: '/home/cybage/app/cybage/oradata/temp/redo01.l                                             og'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /home/cybage/app/cybage/diag/rdbms/temp/temp/trace/temp_lgwr_1157                                             8.trc:

6)To restore and recover using RMAN
run { set until sequence 19; restore database; recover database; alter database open resetlogs; }



executing command: SET until clause

Starting restore at 17-JAN-17
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=19 device type=DISK

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 /home/cybage/app/cybage/oradata/temp/system01.dbf
channel ORA_DISK_1: restoring datafile 00002 to /home/cybage/app/cybage/oradata/temp/sysaux01.dbf
channel ORA_DISK_1: restoring datafile 00003 to /home/cybage/app/cybage/oradata/temp/undotbs01.dbf
channel ORA_DISK_1: restoring datafile 00004 to /home/cybage/app/cybage/oradata/temp/users01.dbf
channel ORA_DISK_1: restoring datafile 00005 to /home/cybage/app/cybage/oradata/temp/example01.dbf
channel ORA_DISK_1: restoring datafile 00006 to /home/cybage/app/cybage/oradata/temp/new.dbf
channel ORA_DISK_1: restoring datafile 00007 to /home/cybage/app/cybage/oradata/temp/test_data01.dbf
channel ORA_DISK_1: reading from backup piece /home/cybage/app/cybage/product/11.2.0/dbhome_3/dbs/0arq8lia_1_1
channel ORA_DISK_1: piece handle=/home/cybage/app/cybage/product/11.2.0/dbhome_3/dbs/0arq8lia_1_1 tag=TAG20170117T141434
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:35
Finished restore at 17-JAN-17

Starting recover at 17-JAN-17
using channel ORA_DISK_1

starting media recovery

archived log for thread 1 with sequence 18 is already on disk as file /home/cybage/app/cybage/product/11.2.0/dbhome_3/dbs/arch1_18_933023555.dbf
archived log file name=/home/cybage/app/cybage/product/11.2.0/dbhome_3/dbs/arch1_18_933023555.dbf thread=1 sequence=18
media recovery complete, elapsed time: 00:00:00
Finished recover at 17-JAN-17

database opened

No comments:

Post a Comment