BackupRestore123

 

 

BackupRestore123. 1

Do the BACKUP. 1

List the backup files. 1

Prepare One Testing Scenario. 2

And Now Restore Recover 2

Startup the DB and. 2

RMAN Restore and Recover 2

Is It Workig ?. 3

 

 

Do the BACKUP

 

--environment

set ORACLE_HOME=E:\oracle\ora92

set ORACLE_SID=orcl

set PATH=E:\oracle\ora92\bin

rman TARGET /

 

--Start RMAN Backup

RMAN> run {

      allocate channel c1 type disk;

      backup

      incremental level 0

      filesperset 5

      format 'E:\oracle\admin\orcl\arch\rman_backup\ogisf%t_s%s_p%p'

      database INCLUDE CURRENT CONTROLFILE;

      # Oracle preporucuje arhiviranje aktivnog loga odmah nakon

      # obavljanja bilo kog otvorenog BACKUP-a

     sql 'alter system archive log current';

     release channel c1;

      }

 

 

List the backup files

 

--What we have inside

RMAN> list backup;

RMAN> list backupset 13;

 

--Prepare the initialization pfile and Rename trace file from user_dump_dest to ex. E:\oracle\admin\orcl\pfile\init14022007.ora

RMAN> sql 'alter database backup controlfile to trace';

 

 

Prepare One Testing Scenario

 

--Shutdown the db, Delete all data files but keep control and redo logs....

 

 

And Now Restore Recover

 

--environment for sql*plus

set ORACLE_HOME=E:\oracle\ora92

set ORACLE_SID=orcl

set PATH=E:\oracle\ora92\bin

 

 

Startup the DB and

 

sqlplus

/ as sysdba

SQL> startup pfile=E:\oracle\admin\orcl\pfile\init14022007.ora momount

 

--Open the controlfile

SQL> alter database mount;

 

--environment for rman

set ORACLE_HOME=E:\oracle\ora92

set ORACLE_SID=orcl

set PATH=E:\oracle\ora92\bin

 

 

RMAN Restore and Recover

 

--RMAN connected to target

rman TARGET /

 

--check backup and files

RMAN> crosscheck backup

RMAN> list backup

 

--Do the restore

RMAN>  run {

  restore database;

  recover database;

  }

 

--Finally Open the DB

RMAN> alter database open ;

 

 

DB Is Working ?

 

--Check the Status

SQL> select * from v$INSTANCE;