To recovery  Control-file and Data-files Backup Type

REQUIRED

Full backup Loss: All the Control files and Data files including system and sysaux

TAKE DATABASE FULL BACKUP CONNECT TO TARGET DB 

RMAN>BACKUP DATABASE PLUS ARCHIVELOG FORMAT "<BACKUP_LOCATION>";

ONCE BACKUP IS COMPLETED CHECK BACKUP TAG

RMAN>LIST BACKUP OF DATABASE SUMMARY;

CREATE NEW USER AND TABLE INSIDE INSERT VALUES LIKE  BELOW

SQL>Create user Valak identified by Edwarren default tablespace  conjuring;

 CONNECT THE USER VALAK

SQL>conn VALAK/Edwarren

 CREATE TABLE AND INSERT VALUES

SQL>Create table  peggey  (id int, Family_mem_name varachar(25));

table is created.

SQL>insert into peggey values ('1','Jannet');

1 row is inserted.

SQL>insert into peggey values ('2','Malcolum');

1 row is inserted.

SQL>insert into peggey values ('3','Mike');

1 row is inserted.

SQL>COMMIT;

commit completed.

 

SIMULATE THE FAILURE

check data files and controlfiles location

SQL>select name from V$controlfile;

SQL>Select name from V$datafile;

DELETE CONTROL AND DATA FILES FROM DATABASE

I)remove data files

Oracle@Oracle11g~]$rm - rf  /u01/app/oracle/product/11.2.0.3/oradata/CA/*.dbf

II)remove control files

Oracle@Oracle11g~]$rm - rf  /u01/app/oracle/product/11.2.0.3/oradata/CA/*.ctl

 

START RECOVERY

RMAN>RESTORE CONTROLFILE FROM AUTOBACKUP;
RMAN>SQL 'ALTER DATABASE MOUNT ';
RMAN>RESTORE DATABASE FROM TAG<TAG>;
RMAN>RECOVER DATABASE;
RMAN>SQL 'ALTER DATABASE OPEN RESETLOGS';

WHEN CONTROL FILE IS NOT AVAILABLE IN AUTO BACKUP

RMAN>LIST BACKUP OF CONTROLFILE;

RMAN>LIST BACKUP TAG<>;

RESTORE FROM BACKUP LOCATION

RMAN>RESTORE CONTROLFILE FROM <BACKUP LOCATION>;

RECOVERY WITH  MANUAL CHANNELS

The above-performed recovery needs monitoring and also the speed depends on on the automatic channels configured. You can allocate manual channels to speed up the recovery process by using  RMAN run block.

run{
allocate channel ch1 device type disk;
allocate channel ch2 device type disk;
Restore controlfile from autobackup;
sql 'alter database mount';
restore database from tag <tag>;
recover database;
sql 'alter database open RESETLOGS';
release channel ch1;
release channel ch2;
}