Oralce 데이터 복구

1. 플 라 쉬 백 큐 리. - 15 분 전 으로 반 짝.
select * from table_name as of timestamp (systimestamp - interval '15' minute) where ......

 여기 서 DAY, SECOND, MONTH 를 사용 하여 minute 을 교체 할 수 있 습 니 다. 예 를 들 어:
SELECT * FROM table_name AS OF TIMESTAMP(SYSTIMESTAMP - INTERVAL '2' DAY) where ......

 --어느 시점 으로 되돌아가다
select  *  from table_name as of timestamp to_timestamp ('2013-01-05 16:18:57.845993', 'YYYY-MM-DD HH24:MI:SS.FF') where ......

 --이틀 전 으로 되돌아오다
select * from table_name as of timestamp (sysdate - 2) where.........

         실례:
insert into table_name
select * from table_name as of timestamp (systimestamp - interval '15' minute) where code = 'XXX'
minus
select * from table_name where code = 'XXX';

 
2. FLASHBack DROP 1. 원본 테이블 이 재 구축 되 지 않 으 면
flashback table orders to before drop; 

 2. 원본 표 가 재 건 된 경우 rename to 절 을 사용 할 수 있 습 니 다.
flashback table order to before drop  rename to order_old_version; 

 
3. FLASHBack TABLE   1. 우선 줄 이동 을 사용 합 니 다:  
alter table order enable row movement;

2. 플래시 시계 가 15 분 전 까지:  
flashback table order  to timestamp systimestamp - interval '15' minute;

   어느 시점 으로 되 돌아 가기:   
FLASHBACK TABLE order TO TIMESTAMP TO_TIMESTAMP('2013-01-05 01:15:25','YYYY-MM-DD HH24:MI:SS');

좋은 웹페이지 즐겨찾기