Recreating history, after the fact, is expensive and often impossible.
Yet everyday IT organizations, and end-users, face this data dilemma. They know that data was changed since it was originally created. They could easily query the latest value from the database, but what they really need to know is the value from 30 days ago, before the data was changed.
The Flashback Time Travel feature (previously known as Flashback Data Archive) of Oracle Database supplies a mechanism for tracking transactional changes to production databases that is secure, efficient, easy to use and application transparent. Flashback Time Travel allows organizations to configure historical data capture in a matter of minutes, supplying a centralized and seamlessly queryable historical data store.
It is not hard to imagine the everyday use cases — U.S. government regulations such as the Sarbanes-Oxley Act, the Health Insurance Portability and Accountability Act (HIPAA) or international agreements such as Basel II are driving the need to track changes to data over time.
About Flashback Archive
Flashback Time Travel supplies the ability to create a Flashback Archive used to track, and store, transactional changes to a table.
A Flashback Archive consists of one or more tablespaces or parts thereof. You can have multiple Flashback Archives. A Flashback Archive is configured with retention time and data archived in the Flashback Archive is kept for the retention time specified when the Flashback Archive was created.
Flashback Archive is supported for multitenant for both local and shared undo configurations. Flashback Archives are created at per PDB level just as user tables are created and enabled for Flashback Archive at a PDB level. Retention property is associated with a Flashback Archive and will be honored by the PDB.
Flashback Archive needs little setup and administration. Two privileges have been introduced, the Flashback Archive Administer and Flashback Archive privilege.
The Administer creates a tablespace to hold the archive (with a retention period), creates the Flashback Archive, and tables are assigned to the archive (either on create or alter table statements). If different retention periods are needed, different archives must be created. Tables are assigned in whole to a Flashback Archive.
Using Flashback Archive
Example: Creating Flashback Archives
Create a default Flashback Archive named fla1 that uses up to 10 G of tablespace tbs1, whose data is kept for one year:
CREATE FLASHBACK ARCHIVE DEFAULT fla1 TABLESPACE tbs1
QUOTA 10G RETENTION 1 YEAR;
Create a Flashback Archive named fla2 that uses tablespace tbs2, whose data is kept for two years:
CREATE FLASHBACK ARCHIVE fla2 TABLESPACE tbs2 RETENTION 2 YEAR;
Example: Enabling Flashback Archive for desired tables
Create table employee and store the historical data in the Flashback Archive fla1:
CREATE TABLE employee (EMPNO NUMBER(4) NOT NULL, ENAME VARCHAR2(10),
JOB VARCHAR2(9), MGR NUMBER(4)) FLASHBACK ARCHIVE fla1;
Or, for an existing table, enable Flashback Archive for the table employee and store the historical data in the Flashback Archive fla1:
ALTER TABLE employee FLASHBACK ARCHIVE fla1;
For more information about getting started with Flashback Time Travel please see:
Oracle® Database Development Guide. (See here)
Flashback Time Travel is now available for Oracle Autonomous Database.
For more information about Autonomous Database and Flashback Time Travel please see:
The Autonomous Data Insider. (See here)
Oracle Flashback Technologies
Oracle Flashback Technologies are a group of Oracle Database features that let you view past states of database objects, or to return database objects to an earlier state, without using point-in-time media recovery.
For more information (and usage examples) about using Oracle Flashback Technologies with Flashback Time Travel please see:
Oracle® Database Development Guide. (See here)