Oracle Flashback Transaction Query
Version 12.2.0.1

Library Note Morgan's Library Page Header
"We don't live in a dictatorship or a monarchy. I swore an oath in the military and in the Senate to preserve, protect and defend the Constitution of the United States, not to mindlessly cater to the whims of Cadet Bone Spurs and clap when he demands I clap,"
~ Sen. Tammy Duckworth
 
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 12cR1
What's New In 12cR2

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