 |
|
Oracle Tips by Burleson |
Oracle 10g Flashback Transaction History
The Flashback Transaction History feature
provides a way to view changes made to the database at the
transaction level. It allows you to diagnose problems in your
database and perform analysis and audit transactions. You can use
this feature in conjunction with the Flash Row History feature to
roll back the changes made by a transaction. You can also use this
feature to audit user and application transactions. The Flashback
Transaction History provides a faster way to undo a transaction than
LogMiner.
You can retrieve the transaction history from
dba_transaction_query view:
SQL> desc
dba_transaction_query
Name Null? Type
---------------------------- -------- ----------------
XID
RAW(8)
START_SCN NUMBER
START_TIMESTAMP DATE
COMMIT_SCN NUMBER
COMMIT_TIMESTAMP DATE
LOGON_USER VARCHAR2(30)
UNDO_CHANGE# NUMBER
OPERATION VARCHAR2(32)
TABLE_NAME VARCHAR2(256)
TABLE_OWNER VARCHAR2(32)
ROW_ID VARCHAR2(19)
UNDO_SQL VARCHAR2(4000)
SQL> select
versions_xid, name, salary
2 from emp
3 versions between scn minvalue and maxvalue;
VERSIONS_XID
NAME SALARY
---------------- ---------- ----------
0003000E00000FE2 DANIEL 3000
DANIEL 2000
SQL> select *
2 from dba_transaction_query
3 where xid = '0003000E00000FE2';
Get the complete Oracle10g story:
To get the code instantly, click here:
Need an Oracle Mentor?
BEI is now offering personal mentors for Oracle DBAs where you can have an
Oracle expert right at your fingertips, anytime day or night. We work with
hundreds of Oracle databases every year, so we know exactly how to quickly
assist you with any Oracle question.
Why risk an unplanned outage? You can now get telephone access to Don
Burleson or any of his Oracle Certified DBAs with more than 20 years of
full-time IT experience. Click here for details:
http://www.dba-oracle.com/service_oracle_backup.htm

|