From this output, we see that one employee
was deleted and that another employee received two pay adjustments instead of one. It??™s also
worth noting that some of the transactions contain only one DML command, and others have
two.In the next section, we??™ll attempt to correct one or more of these problems.
Flashback Transaction Query
Once we have identified any erroneous or incorrect changes to a table, we can use Flashback
Transaction Query to identify any other changes that were made by the transaction containing the
inappropriate changes. Once identified, all changes within the transaction can be reversed as a
group, typically to maintain referential integrity or the business rules used to process the transaction
in the first place.
A Flashback Transaction Query, unlike a Flashback Version Query, does not reference the
table involved in DML transactions; instead, you query the data dictionary view FLASHBACK_
TRANSACTION_QUERY. The columns of FLASHBACK_TRANSACTION_QUERY are summarized
in Table 7-4.
To further investigate the changes that were made to the EMPLOYEES table, we will query
the view FLASHBACK_TRANSACTION_QUERY with the oldest transaction from the query in the
previous section:
SQL> select start_scn, commit_scn, logon_user,
2 operation, table_name, undo_sql
3 from flashback_transaction_query
4 where xid = hextoraw('0E001A0024000000');
START_SCN COMMIT_SCN LOGON_USER OPERATION TABLE_NAME
---------- ---------- ---------- ------------ ---------------
UNDO_SQL
---------------------------------------------------------------------
4011380 4011463 HR UPDATE EMPLOYEES
update "HR".
Pages:
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396