SlideShare a Scribd company logo
1 of 32
Migrating a Data Warehouse from Microsoft SQL Server to Oracle 11g Dylan Kucera Senior Manager – Data Architecture Ontario Teachers’ Pension Plan Collaborate 2009 – Session ID 387 Wednesday May 6, 2009 3:15pm-4:15pm
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.GetScheduleForRange @inStartDate DATETIME, @inEndDate DATETIME AS SELECT  DATE, DURATION, SESSION_ID, TITLE FROM  NorthWind..COLLABSCHED WHERE  DATE  BETWEEN  @inStartDate  AND  @inEndDate
Procs employing Transparent Gateway CREATE   OR   REPLACE   PROCEDURE  PLAY.RPT_COLLABORATE_SCHEDULE_RANGE ( inStart_Date  DATE , inEnd_Date  DATE , RC1  IN   OUT   SYS_REFCURSOR )  IS tRC1_MS  SYS_REFCURSOR ; tDate  DATE ; tDuration  NUMBER ; tSession_ID  NUMBER ; tTitle  VARCHAR2 (256); BEGIN DELETE   FROM  PLAY.TEMP_COLLABORATE_SCHEDULE; dbo.GetScheduleForRange@MSSQL(inStart_Date, inEnd_Date, tRC1_MS); LOOP FETCH  tRC1_MS  INTO  tDate, tDuration, tSession_ID, tTitle;  EXIT   WHEN  tRC1_MS% NOTFOUND ; BEGIN INSERT   INTO  PLAY.TEMP_COLLABORATE_SCHEDULE (DATE_, DURATION, SESSION_ID, TITLE) VALUES (tDate, tDuration, tSession_ID, tTitle); END ; END   LOOP ; CLOSE  tRC1_MS;  OPEN   RC1  FOR SELECT   DATE_, DURATION, SESSION_ID, TITLE FROM   PLAY.TEMP_COLLABORATE_SCHEDULE ORDER   BY  SESSION_ID; END  RPT_COLLABORATE_SCHEDULE_RANGE; ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Pitfalls of Transparent Gateway – Procs and Result Sets {CALL PLAY.RPT_COLLABORATE_SCHEDULE_RANGE( '2009-05-06 12:00:00', '2009-05-06 17:00:00')} 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.COLLABSCHED ( DATE  DATETIME, DURATION  INT, SESSION_ID INT, TITLE  VARCHAR(256) ) New Oracle Data Warehouse: TABLE PLAY.COLLABORATE_SCHEDULE ( DATE_  DATE, DURATION  NUMBER, SESSION_ID NUMBER, TITLE  VARCHAR2(256) );
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.COLLABORATE_SCHEDULE', 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  => 'COLLABORATE_SCHEDULE554', from_table_name => 'PLAY.COLLABORATE_SCHEDULE', to_table_name  => '&quot;dbo&quot;.COLLABSCHED', step_number  => 0, operation  =>'ADD'); END; / BEGIN DBMS_STREAMS_ADM.RENAME_COLUMN( rule_name  => 'COLLABORATE_SCHEDULE554', table_name  => 'PLAY.COLLABORATE_SCHEDULE', 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.COLLABORATE_SCHEDULE (DATE_,DURATION,SESSION_ID,TITLE) VALUES ('2009-05-06 08:30:00',60,359,'Oracle Critical Patch Updates: Insight and Understanding'); 1 row inserted SQL> INSERT INTO PLAY.COLLABORATE_SCHEDULE (DATE_,DURATION,SESSION_ID,TITLE) VALUES ('2009-05-06 11:00:00',60,237,'Best Practices for Managing Successful BI Implementations'); 1 row inserted SQL> INSERT INTO PLAY.COLLABORATE_SCHEDULE (DATE_,DURATION,SESSION_ID,TITLE) VALUES ('2009-05-06 12:15:00',60,257,'Best practices for deploying a Data Warehouse on Oracle Database 11g'); 1 row inserted SQL> INSERT INTO PLAY.COLLABORATE_SCHEDULE (DATE_,DURATION,SESSION_ID,TITLE) VALUES ('2009-05-06 13:30:00',60,744,'Business Intelligence Publisher Overview and Planned Features'); 1 row inserted SQL> INSERT INTO PLAY.COLLABORATE_SCHEDULE (DATE_,DURATION,SESSION_ID,TITLE) VALUES ('2009-05-06 15:15:00',60,387,'Migrating a Data Warehouse from Microsoft SQL Server to Oracle 11g'); 1 row inserted SQL> INSERT INTO PLAY.COLLABORATE_SCHEDULE (DATE_,DURATION,SESSION_ID,TITLE) VALUES ('2009-05-06 16:30:00',60,245,'Data Quality Heartburn? Get 11g Relief'); 1 row inserted SQL> COMMIT; Commit complete
Heterogeneous Streams – After inserts to Captured Oracle table
Heterogeneous Streams – NULL vs. Empty String (SQL Server)
Heterogeneous Streams – NULL vs. Empty String (SQL Server via Oracle TG)
Heterogeneous Streams – NULL vs. Empty String (Oracle)
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 Senior Manager – Data Architecture Ontario Teachers’ Pension Plan Collaborate 2009 – Session ID 387 Wednesday May 6, 2009 3:15pm-4:15pm Thank You! – Please complete the evaluation form – I value your feedback!

More Related Content

What's hot

In Defense Of Core Data
In Defense Of Core DataIn Defense Of Core Data
In Defense Of Core DataDonny Wals
 
MySQL Indexes and Histograms - RMOUG Training Days 2022
MySQL Indexes and Histograms - RMOUG Training Days 2022MySQL Indexes and Histograms - RMOUG Training Days 2022
MySQL Indexes and Histograms - RMOUG Training Days 2022Dave Stokes
 
שבוע אורקל 2016
שבוע אורקל 2016שבוע אורקל 2016
שבוע אורקל 2016Aaron Shilo
 
Storing time series data with Apache Cassandra
Storing time series data with Apache CassandraStoring time series data with Apache Cassandra
Storing time series data with Apache CassandraPatrick McFadin
 
ADO.Net Improvements in .Net 2.0
ADO.Net Improvements in .Net 2.0ADO.Net Improvements in .Net 2.0
ADO.Net Improvements in .Net 2.0David Truxall
 
Live Query Statistics & Query Store in SQL Server 2016
Live Query Statistics & Query Store in SQL Server 2016Live Query Statistics & Query Store in SQL Server 2016
Live Query Statistics & Query Store in SQL Server 2016Antonios Chatzipavlis
 
How to bake a Customer Story with With Windows, NVM-e, Data Guard, ACFS Snaps...
How to bake a Customer Story with With Windows, NVM-e, Data Guard, ACFS Snaps...How to bake a Customer Story with With Windows, NVM-e, Data Guard, ACFS Snaps...
How to bake a Customer Story with With Windows, NVM-e, Data Guard, ACFS Snaps...Ludovico Caldara
 
Oracle Active Data Guard and Global Data Services in Action!
Oracle Active Data Guard and Global Data Services in Action!Oracle Active Data Guard and Global Data Services in Action!
Oracle Active Data Guard and Global Data Services in Action!Ludovico Caldara
 
Stretch Database
Stretch DatabaseStretch Database
Stretch DatabaseSolidQ
 
Oracle Database on ACFS: a perfect marriage?
Oracle Database on ACFS: a perfect marriage?Oracle Database on ACFS: a perfect marriage?
Oracle Database on ACFS: a perfect marriage?Ludovico Caldara
 
Time series with Apache Cassandra - Long version
Time series with Apache Cassandra - Long versionTime series with Apache Cassandra - Long version
Time series with Apache Cassandra - Long versionPatrick McFadin
 
Oracle: Let My People Go! (Shu Zhang, Ilya Sokolov, Symantec) | Cassandra Sum...
Oracle: Let My People Go! (Shu Zhang, Ilya Sokolov, Symantec) | Cassandra Sum...Oracle: Let My People Go! (Shu Zhang, Ilya Sokolov, Symantec) | Cassandra Sum...
Oracle: Let My People Go! (Shu Zhang, Ilya Sokolov, Symantec) | Cassandra Sum...DataStax
 
Microsoft SQL Server Query Tuning
Microsoft SQL Server Query TuningMicrosoft SQL Server Query Tuning
Microsoft SQL Server Query TuningMark Ginnebaugh
 
Cassandra Basics, Counters and Time Series Modeling
Cassandra Basics, Counters and Time Series ModelingCassandra Basics, Counters and Time Series Modeling
Cassandra Basics, Counters and Time Series ModelingVassilis Bekiaris
 
Cassandra 2.0 and timeseries
Cassandra 2.0 and timeseriesCassandra 2.0 and timeseries
Cassandra 2.0 and timeseriesPatrick McFadin
 
Get the most out of Oracle Data Guard - OOW version
Get the most out of Oracle Data Guard - OOW versionGet the most out of Oracle Data Guard - OOW version
Get the most out of Oracle Data Guard - OOW versionLudovico Caldara
 
Oracle Database 12c - New Features for Developers and DBAs
Oracle Database 12c  - New Features for Developers and DBAsOracle Database 12c  - New Features for Developers and DBAs
Oracle Database 12c - New Features for Developers and DBAsAlex Zaballa
 
Winning performance challenges in oracle standard editions
Winning performance challenges in oracle standard editionsWinning performance challenges in oracle standard editions
Winning performance challenges in oracle standard editionsPini Dibask
 
IOUG Collaborate 18 - Data Guard for Beginners
IOUG Collaborate 18 - Data Guard for BeginnersIOUG Collaborate 18 - Data Guard for Beginners
IOUG Collaborate 18 - Data Guard for BeginnersPini Dibask
 
OTN TOUR 2016 - Oracle Database 12c - The Best Oracle Database 12c New Featur...
OTN TOUR 2016 - Oracle Database 12c - The Best Oracle Database 12c New Featur...OTN TOUR 2016 - Oracle Database 12c - The Best Oracle Database 12c New Featur...
OTN TOUR 2016 - Oracle Database 12c - The Best Oracle Database 12c New Featur...Alex Zaballa
 

What's hot (20)

In Defense Of Core Data
In Defense Of Core DataIn Defense Of Core Data
In Defense Of Core Data
 
MySQL Indexes and Histograms - RMOUG Training Days 2022
MySQL Indexes and Histograms - RMOUG Training Days 2022MySQL Indexes and Histograms - RMOUG Training Days 2022
MySQL Indexes and Histograms - RMOUG Training Days 2022
 
שבוע אורקל 2016
שבוע אורקל 2016שבוע אורקל 2016
שבוע אורקל 2016
 
Storing time series data with Apache Cassandra
Storing time series data with Apache CassandraStoring time series data with Apache Cassandra
Storing time series data with Apache Cassandra
 
ADO.Net Improvements in .Net 2.0
ADO.Net Improvements in .Net 2.0ADO.Net Improvements in .Net 2.0
ADO.Net Improvements in .Net 2.0
 
Live Query Statistics & Query Store in SQL Server 2016
Live Query Statistics & Query Store in SQL Server 2016Live Query Statistics & Query Store in SQL Server 2016
Live Query Statistics & Query Store in SQL Server 2016
 
How to bake a Customer Story with With Windows, NVM-e, Data Guard, ACFS Snaps...
How to bake a Customer Story with With Windows, NVM-e, Data Guard, ACFS Snaps...How to bake a Customer Story with With Windows, NVM-e, Data Guard, ACFS Snaps...
How to bake a Customer Story with With Windows, NVM-e, Data Guard, ACFS Snaps...
 
Oracle Active Data Guard and Global Data Services in Action!
Oracle Active Data Guard and Global Data Services in Action!Oracle Active Data Guard and Global Data Services in Action!
Oracle Active Data Guard and Global Data Services in Action!
 
Stretch Database
Stretch DatabaseStretch Database
Stretch Database
 
Oracle Database on ACFS: a perfect marriage?
Oracle Database on ACFS: a perfect marriage?Oracle Database on ACFS: a perfect marriage?
Oracle Database on ACFS: a perfect marriage?
 
Time series with Apache Cassandra - Long version
Time series with Apache Cassandra - Long versionTime series with Apache Cassandra - Long version
Time series with Apache Cassandra - Long version
 
Oracle: Let My People Go! (Shu Zhang, Ilya Sokolov, Symantec) | Cassandra Sum...
Oracle: Let My People Go! (Shu Zhang, Ilya Sokolov, Symantec) | Cassandra Sum...Oracle: Let My People Go! (Shu Zhang, Ilya Sokolov, Symantec) | Cassandra Sum...
Oracle: Let My People Go! (Shu Zhang, Ilya Sokolov, Symantec) | Cassandra Sum...
 
Microsoft SQL Server Query Tuning
Microsoft SQL Server Query TuningMicrosoft SQL Server Query Tuning
Microsoft SQL Server Query Tuning
 
Cassandra Basics, Counters and Time Series Modeling
Cassandra Basics, Counters and Time Series ModelingCassandra Basics, Counters and Time Series Modeling
Cassandra Basics, Counters and Time Series Modeling
 
Cassandra 2.0 and timeseries
Cassandra 2.0 and timeseriesCassandra 2.0 and timeseries
Cassandra 2.0 and timeseries
 
Get the most out of Oracle Data Guard - OOW version
Get the most out of Oracle Data Guard - OOW versionGet the most out of Oracle Data Guard - OOW version
Get the most out of Oracle Data Guard - OOW version
 
Oracle Database 12c - New Features for Developers and DBAs
Oracle Database 12c  - New Features for Developers and DBAsOracle Database 12c  - New Features for Developers and DBAs
Oracle Database 12c - New Features for Developers and DBAs
 
Winning performance challenges in oracle standard editions
Winning performance challenges in oracle standard editionsWinning performance challenges in oracle standard editions
Winning performance challenges in oracle standard editions
 
IOUG Collaborate 18 - Data Guard for Beginners
IOUG Collaborate 18 - Data Guard for BeginnersIOUG Collaborate 18 - Data Guard for Beginners
IOUG Collaborate 18 - Data Guard for Beginners
 
OTN TOUR 2016 - Oracle Database 12c - The Best Oracle Database 12c New Featur...
OTN TOUR 2016 - Oracle Database 12c - The Best Oracle Database 12c New Featur...OTN TOUR 2016 - Oracle Database 12c - The Best Oracle Database 12c New Featur...
OTN TOUR 2016 - Oracle Database 12c - The Best Oracle Database 12c New Featur...
 

Viewers also liked

VMWare Sponsor Presentation: Accelerating the journey to cloud
VMWare Sponsor Presentation: Accelerating the journey to cloudVMWare Sponsor Presentation: Accelerating the journey to cloud
VMWare Sponsor Presentation: Accelerating the journey to cloudVincent Kwon
 
Test Driven Elephants
Test Driven ElephantsTest Driven Elephants
Test Driven ElephantsVijay Ramesh
 
WhereScape - Business Intelligence for Growth
WhereScape - Business Intelligence for GrowthWhereScape - Business Intelligence for Growth
WhereScape - Business Intelligence for GrowthVincent Kwon
 
Intro to Microsoft Test Manager
Intro to Microsoft Test ManagerIntro to Microsoft Test Manager
Intro to Microsoft Test ManagerEsteban Garcia
 
WhereScape, the pioneer in data warehouse automation software
WhereScape, the pioneer in data warehouse automation software WhereScape, the pioneer in data warehouse automation software
WhereScape, the pioneer in data warehouse automation software Patrick Van Renterghem
 
InCycle Software presents: Quality enablement using agile practices with TFS ...
InCycle Software presents: Quality enablement using agile practices with TFS ...InCycle Software presents: Quality enablement using agile practices with TFS ...
InCycle Software presents: Quality enablement using agile practices with TFS ...InCycle Software
 
Best Practices for Building a Warehouse Quickly
Best Practices for Building a Warehouse QuicklyBest Practices for Building a Warehouse Quickly
Best Practices for Building a Warehouse QuicklyWhereScape
 
SharePoint Governance Slide Deck 1.16.2014
SharePoint Governance Slide Deck 1.16.2014SharePoint Governance Slide Deck 1.16.2014
SharePoint Governance Slide Deck 1.16.2014McOWLMarketing
 
How to Test Big Data Systems | QualiTest Group
How to Test Big Data Systems | QualiTest GroupHow to Test Big Data Systems | QualiTest Group
How to Test Big Data Systems | QualiTest GroupQualitest
 
Test Case Management with MTM 2013
Test Case Management with MTM 2013Test Case Management with MTM 2013
Test Case Management with MTM 2013Raluca Suditu
 
TDD vs. ATDD - What, Why, Which, When & Where
TDD vs. ATDD - What, Why, Which, When & WhereTDD vs. ATDD - What, Why, Which, When & Where
TDD vs. ATDD - What, Why, Which, When & WhereDaniel Davis
 
Microsoft Test Manager
Microsoft Test ManagerMicrosoft Test Manager
Microsoft Test ManagerMitchDenny
 
Agile project management with visual studio tfs 2013 - My presentation at Reg...
Agile project management with visual studio tfs 2013 - My presentation at Reg...Agile project management with visual studio tfs 2013 - My presentation at Reg...
Agile project management with visual studio tfs 2013 - My presentation at Reg...Om Prakash Bang
 

Viewers also liked (14)

VMWare Sponsor Presentation: Accelerating the journey to cloud
VMWare Sponsor Presentation: Accelerating the journey to cloudVMWare Sponsor Presentation: Accelerating the journey to cloud
VMWare Sponsor Presentation: Accelerating the journey to cloud
 
Test Driven Elephants
Test Driven ElephantsTest Driven Elephants
Test Driven Elephants
 
WhereScape - Business Intelligence for Growth
WhereScape - Business Intelligence for GrowthWhereScape - Business Intelligence for Growth
WhereScape - Business Intelligence for Growth
 
Intro to Microsoft Test Manager
Intro to Microsoft Test ManagerIntro to Microsoft Test Manager
Intro to Microsoft Test Manager
 
WhereScape, the pioneer in data warehouse automation software
WhereScape, the pioneer in data warehouse automation software WhereScape, the pioneer in data warehouse automation software
WhereScape, the pioneer in data warehouse automation software
 
InCycle Software presents: Quality enablement using agile practices with TFS ...
InCycle Software presents: Quality enablement using agile practices with TFS ...InCycle Software presents: Quality enablement using agile practices with TFS ...
InCycle Software presents: Quality enablement using agile practices with TFS ...
 
Best Practices for Building a Warehouse Quickly
Best Practices for Building a Warehouse QuicklyBest Practices for Building a Warehouse Quickly
Best Practices for Building a Warehouse Quickly
 
SharePoint Governance Slide Deck 1.16.2014
SharePoint Governance Slide Deck 1.16.2014SharePoint Governance Slide Deck 1.16.2014
SharePoint Governance Slide Deck 1.16.2014
 
How to Test Big Data Systems | QualiTest Group
How to Test Big Data Systems | QualiTest GroupHow to Test Big Data Systems | QualiTest Group
How to Test Big Data Systems | QualiTest Group
 
Test Case Management with MTM 2013
Test Case Management with MTM 2013Test Case Management with MTM 2013
Test Case Management with MTM 2013
 
TDD vs. ATDD - What, Why, Which, When & Where
TDD vs. ATDD - What, Why, Which, When & WhereTDD vs. ATDD - What, Why, Which, When & Where
TDD vs. ATDD - What, Why, Which, When & Where
 
Microsoft Test Manager
Microsoft Test ManagerMicrosoft Test Manager
Microsoft Test Manager
 
Agile project management with visual studio tfs 2013 - My presentation at Reg...
Agile project management with visual studio tfs 2013 - My presentation at Reg...Agile project management with visual studio tfs 2013 - My presentation at Reg...
Agile project management with visual studio tfs 2013 - My presentation at Reg...
 
Test Automation for Data Warehouses
Test Automation for Data Warehouses Test Automation for Data Warehouses
Test Automation for Data Warehouses
 

Similar to Migrating a Data Warehouse from Microsoft SQL Server to Oracle 11g

Oracle OpenWorld 2010 - Consolidating Microsoft SQL Server Databases into an ...
Oracle OpenWorld 2010 - Consolidating Microsoft SQL Server Databases into an ...Oracle OpenWorld 2010 - Consolidating Microsoft SQL Server Databases into an ...
Oracle OpenWorld 2010 - Consolidating Microsoft SQL Server Databases into an ...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 lsInSync Conference
 
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 lsInSync Conference
 
Powerful Spatial Features You Never Knew Existed in Oracle Spatial and Graph ...
Powerful Spatial Features You Never Knew Existed in Oracle Spatial and Graph ...Powerful Spatial Features You Never Knew Existed in Oracle Spatial and Graph ...
Powerful Spatial Features You Never Knew Existed in Oracle Spatial and Graph ...Jean Ihm
 
Advance Sql Server Store procedure Presentation
Advance Sql Server Store procedure PresentationAdvance Sql Server Store procedure Presentation
Advance Sql Server Store procedure PresentationAmin Uddin
 
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 V6Mahesh Vallampati
 
TSQL in SQL Server 2012
TSQL in SQL Server 2012TSQL in SQL Server 2012
TSQL in SQL Server 2012Eduardo Castro
 
Useful PL/SQL Supplied Packages
Useful PL/SQL Supplied PackagesUseful PL/SQL Supplied Packages
Useful PL/SQL Supplied PackagesMaria Colgan
 
07 Using Oracle-Supported Package in Application Development
07 Using Oracle-Supported Package in Application Development07 Using Oracle-Supported Package in Application Development
07 Using Oracle-Supported Package in Application Developmentrehaniltifat
 
2° Ciclo Microsoft CRUI 3° Sessione: l'evoluzione delle piattaforme tecnologi...
2° Ciclo Microsoft CRUI 3° Sessione: l'evoluzione delle piattaforme tecnologi...2° Ciclo Microsoft CRUI 3° Sessione: l'evoluzione delle piattaforme tecnologi...
2° Ciclo Microsoft CRUI 3° Sessione: l'evoluzione delle piattaforme tecnologi...Jürgen Ambrosi
 
OWB11gR2 - Extending ETL
OWB11gR2 - Extending ETL OWB11gR2 - Extending ETL
OWB11gR2 - Extending ETL Suraj Bang
 
Database Foundation Training
Database Foundation TrainingDatabase Foundation Training
Database Foundation TrainingFranky Lao
 
Oracle Database 12c - New Features for Developers and DBAs
Oracle Database 12c - New Features for Developers and DBAsOracle Database 12c - New Features for Developers and DBAs
Oracle Database 12c - New Features for Developers and DBAsAlex Zaballa
 
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 KnowAlex Zaballa
 
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 KnowAlex Zaballa
 
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 KnowAlex Zaballa
 

Similar to Migrating a Data Warehouse from Microsoft SQL Server to Oracle 11g (20)

Oracle OpenWorld 2010 - Consolidating Microsoft SQL Server Databases into an ...
Oracle OpenWorld 2010 - Consolidating Microsoft SQL Server Databases into an ...Oracle OpenWorld 2010 - Consolidating Microsoft SQL Server Databases into an ...
Oracle OpenWorld 2010 - Consolidating Microsoft SQL Server Databases into an ...
 
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
 
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...
 
Sherlock holmes for dba’s
Sherlock holmes for dba’sSherlock holmes for dba’s
Sherlock holmes for dba’s
 
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
 
Powerful Spatial Features You Never Knew Existed in Oracle Spatial and Graph ...
Powerful Spatial Features You Never Knew Existed in Oracle Spatial and Graph ...Powerful Spatial Features You Never Knew Existed in Oracle Spatial and Graph ...
Powerful Spatial Features You Never Knew Existed in Oracle Spatial and Graph ...
 
Advance Sql Server Store procedure Presentation
Advance Sql Server Store procedure PresentationAdvance Sql Server Store procedure Presentation
Advance Sql Server Store procedure Presentation
 
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
 
TSQL in SQL Server 2012
TSQL in SQL Server 2012TSQL in SQL Server 2012
TSQL in SQL Server 2012
 
Useful PL/SQL Supplied Packages
Useful PL/SQL Supplied PackagesUseful PL/SQL Supplied Packages
Useful PL/SQL Supplied Packages
 
07 Using Oracle-Supported Package in Application Development
07 Using Oracle-Supported Package in Application Development07 Using Oracle-Supported Package in Application Development
07 Using Oracle-Supported Package in Application Development
 
2° Ciclo Microsoft CRUI 3° Sessione: l'evoluzione delle piattaforme tecnologi...
2° Ciclo Microsoft CRUI 3° Sessione: l'evoluzione delle piattaforme tecnologi...2° Ciclo Microsoft CRUI 3° Sessione: l'evoluzione delle piattaforme tecnologi...
2° Ciclo Microsoft CRUI 3° Sessione: l'evoluzione delle piattaforme tecnologi...
 
OWB11gR2 - Extending ETL
OWB11gR2 - Extending ETL OWB11gR2 - Extending ETL
OWB11gR2 - Extending ETL
 
Database Foundation Training
Database Foundation TrainingDatabase Foundation Training
Database Foundation Training
 
Oracle Database 12c - New Features for Developers and DBAs
Oracle Database 12c - New Features for Developers and DBAsOracle Database 12c - New Features for Developers and DBAs
Oracle Database 12c - New Features for Developers and DBAs
 
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
 
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
 
Msql
Msql Msql
Msql
 

Migrating a Data Warehouse from Microsoft SQL Server to Oracle 11g

  • 1. Migrating a Data Warehouse from Microsoft SQL Server to Oracle 11g Dylan Kucera Senior Manager – Data Architecture Ontario Teachers’ Pension Plan Collaborate 2009 – Session ID 387 Wednesday May 6, 2009 3:15pm-4:15pm
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8. OMW – Capturing a SQL Server model
  • 9. OMW – Captured T-SQL Procedure
  • 10. OMW – Converted PL/SQL Procedure
  • 11.
  • 12. 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]
  • 13. 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
  • 14. Procs employing Transparent Gateway CREATE PROCEDURE dbo.GetScheduleForRange @inStartDate DATETIME, @inEndDate DATETIME AS SELECT DATE, DURATION, SESSION_ID, TITLE FROM NorthWind..COLLABSCHED WHERE DATE BETWEEN @inStartDate AND @inEndDate
  • 15.
  • 16. Pitfalls of Transparent Gateway – Procs and Result Sets {CALL PLAY.RPT_COLLABORATE_SCHEDULE_RANGE( '2009-05-06 12:00:00', '2009-05-06 17:00:00')} 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
  • 17. Oracle Streams as an enabler of migration Oracle Streams ETL
  • 18. Heterogeneous Streams – General Architecture Diagram Adapted from “Oracle Database 11g: Oracle Streams Replication, An Oracle White Paper, July 2007”
  • 19. Heterogeneous Streams – Example Legacy Microsoft SQL Server Data Warehouse: TABLE NorthWind.dbo.COLLABSCHED ( DATE DATETIME, DURATION INT, SESSION_ID INT, TITLE VARCHAR(256) ) New Oracle Data Warehouse: TABLE PLAY.COLLABORATE_SCHEDULE ( DATE_ DATE, DURATION NUMBER, SESSION_ID NUMBER, TITLE VARCHAR2(256) );
  • 20. 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.COLLABORATE_SCHEDULE', streams_type => 'APPLY', streams_name => 'SAMPLE_APPLY_NORTHWIND', queue_name => 'SAMPLE_STREAM_Q', include_dml => true, include_ddl => false ); END; /
  • 21. Heterogeneous Streams – Heterogeneous Apply Transforms BEGIN DBMS_STREAMS_ADM.RENAME_TABLE( rule_name => 'COLLABORATE_SCHEDULE554', from_table_name => 'PLAY.COLLABORATE_SCHEDULE', to_table_name => '&quot;dbo&quot;.COLLABSCHED', step_number => 0, operation =>'ADD'); END; / BEGIN DBMS_STREAMS_ADM.RENAME_COLUMN( rule_name => 'COLLABORATE_SCHEDULE554', table_name => 'PLAY.COLLABORATE_SCHEDULE', from_column_name => '&quot;DATE_&quot;', to_column_name => '&quot;DATE&quot;', value_type => '*', step_number => 0, operation => 'ADD'); END; /
  • 22. Heterogeneous Streams – Before inserts to Captured Oracle table
  • 23. Heterogeneous Streams – Insert some rows into Captured Oracle table SQL> INSERT INTO PLAY.COLLABORATE_SCHEDULE (DATE_,DURATION,SESSION_ID,TITLE) VALUES ('2009-05-06 08:30:00',60,359,'Oracle Critical Patch Updates: Insight and Understanding'); 1 row inserted SQL> INSERT INTO PLAY.COLLABORATE_SCHEDULE (DATE_,DURATION,SESSION_ID,TITLE) VALUES ('2009-05-06 11:00:00',60,237,'Best Practices for Managing Successful BI Implementations'); 1 row inserted SQL> INSERT INTO PLAY.COLLABORATE_SCHEDULE (DATE_,DURATION,SESSION_ID,TITLE) VALUES ('2009-05-06 12:15:00',60,257,'Best practices for deploying a Data Warehouse on Oracle Database 11g'); 1 row inserted SQL> INSERT INTO PLAY.COLLABORATE_SCHEDULE (DATE_,DURATION,SESSION_ID,TITLE) VALUES ('2009-05-06 13:30:00',60,744,'Business Intelligence Publisher Overview and Planned Features'); 1 row inserted SQL> INSERT INTO PLAY.COLLABORATE_SCHEDULE (DATE_,DURATION,SESSION_ID,TITLE) VALUES ('2009-05-06 15:15:00',60,387,'Migrating a Data Warehouse from Microsoft SQL Server to Oracle 11g'); 1 row inserted SQL> INSERT INTO PLAY.COLLABORATE_SCHEDULE (DATE_,DURATION,SESSION_ID,TITLE) VALUES ('2009-05-06 16:30:00',60,245,'Data Quality Heartburn? Get 11g Relief'); 1 row inserted SQL> COMMIT; Commit complete
  • 24. Heterogeneous Streams – After inserts to Captured Oracle table
  • 25. Heterogeneous Streams – NULL vs. Empty String (SQL Server)
  • 26. Heterogeneous Streams – NULL vs. Empty String (SQL Server via Oracle TG)
  • 27. Heterogeneous Streams – NULL vs. Empty String (Oracle)
  • 28. Heterogeneous Streams – Syncing tables containing Floats
  • 29. Heterogeneous Streams – Syncing tables containing Floats
  • 30. Heterogeneous Streams – Syncing tables containing Floats
  • 31.
  • 32. Questions? Dylan Kucera Senior Manager – Data Architecture Ontario Teachers’ Pension Plan Collaborate 2009 – Session ID 387 Wednesday May 6, 2009 3:15pm-4:15pm Thank You! – Please complete the evaluation form – I value your feedback!