Tablespace Point-in-Time Recovery (TSPITR) with RMAN in oracle 12c database with mininum tablespaces backup:
run
{
allocate channel c1 type disk format '/tmp/madhav/madhav_%U';
configure controlfile autobackup on;
CONFIGURE BACKUP OPTIMIZATION off;
backup current controlfile spfile;
BACKUP TABLESPACE SYSTEM, SYSAUX, UNDOTBS1, MADHAV;
}
SQL> select * From madhav.test1;
A B
---------- ----------
1 2
2 3
select to_char(sysdate,'hh24:mi dd-mm-yyyy'), current_scn from v$database;
TO_CHAR(SYSDATE, CURRENT_SCN
---------------- -----------
04:10 07-10-2016 22052194
drop table madhav.test1;
select * from madhav.test1;
ORA-00942: table or view does not exist
run
{
SQL 'ALTER TABLESPACE madhav OFFLINE IMMEDIATE';
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/tmp/madhav/madhav_%U';
recover tablespace madhav until time "to_date('04:10 07-10-2016 ','hh24:mi dd-mm-yyyy')" auxiliary destination '/tmp/';
SQL "ALTER TABLESPACE madhav ONLINE";
}
RMAN> select * From madhav.test1;
A B
---------- ----------
1 2
2 3
No comments:
Post a Comment