oracle之flashback深入研究(五)

2014-11-24 16:05:56 · 作者: · 浏览: 6
SQL> commit;
Commit complete.
SQL> select versions_startscn,versions_endscn,versions_xid,versions_operation,id,sal,job from t1 versions between scn minvalue and maxvalue;
VERSIONS_STARTSCN VERSIONS_ENDSCN VERSIONS_XID V ID SAL JOB
----------------- --------------- ---------------- - ---------- ---------- ----------
11166640 13000A00D9000000 U 3 1 a
2 3 b
11166640 2 1 a
D
11187698 13001300DB000000 D 1 1 ab
11166640 11187698 13000A00D9000000 I 1 1 ab
6 rows selected.
SQL> select xid,logon_user,start_scn,operation,table_name,row_id,undo_sql from flashback_transaction_query where xid='13000A00D9000000';
select xid,logon_user,start_scn,operation,table_name,row_id,undo_sql from flashback_transaction_query where xid='13000A00D9000000'
*
ERROR at line 1:
ORA-01031: insufficient privileges
SQL> conn sys/root as sysdba
Connected.
SQL> select current_scn from v$database;
CURRENT_SCN
-----------
11187761
SQL> select xid,logon_user,start_scn,operation,table_name,row_id,undo_sql from flashback_transaction_query where xid='13001300DB000000';
XID LOGON_USER START_SCN OPERATION
---------------- ------------------------------ ---------- --------------------------------
TABLE_NAME
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
ROW_ID
-------------------
UNDO_SQL
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
13001300DB000000 RHYS 0 UNKNOWN
T1
XID LOGON_USER START_SCN OPERATION
---------------- ------------------------------ ---------- --------------------------------
TABLE_NAME
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
ROW_ID
-------------------
UNDO_SQL
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
13001300DB000000 RHYS 0 BEGIN
SQL>
但是没有任何undo_sql,查看网络发现如下:
#这里执行这个语句的意思是追加日志
supplemental logging 的定义 :
redo log一般用于实例恢复及介质恢复。在redo log中这些数据被自动记录。不过一些
基于redo的application可能在redo log中记录额外的一些列。 这种记录额外列的过程
被称为supplemental logging
缺省情况下, 数据库没有打开对supplemental logging的支持。
然后重新做实验如下:
SQL> alter database add supplemental log data;
Database altered.
SQL> select * f