Pages

Showing posts with label Oracle Database Recovery. Show all posts
Showing posts with label Oracle Database Recovery. Show all posts

Sunday, March 8, 2015

Database Recovery


Recovering after Loss of Whole Database

Scenarios can be Create i.e

Steps

 è Take Fresh backup.
 è Dbca to delete database.
 è Create directory structure
 è Create Instance (service of database)
Cmd> oradim –new –sid orcl
Cmd> set ORACLE_SID=orcl
Cmd> rman target /
Rman>startup nomount force;
Rman> restore spfile from autobackup;
Rman> sql ‘shutdown immdiate’;
Cmd> sqlplus sys as sysdba
Sql> create pfile=’$ORACLE_HOME/db1/dbs/initorcl.ora’ from spfile;
Sql> startup nomount;
Rman> restore controlfile from autobackup;
Rman> sql ‘alter database mount’;
Rman> restore database;
Rman> recover database;
(if any error)
Rman>run
{
Allocate channel c1 type disk;
Set until sequence <current_seq_no> thread 1;
Recover database;
Alter database open resetlogs;

}