1. 테이블
alter table <table> enable row movement;
flashback table <table> to timestamp <when it was good>;
flashback table orders to timestamp systimestamp - interval '1' hour;
create flashback archive <archive> tablespace <tablespace> retention 1 year;
alter table <table> flashback archive <archive>;
flashback table <table> to before drop;
2. Row 복구
select * from <table> as of timestamp systimestamp - interval '1' hour;
select * from <table> as of scn 1234567;
insert into table select * from <table> as of timestamp sysdate – interval '1' hour where <conditions to find the rows>;
insert into <table> select * from <table> as of timestamp sysdate – interval '1' hour minus select * from <table>;
3. database
alter system set DB_RECOVERY_FILE_DEST = '/u01/oradata/recovery_area' scope=both; alter system set DB_RECOVERY_FILE_DEST_SIZE = 10G scope=both;
분단위로 복구 가능한 시간 설정 (아래 7일 : 60 * 24 * 7 )
alter system set DB_flashback_retention_target = 10080 scope=both;
alter database flashback on;
복구 포인트 생성
create restore point <restore_point> guarantee flashback database;
startup mount
alter database open resetlogs;
flashback database to scn 12345;
flashback database to time "to_date('01/01/2016', 'dd/mm/yyyy')";
flashback database to restore point <restore_point>;
'RDB > Oracle' 카테고리의 다른 글
oswatch 설치/구성 (0) | 2017.11.04 |
---|---|
[12c] inmemory 사용 (0) | 2017.10.30 |
pl/sql function example (0) | 2017.10.24 |
logmnr 설정 (0) | 2017.07.18 |
DBCA 오라클 DB생성 (0) | 2017.01.23 |