undo
验证:找不到旧值
SQL> select salary from hr.employees where employee_id=100;
SALARY
----------
24000
查看时间:
SQL> select to_char(sysdate,'YYYY-MM-DD HH24:MI:SS') time from dual;
TIME
-------------------
2013-08-03 11:17:09
SQL> update hr.employees set salary=42000 where employee_id=100;
1 row updated.
闪回查询寻找旧值:
SQL> select salary from hr.employees as of timestamp to_timestamp('2013-08-03:11:14:15','YYYY-MM-DD:HH24:MI:SS') where employee_id=100;
SALARY
----------
24000
新建undo表空间:
create undo tablespace undotbs2
datafile size 20M;
切换表空间:
alter system set undo_tablespace='UNDOTBS2';
刷新缓存区:
alter system flush buffer_cache;