You are on page 1of 14

From Here to Eternity: Using

Oracle’s Flashback Data Archive


to Protect Critical Data

Gary Garrison
“People Are
Our Greatest
Asset.”
While a nice quote this
statement is wrong. Data is an
organization’s greatest asset,
and liability.
Agenda
• Need for Flashback Data Archive (FDA)
or Total Recall
• Architecture
• Best Practices
• Examples
The Need for FDA
• Legal and regulatory
– Sarbanes-Oxley, HIPAA, BASEL II, etc.
– Fines and jail time
• Fix logical errors
• Auditing for malicious acts
• Trend analysis
The Technical Need for FDA
• More surgical restoral than RMAN or
Flashback Database
• Longer lifespan than other Flashback
technologies
• The ability to precisely control retention
of data modifications
Architecture
• Uses undo tablespace
• New background process (FBDA)
• Small impact on performance
• System tables that hold data
modifications are partitioned
Best Practices
• Do not archive every table
• Backup the archive tablespace
• Use dedicated tablespaces for
Flashback Data Archive
• Index the system tables that hold data
modifications
Examples (as of)
select
old_emp.employee_id,old_emp.last_name,old_emp.first_name,
old_emp.salary,new_salary
from hr.employees
as of timestamp to_timestamp('2007-12-30 07:00:00','yyyy-mm-dd
hh24:mi:ss') old_emp
join (select employee_id,salary as new_salary
from hr.employees) new_emp
on old_emp.employee_id = new_emp.employee_id
where old_emp.salary != new_emp.new_salary

EMPLOYEE_ID LAST_NAME FIRST_NAME SALARY


NEW_SALARY
----------- ---------- ---------- ---------- ----------
206 Gietz William 12000 100
Example (versions between)
11gR2
select
versions_starttime,versions_endtime,versions_operation,versions_xid,
employee_id,salary
from hr.employees versions between timestamp
to_timestamp('2007-12-30 10:00:00','yyyy-mm-dd hh24:mi:ss')
and systimestamp
where employee_id = 206
VERSIONS_STARTTIME VERSIONS_ENDTIME E SALARY
------------------------- ------------------------- - ----------
30-DEC-07 10.41.32 AM U 12000
30-DEC-07 10.14.34 AM 30-DEC-07 10.41.32 AM U 50000
30-DEC-07 10.14.34 AM 100000
Demos
• Flashback Data Dictionary views
• Finding changes between current data
and previous point-in-time
• Fixing logical errors
References
• How to Turn Back Time: Using Oracle’s
Flashback Technology to Fix Logical Errors.
Gary Garrison.
• Oracle Database Advanced Application
Developer's Guide 11g Release 2 (11.2).
Using Flashback Data Archive (Oracle Total
Recall).
• Oracle Total Recall with Oracle Database 11g
Release 2.
Conclusion

FDA is a critical
component a
good data
protection
strategy
Questions

gary.garrison@arisant.com
www.arisant.com

You might also like