Recovery From Loss Of Datafile For Which No Backup Is Available Using RMAN Utility
SCENARIO – 10g Database Loss of datafile which has not been backed up.
CREATE NEW TABLESPACE TESTCHAITANYA
SQL> create tablespace testchaitanya datafile ‘/u02/oradata/testdb/testchaitanya.dbf’ size 25m;
Tablespace created.
TAKE A BACKUP OF THE DATABASE AT THIS POINT
ADD DATAFILE TO TESTCHAITANYA TABLESPACE
SQL> alter tablespace testchaitanya add datafile ‘/u02/oradata/testdb/testchaitanya01.dbf’ size 25m;
Tablespace altered.
SIMULATE FAILURE BY REMOVING DATAFILES FOR TESTCHAITANYA TABLESPACE FROM DISK
Note: The tablespace TESTCHAITANYA has two datafiles, but only one has been backed up at this point in time
testdb:/u02/oradata/testdb> rm test*
testdb:/u02/oradata/testdb> sql
SQL> alter tablespace testchaitanya offline immediate;
Tablespace altered.
RESTORE DATAFILE 5; – The datafile which was backed up.
testdb:/u02/oradata/testdb> rman target / catalog rman11p/xxx@rcatp
Recovery Manager: Release 11.1.0.6.0 – Production on Thu AUG 20 09:19:28 2020
Copyright (c) 1982, 2007, Oracle. All rights reserved.
connected to target database: TESTDB (DBID=2358982414)
connected to recovery catalog database
RMAN> restore datafile 5;
Starting restore at 20/AUG/20
starting full resync of recovery catalog
full resync complete
Finished restore at 20/AUG/20
RMAN> restore tablespace testchaitanya;
Starting restore at 20/AUG/20
using channel ORA_SBT_TAPE_1
using channel ORA_SBT_TAPE_2
using channel ORA_DISK_1
creating datafile file number=6 name=/u02/oradata/testdb/testchaitanya01.dbf >>> In 10g, Oracle creates the missing datafile .
skipping datafile 5; already restored to file /u02/oradata/testdb/testchaitanya.dbf
Finished restore at 14/MAY/09
RECOVER TABLESPACE TEST
SQL> recover tablespace testchaitanya;
Media recovery complete.
SQL> alter tablespace testchaitanya online;
Tablespace altered.
Note: Info on Recovery From Loss Of Datafile For Which No Backup Is Available Using RMAN Utility it may differ from your environment production,testing,development and mountpoints etc
THANKS FOR VIEWING MY BLOG FOR MORE UPDATES FOLLOW ME OR SUBSCRIBE ME