SlideShare una empresa de Scribd logo
1 de 32
 
Consolidating Microsoft SQL Server Databases into an Oracle 11g Cluster Dylan Kucera Director – Data Architecture Ontario Teachers’ Pension Plan Oracle OpenWorld 2010– S313546 Sunday September 19, 2010 3:00pm-4:00pm
Agenda ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Gaining buy-in for a DW migration ,[object Object],[object Object],[object Object]
Gaining buy-in for a DW migration ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Gaining buy-in for a DW migration ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
A new Data Warehouse – If we build it, will they come? ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Oracle Migration (Workbench) ,[object Object],[object Object],[object Object],[object Object],[object Object]
OMW – Capturing a SQL Server model
OMW – Captured T-SQL Procedure
OMW – Converted PL/SQL Procedure
OMW – But what about the legacy? ,[object Object],[object Object],[object Object],[object Object],[object Object]
Views employing Transparent Gateway CREATE   OR   REPLACE   VIEW  PLAY.VALUE_TABLE_SAMPLE  AS SELECT "IDENTIFIER"  AS  ID_,  "VALUE"  AS  VALUE_,  FILE_DATE  AS  FILE_DATE FROM [email_address]
Pitfalls of Transparent Gateway - Views DECLARE tDate  DATE  := '2008-12-31'; BEGIN INSERT   INTO  PLAY.TEMP_SAMPLE_7445 (ID_, NAME_, PREV_VALUE, CURR_VALUE, VALUE_SUPPLIER, DATE_VALUE_CHANGED) SELECT   ID_, '', '', '', 'SAMPLE',  MAX (FILE_DATE) FROM   PLAY.VALUE_TABLE_SAMPLE WHERE   FILE_DATE <= tDate GROUP   BY  ID_; END ; Results in ORA-03113: end-of-file on communication channel Alert log says ORA-07445: exception encountered: core dump [intel_fast_memcpy.A()+18] [ACCESS_VIOLATION] [ADDR:0x115354414B] [PC:0x52A9DFE] [UNABLE_TO_READ] [] Fixed in 11.1.0.6 Patch 10 and 11.1.0.7 Patch 7
Procs employing Transparent Gateway CREATE   PROCEDURE  dbo.GetNHLTeamStats @inDate DATETIME, @inTeam VARCHAR(8) AS SELECT  SWEATER_NO, NAME, POINTS, FACE_OFF_PCT FROM  NorthWind..NHL_PLAYER_STATS WHERE  DATE = @inDate  AND  TEAM = @inTeam
Procs employing Transparent Gateway CREATE   OR   REPLACE   PROCEDURE  PLAY.RPT_NHL_TEAM_STAT ( inDate  DATE , inTeam  VARCHAR2, RC1  IN   OUT   SYS_REFCURSOR )  IS tRC1_MS  SYS_REFCURSOR ; tSweater_No  NUMBER ; tName  VARCHAR2(8); tPoints  NUMBER ; tFace_Off_Pct  NUMBER ; BEGIN DELETE   FROM  PLAY.TEMP_NHL_TEAM_STAT; dbo.GetNHLTeamStats@MSSQL(inDate, inTeam, tRC1_MS); LOOP FETCH  tRC1_MS  INTO  tSweater_No, tName, tPoints, tFace_Off_Pct;  EXIT   WHEN  tRC1_MS% NOTFOUND ; BEGIN INSERT   INTO  PLAY.TEMP_NHL_TEAM_STAT (SWEATER_NO, NAME_, POINTS, FACE_OFF_PCT) VALUES (tSweater_No, tName, tPoints, tFace_Off_Pct); END ; END   LOOP ; CLOSE  tRC1_MS;  OPEN   RC1  FOR SELECT   SWEATER_NO, NAME_, POINTS, FACE_OFF_PCT FROM   PLAY.TEMP_NHL_TEAM_STAT ORDER   BY  SWEATER_NO; END  RPT_NHL_TEAM_STAT ; ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Pitfalls of Transparent Gateway – Procs and Result Sets {CALL PLAY.RPT_NHL_TEAM_STATS ('2010-08-31', 'SJS')} Results in ORA-06504: PL/SQL: Return types of Result Set variables or query do not match Fixed in 11.1.0.7 Patch 7
Oracle Streams as an enabler of migration Oracle Streams ETL
Heterogeneous Streams – General Architecture Diagram Adapted from “Oracle Database 11g: Oracle Streams Replication, An Oracle White Paper, July 2007”
Heterogeneous Streams – Example Legacy Microsoft SQL Server Data Warehouse: TABLE NorthWind.dbo.NHL_PLAYER_STATS ( DATE DATETIME, TEAM VARCHAR(8), SWEATER_NO INT, NAME VARCHAR(128), BIRTH_DATE DATETIME, POINTS INT, FACE_OFF_PCT FLOAT ) New Oracle Data Warehouse: TABLE PLAY. NHL_PLAYER_STAT ( DATE_ DATE, TEAM VARCHAR2(8), SWEATER_NO NUMBER, NAME_ VARCHAR2(128), BIRTH_DATE DATE, POINTS NUMBER, FACE_OFF_PCT NUMBER );
Heterogeneous Streams – Heterogeneous Apply BEGIN  DBMS_APPLY_ADM.CREATE_APPLY( queue_name  => 'SAMPLE_STREAM_Q', apply_name  => 'SAMPLE_APPLY_NORTHWIND', apply_captured  => TRUE, apply_database_link => 'MSSQL_STREAMS_NORTHWIND' );  END;  / BEGIN DBMS_STREAMS_ADM.ADD_TABLE_RULES( table_name  => 'PLAY.NHL_PLAYER_STAT', streams_type => 'APPLY', streams_name => 'SAMPLE_APPLY_NORTHWIND', queue_name  => 'SAMPLE_STREAM_Q', include_dml  => true, include_ddl  => false ); END; /
Heterogeneous Streams – Heterogeneous Apply Transforms BEGIN DBMS_STREAMS_ADM.RENAME_TABLE( rule_name  => 'NHL_PLAYER_STAT2283',  from_table_name => 'PLAY.NHL_PLAYER_STAT',  to_table_name  => '&quot;dbo&quot;.NHL_PLAYER_STATS', step_number  => 0, operation  =>'ADD'); END; / BEGIN DBMS_STREAMS_ADM.RENAME_COLUMN( rule_name  => 'NHL_PLAYER_STAT2283', table_name  => 'PLAY.NHL_PLAYER_STAT', from_column_name  => '&quot;DATE_&quot;', to_column_name  => '&quot;DATE&quot;', value_type  => '*', step_number  => 0, operation  => 'ADD'); END; /
Heterogeneous Streams – Before inserts to Captured Oracle table
Heterogeneous Streams – Insert some rows into Captured Oracle table SQL> INSERT INTO PLAY.NHL_PLAYER_STAT (DATE_, TEAM, SWEATER_NO, NAME_, BIRTH_DATE, POINTS, FACE_OFF_PCT) 2  VALUES ('2010-08-31', 'VAN', 33, 'Henrik Sedin', '1980-09-26', 112, 49.5); 1 row inserted SQL> INSERT INTO PLAY.NHL_PLAYER_STAT (DATE_, TEAM, SWEATER_NO, NAME_, BIRTH_DATE, POINTS, FACE_OFF_PCT) 2  VALUES ('2010-08-31', 'PIT', 87, 'Sidney Crosby', '1987-08-07', 109, 55.9); 1 row inserted SQL> INSERT INTO PLAY.NHL_PLAYER_STAT (DATE_, TEAM, SWEATER_NO, NAME_, BIRTH_DATE, POINTS, FACE_OFF_PCT) 2  VALUES ('2010-08-31', 'WSH', 8, 'Alex Ovechkin', '1985-09-17', 109, 45.4); 1 row inserted SQL> INSERT INTO PLAY.NHL_PLAYER_STAT (DATE_, TEAM, SWEATER_NO, NAME_, BIRTH_DATE, POINTS, FACE_OFF_PCT) 2  VALUES ('2010-08-31', 'SJS', 19, 'Joe Thornton', '1979-07-02', 89, 53.9); 1 row inserted SQL> INSERT INTO PLAY.NHL_PLAYER_STAT (DATE_, TEAM, SWEATER_NO, NAME_, BIRTH_DATE, POINTS, FACE_OFF_PCT) 2  VALUES ('2010-08-31', 'OTT', 11, 'Daniel Alfredsson', '1972-12-11', 71, 35.0); 1 row inserted SQL> INSERT INTO PLAY.NHL_PLAYER_STAT (DATE_, TEAM, SWEATER_NO, NAME_, BIRTH_DATE, POINTS, FACE_OFF_PCT) 2  VALUES ('2010-08-31', 'CGY', 12, 'Jarome Iginla', '1977-07-01', 69, 47.0 ); 1 row inserted SQL> INSERT INTO PLAY.NHL_PLAYER_STAT (DATE_, TEAM, SWEATER_NO, NAME_, BIRTH_DATE, POINTS, FACE_OFF_PCT) 2  VALUES ('2010-08-31', 'TOR', 15, 'Tomas Kaberle', '1978-03-02', 49, NULL); 1 row inserted SQL> COMMIT; Commit complete
Heterogeneous Streams – After inserts to Captured Oracle table
Streams – NULL vs. Empty String ,[object Object],[object Object],[object Object]
Heterogeneous Streams – Syncing tables containing Floats
Heterogeneous Streams – Syncing tables containing Floats
Heterogeneous Streams – Syncing tables containing Floats
Wrap-up ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Questions? Dylan Kucera Director – Data Architecture Ontario Teachers’ Pension Plan Oracle OpenWorld 2010– S313546 Sunday September 19, 2010 3:00pm-4:00pm Thank You! - I value your feedback!
 

Más contenido relacionado

La actualidad más candente

Dsi 11g convert_to RAC
Dsi 11g convert_to RACDsi 11g convert_to RAC
Dsi 11g convert_to RAC
Anil Kumar
 
Oracle 10g Performance: chapter 00 sampling
Oracle 10g Performance: chapter 00 samplingOracle 10g Performance: chapter 00 sampling
Oracle 10g Performance: chapter 00 sampling
Kyle Hailey
 
Chetan postgresql partitioning
Chetan postgresql partitioningChetan postgresql partitioning
Chetan postgresql partitioning
suniltomar04
 

La actualidad más candente (12)

DevOpsDaysRiga 2018: Michiel Rook - Database schema migrations with zero down...
DevOpsDaysRiga 2018: Michiel Rook - Database schema migrations with zero down...DevOpsDaysRiga 2018: Michiel Rook - Database schema migrations with zero down...
DevOpsDaysRiga 2018: Michiel Rook - Database schema migrations with zero down...
 
SPARQLing cocktails
SPARQLing cocktailsSPARQLing cocktails
SPARQLing cocktails
 
Agile Database Development with JSON
Agile Database Development with JSONAgile Database Development with JSON
Agile Database Development with JSON
 
Performance Tuning Tool01-Statspack
Performance Tuning Tool01-StatspackPerformance Tuning Tool01-Statspack
Performance Tuning Tool01-Statspack
 
Ppt INFORMATIVE PRACTICES for class 11th chapter 14
Ppt INFORMATIVE PRACTICES for class 11th chapter 14Ppt INFORMATIVE PRACTICES for class 11th chapter 14
Ppt INFORMATIVE PRACTICES for class 11th chapter 14
 
The Five Best Things To Happen To SQL
The Five Best Things To Happen To SQLThe Five Best Things To Happen To SQL
The Five Best Things To Happen To SQL
 
Dsi 11g convert_to RAC
Dsi 11g convert_to RACDsi 11g convert_to RAC
Dsi 11g convert_to RAC
 
Oracle 10g Performance: chapter 00 sampling
Oracle 10g Performance: chapter 00 samplingOracle 10g Performance: chapter 00 sampling
Oracle 10g Performance: chapter 00 sampling
 
Chetan postgresql partitioning
Chetan postgresql partitioningChetan postgresql partitioning
Chetan postgresql partitioning
 
Example R usage for oracle DBA UKOUG 2013
Example R usage for oracle DBA UKOUG 2013Example R usage for oracle DBA UKOUG 2013
Example R usage for oracle DBA UKOUG 2013
 
Cassandra Fundamentals - C* 2.0
Cassandra Fundamentals - C* 2.0Cassandra Fundamentals - C* 2.0
Cassandra Fundamentals - C* 2.0
 
2013-07-21 MITRE Developer Days - Red Hat SCAP Remediation
2013-07-21 MITRE Developer Days - Red Hat SCAP Remediation2013-07-21 MITRE Developer Days - Red Hat SCAP Remediation
2013-07-21 MITRE Developer Days - Red Hat SCAP Remediation
 

Destacado

Collaborate 2011– Leveraging and Enriching the Capabilities of Oracle Databas...
Collaborate 2011– Leveraging and Enriching the Capabilities of Oracle Databas...Collaborate 2011– Leveraging and Enriching the Capabilities of Oracle Databas...
Collaborate 2011– Leveraging and Enriching the Capabilities of Oracle Databas...
djkucera
 
Normalisation lesson plan
Normalisation   lesson planNormalisation   lesson plan
Normalisation lesson plan
Mohamed Maguid
 
Oftalmoloji tarihi
Oftalmoloji tarihiOftalmoloji tarihi
Oftalmoloji tarihi
kebaplik
 

Destacado (9)

Collaborate 2011– Leveraging and Enriching the Capabilities of Oracle Databas...
Collaborate 2011– Leveraging and Enriching the Capabilities of Oracle Databas...Collaborate 2011– Leveraging and Enriching the Capabilities of Oracle Databas...
Collaborate 2011– Leveraging and Enriching the Capabilities of Oracle Databas...
 
Russian Roadshow Presentation London
Russian Roadshow Presentation LondonRussian Roadshow Presentation London
Russian Roadshow Presentation London
 
Ten Ways For DBA's To Save Time
Ten Ways For DBA's To Save TimeTen Ways For DBA's To Save Time
Ten Ways For DBA's To Save Time
 
10 sip km
10 sip km10 sip km
10 sip km
 
Normalisation lesson plan
Normalisation   lesson planNormalisation   lesson plan
Normalisation lesson plan
 
Upload Oracle EBS Attachments via MS-Excel Templates using Project Partners U...
Upload Oracle EBS Attachments via MS-Excel Templates using Project Partners U...Upload Oracle EBS Attachments via MS-Excel Templates using Project Partners U...
Upload Oracle EBS Attachments via MS-Excel Templates using Project Partners U...
 
Verify EMR Quick Tour April 2012
Verify EMR Quick Tour April 2012Verify EMR Quick Tour April 2012
Verify EMR Quick Tour April 2012
 
Understanding creativity
Understanding creativityUnderstanding creativity
Understanding creativity
 
Oftalmoloji tarihi
Oftalmoloji tarihiOftalmoloji tarihi
Oftalmoloji tarihi
 

Similar a Oracle OpenWorld 2010 - Consolidating Microsoft SQL Server Databases into an Oracle 11g Cluster

Collaborate 2009 - Migrating a Data Warehouse from Microsoft SQL Server to Or...
Collaborate 2009 - Migrating a Data Warehouse from Microsoft SQL Server to Or...Collaborate 2009 - Migrating a Data Warehouse from Microsoft SQL Server to Or...
Collaborate 2009 - Migrating a Data Warehouse from Microsoft SQL Server to Or...
djkucera
 
Collaborate 2011– Leveraging and Enriching the Capabilities of Oracle Databas...
Collaborate 2011– Leveraging and Enriching the Capabilities of Oracle Databas...Collaborate 2011– Leveraging and Enriching the Capabilities of Oracle Databas...
Collaborate 2011– Leveraging and Enriching the Capabilities of Oracle Databas...
djkucera
 
Oracle OpenWorld 2011– Leveraging and Enriching the Capabilities of Oracle Da...
Oracle OpenWorld 2011– Leveraging and Enriching the Capabilities of Oracle Da...Oracle OpenWorld 2011– Leveraging and Enriching the Capabilities of Oracle Da...
Oracle OpenWorld 2011– Leveraging and Enriching the Capabilities of Oracle Da...
djkucera
 
Tony Jambu (obscure) tools of the trade for tuning oracle sq ls
Tony Jambu   (obscure) tools of the trade for tuning oracle sq lsTony Jambu   (obscure) tools of the trade for tuning oracle sq ls
Tony Jambu (obscure) tools of the trade for tuning oracle sq ls
InSync Conference
 
Oracle tips and tricks
Oracle tips and tricksOracle tips and tricks
Oracle tips and tricks
Yanli Liu
 

Similar a Oracle OpenWorld 2010 - Consolidating Microsoft SQL Server Databases into an Oracle 11g Cluster (20)

Collaborate 2009 - Migrating a Data Warehouse from Microsoft SQL Server to Or...
Collaborate 2009 - Migrating a Data Warehouse from Microsoft SQL Server to Or...Collaborate 2009 - Migrating a Data Warehouse from Microsoft SQL Server to Or...
Collaborate 2009 - Migrating a Data Warehouse from Microsoft SQL Server to Or...
 
Tony jambu (obscure) tools of the trade for tuning oracle sq ls
Tony jambu   (obscure) tools of the trade for tuning oracle sq lsTony jambu   (obscure) tools of the trade for tuning oracle sq ls
Tony jambu (obscure) tools of the trade for tuning oracle sq ls
 
Collaborate 2011– Leveraging and Enriching the Capabilities of Oracle Databas...
Collaborate 2011– Leveraging and Enriching the Capabilities of Oracle Databas...Collaborate 2011– Leveraging and Enriching the Capabilities of Oracle Databas...
Collaborate 2011– Leveraging and Enriching the Capabilities of Oracle Databas...
 
SQL Optimization With Trace Data And Dbms Xplan V6
SQL Optimization With Trace Data And Dbms Xplan V6SQL Optimization With Trace Data And Dbms Xplan V6
SQL Optimization With Trace Data And Dbms Xplan V6
 
Oracle OpenWorld 2011– Leveraging and Enriching the Capabilities of Oracle Da...
Oracle OpenWorld 2011– Leveraging and Enriching the Capabilities of Oracle Da...Oracle OpenWorld 2011– Leveraging and Enriching the Capabilities of Oracle Da...
Oracle OpenWorld 2011– Leveraging and Enriching the Capabilities of Oracle Da...
 
Tony Jambu (obscure) tools of the trade for tuning oracle sq ls
Tony Jambu   (obscure) tools of the trade for tuning oracle sq lsTony Jambu   (obscure) tools of the trade for tuning oracle sq ls
Tony Jambu (obscure) tools of the trade for tuning oracle sq ls
 
PHP tips by a MYSQL DBA
PHP tips by a MYSQL DBAPHP tips by a MYSQL DBA
PHP tips by a MYSQL DBA
 
Oracle Database 12c New Features for Developers and DBAs - OTN TOUR LA 2015
Oracle Database 12c  New Features for Developers and DBAs - OTN TOUR LA 2015Oracle Database 12c  New Features for Developers and DBAs - OTN TOUR LA 2015
Oracle Database 12c New Features for Developers and DBAs - OTN TOUR LA 2015
 
Ash and awr deep dive hotsos
Ash and awr deep dive hotsosAsh and awr deep dive hotsos
Ash and awr deep dive hotsos
 
OTN TOUR 2016 - DBA Commands and Concepts That Every Developer Should Know
OTN TOUR 2016 - DBA Commands and Concepts That Every Developer Should KnowOTN TOUR 2016 - DBA Commands and Concepts That Every Developer Should Know
OTN TOUR 2016 - DBA Commands and Concepts That Every Developer Should Know
 
OTN TOUR 2016 - DBA Commands and Concepts That Every Developer Should Know
OTN TOUR 2016 - DBA Commands and Concepts That Every Developer Should KnowOTN TOUR 2016 - DBA Commands and Concepts That Every Developer Should Know
OTN TOUR 2016 - DBA Commands and Concepts That Every Developer Should Know
 
Chris Mc Glothen Sql Portfolio
Chris Mc Glothen Sql PortfolioChris Mc Glothen Sql Portfolio
Chris Mc Glothen Sql Portfolio
 
Intro To PostGIS
Intro To PostGISIntro To PostGIS
Intro To PostGIS
 
Oracle - Program with PL/SQL - Lession 17
Oracle - Program with PL/SQL - Lession 17Oracle - Program with PL/SQL - Lession 17
Oracle - Program with PL/SQL - Lession 17
 
Oracle SQL Tuning
Oracle SQL TuningOracle SQL Tuning
Oracle SQL Tuning
 
Oracle tips and tricks
Oracle tips and tricksOracle tips and tricks
Oracle tips and tricks
 
SQL Tuning Overview
SQL Tuning OverviewSQL Tuning Overview
SQL Tuning Overview
 
Plsql
PlsqlPlsql
Plsql
 
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should KnowDBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
 
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should KnowDBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
 

Oracle OpenWorld 2010 - Consolidating Microsoft SQL Server Databases into an Oracle 11g Cluster

  • 1.  
  • 2. Consolidating Microsoft SQL Server Databases into an Oracle 11g Cluster Dylan Kucera Director – Data Architecture Ontario Teachers’ Pension Plan Oracle OpenWorld 2010– S313546 Sunday September 19, 2010 3:00pm-4:00pm
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9. OMW – Capturing a SQL Server model
  • 10. OMW – Captured T-SQL Procedure
  • 11. OMW – Converted PL/SQL Procedure
  • 12.
  • 13. Views employing Transparent Gateway CREATE OR REPLACE VIEW PLAY.VALUE_TABLE_SAMPLE AS SELECT &quot;IDENTIFIER&quot; AS ID_, &quot;VALUE&quot; AS VALUE_, FILE_DATE AS FILE_DATE FROM [email_address]
  • 14. Pitfalls of Transparent Gateway - Views DECLARE tDate DATE := '2008-12-31'; BEGIN INSERT INTO PLAY.TEMP_SAMPLE_7445 (ID_, NAME_, PREV_VALUE, CURR_VALUE, VALUE_SUPPLIER, DATE_VALUE_CHANGED) SELECT ID_, '', '', '', 'SAMPLE', MAX (FILE_DATE) FROM PLAY.VALUE_TABLE_SAMPLE WHERE FILE_DATE <= tDate GROUP BY ID_; END ; Results in ORA-03113: end-of-file on communication channel Alert log says ORA-07445: exception encountered: core dump [intel_fast_memcpy.A()+18] [ACCESS_VIOLATION] [ADDR:0x115354414B] [PC:0x52A9DFE] [UNABLE_TO_READ] [] Fixed in 11.1.0.6 Patch 10 and 11.1.0.7 Patch 7
  • 15. Procs employing Transparent Gateway CREATE PROCEDURE dbo.GetNHLTeamStats @inDate DATETIME, @inTeam VARCHAR(8) AS SELECT SWEATER_NO, NAME, POINTS, FACE_OFF_PCT FROM NorthWind..NHL_PLAYER_STATS WHERE DATE = @inDate AND TEAM = @inTeam
  • 16.
  • 17. Pitfalls of Transparent Gateway – Procs and Result Sets {CALL PLAY.RPT_NHL_TEAM_STATS ('2010-08-31', 'SJS')} Results in ORA-06504: PL/SQL: Return types of Result Set variables or query do not match Fixed in 11.1.0.7 Patch 7
  • 18. Oracle Streams as an enabler of migration Oracle Streams ETL
  • 19. Heterogeneous Streams – General Architecture Diagram Adapted from “Oracle Database 11g: Oracle Streams Replication, An Oracle White Paper, July 2007”
  • 20. Heterogeneous Streams – Example Legacy Microsoft SQL Server Data Warehouse: TABLE NorthWind.dbo.NHL_PLAYER_STATS ( DATE DATETIME, TEAM VARCHAR(8), SWEATER_NO INT, NAME VARCHAR(128), BIRTH_DATE DATETIME, POINTS INT, FACE_OFF_PCT FLOAT ) New Oracle Data Warehouse: TABLE PLAY. NHL_PLAYER_STAT ( DATE_ DATE, TEAM VARCHAR2(8), SWEATER_NO NUMBER, NAME_ VARCHAR2(128), BIRTH_DATE DATE, POINTS NUMBER, FACE_OFF_PCT NUMBER );
  • 21. Heterogeneous Streams – Heterogeneous Apply BEGIN DBMS_APPLY_ADM.CREATE_APPLY( queue_name => 'SAMPLE_STREAM_Q', apply_name => 'SAMPLE_APPLY_NORTHWIND', apply_captured => TRUE, apply_database_link => 'MSSQL_STREAMS_NORTHWIND' ); END; / BEGIN DBMS_STREAMS_ADM.ADD_TABLE_RULES( table_name => 'PLAY.NHL_PLAYER_STAT', streams_type => 'APPLY', streams_name => 'SAMPLE_APPLY_NORTHWIND', queue_name => 'SAMPLE_STREAM_Q', include_dml => true, include_ddl => false ); END; /
  • 22. Heterogeneous Streams – Heterogeneous Apply Transforms BEGIN DBMS_STREAMS_ADM.RENAME_TABLE( rule_name => 'NHL_PLAYER_STAT2283', from_table_name => 'PLAY.NHL_PLAYER_STAT', to_table_name => '&quot;dbo&quot;.NHL_PLAYER_STATS', step_number => 0, operation =>'ADD'); END; / BEGIN DBMS_STREAMS_ADM.RENAME_COLUMN( rule_name => 'NHL_PLAYER_STAT2283', table_name => 'PLAY.NHL_PLAYER_STAT', from_column_name => '&quot;DATE_&quot;', to_column_name => '&quot;DATE&quot;', value_type => '*', step_number => 0, operation => 'ADD'); END; /
  • 23. Heterogeneous Streams – Before inserts to Captured Oracle table
  • 24. Heterogeneous Streams – Insert some rows into Captured Oracle table SQL> INSERT INTO PLAY.NHL_PLAYER_STAT (DATE_, TEAM, SWEATER_NO, NAME_, BIRTH_DATE, POINTS, FACE_OFF_PCT) 2 VALUES ('2010-08-31', 'VAN', 33, 'Henrik Sedin', '1980-09-26', 112, 49.5); 1 row inserted SQL> INSERT INTO PLAY.NHL_PLAYER_STAT (DATE_, TEAM, SWEATER_NO, NAME_, BIRTH_DATE, POINTS, FACE_OFF_PCT) 2 VALUES ('2010-08-31', 'PIT', 87, 'Sidney Crosby', '1987-08-07', 109, 55.9); 1 row inserted SQL> INSERT INTO PLAY.NHL_PLAYER_STAT (DATE_, TEAM, SWEATER_NO, NAME_, BIRTH_DATE, POINTS, FACE_OFF_PCT) 2 VALUES ('2010-08-31', 'WSH', 8, 'Alex Ovechkin', '1985-09-17', 109, 45.4); 1 row inserted SQL> INSERT INTO PLAY.NHL_PLAYER_STAT (DATE_, TEAM, SWEATER_NO, NAME_, BIRTH_DATE, POINTS, FACE_OFF_PCT) 2 VALUES ('2010-08-31', 'SJS', 19, 'Joe Thornton', '1979-07-02', 89, 53.9); 1 row inserted SQL> INSERT INTO PLAY.NHL_PLAYER_STAT (DATE_, TEAM, SWEATER_NO, NAME_, BIRTH_DATE, POINTS, FACE_OFF_PCT) 2 VALUES ('2010-08-31', 'OTT', 11, 'Daniel Alfredsson', '1972-12-11', 71, 35.0); 1 row inserted SQL> INSERT INTO PLAY.NHL_PLAYER_STAT (DATE_, TEAM, SWEATER_NO, NAME_, BIRTH_DATE, POINTS, FACE_OFF_PCT) 2 VALUES ('2010-08-31', 'CGY', 12, 'Jarome Iginla', '1977-07-01', 69, 47.0 ); 1 row inserted SQL> INSERT INTO PLAY.NHL_PLAYER_STAT (DATE_, TEAM, SWEATER_NO, NAME_, BIRTH_DATE, POINTS, FACE_OFF_PCT) 2 VALUES ('2010-08-31', 'TOR', 15, 'Tomas Kaberle', '1978-03-02', 49, NULL); 1 row inserted SQL> COMMIT; Commit complete
  • 25. Heterogeneous Streams – After inserts to Captured Oracle table
  • 26.
  • 27. Heterogeneous Streams – Syncing tables containing Floats
  • 28. Heterogeneous Streams – Syncing tables containing Floats
  • 29. Heterogeneous Streams – Syncing tables containing Floats
  • 30.
  • 31. Questions? Dylan Kucera Director – Data Architecture Ontario Teachers’ Pension Plan Oracle OpenWorld 2010– S313546 Sunday September 19, 2010 3:00pm-4:00pm Thank You! - I value your feedback!
  • 32.