Full restore and recover Database
RUN { ALLOCATE CHANNEL CH1 TYPE 'SBT_TAPE' PARMS 'SBT_PARMS=(NSR_SERVER=datadomain.domain.local,NSR_CLIENT=host.domain.local)'; ALLOCATE CHANNEL CH2 TYPE 'SBT_TAPE' PARMS 'SBT_PARMS=(NSR_SERVER=datadomain.domain.local,NSR_CLIENT=host.domain.local)'; ALLOCATE CHANNEL CH3 TYPE 'SBT_TAPE' PARMS 'SBT_PARMS=(NSR_SERVER=datadomain.domain.local,NSR_CLIENT=host.domain.local)'; ALLOCATE CHANNEL CH4 TYPE 'SBT_TAPE' PARMS 'SBT_PARMS=(NSR_SERVER=datadomain.domain.local,NSR_CLIENT=host.domain.local)'; RESTORE DATABASE; RECOVER DATABASE; RELEASE CHANNEL CH1; RELEASE CHANNEL CH2; RELEASE CHANNEL CH3; RELEASE CHANNEL CH4; ALTER DATABASE OPEN; }
Restore only one tablespace
RUN { ALLOCATE CHANNEL CH1 TYPE 'SBT_TAPE' PARMS 'SBT_PARMS=(NSR_SERVER=datadomain.domain.local,NSR_CLIENT=host.domain.local)'; ALLOCATE CHANNEL CH2 TYPE 'SBT_TAPE' PARMS 'SBT_PARMS=(NSR_SERVER=datadomain.domain.local,NSR_CLIENT=host.domain.local)'; ALLOCATE CHANNEL CH3 TYPE 'SBT_TAPE' PARMS 'SBT_PARMS=(NSR_SERVER=datadomain.domain.local,NSR_CLIENT=host.domain.local)'; ALLOCATE CHANNEL CH4 TYPE 'SBT_TAPE' PARMS 'SBT_PARMS=(NSR_SERVER=datadomain.domain.local,NSR_CLIENT=host.domain.local)'; SQL 'ALTER TABLESPACE TABLESPACE_NAME OFFLINE IMMEDIATE'; RESTORE TABLESPACE TABLESPACE_NAME; RECOVER TABLESPACE TABLESPACE_NAME; SQL 'ALTER TABLESPACE TABLESPACE_NAME ONLINE'; RELEASE CHANNEL CH1; RELEASE CHANNEL CH2; RELEASE CHANNEL CH3; RELEASE CHANNEL CH4; }
Point in time recovery of full database
RUN { ALLOCATE CHANNEL CH1 TYPE 'SBT_TAPE' PARMS 'SBT_PARMS=(NSR_SERVER=datadomain.domain.local,NSR_CLIENT=host.domain.local)'; ALLOCATE CHANNEL CH2 TYPE 'SBT_TAPE' PARMS 'SBT_PARMS=(NSR_SERVER=datadomain.domain.local,NSR_CLIENT=host.domain.local)'; ALLOCATE CHANNEL CH3 TYPE 'SBT_TAPE' PARMS 'SBT_PARMS=(NSR_SERVER=datadomain.domain.local,NSR_CLIENT=host.domain.local)'; ALLOCATE CHANNEL CH4 TYPE 'SBT_TAPE' PARMS 'SBT_PARMS=(NSR_SERVER=datadomain.domain.local,NSR_CLIENT=host.domain.local)'; RESTORE DATABASE UNTIL TIME = "TO_DATE('14/09/2016-13:23:42', 'DD/MM/YYYY-HH24:MI:SS')"; RECOVER DATABASE UNTIL TIME = "TO_DATE('14/09/2016-13:23:42', 'DD/MM/YYYY-HH24:MI:SS')"; RELEASE CHANNEL CH1; RELEASE CHANNEL CH2; RELEASE CHANNEL CH3; RELEASE CHANNEL CH4; }
Point in time recovery duplicate
At target
rman
connect target sys/Password1@pdwh
connect auxiliary /
run
{
set until time "to_date('Feb 02 2018 04:30:00','Mon DD YYYY HH24:MI:SS')";
duplicate
target database to xdwh;
}
Tablespace PITR
rman
connect target sys/passwd1@phods
connect auxiliary /
run
{
set until time "to_date('Aug 20 2018 16:00:00','Mon DD YYYY HH24:MI:SS')";
duplicate
target database to crit undo tablespace 'UNDOTBS1' tablespace 'HMA_ESB_DATA','HMA_ESB_INDEX';
}