SlideShare a Scribd company logo
FLASHBACK – 
THE TIME MACHINE 
BY – NAVNEET UPNEJA
AGENDA 
• About Flashback 
• Flashback Technologies 
• Demo 
• Questions
FLASHBACK 
• Access to past much like a time machine. 
• Useful in case of User Errors or Logical Errors. 
• Can rollback Transaction with Database still remains Online. 
• Can be helpful to see the history of changes to data. 
• Can recover Table or database to point in time in the past. 
• New buffer in SGA: Flashback Buffer 
• New Background process: RVWR
FLASHBACK TECHNOLOGIES 
• Flashback Query 
• Flashback Table 
• Flashback Versions Query 
• Flashback Transaction Query 
• Flashback Transaction 
• DBMS_FLASHBACK 
• Flashback Drop 
• Flashback Database
FLASHBACK QUERY 
• Query data in the past. 
• Depends upon the data availability in Undo segments. 
• Can be used to recover lost data or undo some transaction. 
• Is used by using DzSELECT AS OFdz 
• Takes around 6 sec to record the flashback record. 
• SELECT * FROM FL_QUERY AS OF TIMESTAMP 
TO_TIMESTAMP('&timestamp','DD-MON-YY HH24.MI.SS');
FLASHBACK VERSION QUERY 
• Retrieve different versions of rows during a given interval. 
• DzVersions Betweendz clause of Select statement is used. 
• Pseudocolumns are used: 
• Versions_startscn 
• Versions_starttime 
• Versions_endscn 
• Versions_endtime 
• Versions_xid 
• Versions_operation 
• Scripts used: fl_version_upd.sql fl_version.sql
FLASHBACK TRANSACTION QUERY 
• Retrieve Metadata and historical data for 
transaction/transactions. 
• flashback_transaction_query view is used to see the past 
transaction data. 
SELECT xid, operation, start_scn, commit_scn, logon_user, undo_sql 
FROM flashback_transaction_query 
WHERE xid in (select versions_xid from fl_query versions 
BETWEEN TIMESTAMP TO_TIMESTAMP('29-MAY-14 16.40.54', 
'DD-MON-YY HH24.MI.SS') AND TO_TIMESTAMP('29-MAY-14 
16.49.56', 'DD-MON-YY HH24.MI.SS'));
FLASHBACK TABLE 
• Will flashback a table to some time in past. 
• Use undo to flashback the table. 
• This is not a rollback, it’s a separate transaction. 
• Flashback table keep the constraints intact. 
• Enable Row movement on tables before Flashback table.
DBMS_FLASHBACK 
• Package used to rollback transaction/s. 
• Subprograms: 
• Enable_At_time 
• Transaction_backout 
• Disable 
• Must have DzFlashback any tabledz privilege. 
Example: exec 
dbms_flashback.transaction_backout(numtxns=>1,xids=>sys.xid_ 
array('030020006D070000'),options=>dbms_flashback.cascade);
FLASHBACK DROP 
• Getting back the dropped table. 
• Table is recreated (Re-named) from recycle bin. 
• Depends upon the availability of dropped table in recycle bin. 
• Cannot recover a table from dropped schema. 
Flashback table drop_table to before drop;
FLASHBACK DATABASE 
• Flashback Database to time in the past. 
• Needs Resetlogs to open the database. 
• Similar to point in time recovery but takes less time and less 
complex. 
• Db_recovery_file_dest=/data3/oracle/fast_recovery_area/ 
• Db_flashback_retention_target=1440; 
• Db_recovery_file_Dest=10G; 
• Alter database Flashback on; 
• Flashback database to timestamp to_timestamp('30-may-2014 
14:51:09','dd-mon-yyyy hh24:mi:ss'); 
• Alter database open resetlogs;
• Restore Points 
• create restore point BEFORE_UPGRADE; 
• create restore point BEFORE_UPGRADE guarantee flashback 
database; 
• drop restore point BEFORE_UPGRADE;
SUMMARY 
• Flashback Query – no setup required – Just undo 
• Flashback Table – no setup required – Just undo 
• Flashback Drop – Recyclebin – on by default. 
• Flashback Versions - no setup required – Just undo 
• Flashback Database – Requires a flash recovery area / feature to 
be switched on. 
• Flashback Transaction – may require supplimental data 
• Flashback Data Archives – needs flashback tablespace
Flashback - The Time Machine..

More Related Content

PPT
Oracle-L11 using Oracle flashback technology-Mazenet solution
PPTX
Oracle flashback
PPT
Oracle Flashback Query 3
PPT
Less17 flashback tb3
PPTX
Ensuring Data Protection Using Oracle Flashback Features - Presentation
PDF
Oracle10g New Features I
PDF
The Top 12 Features new to Oracle 12c
PPT
Oracle 10g Introduction 1
Oracle-L11 using Oracle flashback technology-Mazenet solution
Oracle flashback
Oracle Flashback Query 3
Less17 flashback tb3
Ensuring Data Protection Using Oracle Flashback Features - Presentation
Oracle10g New Features I
The Top 12 Features new to Oracle 12c
Oracle 10g Introduction 1

What's hot (20)

PDF
Ensuring Data Protection Using Oracle Flashback Features
PPTX
Oracle Basics and Architecture
PPT
Less18 moving data
PDF
2013 Collaborate - OAUG - Presentation
PPSX
Oracle database 12c new features
PDF
2009 Collaborate IOUG Presentation
PDF
2011 Collaborate IOUG Presentation
PPT
Les 17 sched
PPT
Less08 managing data and concurrency
PPTX
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
DOCX
Oracle Database 12c "New features"
DOC
Backup and Recovery Procedure
PDF
Overview of Oracle database12c for developers
PDF
B35 all you wanna know about rman by francisco alvarez
PPT
Les 20 dup_db
PDF
GLOC 2014 NEOOUG - Oracle Database 12c New Features
PDF
2008 Collaborate IOUG Presentation
PDF
Oracle 12c New Features for Developers
PPTX
Best New Features of Oracle Database 12c
PPTX
DBA Commands and Concepts That Every Developer Should Know
Ensuring Data Protection Using Oracle Flashback Features
Oracle Basics and Architecture
Less18 moving data
2013 Collaborate - OAUG - Presentation
Oracle database 12c new features
2009 Collaborate IOUG Presentation
2011 Collaborate IOUG Presentation
Les 17 sched
Less08 managing data and concurrency
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
Oracle Database 12c "New features"
Backup and Recovery Procedure
Overview of Oracle database12c for developers
B35 all you wanna know about rman by francisco alvarez
Les 20 dup_db
GLOC 2014 NEOOUG - Oracle Database 12c New Features
2008 Collaborate IOUG Presentation
Oracle 12c New Features for Developers
Best New Features of Oracle Database 12c
DBA Commands and Concepts That Every Developer Should Know
Ad

Similar to Flashback - The Time Machine.. (20)

PPTX
Time is of the essence - The Fourth Dimension in Oracle Database 12c (on Flas...
PDF
Oracle 12c New Features_RMAN_slides
PDF
Aioug vizag oracle12c_new_features
PDF
Training Slides: 203 - Backup & Recovery
PDF
Rman Presentation
PPTX
Flash back by 30,08
PPTX
Flashback Technology by Sohaib
PPTX
What you need to know for postgresql operation
PDF
Flashback time travel vs Flash back Data Archive.pdf
PPT
Galera Cluster Best Practices for DBA's and DevOps Part 1
PDF
Strategic autovacuum
PPTX
Geek Sync | How to Detect, Analyze, and Minimize SQL Server Blocking and Locking
PDF
Performance Scenario: Diagnosing and resolving sudden slow down on two node RAC
PPTX
From Backups To Time Travel: A Systems Perspective on Snapshots
PDF
Kubernetes Walk Through from Technical View
PDF
SQLDay2013_MarcinSzeliga_StoredProcedures
PDF
Strategic Autovacuum
PDF
Take your database source code and data under control
PPT
1 Oracle Flashback study related with recyclebin.ppt
PDF
IBM Tivoli Storage Manager V6 - PCTY 2011
Time is of the essence - The Fourth Dimension in Oracle Database 12c (on Flas...
Oracle 12c New Features_RMAN_slides
Aioug vizag oracle12c_new_features
Training Slides: 203 - Backup & Recovery
Rman Presentation
Flash back by 30,08
Flashback Technology by Sohaib
What you need to know for postgresql operation
Flashback time travel vs Flash back Data Archive.pdf
Galera Cluster Best Practices for DBA's and DevOps Part 1
Strategic autovacuum
Geek Sync | How to Detect, Analyze, and Minimize SQL Server Blocking and Locking
Performance Scenario: Diagnosing and resolving sudden slow down on two node RAC
From Backups To Time Travel: A Systems Perspective on Snapshots
Kubernetes Walk Through from Technical View
SQLDay2013_MarcinSzeliga_StoredProcedures
Strategic Autovacuum
Take your database source code and data under control
1 Oracle Flashback study related with recyclebin.ppt
IBM Tivoli Storage Manager V6 - PCTY 2011
Ad

More from Navneet Upneja (9)

PDF
Database option SDO mismatch: PDB installed version 12.1.0.2.0. CDB installed...
PDF
Effecitvely testing Oracle SQL (sql tuning)
PDF
Sql developer - Powerful Free tool for Developers and DBA's
PDF
Role of-analytics-in-db as-life
PPT
Oracle Dataguard
PPT
ORACLE 12C-New-Features
PDF
Oracle 12 c new-features
PDF
DataGuard - Oracle's Time Machine
PDF
An Approach to Sql tuning - Part 1
Database option SDO mismatch: PDB installed version 12.1.0.2.0. CDB installed...
Effecitvely testing Oracle SQL (sql tuning)
Sql developer - Powerful Free tool for Developers and DBA's
Role of-analytics-in-db as-life
Oracle Dataguard
ORACLE 12C-New-Features
Oracle 12 c new-features
DataGuard - Oracle's Time Machine
An Approach to Sql tuning - Part 1

Recently uploaded (20)

PDF
WOOl fibre morphology and structure.pdf for textiles
PPTX
A Presentation on Touch Screen Technology
PDF
Hybrid model detection and classification of lung cancer
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Univ-Connecticut-ChatGPT-Presentaion.pdf
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PDF
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
PDF
Hindi spoken digit analysis for native and non-native speakers
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PDF
Encapsulation theory and applications.pdf
PDF
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
PDF
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
PPTX
Tartificialntelligence_presentation.pptx
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPTX
TLE Review Electricity (Electricity).pptx
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Approach and Philosophy of On baking technology
PDF
Accuracy of neural networks in brain wave diagnosis of schizophrenia
PPTX
SOPHOS-XG Firewall Administrator PPT.pptx
WOOl fibre morphology and structure.pdf for textiles
A Presentation on Touch Screen Technology
Hybrid model detection and classification of lung cancer
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Univ-Connecticut-ChatGPT-Presentaion.pdf
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
Hindi spoken digit analysis for native and non-native speakers
Group 1 Presentation -Planning and Decision Making .pptx
Encapsulation theory and applications.pdf
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
Tartificialntelligence_presentation.pptx
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
TLE Review Electricity (Electricity).pptx
Unlocking AI with Model Context Protocol (MCP)
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Approach and Philosophy of On baking technology
Accuracy of neural networks in brain wave diagnosis of schizophrenia
SOPHOS-XG Firewall Administrator PPT.pptx

Flashback - The Time Machine..

  • 1. FLASHBACK – THE TIME MACHINE BY – NAVNEET UPNEJA
  • 2. AGENDA • About Flashback • Flashback Technologies • Demo • Questions
  • 3. FLASHBACK • Access to past much like a time machine. • Useful in case of User Errors or Logical Errors. • Can rollback Transaction with Database still remains Online. • Can be helpful to see the history of changes to data. • Can recover Table or database to point in time in the past. • New buffer in SGA: Flashback Buffer • New Background process: RVWR
  • 4. FLASHBACK TECHNOLOGIES • Flashback Query • Flashback Table • Flashback Versions Query • Flashback Transaction Query • Flashback Transaction • DBMS_FLASHBACK • Flashback Drop • Flashback Database
  • 5. FLASHBACK QUERY • Query data in the past. • Depends upon the data availability in Undo segments. • Can be used to recover lost data or undo some transaction. • Is used by using DzSELECT AS OFdz • Takes around 6 sec to record the flashback record. • SELECT * FROM FL_QUERY AS OF TIMESTAMP TO_TIMESTAMP('&timestamp','DD-MON-YY HH24.MI.SS');
  • 6. FLASHBACK VERSION QUERY • Retrieve different versions of rows during a given interval. • DzVersions Betweendz clause of Select statement is used. • Pseudocolumns are used: • Versions_startscn • Versions_starttime • Versions_endscn • Versions_endtime • Versions_xid • Versions_operation • Scripts used: fl_version_upd.sql fl_version.sql
  • 7. FLASHBACK TRANSACTION QUERY • Retrieve Metadata and historical data for transaction/transactions. • flashback_transaction_query view is used to see the past transaction data. SELECT xid, operation, start_scn, commit_scn, logon_user, undo_sql FROM flashback_transaction_query WHERE xid in (select versions_xid from fl_query versions BETWEEN TIMESTAMP TO_TIMESTAMP('29-MAY-14 16.40.54', 'DD-MON-YY HH24.MI.SS') AND TO_TIMESTAMP('29-MAY-14 16.49.56', 'DD-MON-YY HH24.MI.SS'));
  • 8. FLASHBACK TABLE • Will flashback a table to some time in past. • Use undo to flashback the table. • This is not a rollback, it’s a separate transaction. • Flashback table keep the constraints intact. • Enable Row movement on tables before Flashback table.
  • 9. DBMS_FLASHBACK • Package used to rollback transaction/s. • Subprograms: • Enable_At_time • Transaction_backout • Disable • Must have DzFlashback any tabledz privilege. Example: exec dbms_flashback.transaction_backout(numtxns=>1,xids=>sys.xid_ array('030020006D070000'),options=>dbms_flashback.cascade);
  • 10. FLASHBACK DROP • Getting back the dropped table. • Table is recreated (Re-named) from recycle bin. • Depends upon the availability of dropped table in recycle bin. • Cannot recover a table from dropped schema. Flashback table drop_table to before drop;
  • 11. FLASHBACK DATABASE • Flashback Database to time in the past. • Needs Resetlogs to open the database. • Similar to point in time recovery but takes less time and less complex. • Db_recovery_file_dest=/data3/oracle/fast_recovery_area/ • Db_flashback_retention_target=1440; • Db_recovery_file_Dest=10G; • Alter database Flashback on; • Flashback database to timestamp to_timestamp('30-may-2014 14:51:09','dd-mon-yyyy hh24:mi:ss'); • Alter database open resetlogs;
  • 12. • Restore Points • create restore point BEFORE_UPGRADE; • create restore point BEFORE_UPGRADE guarantee flashback database; • drop restore point BEFORE_UPGRADE;
  • 13. SUMMARY • Flashback Query – no setup required – Just undo • Flashback Table – no setup required – Just undo • Flashback Drop – Recyclebin – on by default. • Flashback Versions - no setup required – Just undo • Flashback Database – Requires a flash recovery area / feature to be switched on. • Flashback Transaction – may require supplimental data • Flashback Data Archives – needs flashback tablespace