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

Garrison 01

Apr 08, 2018

Download

Documents

garrisog99
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Garrison 01

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

Page 2: Garrison 01

8/6/2019 Garrison 01

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

“People Are

Our GreatestAsset.”

Page 3: Garrison 01

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.

Page 4: Garrison 01

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

Page 5: Garrison 01

8/6/2019 Garrison 01

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

Page 6: Garrison 01

8/6/2019 Garrison 01

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

Page 7: Garrison 01

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

Page 8: Garrison 01

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

Page 9: Garrison 01

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

Page 10: Garrison 01

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

Page 11: Garrison 01

8/6/2019 Garrison 01

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

Page 12: Garrison 01

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.

Page 13: Garrison 01

8/6/2019 Garrison 01

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

Conclusion

FDA is a criticalcomponent a

good dataprotection

strategy

Page 14: Garrison 01

8/6/2019 Garrison 01

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

Questions

[email protected]

www.arisant.com