RMAN Restore Database

-- Before start
get the info on the ALERT.LOG regarding last TIMESTAMP valid, 
the last time before the crash;


Wed Jan 04 15:28:43 2017
Thread 1 advanced to log sequence 8725 (LGWR switch)
  Current log# 3 seq# 8725 mem# 0: /u01/oradata/dbtst/redo03.log
Wed Jan 04 15:28:43 2017 <------------------------------------------------------------ * THIS ON THIS CASE
Archived Log entry 13322 added for thread 1 sequence 8724 ID 0xee867f48 dest 1:
Wed Jan 04 15:43:40 2017
Errors in file /u01/oracle/diag/rdbms/dbtst/dbtst/trace/dbtst_m002_10209.trc:
ORA-00313: open failed for members of log group 1 of thread 1
ORA-00312: online log 1 thread 1: '/u01/oradata/dbtst/redo01.log'
ORA-27037: unable to obtain file status
/15:43:40 2017 

rman target /

list backup of controlfile:

(take the last one)

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
8421    Full    14.92M     DISK        00:00:01     04-JAN-17
        BP Key: 8421   Status: AVAILABLE  Compressed: NO  Tag: TAG20170104T051133
        Piece Name: /oracle_backups/ITT/dbtst_ctl_s_DBTST932361094u5rp5cs6_1_1
  Standby Control File Included: Ckp SCN: 60656341385   Ckp time: 04-JAN-17

Controlfile Location:

sqlplus / as sysdba

show parameter control;

/u01/oradata/dbtst/control01.ctl, /u01/oradata/dbtst/control02.ctl

3.) Check if still have the controlfiles:

[oracle@lnx01/ SID : dbtst]$ ls -ltr
total 45744
-rw-r----- 1 oracle oinstall 15613952 Jan  4 13:48 snapcf_dbtst.ctl
-rw-r----- 1 oracle oinstall 15613952 Jan  4 16:26 control02.ctl
-rw-r----- 1 oracle oinstall 15613952 Jan  4 16:26 control01.ctl

4.) Try first do the restore using the existent controlfile, 
if doesn't have anymore the files you need use the backup on the STEP 1, 
to restore the latest controlfile before start
the restore database operation;

JUST in case of you don't have any more the CONTROLFILES execute the step below:

rman target /

startup nomount;

RESTORE CONTROLFILE FROM "/oracle_backups/ITT/dbtst_ctl_s_DBTST932361094u5rp5cs6_1_1"; 

If the CONTROLFILES are in place, proceed like below:

rman target /
startup mount;

set until time "to_date('04-JAN-2017:15:28:43', 'DD-MON-YYYY:HH24:MI:SS')" ; 
restore database;
recover database;

RMAN> alter database open resetlogs;

Statement processed


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s