© 2006 Northgate Information Solutions plc and its associated companies. All rights reserved. Slide 1.

Slides:



Advertisements
Similar presentations
Chris Ruel * Image used without permission.
Advertisements

SQL2-ch2 管理綱要物件.
INTRODUCTION TO ORACLE Lynnwood Brown System Managers LLC Backup and Recovery Copyright System Managers LLC 2008 all rights reserved.
17 Copyright © 2005, Oracle. All rights reserved. Performing Flashback.
ORACLE FLASHBACK. Flashback Flashback a nivel de base de datos Flashback a nivel de tabla Flashback a nivel de tabla borrada Flashback query Flashback.
Basic Storage Concepts and Settings
Harvard University Oracle Database Administration Session 10 Database Backups.
10 Copyright © 2009, Oracle. All rights reserved. Managing Undo Data.
5 Copyright © 2006, Oracle. All rights reserved. Database Recovery.
INTRODUCTION TO ORACLE Lynnwood Brown President System Managers LLC Data Loading & Backup And Recovery Lecture 5 Copyright System Managers LLC 2003 all.
RMAN Restore and Recovery
Backup and Recovery (2) Oracle 10g CAP364 1 Hebah ElGibreen.
Backup and Recovery Part 1.
Chapter 12 Performing Incomplete Recovery. Background Viewed as one of the more difficult chapters to write Thought it was important to put in material.
CHAPTER 16 User-Managed Backup and Recovery. Introduction to User Managed Backup and Recovery Backup and recover is one of the most critical skills a.
Oracle9i Database Administrator: Implementation and Administration
Backup Concepts. Introduction Backup and recovery procedures protect your database against data loss and reconstruct the data, should loss occur. The.
Agenda  Overview  Configuring the database for basic Backup and Recovery  Backing up your database  Restore and Recovery Operations  Managing your.
Introduction to Oracle Backup and Recovery
Using RMAN to Perform Recovery
CHAPTER 16 User-Managed Backup and Recovery. Introduction to User Managed Backup and Recovery Backup and recover is one of the most critical skills a.
Oracle Database High Availability Brandon Kuschel Jian Liu Source: Oracle Database 11g Release 2 High Availability An Oracle White Paper November 2010.
Oracle Database Administration
7 Copyright © 2006, Oracle. All rights reserved. Dealing with Database Corruption.
NoCOUG 2005 Winter Conference NoCOUG 2005 Winter Conference Oracle 10g Backup and Recovery New Features Daniel T. Liu Senior Technical Consultant First.
5 Copyright © 2008, Oracle. All rights reserved. Using RMAN to Create Backups.
1 Oracle Database 11g – Flashback Data Archive. 2 Data History and Retention Data retention and change control requirements are growing Regulatory oversight.
1 Oracle Flashback Technologies COUG Presentation – Feb 2010 Feb 25, 2010 Ray Smith
9 Copyright © 2004, Oracle. All rights reserved. Flashback Database.
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
16 Copyright © 2004, Oracle. All rights reserved. Undo Management.
Oracle Database 10 g Time Navigation: Human-Error Correction Magnus Lubeck DBA/Systems Analyst CERN, IT-DB Group Session id: Tammy Bednar Sr. Product.
6 Copyright © 2006, Oracle. All rights reserved. Flashback.
15 Copyright © Oracle Corporation, All rights reserved. RMAN Incomplete Recovery.
Database structure and space Management. Database Structure An ORACLE database has both a physical and logical structure. By separating physical and logical.
Week 3 Lecture 1 The Redo Log Files and Diagnostic Files.
7 Copyright © 2005, Oracle. All rights reserved. Managing Undo Data.
Database structure and space Management. Segments The level of logical database storage above an extent is called a segment. A segment is a set of extents.
11 Copyright © 2004, Oracle. All rights reserved. Dealing with Database Corruption.
Week 3 Lecture 2 Basic Storage Concepts and Settings.
IT Database Administration Section 09. Backup and Recovery Backup: The available options Full Consistent (cold) Backup Database shutdown, all files.
10 Copyright © 2004, Oracle. All rights reserved. Recovering from User Errors.
14 Copyright © 2005, Oracle. All rights reserved. Backup and Recovery Concepts.
Oracle 10g Database Administrator: Implementation and Administration Chapter 5 Basic Storage Concepts and Settings.
Overview of Oracle Backup and Recovery Darl Kuhn, Regis University.
12 Copyright © Oracle Corporation, All rights reserved. User-Managed Complete Recovery.
18 Copyright © 2004, Oracle. All rights reserved. Backup and Recovery Concepts.
6 Copyright © 2007, Oracle. All rights reserved. Performing User-Managed Backup and Recovery.
2 Copyright © 2006, Oracle. All rights reserved. Configuring Recovery Manager.
3 Copyright © 2007, Oracle. All rights reserved. Using the RMAN Recovery Catalog.
18 Copyright © 2004, Oracle. All rights reserved. Recovery Concepts.
14 Copyright © 2005, Oracle. All rights reserved. Backup and Recovery Concepts.
11 Copyright © 2007, Oracle. All rights reserved. Using Flashback Technology.
Chapter 3 Table Creation and Management Oracle 10g: SQL.
6 Copyright © Oracle Corporation, All rights reserved. Backup and Recovery Overview.
What is the Flashback Database? Improves a database’s availability Useful alternative to traditional restoration methods Contains Flashback logs Archived.
14 Copyright © 2007, Oracle. All rights reserved. Backup and Recovery Concepts.
What is Flashback? Technology that allows you to revert the database to a point in time in the past Several versions of flashback available Different types.
23 Copyright © 2004, Oracle. All rights reserved. Preferring the Past: Flashback.
9 Copyright © 2005, Oracle. All rights reserved. Managing Undo Data.
10 Copyright © 2007, Oracle. All rights reserved. Managing Undo Data.
Oracle Database High Availability
Performing Flashback.
Recovering from User Errors
Oracle Database High Availability
Oracle 10g Database Administrator: Implementation and Administration
Oracle9i Database Administrator: Implementation and Administration
Performing Tablespace Point-in-Time Recovery
Performing Database Recovery
Chapter 5 The Redo Log Files.
Presentation transcript:

© 2006 Northgate Information Solutions plc and its associated companies. All rights reserved. Slide 1

© 2006 Northgate Information Solutions plc and its associated companies. All rights reserved. 2 Oracle Flashback Presented By Simon Swann

© 2006 Northgate Information Solutions plc and its associated companies. All rights reserved. 3 Flashback Coverage Introduction Brief History User Induced Trauma Extended Flashback Features Summary

© 2006 Northgate Information Solutions plc and its associated companies. All rights reserved. 4 Flashback Introduction Introduction: Several New Features ► ASMM (automatic shared memory management) (ability to share memory in a more efficient manor ) ► ASM (automatic storage management) (store thousands of files in disk groups) ► OMF (oracle managed files) (control of naming & location left to Oracle) ► Enhancements to Flashback (allows speedy recovery from data loss)

© 2006 Northgate Information Solutions plc and its associated companies. All rights reserved. 5 Flashback Brief History Brief History: ► Backup & Recovery main hallmark is the ability to recover from failure ► Datafile loss, a set of Datafiles, Redologs, Controlfile loss ► Restore options from: Physical backup copies, Rman backups or Export/Import

© 2006 Northgate Information Solutions plc and its associated companies. All rights reserved. 6 Flashback User Induced Trauma  Deletions Truncations  Drops Data TablesDatabase Corruptions Human Errors Disasters Power Outage Hardware Failure

© 2006 Northgate Information Solutions plc and its associated companies. All rights reserved. Slide 7 Database Recovery Time ► How long will it take? Is the Backup good? ► Has it been tested? Time spent Trouble Shooting ► Do we have the relevant Backups onsite? ► Have we recovered far enough back?

© 2006 Northgate Information Solutions plc and its associated companies. All rights reserved. 8 Flashback Recovery Solutions Logical Methods: ► Export and Import ► Datapump Physical Methods: ► O/S Backup and Restore ► RMAN Backup and Restore Flashback can be used to ‘speed up’ the recovery process in certain areas

© 2006 Northgate Information Solutions plc and its associated companies. All rights reserved. 9 Flashback Features What is it? ► A feature that allows data, tables or the database to be flashed back to a previous point in time Introduced in Oracle 9i ► DBMS_FLASHBACK package Expanded in Oracle 10g ► Incorporated in SQL

© 2006 Northgate Information Solutions plc and its associated companies. All rights reserved. 10 Flashback Background How does it work? ► Technology was there in Rollback segments, which are used for transaction read consistency, commit or rollback and recovery assistance. Before data could be over written within the rollback segment Flashback makes use of Automatic Undo Management. ► Undo_management=AUTO ► Undo_tablespace=UNDOTBS ► Undo_retention=3600 Before data could possibly remain there for longer periods of time before being over written within the undo segment

© 2006 Northgate Information Solutions plc and its associated companies. All rights reserved. 11 Flashback Query Flashback Query

© 2006 Northgate Information Solutions plc and its associated companies. All rights reserved. 12 Flashback Query Feature Allows Querying of data in the past CURRENT_SCN from V$DATABASE;

© 2006 Northgate Information Solutions plc and its associated companies. All rights reserved. 13 Flashback Query Feature Flashback Query additions: ► select * from as of scn timestamp_to_scn (sysdate – 2/24); ► select * from as of scn timestamp_to_scn (sysdate – 0.25/24);

© 2006 Northgate Information Solutions plc and its associated companies. All rights reserved. 14 Flashback Query Flashback Version Flashback Version Feature

© 2006 Northgate Information Solutions plc and its associated companies. All rights reserved. 15 Flashback Version Query Feature A short term auditing feature that allows changes to individual rows to be tracked over a time period. The information about the transactions are stored in the Undo Segments.

© 2006 Northgate Information Solutions plc and its associated companies. All rights reserved. 16 Flashback Version Query pseudocolumns Use the ‘versions between’ clause to track the changes between different SCN values. VERSIONS_STARTSCN - starting SCN when the row acquired this value VERSIONS_STARTTIME - specifies a time rather than an SCN VERSIONS_ENDSCN - last SCN when the row held the value VERSIONS_ENDTIME - specifies a time rather than an SCN VERSIONS_XID - ID of the transaction involved VERSIONS_OPERATION - performing insert, update, delete

© 2006 Northgate Information Solutions plc and its associated companies. All rights reserved. 17 Flashback Version Query example Performing a Flashback Version Query against a table that has had a column heading change.

© 2006 Northgate Information Solutions plc and its associated companies. All rights reserved. 18 Flashback Version Query Feature

© 2006 Northgate Information Solutions plc and its associated companies. All rights reserved. 19 Flashback Query Flashback Version Flashback Transaction Flashback Transaction Feature

© 2006 Northgate Information Solutions plc and its associated companies. All rights reserved. 20 Flashback Transaction Query Feature Displays detailed transaction information Information about transactions affecting a table can be obtained using the view ‘FLASHBACK_TRANSACTION_QUERY’ The view contains a column ‘XID’ which can be joined to the ‘VERSIONS_XID’ row returned by the ‘VERSIONS_BETWEEN’ clause.

© 2006 Northgate Information Solutions plc and its associated companies. All rights reserved. 21 Flashback Transaction Query The view contains a column ‘XID’ which can be joined to the ‘VERSIONS_XID’ row returned by the ‘VERSIONS_BETWEEN’ clause. select * from flashback_transaction_query where xid in (select hextoraw(versions_xid) from division versions between scn and );

© 2006 Northgate Information Solutions plc and its associated companies. All rights reserved. 22 Flashback Query Flashback Version Flashback Transaction Flashback Table Flashback Table Feature

© 2006 Northgate Information Solutions plc and its associated companies. All rights reserved. 23 Flashback Table Feature Allows a table to be rolled back to a particular point in time The relevant information will need to be in the ‘UNDO SEGMENTS’ and ‘ROW MOVEMENT’ must be enabled When you use the Flashback Table feature to restore a table to a specific point in time, all associated objects, such as, indexes, constraints, and triggers will be restored

© 2006 Northgate Information Solutions plc and its associated companies. All rights reserved. 24 Flashback Table Feature Flashback Table allows you to recover a table or tables to a specific point In time without restoring a backup.

© 2006 Northgate Information Solutions plc and its associated companies. All rights reserved. 25 Flashback Query Flashback Version Flashback Transaction Flashback Table Flashback Drop Flashback Drop Feature

© 2006 Northgate Information Solutions plc and its associated companies. All rights reserved. 26 Flashback Drop Feature Acts as a ‘RECYCLEBIN’ allowing dropped tables to be retrieved Flashback Drop is a variation of Flashback table as it handles rolling back a dropped table Dropped tables are ‘RENAMED’ in the ‘RECYCLEBIN’ and can be retrieved using the ‘FLASHBACK DROP’ command

© 2006 Northgate Information Solutions plc and its associated companies. All rights reserved. 27 Flashback Drop Feature Tables must be in Locally managed tablespaces Tables must not be in the SYSTEM tablespace

© 2006 Northgate Information Solutions plc and its associated companies. All rights reserved. 28 Flashback Drop Feature Purge Recyclebin: ► Will remove ALL dropped objects from individual USERS recyclebin ► Select * from user_recyclebin ► Show recyclebin ► Purge recyclebin Purge DBA Recyclebin: ► Will remove ALL dropped objects from all users recyclebin ► Select * from DBA_recyclebin ► Show DBA_recyclebin ► Purge DBA_recyclebin

© 2006 Northgate Information Solutions plc and its associated companies. All rights reserved. 29 Flashback Database Flashback Query Flashback Version Flashback Transaction Flashback Table Flashback Drop Flashback Database Feature

© 2006 Northgate Information Solutions plc and its associated companies. All rights reserved. 30 Flashback Database Feature Database LGWRRVWR Log file 1 Log file 2 Flashback Log

© 2006 Northgate Information Solutions plc and its associated companies. All rights reserved. 31 Flashback Database Feature Initialization Parameters to be defined: ► DB_RECOVERY_FILE_DEST_SIZE ► Alter system set DB_RECOVERY_FILE_DEST_SIZE=8g scope=both; ► DB_RECOVERY_FILE_DEST ► Alter system set DB_RECOVERY_FILE_DEST=`C:\flash` scope=both;

© 2006 Northgate Information Solutions plc and its associated companies. All rights reserved. 32 Flashback Database Feature SHUTDOWN IMMEDIATE STARTUP MOUNT ALTER DATABASE FLASHBACK ON ALTER DATABASE OPEN Select CURRENT_SCN, FLASHBACK_ON From V$DATABASE To monitor Flashback Database use V$flashback_database_stat

© 2006 Northgate Information Solutions plc and its associated companies. All rights reserved. 33 Flashback Database Feature Then the Inevitable happens Table truncated Database becomes corrupt

© 2006 Northgate Information Solutions plc and its associated companies. All rights reserved. 34 Flashback Database Feature Performing a FLASHBACK DATABASE recovery: ► SHUTDOWN IMMEDIATE ► STARTUP MOUNT ► FLASHBACK DATABASE to SCN ► ALTER DATABASE OPEN RESETLOGS

© 2006 Northgate Information Solutions plc and its associated companies. All rights reserved. 35 Flashback Database Feature FLASHBACK DATABASE recovery options: ► FLASHBACK DATABASE to TIMESTAMP ► FLASHBACK DATABASE to BEFORE SCN ► FLASHBACK DATABASE to BEFORE TIMESTAMP Set the Flashback Database retention target: ► DB_FLASHBACK_RETENTION_TARGET The default value for flashback retention time is 1400 minutes.

© 2006 Northgate Information Solutions plc and its associated companies. All rights reserved. 36 Flashback Database Flashback Query Flashback Version Flashback Transaction Flashback Table Flashback Drop Summary

© 2006 Northgate Information Solutions plc and its associated companies. All rights reserved. Summary Flashback Query – allows a user to view previous versions of a table. Flashback Version – allows changes of individual rows to be tracked. Flashback Transaction – allows tracking of specific transaction changes. Flashback Table – put the table back as it was, undoing corruption Flashback Drop – retrieve a dropped table from the recyclebin Flashback Database – perform an incomplete recovery without the aid of a backup

© 2006 Northgate Information Solutions plc and its associated companies. All rights reserved. 38 Thank you for your time Simon Swann