Thursday, May 01, 2008

??? TSPITR

Tablespace Point-in-Time Recovery
Rman automatic enable for "TSPITR", that make us to quickly recover one or more tablespaces in a database to an earlier time without affecting.

Situations:
- recover a logical database to point different from the rest of the physical database.
- recover data lost after DDL operations that change the structure of table. we can not use Flashback table to rewind a table to before the point of structural change such as a truncate table operation.
- recover a table after it dropped with the PURGE option.
- recover from the logical corruption of a table.


TSPITR using the RMAN RECOVER TABLESPACE command.

Example: use TSPITR with AUXILIARY database

RUN
{
SET NEWNAME FOR DATAFILE '+DATA/DB/example01.dbf'
TO '+DATA/AUX/example01.dbf';
SET NEWNAME FOR DATAFILE '+DATA/DB/system01.dbf'
TO '+DATA/AUX/system01.dbf';
SET NEWNAME FOR DATAFILE '+DATA/DB/sysaux01.dbf'
TO '+DATA/AUX/sysaux01.dbf';
SET NEWNAME FOR DATAFILE '+DATA/DB/undo01.dbf'
TO '+DATA/AUX/undo01.dbf';
ALLOCATE AUXILIARY CHANNEL t1 DEVICE TYPE DISK;
ALLOCATE AUXILIARY CHANNEL t2 DEVICE 'TYPE SBT_TAPE';
RECOVER TABLESPACE example UNTIL TIME "to_date('Apr:30:2008 14:00:00', 'Mon:DD:YYYY HH24:MI:SS')";
}

No comments: