?????????????????Oracle??????????????????????????????????????????????????????????????????????????????????????????????RMAN???DataPump??2???????????????????????????????????????????????????????????????????
???????????????????
????Oracle???????????2???????????
????· ???????
???????伶?????????????????????????λ
????· ?????
???????????ζ??????????????????????????????????????????????????????????????????????????????????е???????????????????????
???????????ó???
??????????????????????3?????
???????????????????????????????DML
???????????????????DDL???????????????????????????????????????????????????????????(truncate)??????
???????drop??????purge?????
????????????????????
?????????????????RMAN???????drop????????????TSPITR
???????????????????????????????????伶??????????????С????Σ?????????????????е????????????????????????????
????????????????????????????
??????????????????????????????????Щ????????£?
????1.??????Ч????????
????2.???????鵵??
????3.???????????????(????)??????Σ?????????????????????????????(?????????????????????Υ?????????)
????4.?????????????????????????????????????????
????5.????????????????????
????6.?????????????
???????????????????????????????(?????????????????)
????undo????undo??
????sys???μ????(??PL/SQL??views?? synonyms?? users…)
?????????????????????????
????Target instance
?????????????????????????????
????Target time
????????????????????scn
????Auxiliary instance
?????????Oracle????????????????????乤?????????????????????????????????
????Auxiliary destination
????????????洢??????????????????????
????Recovery set
????????????????????????е????????
????Auxiliary set
???????????????????????????system??sysaux??undo????????????????????????鵵????????????????????????
????(???????????????????????????????)
?????塢?????????TSPITR ???

 

????????????????????????
????????(??)
????????????У?RMAN??????????????????????????????????????????μ????????????????TSPITR?????п????и???????????????????????????????á?????????????????????á??????????
????rman target /
????RMAN> recover tablespace users?? tools
????until logseq 1300 thread 1
????-- until time "to_date( '2017-04-18 16:05:07'?? 'yyyy-mm-dd hh24:mi:ss')"
????auxiliary destination '/disk1/auxdest';
?????????(???????????????????????)
????run
????{
????set newname for datafile '?/oracle_home/oradata/trgt/users01.dbf'
????to '/newfs/users01.dbf';
????...other set newname commands...
????recover tablespace users?? tools until sequence 1300 thread 1;
????}
??????????????????λ???????????
?????????????
???????
?????÷????????????????TSPITR??????檔????????????й??????????????????????????????????????????????
run
{
# specify newname for recovery set data files
set newname for tablespace clients
to '?/oradata/prod/rec/%b';
# specify newnames for some auxiliary set
# data files that have a valid image copy to avoid restores:
set newname for datafile '?/oradata/prod/system01.dbf'
to '/backups/prod/system01_monday_noon.dbf';
set newname for datafile '?/oradata/prod/system02.dbf'
to '/backups/prod/system02_monday_noon.dbf';
set newname for datafile '?/oradata/prod/sysaux01.dbf'
to '/backups/prod/sysaux01_monday_noon.dbf';
set newname for datafile '?/oradata/prod/undo01.dbf'
to '/backups/prod/undo01_monday_noon.dbf';
# specify the types of channels to use
allocate auxiliary channel c1 device type disk;
allocate auxiliary channel t1 device type sbt;
# recover the clients tablespace to 24 hours ago:
recover tablespace clients until time 'sysdate-1';
}
????????????????TSPITR????????
????1.???????飬?????????????????????DBMS_TTS.TRANSPORT_SET_CHECK???????TRANSPORT_SET_VIOLATIONS??????м????????????????????????
????2.??????????????????????????????????RMAN?????????????????????????????????????
????3.???????????н???????????????????????
????4.???????????????????????????????????????????????
????5.??????????????н??????????????????????????????????????洢????????????л???????????????У??????????????????????????У???????????????????????????auxliary destination??????recover tablespace????)??
????6.?????????н?????????????????????????????
????7.???resetlogs????????????
????8.???????????????????????????
????9.???DataPump??????????????????????????????????dump???
????10.?????????
????11.????????????????????(??????????????????)
????12.DataPump????????????????dump???????????????
????13.???????????????????????/д??????????
????14.??????и????????????