Oracle Flashback Transaction Query
Version 18.3.0.1

Library Note Morgan's Library Page Header
Coming to OpenWorld 2018? Be sure to visit the TidalScale booth in Moscone South and learn how to solve performance problems and lower costs with Software Defined Servers. Before you visit the booth, or if you can't make it this year, check out TidalScale at www.tidalscale.com. Be sure to click on the Solutions link and look through the Oracle resources.
 
Flashback Transaction Query Functionality Demo
Demo using the flashback_transaction_query view SELECT operation, undo_sql, logon_user
FROM flashback_transaction_query
WHERE xid = HEXTORAW(<version_xid>);
conn uwclass/uwclass@pdbdev

CREATE TABLE t (
mycol VARCHAR2(20));

INSERT INTO t VALUES ('ABC');

COMMIT;

INSERT INTO t VALUES ('DEF');

COMMIT;

INSERT INTO t VALUES ('GHI');

COMMIT;

SELECT versions_xid, versions_startscn, versions_endscn, versions_operation, mycol
FROM t
VERSIONS BETWEEN SCN MINVALUE AND MAXVALUE;

conn sys@pdbdev as sysdba

desc flashback_transaction_query

set linesize 121
col operation format a10
col undo_sql format a65

-- choose the 'DEF' entry's xid
SELECT operation, undo_sql, logon_user
FROM flashback_transaction_query
WHERE xid = HEXTORAW('0A0009005F060000');

delete from "UWCLASS"."T" where ROWID = 'AAAPHYAAGAAABgqAAB';

COMMIT;

SELECT * FROM uwclass. t;

SELECT versions_xid, versions_startscn, versions_endscn, versions_operation, mycol
FROM uwclass.t
VERSIONS BETWEEN SCN MINVALUE AND MAXVALUE;

UPDATE uwclass.t
SET mycol = 'MNO'
WHERE mycol = 'GHI';

INSERT INTO uwclass.t VALUES ('XYZ');

COMMIT;

SELECT versions_xid, versions_startscn, versions_endscn, versions_operation, mycol
FROM uwclass.t
VERSIONS BETWEEN SCN MINVALUE AND MAXVALUE;

Related Topics
Built-in Functions
Built-in Packages
Flashback Archive
Flashback Database
Flashback Drop
Flashback Query
Flashback Table
Flashback Transaction Backout
Flashback Version Query
Pseudocolumns
Recycle Bin
What's New In 12cR2
What's New In 18cR1

Morgan's Library Page Footer
This site is maintained by Dan Morgan. Last Updated: This site is protected by copyright and trademark laws under U.S. and International law. © 1998-2017 Daniel A. Morgan All Rights Reserved