8/12/2019 Presentation - Three Rs of Data Warehouse Fault Tolerance
1/60
T : (888) 631 1410 or+44 (0) 8446 697 995 E : [email protected] W: www.rittmanmead.com
Stewart Bryson, Managing Director, Rittman Mead AmericaOracle Open World 2010, San Francisco, September 2010
Three Rs of Data Warehouse Fault Tolerance
Thursday, September 23, 2010
8/12/2019 Presentation - Three Rs of Data Warehouse Fault Tolerance
2/60
T : (888) 631 1410 or+44 (0) 8446 697 995 E : [email protected] W: www.rittmanmead.com
Who am I?
Thursday, September 23, 2010
http://www.rittmanmead.com/http://www.rittmanmead.com/8/12/2019 Presentation - Three Rs of Data Warehouse Fault Tolerance
3/60
T : (888) 631 1410 or+44 (0) 8446 697 995 E : [email protected] W: www.rittmanmead.com
Stewart Bryson, Managing Director, Rittman MeadAmerica
Oracle BI/DW Architect and Delivery Specialist
Oracle Database and BI Stack since 1996
Regular Community Speaker
Writer for Rittman Mead Blog:http://www.rittmanmead.com/blog
Developer of Transcend Framework
Email : [email protected]
Twitter : @stewartbryson
Thursday, September 23, 2010
http://www.rittmanmead.com/bloghttp://www.rittmanmead.com/bloghttp://www.rittmanmead.com/http://www.rittmanmead.com/8/12/2019 Presentation - Three Rs of Data Warehouse Fault Tolerance
4/60
T : (888) 631 1410 or+44 (0) 8446 697 995 E : [email protected] W: www.rittmanmead.com
Who is Rittman Mead?
Thursday, September 23, 2010
http://www.rittmanmead.com/http://www.rittmanmead.com/8/12/2019 Presentation - Three Rs of Data Warehouse Fault Tolerance
5/60
T : (888) 631 1410 or+44 (0) 8446 697 995 E : [email protected] W: www.rittmanmead.com
Oracle BI&DW Experts
Consulting, Training and Support
Global Company, Offices in the US, UK and India
Clients in the UK, USA, Europe, Middle-East
Voted UKOUG BI Partner of the Year 2008
13 Sessions at Oracle Open World 2010
Twitter : @stewartbryson
Thursday, September 23, 2010
http://www.rittmanmead.com/http://www.rittmanmead.com/8/12/2019 Presentation - Three Rs of Data Warehouse Fault Tolerance
6/60
T : (888) 631 1410 or+44 (0) 8446 697 995 E : [email protected] W: www.rittmanmead.com
Rittman Mead Blog
Thursday, September 23, 2010
http://www.rittmanmead.com/http://www.rittmanmead.com/8/12/2019 Presentation - Three Rs of Data Warehouse Fault Tolerance
7/60
T : (888) 631 1410 or+44 (0) 8446 697 995 E : [email protected] W: www.rittmanmead.com
Longest-running Oracle (BI) Blog
OBIEE, OWB, BI, data warehousing, Hyperion, etc.Step-by-step demonstrations
Test cases
Product evaluations
Authors include
! Mark Rittman (ACE Director)
! Venkat Janakiraman (ACE)
! Stewart Bryson
! Borkur Steingrimsson
! Peter Scott
Thursday, September 23, 2010
http://www.rittmanmead.com/http://www.rittmanmead.com/8/12/2019 Presentation - Three Rs of Data Warehouse Fault Tolerance
8/60
T : (888) 631 1410 or+44 (0) 8446 697 995 E : [email protected] W: www.rittmanmead.com
Rittman Mead Oracle BI Training Days 2010
Running in London, Atlanta and Bangalore, Fall 2010
Three days of intense OBIEE 11gR1 hands-on training
Led by the Rittman Mead 11g Beta Testing team
Limited places still available: http://www.rittmanmead.com/trainingdays2010
Thursday, September 23, 2010
http://www.rittmanmead.com/http://www.rittmanmead.com/8/12/2019 Presentation - Three Rs of Data Warehouse Fault Tolerance
9/60
T : (888) 631 1410 or+44 (0) 8446 697 995 E : [email protected] W: www.rittmanmead.com
What will this session answer?
Thursday, September 23, 2010
http://www.rittmanmead.com/http://www.rittmanmead.com/8/12/2019 Presentation - Three Rs of Data Warehouse Fault Tolerance
10/60
T : (888) 631 1410 or+44 (0) 8446 697 995 E : [email protected] W: www.rittmanmead.com
!What do I mean by fault tolerance?
!How is fault tolerance different for BI/DW systems?
!Are there standard features of the Oracle Databasethat can help with fault tolerance?
!What do I mean by Resuming, Restarting andRestoring?
Thursday, September 23, 2010
http://www.rittmanmead.com/http://www.rittmanmead.com/8/12/2019 Presentation - Three Rs of Data Warehouse Fault Tolerance
11/60
T : (888) 631 1410 or+44 (0) 8446 697 995 E : [email protected] W: www.rittmanmead.com
How are BI/DW Systems Different?
Thursday, September 23, 2010
http://www.rittmanmead.com/http://www.rittmanmead.com/8/12/2019 Presentation - Three Rs of Data Warehouse Fault Tolerance
12/60
T : (888) 631 1410 or+44 (0) 8446 697 995 E : [email protected] W: www.rittmanmead.com
Millions or billions of rows
Constraints are often disabled
!No referential integrity protecting errant ETL runs
! Long query processing to find issues
DDL operations included in ETL code
Large memory sizes, parallelism
Thursday, September 23, 2010
http://www.rittmanmead.com/http://www.rittmanmead.com/8/12/2019 Presentation - Three Rs of Data Warehouse Fault Tolerance
13/60
T : (888) 631 1410 or+44 (0) 8446 697 995 E : [email protected] W: www.rittmanmead.com
What is Fault Tolerance for BI/DW?
Thursday, September 23, 2010
http://www.rittmanmead.com/http://www.rittmanmead.com/8/12/2019 Presentation - Three Rs of Data Warehouse Fault Tolerance
14/60
T : (888) 631 1410 or+44 (0) 8446 697 995 E : [email protected] W: www.rittmanmead.com
Ability to recover from different kinds of errors
!Hardware and software
!
General System issues: space, network latency!Human mistakes
Elimination of aftermath scenarios
!Data correction scenarios
! Long rerun processes
Thursday, September 23, 2010
http://www.rittmanmead.com/http://www.rittmanmead.com/8/12/2019 Presentation - Three Rs of Data Warehouse Fault Tolerance
15/60
T : (888) 631 1410 or+44 (0) 8446 697 995 E : [email protected] W: www.rittmanmead.com
What is available to us with the database?
Thursday, September 23, 2010
http://www.rittmanmead.com/http://www.rittmanmead.com/8/12/2019 Presentation - Three Rs of Data Warehouse Fault Tolerance
16/60
T : (888) 631 1410 or+44 (0) 8446 697 995 E : [email protected] W: www.rittmanmead.com
The first thing we should do is exploit the features inthe database we already own
Threat a BI/DW environment as a production system
Simple errors should never cause downtime
Complex errors should cause minimal downtime
Understand that ETL processes will sometimes breakand plan for that
Thursday, September 23, 2010
http://www.rittmanmead.com/http://www.rittmanmead.com/8/12/2019 Presentation - Three Rs of Data Warehouse Fault Tolerance
17/60
T : (888) 631 1410 or+44 (0) 8446 697 995 E : [email protected] W: www.rittmanmead.com
Resuming
Thursday, September 23, 2010
http://www.rittmanmead.com/http://www.rittmanmead.com/8/12/2019 Presentation - Three Rs of Data Warehouse Fault Tolerance
18/60
T : (888) 631 1410 or+44 (0) 8446 697 995 E : [email protected] W: www.rittmanmead.com
Error is detected and processing is suspended
Once the error is corrected, processing continuesautomatically
Oracle Database offers Resumable Space Allocation
!Available since 9i
! Functionality for all space-related errors: targetdatafiles, tempfiles, UNDO space
Supported for SELECT, DML and DDL
Available in Oracle Utilities
!Datapump (automatic)
!SQL-Loader
!Export/Import
Thursday, September 23, 2010
http://www.rittmanmead.com/http://www.rittmanmead.com/8/12/2019 Presentation - Three Rs of Data Warehouse Fault Tolerance
19/60
T : (888) 631 1410 or+44 (0) 8446 697 995 E : [email protected] W: www.rittmanmead.com
Enabling Resumable Space Allocation
Thursday, September 23, 2010
http://www.rittmanmead.com/http://www.rittmanmead.com/8/12/2019 Presentation - Three Rs of Data Warehouse Fault Tolerance
20/60
T : (888) 631 1410 or+44 (0) 8446 697 995 E : [email protected] W: www.rittmanmead.com
Enabling Resumable Space Allocation
Enabled at the system Level
!RESUMABLE_TIMEOUT parameter
Thursday, September 23, 2010
http://www.rittmanmead.com/http://www.rittmanmead.com/8/12/2019 Presentation - Three Rs of Data Warehouse Fault Tolerance
21/60
T : (888) 631 1410 or+44 (0) 8446 697 995 E : [email protected] W: www.rittmanmead.com
Enabling Resumable Space Allocation
Enabled at the system Level
!RESUMABLE_TIMEOUT parameter
Enabled at the session Level
!ENABLE RESUMABLE
!
TIMEOUT!NAME
Thursday, September 23, 2010
http://www.rittmanmead.com/http://www.rittmanmead.com/8/12/2019 Presentation - Three Rs of Data Warehouse Fault Tolerance
22/60
T : (888) 631 1410 or+44 (0) 8446 697 995 E : [email protected] W: www.rittmanmead.com
Enabling Resumable Space Allocation
Enabled at the system Level
!RESUMABLE_TIMEOUT parameter
Enabled at the session Level
!ENABLE RESUMABLE
!
TIMEOUT!NAME
Enabled with command-line parametersfor Oracle Utilities
!RESUMABLE
!RESUMABLE_NAME
!RESUMABLE_TIMEOUT
Thursday, September 23, 2010
http://www.rittmanmead.com/http://www.rittmanmead.com/8/12/2019 Presentation - Three Rs of Data Warehouse Fault Tolerance
23/60
T : (888) 631 1410 or+44 (0) 8446 697 995 E : [email protected] W: www.rittmanmead.com
Monitoring Resumable Sessions
Thursday, September 23, 2010
http://www.rittmanmead.com/http://www.rittmanmead.com/8/12/2019 Presentation - Three Rs of Data Warehouse Fault Tolerance
24/60
T : (888) 631 1410 or+44 (0) 8446 697 995 E : [email protected] W: www.rittmanmead.com
Monitoring Resumable Sessions
Thursday, September 23, 2010
http://www.rittmanmead.com/http://www.rittmanmead.com/8/12/2019 Presentation - Three Rs of Data Warehouse Fault Tolerance
25/60
T : (888) 631 1410 or+44 (0) 8446 697 995 E : [email protected] W: www.rittmanmead.com
Monitoring Resumable Sessions
Thursday, September 23, 2010
http://www.rittmanmead.com/http://www.rittmanmead.com/8/12/2019 Presentation - Three Rs of Data Warehouse Fault Tolerance
26/60
T : (888) 631 1410 or+44 (0) 8446 697 995 E : [email protected] W: www.rittmanmead.com
Monitoring Resumable Sessions
Thursday, September 23, 2010
http://www.rittmanmead.com/http://www.rittmanmead.com/8/12/2019 Presentation - Three Rs of Data Warehouse Fault Tolerance
27/60
T : (888) 631 1410 or+44 (0) 8446 697 995 E : [email protected] W: www.rittmanmead.com
AFTER SUSPEND Trigger
Thursday, September 23, 2010
http://www.rittmanmead.com/http://www.rittmanmead.com/8/12/2019 Presentation - Three Rs of Data Warehouse Fault Tolerance
28/60
T : (888) 631 1410 or+44 (0) 8446 697 995 E : [email protected] W: www.rittmanmead.com
AFTER SUSPEND Trigger
System-wide trigger fires whenoperations suspended
Can use the DBMS_RESUMABLEpackage
!SPACE_ERROR_INFO function
!SET_TIMEOUT
Seems unnecessary
!BI/DW environments should beproduction-ready
!Should already have monitoring andalerts
!AUTOEXTEND handles adding space
Thursday, September 23, 2010
http://www.rittmanmead.com/http://www.rittmanmead.com/8/12/2019 Presentation - Three Rs of Data Warehouse Fault Tolerance
29/60
T : (888) 631 1410 or+44 (0) 8446 697 995 E : [email protected] W: www.rittmanmead.com
Resumable Space AllocationDemonstration
Thursday, September 23, 2010
http://www.rittmanmead.com/http://www.rittmanmead.com/8/12/2019 Presentation - Three Rs of Data Warehouse Fault Tolerance
30/60
T : (888) 631 1410 or+44 (0) 8446 697 995 E : [email protected] W: www.rittmanmead.com
Restarting
Thursday, September 23, 2010
http://www.rittmanmead.com/http://www.rittmanmead.com/8/12/2019 Presentation - Three Rs of Data Warehouse Fault Tolerance
31/60
T : (888) 631 1410 or+44 (0) 8446 697 995 E : [email protected] W: www.rittmanmead.com
Complex errors occur during ETL processing
!Hardware and software issues
!Unforeseen data issues
!Human error
!Resumable operations are uselessPlanning means eliminating aftermath scenarios
Investigate the current landscape for errors
Easy errors can sometimes be corrected with a simpleDML statement
What about the rest?
Thursday, September 23, 2010
http://www.rittmanmead.com/http://www.rittmanmead.com/8/12/2019 Presentation - Three Rs of Data Warehouse Fault Tolerance
32/60
T : (888) 631 1410 or+44 (0) 8446 697 995 E : [email protected] W: www.rittmanmead.com
Planning For Complex Errors
Thursday, September 23, 2010
http://www.rittmanmead.com/http://www.rittmanmead.com/8/12/2019 Presentation - Three Rs of Data Warehouse Fault Tolerance
33/60
T : (888) 631 1410 or+44 (0) 8446 697 995 E : [email protected] W: www.rittmanmead.com
Planning For Complex Errors
Need a framework that makes it easy to identify majormilestones in the ETL process
Need to catch unexpected errorsNot the same as code-controlled restartability
Thursday, September 23, 2010
http://www.rittmanmead.com/http://www.rittmanmead.com/8/12/2019 Presentation - Three Rs of Data Warehouse Fault Tolerance
34/60
T : (888) 631 1410 or+44 (0) 8446 697 995 E : [email protected] W: www.rittmanmead.com
Planning For Complex Errors
Need a framework that makes it easy to identify majormilestones in the ETL process
Need to catch unexpected errors
Not the same as code-controlled restartability
Thursday, September 23, 2010
http://www.rittmanmead.com/http://www.rittmanmead.com/8/12/2019 Presentation - Three Rs of Data Warehouse Fault Tolerance
35/60
T : (888) 631 1410 or+44 (0) 8446 697 995 E : [email protected] W: www.rittmanmead.com
Code-Controlled Restartability
Thursday, September 23, 2010
http://www.rittmanmead.com/http://www.rittmanmead.com/8/12/2019 Presentation - Three Rs of Data Warehouse Fault Tolerance
36/60
T : (888) 631 1410 or+44 (0) 8446 697 995 E : [email protected] W: www.rittmanmead.com
Code-Controlled Restartability
Coding for exceptions is a best practice and should alwaysbe done, but we cant catch everything
Thursday, September 23, 2010
http://www.rittmanmead.com/http://www.rittmanmead.com/8/12/2019 Presentation - Three Rs of Data Warehouse Fault Tolerance
37/60
T : (888) 631 1410 or+44 (0) 8446 697 995 E : [email protected] W: www.rittmanmead.com
Oracle Flashback Technology
Thursday, September 23, 2010
http://www.rittmanmead.com/http://www.rittmanmead.com/8/12/2019 Presentation - Three Rs of Data Warehouse Fault Tolerance
38/60
T : (888) 631 1410 or+44 (0) 8446 697 995 E : [email protected] W: www.rittmanmead.com
Revert whole database, or just portions of it
Flashback Table or Flashback Database
Point-in-time is the System Change Number (SCN)
Can create restore points, which are named SCNs
Alternatively, log SCNs with messages in the log table
Thursday, September 23, 2010
http://www.rittmanmead.com/http://www.rittmanmead.com/8/12/2019 Presentation - Three Rs of Data Warehouse Fault Tolerance
39/60
T : (888) 631 1410 or+44 (0) 8446 697 995 E : [email protected] W: www.rittmanmead.com
Completely an UNDO operation
Identify a particular SCN to flashback to
Can only flashback to SCNs still in the UNDO
This is not really new functionality
Doesnt require operations involvement
!
grant flashback on sales_fact to ETL;
Flashback Table
Thursday, September 23, 2010
http://www.rittmanmead.com/http://www.rittmanmead.com/8/12/2019 Presentation - Three Rs of Data Warehouse Fault Tolerance
40/60
T : (888) 631 1410 or+44 (0) 8446 697 995 E : [email protected] W: www.rittmanmead.com
Flashback TableDemonstration
Thursday, September 23, 2010
http://www.rittmanmead.com/http://www.rittmanmead.com/8/12/2019 Presentation - Three Rs of Data Warehouse Fault Tolerance
41/60
T : (888) 631 1410 or+44 (0) 8446 697 995 E : [email protected] W: www.rittmanmead.com
Flashback Database
Thursday, September 23, 2010
http://www.rittmanmead.com/http://www.rittmanmead.com/8/12/2019 Presentation - Three Rs of Data Warehouse Fault Tolerance
42/60
T : (888) 631 1410 or+44 (0) 8446 697 995 E : [email protected] W: www.rittmanmead.com
Flashback Database Scenario: Aftermath
ODS and staging-area lookup components
!Deleting from history tables
!Correcting MDM scenarios
Star Schemas!SCD Type 2 or Hybrid Type 1/Type 2
!Deleting or updating fact tables
!Recalculating aggregates
Difficult to quantify exactly what went wrong
Need a complete do-over
Alternatives!Execution ID
!Audit dimension
Thursday, September 23, 2010
http://www.rittmanmead.com/http://www.rittmanmead.com/8/12/2019 Presentation - Three Rs of Data Warehouse Fault Tolerance
43/60
T : (888) 631 1410 or+44 (0) 8446 697 995 E : [email protected] W: www.rittmanmead.com
Flashback Database
Not an UNDO operation like Flashback Table
Uses Flashback Logs
!Contains prior versions of changed blocks
!Physical not logical
Redo Logs (online or archived)
!Contain logically applied SQL statements
! Logical not physical
Uses a combination of Flashback and Redo Logs
! Find the data block from the Flashback Log just priorto the SCN
!Use the REDO Logs to roll forward to theappropriate SCN
Requires operations involvement
Thursday, September 23, 2010
http://www.rittmanmead.com/http://www.rittmanmead.com/8/12/2019 Presentation - Three Rs of Data Warehouse Fault Tolerance
44/60
T : (888) 631 1410 or+44 (0) 8446 697 995 E : [email protected] W: www.rittmanmead.com
Preparing for Flashback Database
Set the DB_RECOVERY_FILE_DEST_SIZEparameter
!SQL> alter system setdb_recovery_file_dest_size=3G;
Set the DB_RECOVER_FILE_DEST parameter
!SQL> alter system set db_recovery_file_dest='/u01/app/oracle/flash_recovery_area';
Set the DB_FLASHBACK_RETENTION_TARGETparameter (in minutes)
!SQL> alter system set
db_flashback_retention_target=2880;
Turn on Flashback Database
!SQL> alter database flashback on;
Thursday, September 23, 2010
http://www.rittmanmead.com/http://www.rittmanmead.com/8/12/2019 Presentation - Three Rs of Data Warehouse Fault Tolerance
45/60
T : (888) 631 1410 or+44 (0) 8446 697 995 E : [email protected] W: www.rittmanmead.com
Flashback DatabaseDemonstration
Thursday, September 23, 2010
http://www.rittmanmead.com/http://www.rittmanmead.com/8/12/2019 Presentation - Three Rs of Data Warehouse Fault Tolerance
46/60
T : (888) 631 1410 or+44 (0) 8446 697 995 E : [email protected] W: www.rittmanmead.com
Should a BI/DW Database in in ARCHIVELOG Mode?
Explanations for why BI/DW databases are usually in NOARCHIVELOG Mode
!REDO generation is only important for transactional systems
!Generation of REDO causes performance overhead
!Putting a database in NOARCHIVELOG Mode eliminates REDO generation
Thursday, September 23, 2010
http://www.rittmanmead.com/http://www.rittmanmead.com/8/12/2019 Presentation - Three Rs of Data Warehouse Fault Tolerance
47/60
T : (888) 631 1410 or+44 (0) 8446 697 995 E : [email protected] W: www.rittmanmead.com
Database in ARCHIVELOG Mode with a NOLOGGING Table
SQL> ALTER TABLE target.sales
2 nologging;
Table altered.
SQL> SET autotrace on statistics
SQL> INSERT INTO target.sales
2 SELECT * FROM sh.sales;
918843 rows created.
Statistics
-------------------------------------------------------
15401 recursive calls
33766 db block gets
13759 consistent gets
6534 physical reads
38250540 redo size
738 bytes sent via SQL*Net to client
942 bytes received via SQL*Net from client
4 SQL*Net roundtrips to/from client 123 sorts (memory)
0 sorts (disk)
918843 rows processed
SQL>
SQL> ALTER TABLE target.sales
2 nologging;
Table altered.
SQL> SET autotrace on statistics
SQL> INSERT /*+ APPEND */ INTO target.sales
2 SELECT * FROM sh.sales;
918843 rows created.
Statistics
-------------------------------------------------------
1 recursive calls
4637 db block gets
1718 consistent gets
1704 physical reads
8028 redo size
730 bytes sent via SQL*Net to client
956 bytes received via SQL*Net from client
4 SQL*Net roundtrips to/from client 1 sorts (memory)
0 sorts (disk)
918843 rows processed
SQL>
Thursday, September 23, 2010
http://www.rittmanmead.com/http://www.rittmanmead.com/8/12/2019 Presentation - Three Rs of Data Warehouse Fault Tolerance
48/60
T : (888) 631 1410 or+44 (0) 8446 697 995 E : [email protected] W: www.rittmanmead.com
Database in ARCHIVELOG Mode with a NOLOGGING Table
SQL> ALTER TABLE target.sales
2 nologging;
Table altered.
SQL> SET autotrace on statistics
SQL> INSERT INTO target.sales
2 SELECT * FROM sh.sales;
918843 rows created.
Statistics
-------------------------------------------------------
15401 recursive calls
33766 db block gets
13759 consistent gets
6534 physical reads
38250540 redo size
738 bytes sent via SQL*Net to client
942 bytes received via SQL*Net from client
4 SQL*Net roundtrips to/from client 123 sorts (memory)
0 sorts (disk)
918843 rows processed
SQL>
SQL> ALTER TABLE target.sales
2 nologging;
Table altered.
SQL> SET autotrace on statistics
SQL> INSERT /*+ APPEND */ INTO target.sales
2 SELECT * FROM sh.sales;
918843 rows created.
Statistics
-------------------------------------------------------
1 recursive calls
4637 db block gets
1718 consistent gets
1704 physical reads
8028 redo size
730 bytes sent via SQL*Net to client
956 bytes received via SQL*Net from client
4 SQL*Net roundtrips to/from client 1 sorts (memory)
0 sorts (disk)
918843 rows processed
SQL>
Thursday, September 23, 2010
http://www.rittmanmead.com/http://www.rittmanmead.com/8/12/2019 Presentation - Three Rs of Data Warehouse Fault Tolerance
49/60
T : (888) 631 1410 or+44 (0) 8446 697 995 E : [email protected] W: www.rittmanmead.com
Database in NOARCHIVELOG Mode
SQL> set autotrace on stat
SQL> insert into target.sales
2 select * from sh.sales;
918843 rows created.
Statistics
-------------------------------------------------------
9 recursive calls
33251 db block gets 10533 consistent gets
879 physical reads
38282140 redo size
1550 bytes sent via SQL*Net to client
1141 bytes received via SQL*Net from client
6 SQL*Net roundtrips to/from client
1 sorts (memory)
0 sorts (disk)
918843 rows processed
SQL>
SQL> set autotrace on stat
SQL> insert /*+ APPEND */ into target.sales
2 select * from sh.sales;
918843 rows created.
Statistics
-------------------------------------------------------
0 recursive calls
4638 db block gets 1718 consistent gets
62 physical reads
7984 redo size
734 bytes sent via SQL*Net to client
956 bytes received via SQL*Net from client
4 SQL*Net roundtrips to/from client
1 sorts (memory)
0 sorts (disk)
918843 rows processed
SQL>
Thursday, September 23, 2010
http://www.rittmanmead.com/http://www.rittmanmead.com/8/12/2019 Presentation - Three Rs of Data Warehouse Fault Tolerance
50/60
T : (888) 631 1410 or+44 (0) 8446 697 995 E : [email protected] W: www.rittmanmead.com
Database in NOARCHIVELOG Mode
SQL> set autotrace on stat
SQL> insert into target.sales
2 select * from sh.sales;
918843 rows created.
Statistics
-------------------------------------------------------
9 recursive calls
33251 db block gets 10533 consistent gets
879 physical reads
38282140 redo size
1550 bytes sent via SQL*Net to client
1141 bytes received via SQL*Net from client
6 SQL*Net roundtrips to/from client
1 sorts (memory)
0 sorts (disk)
918843 rows processed
SQL>
SQL> set autotrace on stat
SQL> insert /*+ APPEND */ into target.sales
2 select * from sh.sales;
918843 rows created.
Statistics
-------------------------------------------------------
0 recursive calls
4638 db block gets 1718 consistent gets
62 physical reads
7984 redo size
734 bytes sent via SQL*Net to client
956 bytes received via SQL*Net from client
4 SQL*Net roundtrips to/from client
1 sorts (memory)
0 sorts (disk)
918843 rows processed
SQL>
Thursday, September 23, 2010
http://www.rittmanmead.com/http://www.rittmanmead.com/8/12/2019 Presentation - Three Rs of Data Warehouse Fault Tolerance
51/60
T : (888) 631 1410 or+44 (0) 8446 697 995 E : [email protected] W: www.rittmanmead.com
Real Meaning of NOARCHIVELOG
Thursday, September 23, 2010
http://www.rittmanmead.com/http://www.rittmanmead.com/8/12/2019 Presentation - Three Rs of Data Warehouse Fault Tolerance
52/60
T : (888) 631 1410 or+44 (0) 8446 697 995 E : [email protected] W: www.rittmanmead.com
All REDO is not suppressed
! REDO is still needed for crash recovery
! Oracle wouldnt be able to open after a simple servercrash
NOARCHIVELOG Mode only means we are foregoing theability to do Media Recovery
Direct-path writes bypass the buffer cache
! Blocks inserted directly into the appropriate datafiles! INSERT /*+ APPEND */ statements
! SQL-Loader direct-path mode
These statements are not needed for crash recovery
! They already exist inside the datafile as they arecommitted
! No chance of losing them during server crashes Unless direct-path operations are occurring, then REDO is
being generated regardless of ARCHIVELOG mode
Thursday, September 23, 2010
http://www.rittmanmead.com/http://www.rittmanmead.com/8/12/2019 Presentation - Three Rs of Data Warehouse Fault Tolerance
53/60
T : (888) 631 1410 or+44 (0) 8446 697 995 E : [email protected] W: www.rittmanmead.com
Restoring (Actually, Backing Up)
Thursday, September 23, 2010
http://www.rittmanmead.com/http://www.rittmanmead.com/8/12/2019 Presentation - Three Rs of Data Warehouse Fault Tolerance
54/60
T : (888) 631 1410 or+44 (0) 8446 697 995 E : [email protected] W: www.rittmanmead.com
Restoring (Actually, Backing Up)
Put the database in ARCHIVELOG Mode
!Enables Online Backups
!Enables Flashback Database
Thursday, September 23, 2010
http://www.rittmanmead.com/http://www.rittmanmead.com/8/12/2019 Presentation - Three Rs of Data Warehouse Fault Tolerance
55/60
T : (888) 631 1410 or+44 (0) 8446 697 995 E : [email protected] W: www.rittmanmead.com
Restoring (Actually, Backing Up)
Put the database in ARCHIVELOG Mode
!Enables Online Backups
!Enables Flashback Database
Create a Block Change Tracking file
! Increases backup performance
Thursday, September 23, 2010
http://www.rittmanmead.com/http://www.rittmanmead.com/8/12/2019 Presentation - Three Rs of Data Warehouse Fault Tolerance
56/60
T : (888) 631 1410 or+44 (0) 8446 697 995 E : [email protected] W: www.rittmanmead.com
Restoring (Actually, Backing Up)
Put the database in ARCHIVELOG Mode
!Enables Online Backups
!Enables Flashback Database
Create a Block Change Tracking file
! Increases backup performance
Modify tables to be NOLOGGING
Thursday, September 23, 2010
http://www.rittmanmead.com/http://www.rittmanmead.com/8/12/2019 Presentation - Three Rs of Data Warehouse Fault Tolerance
57/60
T : (888) 631 1410 or+44 (0) 8446 697 995 E : [email protected] W: www.rittmanmead.com
Restoring (Actually, Backing Up)
Put the database in ARCHIVELOG Mode
!Enables Online Backups
!Enables Flashback Database
Create a Block Change Tracking file
! Increases backup performance
Modify tables to be NOLOGGING
Perform INSERT /*+ APPEND */statements as part of the ETL
Thursday, September 23, 2010
http://www.rittmanmead.com/http://www.rittmanmead.com/8/12/2019 Presentation - Three Rs of Data Warehouse Fault Tolerance
58/60
T : (888) 631 1410 or+44 (0) 8446 697 995 E : [email protected] W: www.rittmanmead.com
Restoring (Actually, Backing Up)
Put the database in ARCHIVELOG Mode
!Enables Online Backups
!Enables Flashback Database
Create a Block Change Tracking file
! Increases backup performance
Modify tables to be NOLOGGING
Perform INSERT /*+ APPEND */statements as part of the ETL
Perform an incremental backup uponcompletion of the ETL process
!
Incremental backups affect just thechanged blocks
!Can be run throughout the day
!Effective with mini-batch scenarios
Thursday, September 23, 2010
http://www.rittmanmead.com/http://www.rittmanmead.com/8/12/2019 Presentation - Three Rs of Data Warehouse Fault Tolerance
59/60
T : (888) 631 1410 or+44 (0) 8446 697 995 E : [email protected] W: www.rittmanmead.com
Conclusions
All ETL mappings and flows, plus maintenance processes, should use ResumableSpace Allocation
Flashback provides data management restartability
Still need code-controlled restartability
Flashback Table doesnt require operations involvement, while Flashback Database
does
Keep your database in ARCHIVELOG Mode
Use ONLINE Backups for the BI/DW environment
Execute incremental backups at the completion of the ETL processing
Thursday, September 23, 2010
http://www.rittmanmead.com/http://www.rittmanmead.com/8/12/2019 Presentation - Three Rs of Data Warehouse Fault Tolerance
60/60
T : (888) 631 1410 or+44 (0) 8446 697 995 E : [email protected] W: www.rittmanmead.com
Stewart Bryson, Managing Director, Rittman Mead AmericaOracle Open World 2010, San Francisco, September 2010
Three Rs of Data Warehouse Fault Tolerance