TABLE RECOVERY AND TABLE PARTITIONS RECOVERY IN DATABASE 12C USING RMAN
rman target sys/manager
run
{
allocate channel c1 type disk format '/tmp/madhav/madhav_%U';
configure controlfile autobackup on;
CONFIGURE BACKUP OPTIMIZATION off;
BACKUP AS BACKUPSET DATABASE ;
}
select current_scn from v$database;
CURRENT_SCN
-----------
22045558
create table madhav.test1 (a number, b number);
insert into madhav.test1 values (1,2);
insert into madhav.test1 values (2,3);
commit;
select *from madhav.test1;
A B
---------- ----------
1 2
2 3
select current_scn from v$database;
using target database control file instead of recovery catalog
CURRENT_SCN
-----------
22045726
list backup;
sqlplus madhav/madhav
drop table madhav.test1;
select * From test1
*
ERROR at line 1:
ORA-00942: table or view does not exist
rman target sys/manager
recover table madhav.test1 until scn 22045726 auxiliary destination '/tmp';
EXIT
sqlplus madhav/madhav
SQL> select *from madhav.test1;
A B
---------- ----------
1 2
2 3
Recover table partitions :
RECOVER TABLE MADHAV.TBL:TBL_PART98, MADHAV.TBL:TBL_PART99
UNTIL SEQUENCE 22045726 AUXILIARY DESTINATION '/tmp'
REMAP TABLE 'MADHAV'.'TBL':'TBL_PART98':'BKP_TBL_PART98',
'MADHAV'.'TBL':'TBL_PART99':'BKP_TBL_PART99'
REMAP TABLESPACE 'TBL_TS':'TBL_BKP_TS';
No comments:
Post a Comment