?????????Flashback Database??
???????????? ???????[ 2013/10/14 13:53:12 ] ????????
???????1???????????????????????????????????
SQL> create table test_flashback as select * from emp; --??????
Table created.
SQL> select dbms_flashback.get_system_change_number from dual; --???????????scn
GET_SYSTEM_CHANGE_NUMBER
------------------------
1069396
SQL> delete from test_flashback where deptno=20; --???????
5 rows deleted.
SQL> commit;
Commit complete.
SQL> startup mount exclusive --?????mount exclusive??
ORACLE instance started.
Total System Global Area 839282688 bytes
Fixed Size 2217992 bytes
Variable Size 557844472 bytes
Database Buffers 276824064 bytes
Redo Buffers 2396160 bytes
Database mounted.
SQL> flashback database to scn 1069396; --?????????????????????????????????磺
Flashback complete. --flashback database to to_timestamp('2013-10-8 18:02:34'??'YYYY-MM-DD HH24??MI:SS')
SQL> alter database open read only; ?--??read only ?????????????????????????粻????????????????????
Database altered.
SQL> select * from scott.test_flashback where deptno=20;
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
---------- ---------- --------- ---------- --------- ---------- ---------- ----------
7369 SMITH CLERK 7902 17-DEC-80 800 20
7566 JONES MANAGER 7839 02-APR-81 2975 20
7788 SCOTT ANALYST 7566 19-APR-87 3000 20
7876 ADAMS CLERK 7788 23-MAY-87 1100 20
7902 FORD ANALYST 7566 03-DEC-81 3000 20
SQL> startup
ORACLE instance started.
Total System Global Area 839282688 bytes
Fixed Size 2217992 bytes
Variable Size 557844472 bytes
Database Buffers 276824064 bytes
Redo Buffers 2396160 bytes
Database mounted.
ORA-01589: must use RESETLOGS or NORESETLOGS option for database open
SQL> alter database open resetlogs;
Database altered.
|
????--??????????????????????
???????????????????????漰???????????????????SPASVOС??(021-61079698-8054)?????????????????????????