From Legacy to Open
Source
Migrating from legacy
databases to MariaDB
Agenda
• Why migrate to Open Source
• What to migrate and what not to migrate
• MariaDB Server compatibility features
– MariaDB Server up to version 10.1
– MariaDB Server 10.2
– MariaDB Server 10.3
• MariaDB Migration services
• Case Studies
• Questions and Answers
Why migrate to Open Source
Total Cost of Ownership
High Performance
High Availability
Why Open Source?
• Modern, inexpensive and powerful hardware
– Commodity hardware
• Agile software development
– More software
– High quality software
– At lower cost
• Modern infrastructure is more and more based on Open Source
– Cloud technologies
– Containers
– Microservices
– DevOps development
Why Open Source?
• You just cannot avoid Open Source software
• Higher security
– More eyeballs looking at software
– Ability to0 verify claims of security
• Easier software licensing
– Legacy software licenses are complex
– A big part of Vendor lock-in is due to licensing
• Significantly lower Total Cost of Ownership (TCO)
What and what not to
Migrate
Finding the low hanging
fruit
Types of migration targets
• Impossible to migrate
– Means that a complete rewrite takes less effort than a migration
– May also be the case that it is not worthwhile, for example the code base is too old
• Complex migration
– Lots of proprietary code
– Use of proprietary features in key areas
– Complex application
– Lack of or bad documentation
• Medium complexity
– Limited amounts of proprietary code
– Well documented code
– Using Standard features
Types of migration targets
• Easy migration
– Using only standard features
– Separate database layer
• Standard or custom
– Standard database data types
– Small amounts of highly complex SQL
– Well documented application and code
– Standard development languages
What to look out for
• Database procedural code, i.e. PL/SQL
– Not necessarily a big issue but needs to be investigated
– Migration is possible
• Complex SQL statements
– Tuning issues
– Proprietary features
• Dynamic SQL
– Difficult to migrate
– Difficult to tune
– Difficult to test
What to look out for
• Non standard data types
– BLOB/CLOB types are sometimes difficult, implementations are different
– Temporal datatypes are also notoriously difficult due to semantic differences
– Numeric datatypes are sometimes an issue
– User Defined Datatypes
• Characters sets and collations
– UTF-8 support
• Non-standard table types
– Special indexes
– Materialized Views
– Nested tables
MariaDB Server Compitability
Easing migrations
Compatibility in MariaDB Server pre 10.2
• SQL_MODE = Oracle
– Pipes as CONCAT - || treated as MariaDB CONCAT function
– Quoting for names according to ANSI – " treated as MariaDB `
• CHECK Constraints
– Accepted syntax only
• SQL_MODE retained for Stored Procedures and Functions
• Mainly ANSI SQL datatypes
• User Defined Functions and Stored Routines to augment migration
• Convert PL/SQL to external code and/or SQL/PSM
• Partitioning
• ANSI SQL Outer Join syntax
– Oracle, Sybase and SQL Server outer join syntax replacement
Compatibility in MariaDB Server 10.2
• CHECK Constraints
– Implemented and operational in accordance with ANSI SQL
• CTE – Common Table Expressions
– Eases use of temporary objects
– Replacement for Oracle CONNECT BY … PRIOR syntax
• Windowing functions
– In line with Oracle support
• Column DEFAULT expressions enhanced
– In line with ANSI SQL and Oracle
• User based resource limitations
• Enhanced PREPARE statement
• Multiple TRIGGERs per event
Compatibility in MariaDB Server 10.3
• PL/SQL support
– Most of the PL/SQL syntax supported
– PACKAGES support
– Minimal set of built-in packages support
• SEQUENCES support
• Support for parameterized CURSORs
• Several Oracle compatibility functions
• INTERSECT and EXCEPT support
• ROW data types in Stored Procedures
• System Versioned Tables / AS OF – To replace Oracle Flashback
Example schema migration
#: let's create some tables, using ORACLE DATA TYPES
MariaDB [mydb]> CREATE TABLE TBL_CAR_BRAND (
-> CAR_BRAND_NUMBER INTEGER(10) NOT NULL,
-> CAR_BRAND_DESC VARCHAR2(4000) NOT NULL, #: mapped out to MariaDB VARCHAR
-> CAR_BRAND_LOGO BLOB, #: mapped out to MariaDB LONGBLOB
-> PRIMARY KEY(CAR_BRAND_NUMBER)
-> ) ENGINE=InnoDB;
Query OK, 0 rows affected (0.007 sec)
MariaDB [mydb]> CREATE TABLE TBL_CAR (
-> CAR_NUMBER INTEGER(10) NOT NULL,
-> CAR_BRAND_NUMBER INTEGER(10) NOT NULL,
-> CAR_MODEL VARCHAR2(60) NOT NULL,
-> CAR_MODEL_PRICE NUMBER(10,2) NOT NULL, #: mapped out to MariaDB DECIMAL
-> CONSTRAINT FOREIGN KEY (CAR_BRAND_NUMBER) REFERENCES TBL_CAR_BRAND(CAR_BRAND_NUMBER),
-> PRIMARY KEY(CAR_NUMBER)
-> ) ENGINE=InnoDB;
Query OK, 0 rows affected (0.007 sec)
Example procedure migration
MariaDB [mydb]> DELIMITER /
MariaDB [mydb]> CREATE OR REPLACE PROCEDURE mydb.PROC_ADD_CAR_BRAND (
p_car_brand_descmydb.TBL_CAR_BRAND.CAR_BRAND_DESC%TYPE,
p_car_brand_logomydb.TBL_CAR_BRAND.CAR_BRAND_LOGO%TYPE
) AS
BEGIN
IF ((p_car_brand_desc <> '') &&(p_car_brand_logo <> '')) THEN
-- creating a start savepoint
SAVEPOINT startpoint; #: creating an undo point into the local stream
-- inserting the new row
INSERT INTO TBL_CAR_BRAND(CAR_BRAND_NUMBER,CAR_BRAND_DESC,CAR_BRAND_LOGO)
VALUES(SEQ_CAR_BRAND.NEXTVAL,p_car_brand_desc,p_car_brand_logo);
ELSE
SELECT 'You must provide the cars brand...' AS WARNING;
END IF;
EXCEPTION
WHEN OTHERS THEN
-- executing the exception
SELECT 'Exception ' || TO_CHAR(SQLCODE)|| ' ' || SQLERRM AS EXCEPTION;
-- rolling backup to the savepoint startpoint
ROLLBACK TO startpoint;
END;
/
Query OK, 0 rows affected (0.003 sec)
MariaDB Migration Services
MariaDB Migration Practice services
• Competence in MariaDB, MySQL, Oracle, SQL Server and several other database systems
• Migration assessment
– Assess if a migration is feasible
– Determine application complexity
– Determine an approximate effort for migration
• Migration Proof-of-concept
– Migrate distinct part of an application
– Use to ensure that a migration is feasible, possible and useful
– Uncover hidden complexities
– Covers database and well as select application and infrastructure components
MariaDB Migration Practice tasks
• Schema migration
• Data migration
• Data validation
• Database Procedural code migration
– Including Procedural code validation
• Application migration
– MariaDB Migration Practice focus on the database specific aspects of the application
• Application testing and tuning
• Switchover
MariaDB Migration process
Case studies
Background and
examples
Greetz – Oracle RAC to MariaDB Galera Cluster
• Application – E-commerce for Personalized Greeting Cards
• Business Challenges
– High Availability
– Cost
– Predictable performance
• Solution
– Migrate from Oracle RAC to MariaDB Galera Cluster
• Why MariaDB
– Lower Total Cost of Ownership
– Lower hardware cost
– Lower DBA requirements
“MariaDB’s controlled and structured
approach gave us certainty in relation
to data and enabled us to go live on
time. I would not hesitate in working
again with SkySQL and highly
recommend them.“
— Giulio Gaioni, COO, Greetz
Greetz Migration – Some details
• Java application
– Using Hibernate for database access
• Application code required minimal effort
– Certain hardcoded Hibernate objects required changing
• Small amounts of PL/SQL code
– Mostly used for reporting and DBA work
– Replaced with Linux shell scripts and limited amount of MariaDB SQL/PSM code
• Oracle RAC replaced by MariaDB Galera Cluster
• Hardware was leased
– Shared disk system could be returned immediately after migration
– Significant part of migration cost saving
• MariaDB Remote DBA to aid in database work
DBS Bank – Migration from Oracle to MariaDB
• DBS Bank Singapore
– The biggest banks in Southeast Asia.
– 27 applications have already been successfully migrated to MariaDB by 2017
• Including some of the most complex ones
– Several more application in pipeline for 2018
• Heavy-duty transactional data mart for OLTP applications
– Data is then provided to customer-facing applications
– 16 countries, 250 tables, 130 procedures, 4 TB hot data, 15 TB cold data
• Main drivers
– Cost
– Drive towards Open Source
DBS Bank migration – Some challenges
• Proof of Concepts
– Many potential issues found during PoC
• Density of internal application knowledge
– Live application which has been growing over years → hundreds of procedures etc.
• Dependency on Oracle features
– CONNECT BY, PIPE ROW, non-1NF custom types
– Feature development for frequently used constructs
– Solution/workaround development for less frequently used constructs, e.g. collections
• Complexity due to long-term growing architecture
– Tight couplings and dependencies with neighboring systems
– Direct access to tables from/to other applications, i.e. bypassing application calls
Thank you

More Related Content

PDF
Replacing Oracle Database at an International Bank
DOC
Rohit_Panot
PPTX
2019 - GUOB Tech Day / Groundbreakers LAD Tour - Database Migration Methods t...
PDF
Mongo db model relationships with documents
PDF
Mongo db groundup-0-nosql-intro-syedawasekhirni
PPTX
Introduction to Node (15th May 2017)
PPTX
Scaling SQL and NoSQL Databases in the Cloud
PPTX
Oow2016 review--paas-microservices-
Replacing Oracle Database at an International Bank
Rohit_Panot
2019 - GUOB Tech Day / Groundbreakers LAD Tour - Database Migration Methods t...
Mongo db model relationships with documents
Mongo db groundup-0-nosql-intro-syedawasekhirni
Introduction to Node (15th May 2017)
Scaling SQL and NoSQL Databases in the Cloud
Oow2016 review--paas-microservices-

What's hot (20)

PPTX
AMIS Beyond the Horizon - High density deployments using weblogic multitenancy
PPTX
2019 - OOW - Database Migration Methods from On-Premise to Cloud
PDF
Architecting a Next Gen Data Platform – Strata London 2018
PDF
Laskar: High-Velocity GraphQL & Lambda-based Software Development Model
PPTX
PPTX
PPCD_And_AmazonRDS
PDF
DB12c: All You Need to Know About the Resource Manager
PDF
MariaDB on Docker
PDF
Oracle WebLogic 12c New Multitenancy features
PPTX
Overview of Oracle Product Portfolio (focus on Platform) - April, 2017
PPTX
2020 - OCI Key Concepts for Oracle DBAs
PDF
SQL Server 2019 CTP2.4
PPTX
Oow2016 review-iaas-paas-13th-18thoctober
PPTX
Evolutionary database design
PPTX
PDF
The Proxy Wars - MySQL Router, ProxySQL, MariaDB MaxScale
PPTX
Oracle OpenWorld 2016 Review - High Level Overview of major themes and grand ...
PPTX
Oracle OpenWorld 2016 Review - Focus on Data, BigData, Streaming Data, Machin...
PPTX
Oracle GoldenGate and Baseball - 5 Keys for Moving to the Cloud
PPTX
Best practices: running high-performance databases on Kubernetes
AMIS Beyond the Horizon - High density deployments using weblogic multitenancy
2019 - OOW - Database Migration Methods from On-Premise to Cloud
Architecting a Next Gen Data Platform – Strata London 2018
Laskar: High-Velocity GraphQL & Lambda-based Software Development Model
PPCD_And_AmazonRDS
DB12c: All You Need to Know About the Resource Manager
MariaDB on Docker
Oracle WebLogic 12c New Multitenancy features
Overview of Oracle Product Portfolio (focus on Platform) - April, 2017
2020 - OCI Key Concepts for Oracle DBAs
SQL Server 2019 CTP2.4
Oow2016 review-iaas-paas-13th-18thoctober
Evolutionary database design
The Proxy Wars - MySQL Router, ProxySQL, MariaDB MaxScale
Oracle OpenWorld 2016 Review - High Level Overview of major themes and grand ...
Oracle OpenWorld 2016 Review - Focus on Data, BigData, Streaming Data, Machin...
Oracle GoldenGate and Baseball - 5 Keys for Moving to the Cloud
Best practices: running high-performance databases on Kubernetes
Ad

Similar to Migración desde BBDD propietarias a MariaDB (20)

PPT
Kb 40 kevin_klineukug_reading20070717[1]
PDF
[db tech showcase Tokyo 2017] C34: Replacing Oracle Database at DBS Bank ~Ora...
PPTX
Migration from Oracle to PostgreSQL: NEED vs REALITY
PPTX
FatDB Intro
PDF
Maximizing performance via tuning and optimization
PDF
Maximizing performance via tuning and optimization
PPTX
Sql connections germany - migration considerations when migrating your on pre...
PDF
DesignMind SQL Server 2008 Migration
PPTX
Running database infrastructure on containers
PPT
Building and Deploying Large Scale SSRS using Lessons Learned from Customer D...
PPTX
Handling Massive Writes
PPTX
NoSQL
PDF
A Journey from Oracle to PostgreSQL
 
PPTX
What’s New in Oracle Database 19c - Part 1
PDF
Höchste Datenbankleistung durch Anpassung und Optimierung
PPT
Lecture 9: Dynamic web application
PDF
Bases de datos en la nube con AWS
PPTX
Relational Database and mysql insight
PPTX
Introducing NoSQL and MongoDB to complement Relational Databases (AMIS SIG 14...
PPT
Kb 40 kevin_klineukug_reading20070717[1]
[db tech showcase Tokyo 2017] C34: Replacing Oracle Database at DBS Bank ~Ora...
Migration from Oracle to PostgreSQL: NEED vs REALITY
FatDB Intro
Maximizing performance via tuning and optimization
Maximizing performance via tuning and optimization
Sql connections germany - migration considerations when migrating your on pre...
DesignMind SQL Server 2008 Migration
Running database infrastructure on containers
Building and Deploying Large Scale SSRS using Lessons Learned from Customer D...
Handling Massive Writes
NoSQL
A Journey from Oracle to PostgreSQL
 
What’s New in Oracle Database 19c - Part 1
Höchste Datenbankleistung durch Anpassung und Optimierung
Lecture 9: Dynamic web application
Bases de datos en la nube con AWS
Relational Database and mysql insight
Introducing NoSQL and MongoDB to complement Relational Databases (AMIS SIG 14...
Ad

More from MariaDB plc (20)

PDF
MariaDB Berlin Roadshow Slides - 8 April 2025
PDF
MariaDB München Roadshow - 24 September, 2024
PDF
MariaDB Paris Roadshow - 19 September 2024
PDF
MariaDB Amsterdam Roadshow: 19 September, 2024
PDF
MariaDB Paris Workshop 2023 - MaxScale 23.02.x
PDF
MariaDB Paris Workshop 2023 - Newpharma
PDF
MariaDB Paris Workshop 2023 - Cloud
PDF
MariaDB Paris Workshop 2023 - MariaDB Enterprise
PDF
MariaDB Paris Workshop 2023 - Performance Optimization
PDF
MariaDB Paris Workshop 2023 - MaxScale
PDF
MariaDB Paris Workshop 2023 - novadys presentation
PDF
MariaDB Paris Workshop 2023 - DARVA presentation
PDF
MariaDB Tech und Business Update Hamburg 2023 - MariaDB Enterprise Server
PDF
MariaDB SkySQL Autonome Skalierung, Observability, Cloud-Backup
PDF
Einführung : MariaDB Tech und Business Update Hamburg 2023
PDF
Hochverfügbarkeitslösungen mit MariaDB
PDF
Die Neuheiten in MariaDB Enterprise Server
PDF
Global Data Replication with Galera for Ansell Guardian®
PDF
Introducing workload analysis
PDF
Under the hood: SkySQL monitoring
MariaDB Berlin Roadshow Slides - 8 April 2025
MariaDB München Roadshow - 24 September, 2024
MariaDB Paris Roadshow - 19 September 2024
MariaDB Amsterdam Roadshow: 19 September, 2024
MariaDB Paris Workshop 2023 - MaxScale 23.02.x
MariaDB Paris Workshop 2023 - Newpharma
MariaDB Paris Workshop 2023 - Cloud
MariaDB Paris Workshop 2023 - MariaDB Enterprise
MariaDB Paris Workshop 2023 - Performance Optimization
MariaDB Paris Workshop 2023 - MaxScale
MariaDB Paris Workshop 2023 - novadys presentation
MariaDB Paris Workshop 2023 - DARVA presentation
MariaDB Tech und Business Update Hamburg 2023 - MariaDB Enterprise Server
MariaDB SkySQL Autonome Skalierung, Observability, Cloud-Backup
Einführung : MariaDB Tech und Business Update Hamburg 2023
Hochverfügbarkeitslösungen mit MariaDB
Die Neuheiten in MariaDB Enterprise Server
Global Data Replication with Galera for Ansell Guardian®
Introducing workload analysis
Under the hood: SkySQL monitoring

Recently uploaded (20)

PDF
iTop VPN Crack Latest Version Full Key 2025
PDF
Multiverse AI Review 2025: Access All TOP AI Model-Versions!
PDF
Website Design Services for Small Businesses.pdf
PDF
Salesforce Agentforce AI Implementation.pdf
PDF
Practical Indispensable Project Management Tips for Delivering Successful Exp...
PPTX
GSA Content Generator Crack (2025 Latest)
PDF
Ableton Live Suite for MacOS Crack Full Download (Latest 2025)
PDF
Visual explanation of Dijkstra's Algorithm using Python
PDF
How Tridens DevSecOps Ensures Compliance, Security, and Agility
PPTX
Weekly report ppt - harsh dattuprasad patel.pptx
PDF
Introduction to Ragic - #1 No Code Tool For Digitalizing Your Business Proces...
PDF
AI Guide for Business Growth - Arna Softech
PPTX
Download Adobe Photoshop Crack 2025 Free
DOCX
Modern SharePoint Intranet Templates That Boost Employee Engagement in 2025.docx
PPTX
Trending Python Topics for Data Visualization in 2025
PDF
novaPDF Pro 11.9.482 Crack + License Key [Latest 2025]
PPTX
Cybersecurity-and-Fraud-Protecting-Your-Digital-Life.pptx
PDF
AI/ML Infra Meetup | Beyond S3's Basics: Architecting for AI-Native Data Access
PPTX
MLforCyber_MLDataSetsandFeatures_Presentation.pptx
PDF
Microsoft Office 365 Crack Download Free
iTop VPN Crack Latest Version Full Key 2025
Multiverse AI Review 2025: Access All TOP AI Model-Versions!
Website Design Services for Small Businesses.pdf
Salesforce Agentforce AI Implementation.pdf
Practical Indispensable Project Management Tips for Delivering Successful Exp...
GSA Content Generator Crack (2025 Latest)
Ableton Live Suite for MacOS Crack Full Download (Latest 2025)
Visual explanation of Dijkstra's Algorithm using Python
How Tridens DevSecOps Ensures Compliance, Security, and Agility
Weekly report ppt - harsh dattuprasad patel.pptx
Introduction to Ragic - #1 No Code Tool For Digitalizing Your Business Proces...
AI Guide for Business Growth - Arna Softech
Download Adobe Photoshop Crack 2025 Free
Modern SharePoint Intranet Templates That Boost Employee Engagement in 2025.docx
Trending Python Topics for Data Visualization in 2025
novaPDF Pro 11.9.482 Crack + License Key [Latest 2025]
Cybersecurity-and-Fraud-Protecting-Your-Digital-Life.pptx
AI/ML Infra Meetup | Beyond S3's Basics: Architecting for AI-Native Data Access
MLforCyber_MLDataSetsandFeatures_Presentation.pptx
Microsoft Office 365 Crack Download Free

Migración desde BBDD propietarias a MariaDB

  • 1. From Legacy to Open Source Migrating from legacy databases to MariaDB
  • 2. Agenda • Why migrate to Open Source • What to migrate and what not to migrate • MariaDB Server compatibility features – MariaDB Server up to version 10.1 – MariaDB Server 10.2 – MariaDB Server 10.3 • MariaDB Migration services • Case Studies • Questions and Answers
  • 3. Why migrate to Open Source Total Cost of Ownership High Performance High Availability
  • 4. Why Open Source? • Modern, inexpensive and powerful hardware – Commodity hardware • Agile software development – More software – High quality software – At lower cost • Modern infrastructure is more and more based on Open Source – Cloud technologies – Containers – Microservices – DevOps development
  • 5. Why Open Source? • You just cannot avoid Open Source software • Higher security – More eyeballs looking at software – Ability to0 verify claims of security • Easier software licensing – Legacy software licenses are complex – A big part of Vendor lock-in is due to licensing • Significantly lower Total Cost of Ownership (TCO)
  • 6. What and what not to Migrate Finding the low hanging fruit
  • 7. Types of migration targets • Impossible to migrate – Means that a complete rewrite takes less effort than a migration – May also be the case that it is not worthwhile, for example the code base is too old • Complex migration – Lots of proprietary code – Use of proprietary features in key areas – Complex application – Lack of or bad documentation • Medium complexity – Limited amounts of proprietary code – Well documented code – Using Standard features
  • 8. Types of migration targets • Easy migration – Using only standard features – Separate database layer • Standard or custom – Standard database data types – Small amounts of highly complex SQL – Well documented application and code – Standard development languages
  • 9. What to look out for • Database procedural code, i.e. PL/SQL – Not necessarily a big issue but needs to be investigated – Migration is possible • Complex SQL statements – Tuning issues – Proprietary features • Dynamic SQL – Difficult to migrate – Difficult to tune – Difficult to test
  • 10. What to look out for • Non standard data types – BLOB/CLOB types are sometimes difficult, implementations are different – Temporal datatypes are also notoriously difficult due to semantic differences – Numeric datatypes are sometimes an issue – User Defined Datatypes • Characters sets and collations – UTF-8 support • Non-standard table types – Special indexes – Materialized Views – Nested tables
  • 12. Compatibility in MariaDB Server pre 10.2 • SQL_MODE = Oracle – Pipes as CONCAT - || treated as MariaDB CONCAT function – Quoting for names according to ANSI – " treated as MariaDB ` • CHECK Constraints – Accepted syntax only • SQL_MODE retained for Stored Procedures and Functions • Mainly ANSI SQL datatypes • User Defined Functions and Stored Routines to augment migration • Convert PL/SQL to external code and/or SQL/PSM • Partitioning • ANSI SQL Outer Join syntax – Oracle, Sybase and SQL Server outer join syntax replacement
  • 13. Compatibility in MariaDB Server 10.2 • CHECK Constraints – Implemented and operational in accordance with ANSI SQL • CTE – Common Table Expressions – Eases use of temporary objects – Replacement for Oracle CONNECT BY … PRIOR syntax • Windowing functions – In line with Oracle support • Column DEFAULT expressions enhanced – In line with ANSI SQL and Oracle • User based resource limitations • Enhanced PREPARE statement • Multiple TRIGGERs per event
  • 14. Compatibility in MariaDB Server 10.3 • PL/SQL support – Most of the PL/SQL syntax supported – PACKAGES support – Minimal set of built-in packages support • SEQUENCES support • Support for parameterized CURSORs • Several Oracle compatibility functions • INTERSECT and EXCEPT support • ROW data types in Stored Procedures • System Versioned Tables / AS OF – To replace Oracle Flashback
  • 15. Example schema migration #: let's create some tables, using ORACLE DATA TYPES MariaDB [mydb]> CREATE TABLE TBL_CAR_BRAND ( -> CAR_BRAND_NUMBER INTEGER(10) NOT NULL, -> CAR_BRAND_DESC VARCHAR2(4000) NOT NULL, #: mapped out to MariaDB VARCHAR -> CAR_BRAND_LOGO BLOB, #: mapped out to MariaDB LONGBLOB -> PRIMARY KEY(CAR_BRAND_NUMBER) -> ) ENGINE=InnoDB; Query OK, 0 rows affected (0.007 sec) MariaDB [mydb]> CREATE TABLE TBL_CAR ( -> CAR_NUMBER INTEGER(10) NOT NULL, -> CAR_BRAND_NUMBER INTEGER(10) NOT NULL, -> CAR_MODEL VARCHAR2(60) NOT NULL, -> CAR_MODEL_PRICE NUMBER(10,2) NOT NULL, #: mapped out to MariaDB DECIMAL -> CONSTRAINT FOREIGN KEY (CAR_BRAND_NUMBER) REFERENCES TBL_CAR_BRAND(CAR_BRAND_NUMBER), -> PRIMARY KEY(CAR_NUMBER) -> ) ENGINE=InnoDB; Query OK, 0 rows affected (0.007 sec)
  • 16. Example procedure migration MariaDB [mydb]> DELIMITER / MariaDB [mydb]> CREATE OR REPLACE PROCEDURE mydb.PROC_ADD_CAR_BRAND ( p_car_brand_descmydb.TBL_CAR_BRAND.CAR_BRAND_DESC%TYPE, p_car_brand_logomydb.TBL_CAR_BRAND.CAR_BRAND_LOGO%TYPE ) AS BEGIN IF ((p_car_brand_desc <> '') &&(p_car_brand_logo <> '')) THEN -- creating a start savepoint SAVEPOINT startpoint; #: creating an undo point into the local stream -- inserting the new row INSERT INTO TBL_CAR_BRAND(CAR_BRAND_NUMBER,CAR_BRAND_DESC,CAR_BRAND_LOGO) VALUES(SEQ_CAR_BRAND.NEXTVAL,p_car_brand_desc,p_car_brand_logo); ELSE SELECT 'You must provide the cars brand...' AS WARNING; END IF; EXCEPTION WHEN OTHERS THEN -- executing the exception SELECT 'Exception ' || TO_CHAR(SQLCODE)|| ' ' || SQLERRM AS EXCEPTION; -- rolling backup to the savepoint startpoint ROLLBACK TO startpoint; END; / Query OK, 0 rows affected (0.003 sec)
  • 18. MariaDB Migration Practice services • Competence in MariaDB, MySQL, Oracle, SQL Server and several other database systems • Migration assessment – Assess if a migration is feasible – Determine application complexity – Determine an approximate effort for migration • Migration Proof-of-concept – Migrate distinct part of an application – Use to ensure that a migration is feasible, possible and useful – Uncover hidden complexities – Covers database and well as select application and infrastructure components
  • 19. MariaDB Migration Practice tasks • Schema migration • Data migration • Data validation • Database Procedural code migration – Including Procedural code validation • Application migration – MariaDB Migration Practice focus on the database specific aspects of the application • Application testing and tuning • Switchover
  • 22. Greetz – Oracle RAC to MariaDB Galera Cluster • Application – E-commerce for Personalized Greeting Cards • Business Challenges – High Availability – Cost – Predictable performance • Solution – Migrate from Oracle RAC to MariaDB Galera Cluster • Why MariaDB – Lower Total Cost of Ownership – Lower hardware cost – Lower DBA requirements “MariaDB’s controlled and structured approach gave us certainty in relation to data and enabled us to go live on time. I would not hesitate in working again with SkySQL and highly recommend them.“ — Giulio Gaioni, COO, Greetz
  • 23. Greetz Migration – Some details • Java application – Using Hibernate for database access • Application code required minimal effort – Certain hardcoded Hibernate objects required changing • Small amounts of PL/SQL code – Mostly used for reporting and DBA work – Replaced with Linux shell scripts and limited amount of MariaDB SQL/PSM code • Oracle RAC replaced by MariaDB Galera Cluster • Hardware was leased – Shared disk system could be returned immediately after migration – Significant part of migration cost saving • MariaDB Remote DBA to aid in database work
  • 24. DBS Bank – Migration from Oracle to MariaDB • DBS Bank Singapore – The biggest banks in Southeast Asia. – 27 applications have already been successfully migrated to MariaDB by 2017 • Including some of the most complex ones – Several more application in pipeline for 2018 • Heavy-duty transactional data mart for OLTP applications – Data is then provided to customer-facing applications – 16 countries, 250 tables, 130 procedures, 4 TB hot data, 15 TB cold data • Main drivers – Cost – Drive towards Open Source
  • 25. DBS Bank migration – Some challenges • Proof of Concepts – Many potential issues found during PoC • Density of internal application knowledge – Live application which has been growing over years → hundreds of procedures etc. • Dependency on Oracle features – CONNECT BY, PIPE ROW, non-1NF custom types – Feature development for frequently used constructs – Solution/workaround development for less frequently used constructs, e.g. collections • Complexity due to long-term growing architecture – Tight couplings and dependencies with neighboring systems – Direct access to tables from/to other applications, i.e. bypassing application calls