Monday , September 25 2017
Home / Oracle DBA / loss of full database in rman catalog mode

loss of full database in rman catalog mode

  LOSS OF FULL DATABASE USING  RMAN CATALOGMODE:

Catalog is seperate database and it is repository of all target databse .we can register any number of  databases into recovery catalog . In this backup information at will be seperate datbase .

STEP 1:  REPORT SCHEMA :

RMAN> report schema;

Report of database schema for database with db_unique_name DBC

List of Permanent Datafiles
===========================
File          Size(MB)     Tablespace    RB segs      Datafile Name
—-        ——–     ——————–    ——-       ————————
1                 690          SYSTEM                YES            /u01/app/oracle/dbc/system01.dbf
2               480           SYSAUX                 NO             /u01/app/oracle/dbc/sysaux01.dbf
3              30             UNDOTBS1             YES             /u01/app/oracle/dbc/undotbs01.dbf
4             5                 USERS                      NO            /u01/app/oracle/dbc/users01.dbf

List of Temporary Files
=======================
File Size(MB) Tablespace Maxsize(MB) Tempfile Name
—- ——– ——————– ———– ——————–
1 20 TEMP 32767 /u01/app/oracle/dbc/temp01.dbf

STEP 2:  OPEN IN TARGET LOCATION AND REMOVE  CONTROLFILES:

RMAN>
[oracle@dbcentre5 ~]$ cd /u01/app/oracle/dbc
[oracle@dbcentre5 dbc]$ ls
control01.ctl redo02.log sysaux01.dbf temp01.dbf users01.dbf
redo01.log redo03.log system01.dbf undotbs01.dbf
[oracle@dbcentre5 dbc]$ rm *
[oracle@dbcentre5 dbc]$ ls
[oracle@dbcentre5 dbc]$ cd /u01/app/oracle/fast_recovery_area/dbc
[oracle@dbcentre5 dbc]$ ls
control02.ctl
[oracle@dbcentre5 dbc]$ rm control02.ctl
[oracle@dbcentre5 dbc]$ ls
[oracle@dbcentre5 dbc]$

STEP 3: SHUTDOWN THE DATABASE AND OPEN IN NOMOUNT  MODE:

RMAN> shutdown abort

Oracle instance shut down

RMAN> startup nomount

connected to target database (not started)
Oracle instance started

Total System Global Area 523108352 bytes

Fixed Size 1345288 bytes
Variable Size 348129528 bytes
Database Buffers 167772160 bytes
Redo Buffers 5861376 bytes

STEP 4: RESTORE  CONTROLFILE:

RMAN> restore controlfile;

Starting restore at 05-JUL-17
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=17 device type=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: SID=20 device type=DISK

channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: reading from backup piece /u01/app/oracle/product/11.2.0/db_home/d bs/c-1307993075-20170705-00
channel ORA_DISK_1: piece handle=/u01/app/oracle/product/11.2.0/db_home/dbs/c-1307993075-20170705-00 tag=TAG20170705T133731
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:07
output file name=/u01/app/oracle/dbc/control01.ctl
output file name=/u01/app/oracle/fast_recovery_area/dbc/control02.ctl
Finished restore at 05-JUL-17

STEP 5: OPEN IN MOUNT MODE :

RMAN> startup mount;

database is already started
database mounted
released channel: ORA_DISK_1
released channel: ORA_DISK_2

STEP 6: RESTORE THE DATABASE:

RMAN> restore database;

Starting restore at 05-JUL-17
Starting implicit crosscheck backup at 05-JUL-17
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=20 device type=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: SID=17 device type=DISK
Crosschecked 5 objects
Finished implicit crosscheck backup at 05-JUL-17

Starting implicit crosscheck copy at 05-JUL-17
using channel ORA_DISK_1
using channel ORA_DISK_2
Finished implicit crosscheck copy at 05-JUL-17

searching for all files in the recovery area
cataloging files…
no files cataloged

using channel ORA_DISK_1
using channel ORA_DISK_2

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 00002 to /u01/app/oracle/dbc/sysaux01.dbf
channel ORA_DISK_1: restoring datafile 00003 to /u01/app/oracle/dbc/undotbs01.dbf
channel ORA_DISK_1: reading from backup piece /u01/app/oracle/fast_recovery_area/DBC/backupset/2017_07_05/o1_mf_nnndf_TAG20170705T133318_dos7bfxc_.bkp
channel ORA_DISK_2: starting datafile backup set restore
channel ORA_DISK_2: specifying datafile(s) to restore from backup set
channel ORA_DISK_2: restoring datafile 00001 to /u01/app/oracle/dbc/system01.dbf
channel ORA_DISK_2: restoring datafile 00004 to /u01/app/oracle/dbc/users01.dbf
channel ORA_DISK_2: reading from backup piece /u01/app/oracle/fast_recovery_area/DBC/backupset/2017_07_05/o1_mf_nnndf_TAG20170705T133318_dos7bd8z_.bkp
channel ORA_DISK_1: piece handle=/u01/app/oracle/fast_recovery_area/DBC/backupset/2017_07_05/o1_mf_nnndf_TAG20170705T133318_dos7bfxc_.bkp tag=TAG20170705T133318
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:01:26
channel ORA_DISK_2: piece handle=/u01/app/oracle/fast_recovery_area/DBC/backupset/2017_07_05/o1_mf_nnndf_TAG20170705T133318_dos7bd8z_.bkp tag=TAG20170705T133318
channel ORA_DISK_2: restored backup piece 1
channel ORA_DISK_2: restore complete, elapsed time: 00:01:36
Finished restore at 05-JUL-17

RMAN>

STEP 7: RECOVER  THE DATABASE AND DATABASE OPEN IN RESETLOGS:

RMAN> recover database;

Starting recover at 05-JUL-17
using channel ORA_DISK_1
using channel ORA_DISK_2

starting media recovery

archived log for thread 1 with sequence 4 is already on disk as file /u01/app/oracle/fast_recovery_area/DBC/archivelog/2017_07_05/o1_mf_1_4_dos7kv2s_.arc
archived log file name=/u01/app/oracle/fast_recovery_area/DBC/archivelog/2017_07_05/o1_mf_1_4_dos7kv2s_.arc thread=1 sequence=4
unable to find archived log
archived log thread=1 sequence=5
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 07/05/2017 13:57:10
RMAN-06054: media recovery requesting unknown archived log for thread 1 with sequence 5 and starting SCN of 810123

RMAN> alter database open resetlogs;

database opened
new incarnation of database registered in recovery catalog
starting full resync of recovery catalog
full resync complete

 

Comments

comments

Check Also

How to switch on primary database to physical standby database

After configuration data guard then data is switching  into primary database  to standby database : …

Leave a Reply

Your email address will not be published. Required fields are marked *