14
From Here to Eternity: Using Oracle’s Flashback Data Archive to Protect Critical Data Gary Garrison

Garrison 01

Embed Size (px)

Citation preview

8/6/2019 Garrison 01

http://slidepdf.com/reader/full/garrison-01 1/14

From Here to Eternity: UsingOracle’s Flashback Data Archive

to Protect Critical Data

Gary Garrison

8/6/2019 Garrison 01

http://slidepdf.com/reader/full/garrison-01 2/14

“People Are

Our GreatestAsset.”

8/6/2019 Garrison 01

http://slidepdf.com/reader/full/garrison-01 3/14

While a nice quote thisstatement is wrong. Data is an

organization’s greatest asset,and liability.

8/6/2019 Garrison 01

http://slidepdf.com/reader/full/garrison-01 4/14

Agenda

• Need for Flashback Data Archive (FDA)or Total Recall

• Architecture

• Best Practices

• Examples

8/6/2019 Garrison 01

http://slidepdf.com/reader/full/garrison-01 5/14

8/6/2019 Garrison 01

http://slidepdf.com/reader/full/garrison-01 6/14

8/6/2019 Garrison 01

http://slidepdf.com/reader/full/garrison-01 7/14

Architecture

• Uses undo tablespace• New background process (FBDA)

• Small impact on performance• System tables that hold data

modifications are partitioned

8/6/2019 Garrison 01

http://slidepdf.com/reader/full/garrison-01 8/14

Best Practices

• Do not archive every table• Backup the archive tablespace

• Use dedicated tablespaces forFlashback Data Archive

• Index the system tables that hold datamodifications

8/6/2019 Garrison 01

http://slidepdf.com/reader/full/garrison-01 9/14

Examples (as of)select

old_emp.employee_id,old_emp.last_name,old_emp.first_name,

old_emp.salary,new_salary

from hr.employeesas of timestamp to_timestamp('2007-12-30 07:00:00','yyyy-mm-ddhh24: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 SALARYNEW_SALARY

----------- ---------- ---------- ---------- ----------206 Gietz William 12000 100

8/6/2019 Garrison 01

http://slidepdf.com/reader/full/garrison-01 10/14

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

8/6/2019 Garrison 01

http://slidepdf.com/reader/full/garrison-01 11/14

8/6/2019 Garrison 01

http://slidepdf.com/reader/full/garrison-01 12/14

References

• How to Turn Back Time: Using Oracle’sFlashback Technology to Fix Logical Errors.Gary Garrison.

• Oracle Database Advanced ApplicationDeveloper's Guide 11g Release 2 (11.2).Using Flashback Data Archive (Oracle Total

Recall).

• Oracle Total Recall with Oracle Database 11g

Release 2.

8/6/2019 Garrison 01

http://slidepdf.com/reader/full/garrison-01 13/14

Conclusion

FDA is a criticalcomponent a

good dataprotection

strategy

8/6/2019 Garrison 01

http://slidepdf.com/reader/full/garrison-01 14/14

Questions

[email protected]

www.arisant.com