Chapter 16 · Flashback Technologies, Recycle Bin, Data Archive, and Recovery Without Restore

Flashback Data Archive, Blockchain/History Concepts, Retention, Compliance, and Auditing

Use long-term Flashback Time Travel archives for retained row history, then distinguish historical reconstruction from 26ai blockchain-history tamper evidence, Unified Auditing, regulatory retention policy, and tested backup/recovery.

Advanced125–145 minutesFlashback Time Travel + blockchain historyBasic history available across offeringsOptimization unavailable in Free; Advanced Compression gate elsewhereLast reviewed: August 2026

Learning outcomes

ServiceHub needs seven years of row-history evidence for selected financial/work-order records. Undo retention measured in hours or days is not an appropriate long-term archive. Oracle's feature is now documented as Flashback Time Travel (historically called Flashback Data Archive): it stores historical row lifespans in Oracle-managed history structures according to a configured retention period, while ordinary AS OF/VERSIONS syntax continues to query that history.

01

Create a small Flashback Archive and enable a table for long-term Flashback Time Travel on a Free-compatible basic path.

02

Explain archive quota/retention and how long-term history changes AS OF behavior beyond ordinary undo.

03

Record the current licensing boundary: basic Flashback Time Travel is available across offerings, but history-table optimization is unavailable in Free and requires Advanced Compression on EE/EE-ES.

04

Explain 26ai blockchain-enabled Flashback Archive history as cryptographic tamper evidence, not an immutable backup or regulatory audit system by itself.

05

Separate history retention, tamper evidence, Unified Auditing/security context, legal retention, and RMAN disaster recovery.

Generation-time baseline, feature matrix, and safety boundary

Mandatory examples target Oracle AI Database Free 26ai, reviewed against RU 23.26.3, SQL Developer 26.2, and SQLcl 26.2.1. Free is limited to 2 foreground CPU cores, 2 GB combined SGA/PGA RAM, 12 GB user data, and one installation per logical environment; it receives no Oracle patches or Support service requests. The course CDB/PDB baseline is FREE/FREEPDB1. Basic Flashback Query/Version Query and Flashback Table/Database paths are used locally where safe. The current 26ai licensing matrix marks Flashback Transaction Query and Flashback Transaction unavailable in Free, so those are entitlement-gated extensions rather than mandatory Free commands. No flashback feature is presented as a substitute for RMAN backups and restore drills from Chapter 15.

1. Flashback Time Travel stores row history outside ordinary undo lifetime

A Flashback Archive is a logical history repository associated with one or more tablespaces, a storage quota, and a retention period. Tables explicitly enabled for Flashback Archive have committed historical lifespans copied into Oracle-managed history structures. Queries continue to use familiar AS OF and VERSIONS syntax.

The feature was widely known as Flashback Data Archive; current 26ai development/licensing documentation uses Flashback Time Travel for the feature while SQL statements/views still use names such as CREATE FLASHBACK ARCHIVE.

2. Basic licensing is broad; optimization is a separate feature

The current 26ai licensing manual states that Basic Flashback Time Travel is in all offerings. The OPTIMIZE DATA history-table optimization uses Advanced Row/LOB Compression, deduplication, and tiering. That optimization is not available in Free; on EE/EE-ES it requires the Oracle Advanced Compression option.

Free lab rule

Use the default NO OPTIMIZE DATA path. Do not add OPTIMIZE DATA merely because the syntax parses on a differently entitled database.

3. Administrative setup for a small Free archive

The archive administrator needs FLASHBACK ARCHIVE ADMINISTER plus tablespace administration privileges. The application owner needs FLASHBACK ARCHIVE privilege on the specific archive to attach its table. Keep this privilege separate from the runtime ServiceHub account.

sql · SYSDBA/admin in FREEPDB1 — create a tiny disposable archive
ALTER SESSION SET CONTAINER=FREEPDB1;CREATE FLASHBACK ARCHIVE sh16_fba  TABLESPACE users  QUOTA 10M  RETENTION 1 DAY  NO OPTIMIZE DATA;GRANT FLASHBACK ARCHIVE ON sh16_fbaTO servicehub_owner;

If USERS is not the correct lab tablespace or capacity/quota is insufficient, do not guess a new datafile location. Use a deliberately provisioned small tablespace or skip the executable archive creation and retain the design path.

4. Enable one table and generate retained history

sql · as SERVICEHUB_OWNER
BEGIN  EXECUTE IMMEDIATE 'DROP TABLE servicehub_history_case PURGE';EXCEPTION WHEN OTHERS THEN  IF SQLCODE != -942 THEN RAISE; END IF;END;/CREATE TABLE servicehub_history_case (  case_id NUMBER PRIMARY KEY,  status_code VARCHAR2(12) NOT NULL,  amount NUMBER(10,2) NOT NULL);ALTER TABLE servicehub_history_case  FLASHBACK ARCHIVE sh16_fba;INSERT INTO servicehub_history_case VALUES (1,'OPEN',100);COMMIT;VARIABLE history_scn NUMBERBEGIN :history_scn := DBMS_FLASHBACK.GET_SYSTEM_CHANGE_NUMBER; END;/UPDATE servicehub_history_caseSET status_code='CLOSED',    amount=175WHERE case_id=1;COMMIT;
sql · query retained history through ordinary Flashback SQL
SELECT case_id,status_code,amountFROM servicehub_history_case AS OF SCN :history_scnWHERE case_id=1;SELECT  versions_startscn,  versions_endscn,  versions_operation,  case_id,  status_code,  amountFROM servicehub_history_caseVERSIONS BETWEEN SCN :history_scn AND MAXVALUEWHERE case_id=1ORDER BY versions_startscn;

When the requested history is older than ordinary undo but still within the archive's retained history, Oracle can satisfy the query from Flashback Time Travel history structures.

5. Observe archive metadata and capacity

sql · archive and tracked-table inventory
SELECT flashback_archive_name,retention_in_days,statusFROM user_flashback_archiveORDER BY flashback_archive_name;SELECT owner_name,table_name,flashback_archive_name,statusFROM user_flashback_archive_tablesORDER BY owner_name,table_name;

Dictionary-view availability/names depend on privilege scope; a DBA can use the corresponding DBA_* views. The important operational evidence is archive identity, tablespaces/quota, retention, tracked tables, and used capacity.

6. Archive capacity is part of write availability

If Flashback Archive storage fills, DML against tracked tables can fail or slow while Oracle cannot maintain required history. Oracle raises an out-of-space alert near the archive quota limit so administrators can add capacity or purge/adjust data according to policy.

Retention is an application/compliance policy

Do not solve archive pressure by silently reducing retention or purging history. Retention changes can violate legal/business requirements; they need explicit data-governance approval.

7. 26ai blockchain history makes retained history cryptographically verifiable

Oracle AI Database 26ai can track a regular table with a blockchain Flashback Archive. Historical changes are stored in an Oracle-managed blockchain history table whose rows participate in cryptographic hash chains. Built-in blockchain verification can detect tampering with the history chain.

sql · 26ai architecture example — feature/license/support check before production
CREATE TABLE servicehub_chain_history (  case_id NUMBER PRIMARY KEY,  status_code VARCHAR2(12) NOT NULL,  amount NUMBER(10,2) NOT NULL)BLOCKCHAIN FLASHBACK ARCHIVE sh16_fba;

This does not turn the application table into an immutable business ledger. The base table remains a normal user table; the archived history is protected by blockchain chaining. Flashback Database/PITR can still rewind the database, including blockchain tables, so external signed digests/independent evidence may be needed for stronger non-repudiation requirements.

8. Tamper evidence, audit identity, and compliance are different controls

Mechanism Primary question
Flashback Query/Version Query What did row data look like in retained history?
Flashback Time Travel How can selected row history be retained for a configured long period?
Blockchain FBA history Can stored history-chain tampering be cryptographically detected?
Unified Auditing / application identity/context Which authenticated/security actions occurred, by whom, under which policy?
RMAN/offsite backup Can database data/history be recovered after media/site loss?
Legal retention/governance What must be retained, protected, discoverable, and deleted under policy/law?

No one row-history mechanism answers every compliance question. In particular, a historical value does not necessarily prove the real-world human identity responsible for the transaction.

9. Deliberately wrong: call Flashback Time Travel a backup/archive replacement

Flashback history lives in the database/storage lifecycle and can be affected by storage failure, administrative purge, database recovery, credentials, and application security. A long retention period does not provide an independent disaster copy. Keep RMAN/offsite recovery, restore drills, security auditing, and history retention as complementary controls.

10. Cleanup the disposable basic archive lab

sql · owner: detach and remove table
ALTER TABLE servicehub_history_case  NO FLASHBACK ARCHIVE;DROP TABLE servicehub_history_case PURGE;
sql · SYSDBA/admin: remove archive after owner cleanup
REVOKE FLASHBACK ARCHIVE ON sh16_fbaFROM servicehub_owner;DROP FLASHBACK ARCHIVE sh16_fba;

Dropping the archive removes its historical data but does not drop the underlying tablespace. Do not run archive purge/drop against production history without governance approval.

11. Production judgment and chapter close

Use ordinary undo-backed Flashback Query for short incident windows, Flashback Table/Drop for targeted online recovery, Flashback Database/GRPs for broader recent rewinds, and Flashback Time Travel for deliberately retained row history. Add blockchain history when cryptographic tamper evidence is required, but combine it with identity/audit controls and external evidence according to the compliance model.

The generation baseline remains 26ai RU 23.26.3. Basic Flashback Time Travel is broadly licensed; OPTIMIZE DATA is not available in Free and requires Advanced Compression on EE/EE-ES. The 26ai blockchain-history capability is current feature behavior, but production deployment still requires an offering/COMPATIBLE/licensing review. None of these controls replaces Chapter 15's independently stored, encrypted, tested backups and measured RPO/RTO.

Check your understanding

  1. What problem does Flashback Time Travel solve that ordinary undo does not?
  2. Is OPTIMIZE DATA available in Oracle AI Database Free?
  3. What does blockchain-protected FBA add?
  4. Does blockchain history replace Unified Auditing?
  5. Does a seven-year Flashback Archive replace RMAN backups?
Review the answers

It keeps selected committed row history for a configured long-term retention beyond the normal online undo window.

No. Current licensing marks Flashback Time Travel history-table optimization unavailable in Free; EE/EE-ES require Advanced Compression.

It makes archived history rows cryptographically chained/verifiable so tampering can be detected.

No. Blockchain history protects history integrity; auditing addresses security events/identity/policy evidence.

No. The archive remains part of the database/storage lifecycle and is not an independent disaster-recovery copy.

Authoritative references

Keep knowledge open

Help the academy stay free and grow.

If these tutorials save you time, a small donation supports new lessons, technical review, diagrams, examples, and long-term maintenance.

ETHEthereum / ERC-20 only
0x716c4Ab160C4B66F31a28AE2448BfF68fc3a2ef0

Send only Ethereum or ERC-20 compatible assets to this address.