Download presentation
Presentation is loading. Please wait.
Published byWesley Parker Modified over 9 years ago
2
Oracle Database 10 g Time Navigation: Human-Error Correction Magnus Lubeck DBA/Systems Analyst CERN, IT-DB Group Session id: 40109 Tammy Bednar Sr. Product Manager Oracle Corporation
3
Time Navigation and Human Error Correction noitcerroC Correction Correction Correction Correction
4
Human Error Estimated to be the biggest single cause of downtime Need to quickly determine what happened and fix it – Localized damage Needs surgical detection and repair Example – removed wrong person named ‘Smith’ – Widespread damage Requires drastic action to avoid long downtime Example – batch job deletes this month’s orders Analysis and correction using traditional recovery is slow and complex – Restore database to point in time and extract data Oracle Database 10g is a breakthrough release for human error correction Human Errors Other Downtime
5
Flashback Time Navigation Flashback Query – Query all data at point in time Flashback Versions Query – See all versions of a row between two times – See transactions that changed the row Flashback Transaction Query – See all changes made by a transaction Tx 1 Tx 2 Tx 3 Select * from Emp AS OF ‘2:00 P.M.’ where … Select * from Emp VERSIONS BETWEEN ‘2:00 PM’ and ‘3:00 PM’ where … Select * from DBA_TRANSACTION_QUERY where xid = ‘000200030000002D’;
6
Flashback Error Correction Recovery at all levels Database Level – Flashback Database restores the whole database to time Uses Flashback Logs Table Level – Flashback Table restores rows in a set of tables to time Uses UNDO in database – Flashback Drop restores a dropped table or a index Recycle bin for DROPs Row Level – Flashback Query restores rows to time Order Database Customer
7
Flashback Database A new strategy for point in time recovery Eliminate the need to restore a whole database backup Integrated seamlessly with RMAN – Think of it as a continuous backup – Restores just changed blocks – Replay log to restore DB to time It’s fast - recover in minutes, not hours It’s easy - single command restore Flashback Database to ‘2:05 PM’ “Rewind” button for the Database Data FilesFlashback Log New Block Version Disk Write Old Block Version
8
Flashback Drop Quickly recover dropped objects Provides self-service recovery Eliminate the need for TSPITR Virtual Recycle Bin – Objects remain in the recycle bin until you permanently drop them with the PURGE command or recover them with the Flashback Table command. – Objects will remain in the recycle bin until there is no room in the tablespace for new rows or updates to existing rows or until the tablespace needs to be extended – Objects are purged in the order they were dropped. Drop table emp; Emp Mistake was made Emp Recycle bin Flashback Table emp before drop;
9
Flashback Table Recover a table or tables to a specific point in time without restoring a backup Provides a way for users to easily and quickly recover from accidental modifications without DBA involvement In-place and online recovery of a table to a point in time in the past Eliminate traditional restores and clone instances to recover a table or tables to a specific point in time Data in the tables and all associated objects (indexes, constraints, triggers, etc.) are restored
10
Flashback Versions Query Provides a way to audit the rows of a table and retrieve information about the transactions that changed the rows. Retrieve all committed versions of the rows that exist or ever existed between the time the query was issued and a point in time in the past Use the transaction ID to perform transaction mining using LogMiner or Flashback Transaction Query to obtain additional information about the transaction.
11
Flashback Transaction Query Provides a way for you to view changes made to the database at the transaction level When used in conjunction with Flashback Versions Query, it allows you to easily recover from user or application errors. Benefits – Increase online diagnosability of problems in your database – Perform analysis and audits of transactions – Fast recovery at the transaction level
12
Database Mission Determine what transaction removed Order ID 2453 Recover the corruption fast!
13
Order ID 2453 & line item data
14
The Order ID data is removed from the database
15
Using the ‘VERSIONS BETWEEN’ syntax, you can find the operations and transactions executed for Order 2453
16
After manually executing the SQL statements, Order 2453 & its line items have been inserted back into the database!
17
Flashback Transaction Query Provides the SQL statements to ‘undo’ the offending operation
18
CERN Magnus Lubeck, DBA/Systems analyst CERN is the world biggest particle physics research center. In operation for 50 years! In our physics research we collect enormous amounts of data, of which some is stored in ORDBMS Oracle 10G beta testing and evaluation is an important activity for CERN to support the physics community by understanding and request new features. 10 people in our Oracle beta test team, focusing on different areas 6 miles
19
Testbed setup SAN General purpose for – RAC testing – Oracle 10G testing The setup – Five dual CPU servers (four connected to SAN) – Gbit interconnect – Plenty of disk – A set up workstations to run applications Not a setup for Benchmarks, but for proof of concept
20
Testing Flashback Features The Flashback features is a subset of the beta testing performed at CERN The Human Error Correction testing, in order of appearance – the one hour approach – Install Sofware + DB instance – Setting up the recovery area – Flashback table – Flashback transaction query – Flashback database
21
CERN – Testing FB features RMAN Repository Flashback Table Database Instances SCN Flashback Database Flashback Transaction Query Configure Flash Recovery Area Software Installation Timeline PreparationsTesting
22
Summary of CERN Flashback testing Flashback Table/Drop – Easy to get back dropped tables – Nice to be able to query dropped tables Flashback Transaction Query – Diagnosability – Accountability Flashback database – Fast recovery Flash Recovery Area – Organizes & manages backups Future use of FB features
23
Revolution in Recovery Flashback Revolutionizes Recovery – Operates on just the changed data – Time to correct error equals time to make error Minutes instead of hours Flashback is Easy – Single command instead of complex procedure Correction Time = Error Time + f(DB_SIZE)
24
Flashback for All Users END USER Flashback Query Flashback Versions Query DEVELOPER Flashback Versions Query Flashback Transaction Query Flashback Table DATABASE ADMIN Flashback Database Flashback Drop SYSTEM ADMIN Data Guard
25
Next Steps High Availability Sessions from Oracle 11:00 AM How Oracle Database 10G Revolutionizes Availability and Enables the Grid 3:30 PM Oracle Recovery Manager (RMAN) 10G: Reloaded 5:00 PM Proven Techniques for Maximizing Availability 8:30 AM Oracle Database 10G - RMAN and ATA Storage in Action 11:00 AM Oracle Data Guard: Maximum Data Protection at Minimum Cost 1:00 PM Oracle Database 10G Time Navigation: Human-Error Correction 4:30 PM Data Guard SQL Apply: Back to the Future Wednesday in Moscone Room 304Tuesday in Moscone Room 304 For More Info On Oracle HA Go To http://otn.oracle.com/deploy/availability/
26
Next Steps High Availability Sessions from Oracle 8:30 AM -- Moscone Room 304 Oracle Database 10G Data Warehouse Backup and Recovery: Automatic, Simple, Reliable 8:30 AM -- Moscone Room 104 Building RAC Clusters over InfiniBand Thursday For More Info On Oracle HA Go To http://otn.oracle.com/deploy/availability/ Real Application Clusters Data Guard Database Backup & Recovery Flashback Recovery LogMiner, Online Redefinition, and Cross Platform Transportable Tablespaces Database HA Demos All Four Days In The Oracle Demo Campground
27
Reminder – please complete the OracleWorld online session survey Thank you.
28
A Q & Q U E S T I O N S A N S W E R S
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.