SlideShare ist ein Scribd-Unternehmen logo
1 von 19
Downloaden Sie, um offline zu lesen
Oracle to PostgreSQL migration
journey
Dominic Mortimer
April 30, 2021
Agenda
About me
ACI Overview
Starting point
Target destination
Extensions
Technology decisions (DDL, code, data)
Application code changes
Cut over
About me
3
Confidential
• Worked in many parts of the payments industry for over 20 years
• Had a number of roles, both technical and non-technical.
• Naturally gravitate towards the database tier, covering DB2 Z/os, Oracle, MSSQL and PostgreSQL!
• Worked on Oracle to PostgreSQL migration for last 2 – 3 years
ACI Spans the Payments Ecosystem
4
Confidential
WHAT WE DO
PROCESS AND MANAGE
DIGITAL PAYMENTS
• Banks
• Processors
• Central Infrastructures
• Networks
• Acquirers
• Merchant Intermediaries
ENABLE OMNI-COMMERCE
PAYMENTS
• Merchants
PRESENT AND PROCESS
BILL PAYMENTS
• Billers
MANAGE FRAUD
AND RISK
• Banks
• Processors
• Central Infrastructures
• Networks
• Acquirers
• Billers
• Merchant Intermediaries
ACI by the Numbers
5
Confidential
EMEA
~450
customers
Americas
5,300+
customers
Asia/Pacific
~250
customers
Support 19 of the
top 20 banks worldwide
Prevent fraud for 1,500+
banks, intermediaries
and merchants.
Serve 80,000+ merchants
directly and through payment
service providers
Support thousands
of billers
45
years
in payments
6,000+
global
organizations
rely on ACI
~4,000
employees
globally
$1.29B
2020
revenue
6
Confidential
Starting point – Oracle topology
• Issues
− Operational complexity
▪ Replication latency
▪ Multiple replication techniques – multiple points of failure
▪ DR failover – need to set up replication in DR site
− Non ACID
− Code complexity
▪ Logic to know where to look for data
▪ DDL – must align table changes between instances and
custom code.
TX
processing
0-6 month old data
Historic DB1
6-18 months old
data
Historic DB2
18 + months old
data
Config
DB
Configuration
app
Payment
engine
Reporting
engine
Database link
Materialized views
Database link
Materialized views
Custom data movement code
Database link
Custom data movement code
7
Confidential
Final destination
Lead
Master
Config + 0- 6 month
Logical
Standby
Config + all data
Configuration
app
Payment
engine
Reporting
engine
HAProxy
Shadow
Master
Config + 0- 6 month
HAProxy
Lead
Master
Config + 0- 6 month
Logical
Standby
Config + all data
Shadow
Master
Config + 0- 6 month
Configuration
app
Payment
engine
Reporting
engine
HAProxy
HAProxy
Primary Site Secondary Site
BDR
Sync rep
BDR
Sync rep
BDR
Async rep
BDR
Async rep
BDR
Async rep
BDR
Filter Deletes
BDR
Filter Deletes
• Benefits
• Reduced operational complexity
• Simplified DDL deployment
• Simplified application code
• All replication handled by BDR
• Improved performance (no network lag)
• Lower cost
• Still able to offload of read heavy queries
Jenkins
Ansible
Liquibase
Define business objective of migration
• Why do the project (reduce cost/operational complexity, increase availability,
make product more sellable, etc)
Define scope
• Which schemas/apps are to be impacted
Talk to budget holders and decision makers
• Set expectations around tools, infrastructure, risks and timescales
8
Confidential
Before you start
• Different approaches
− Reverse engineer (convert to generalised data model eg power designer)
− Convert already exported generated DDL (Text conversion)
− Read Oracle metadata and convert
• Things to consider
− Migration frequency
− Network speed
− Execute migration multiple times with different options
− Flexibility of index/FK creation – only want after data has been loaded
− Repeatability
− Is this a one off
9
Confidential
Migration technology decisions (DDL)
Tools
• Ora2PG
• AWS
• SQL Lines
• Easyfrom
• Pentaho
• orafce
− This is a very useful extension in your migration project
− Mimics a number of important (non iso standard functions)
− Download from git hub and compile against your version of PostgreSQL
− https://github.com/orafce/orafce
• Pgcrypto
− Replacement for DBMS_OBFUSCATION_TOOLKIT
10
Confidential
Code migration - Extensions
dbms_pipe
dbms_alert
dbms_sql (separate project)
dbms_assert
dbms_random
date functions
date operators
dbms_output
utl_file
11
Confidential
DB code migration tools
Assess code
Report on
gaps
Run migration
Apply manual
changes
Compile/Test
Post migration
custom
process
Update tool
Update custom process
More manual changes
How to decide on which tool to use:
• Volume of gaps reported
• Is amount of manual code change acceptable?
• Frequency of migration
• Can the tool be updated?
• How much effort in creating post migration process
Tool Licence DDL Data Uses orafce
ora2pg Open source Y Y Y
AWS schema
conversion tool
Free Y Y N
Ispirer Migration
and modernisation
toolkit
Commercial Y Y Y
EDB PL
Translate tool
Commercial N (use
ora2pg)
N Y
EDB Advanced
server
Commercial Y Y N – Oracle
emulator
3rd Party Commercial Y Y Possible
• Public synonym/Synonym – use search path, assuming synonym name and object name is the same
• Collections – manual migration
• autonomous transactions – Use dblink
• Packages - Split into functions and procedures
− Object name contains package and function/package name schema.package__function
• Nested functions/procedures not supported – be careful with local variables
• DBMS_OBFUSCATION_TOOLKIT – use pgcrypto
12
Confidential
Can’t migrate – work arounds
• Unit
− Apples to apples (same results Oracle or PostgreSQL)
− Consider adding unit test to overnight test – pgTap framework
• Functional testing
− Use test automation
− Likely minimal changes to test automation suite
− Apples to apples
• Non functional requirements testing
− Performance – results may not be the same but still must meet NFR
− Availability – Same or better than Oracle
13
Confidential
Testing
• Things to consider
− Size of source data
− Rate of change in source system
− Migration time frame
− Impact on source system
− Acceptable latency
− Cost
− Replicate changes
• Tool options
− File based (eg Ora2pg)
− cdc replication tool (eg qlik/striim)
− SQL replication tool (eg nifi)
− Foreign data wrapper
14
Confidential
Data migration - Options
Approach/tool type Approach Source
data size
Cut over
timeframe
Impact on
source
system
Replicate changes Cost
Foreign Data Wrapper Insert into target select *
from FDW table
Can be iterative eg 1
day at a time
Small/Med Med Med Possible
Use MERGE
Need a way to
determine change,
eg last update date
Free
File based
Eg ora2pg
Create unload file
SFTP to target
copy in to target DB
Small/Med Related to
data size
Low/Med Possible but
complex.
Open
source
SQL replication
Eg nifi
Load then replicate
changes
Large Small Medium/high Yes
Replicate changes
by querying source
table.
Need a way to
determine change,
eg last update date
Open
source or
commercial
CDC replication
Eg qlik/striim
Initial load then replicate
changes
Large Small Low Yes – read log in
source/CDC
Commercial
• Same code base Oracle and PostgreSQL – Use ISO standard SQL or orafce supported
• Changes we made
− Rownum
▪ Rownum in select list – use row_number() over(order by ‘1’) window function
▪ Rownum as a predicate – fetch/offset
▪ SYSDATE – use current_timestamp
− Handle changed package names – replace package name/function name separator
▪ Oracle – schema.package_name.function_name
▪ PostgreSQL – schema.package_name__function_name
− New data source for PostgreSQL
15
Confidential
Application code changes
16
Confidential
Cut over - Set up
TX
processing
0-6 month old data
Historic DB
6-18 months old
data
Historic DB
18 + months old
data
Config
DB
Configuration
app
Payment
engine
Reporting
engine
Lead
Master
Config + 0- 6 month
Logical
Standby
Config + all data
HAProxy
Shadow
Master
Config + 0- 6 month
Qlik
replication
(load only)
Qlik load and
changes
HAProxy
17
Confidential
Cut over – RO
TX
processing
0-6 month old data
Historic DB
6-18 months old
data
Historic DB
18 + months old
data
Config
DB
Configuration
app
Payment
engine
Reporting
engine
Lead
Master
Config + 0- 6 month
Logical
Standby
Config + all data
HAProxy
Shadow
Master
Config + 0- 6 month
Qlik
replication
(load only)
Qlik load and
changes
HAProxy
18
Confidential
Cut over – RW
TX
processing
0-6 month old data
Historic DB
6-18 months old
data
Historic DB
18 + months old
data
Config
DB
Configuration
app
Payment
engine
Reporting
engine
Lead
Master
Config + 0- 6 month
Logical
Standby
Config + all data
HAProxy
Shadow
Master
Config + 0- 6 month
Qlik
replication
(load only)
Qlik load and
changes
HAProxy
A Journey from Oracle to PostgreSQL

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

Overview of EnterpriseDB Postgres Plus Advanced Server 9.4 and Postgres Enter...
Overview of EnterpriseDB Postgres Plus Advanced Server 9.4 and Postgres Enter...Overview of EnterpriseDB Postgres Plus Advanced Server 9.4 and Postgres Enter...
Overview of EnterpriseDB Postgres Plus Advanced Server 9.4 and Postgres Enter...
 
An Expert Guide to Migrating Legacy Databases to PostgreSQL
An Expert Guide to Migrating Legacy Databases to PostgreSQLAn Expert Guide to Migrating Legacy Databases to PostgreSQL
An Expert Guide to Migrating Legacy Databases to PostgreSQL
 
New and Improved Features in PostgreSQL 13
New and Improved Features in PostgreSQL 13New and Improved Features in PostgreSQL 13
New and Improved Features in PostgreSQL 13
 
Oracle Migration to Postgres in the Cloud
Oracle Migration to Postgres in the CloudOracle Migration to Postgres in the Cloud
Oracle Migration to Postgres in the Cloud
 
Postgres Deployment Automation with Terraform and Ansible
 Postgres Deployment Automation with Terraform and Ansible Postgres Deployment Automation with Terraform and Ansible
Postgres Deployment Automation with Terraform and Ansible
 
Postgres Foreign Data Wrappers
Postgres Foreign Data Wrappers  Postgres Foreign Data Wrappers
Postgres Foreign Data Wrappers
 
Microsoft SQL Server Data Warehouses for SQL Server DBAs
Microsoft SQL Server Data Warehouses for SQL Server DBAsMicrosoft SQL Server Data Warehouses for SQL Server DBAs
Microsoft SQL Server Data Warehouses for SQL Server DBAs
 
EDB Postgres with Containers
EDB Postgres with ContainersEDB Postgres with Containers
EDB Postgres with Containers
 
Die 10 besten PostgreSQL-Replikationsstrategien für Ihr Unternehmen
Die 10 besten PostgreSQL-Replikationsstrategien für Ihr UnternehmenDie 10 besten PostgreSQL-Replikationsstrategien für Ihr Unternehmen
Die 10 besten PostgreSQL-Replikationsstrategien für Ihr Unternehmen
 
Online Upgrade Using Logical Replication.
Online Upgrade Using Logical Replication.Online Upgrade Using Logical Replication.
Online Upgrade Using Logical Replication.
 
How to Design for Database High Availability
How to Design for Database High AvailabilityHow to Design for Database High Availability
How to Design for Database High Availability
 
Enterprise PostgreSQL - EDB's answer to conventional Databases
Enterprise PostgreSQL - EDB's answer to conventional DatabasesEnterprise PostgreSQL - EDB's answer to conventional Databases
Enterprise PostgreSQL - EDB's answer to conventional Databases
 
Postgres.foreign.data.wrappers.2015
Postgres.foreign.data.wrappers.2015Postgres.foreign.data.wrappers.2015
Postgres.foreign.data.wrappers.2015
 
DBaaS with EDB Postgres on AWS
DBaaS with EDB Postgres on AWSDBaaS with EDB Postgres on AWS
DBaaS with EDB Postgres on AWS
 
Introducing Postgres Plus Advanced Server 9.4
Introducing Postgres Plus Advanced Server 9.4Introducing Postgres Plus Advanced Server 9.4
Introducing Postgres Plus Advanced Server 9.4
 
Reducing Database Pain & Costs with Postgres
Reducing Database Pain & Costs with PostgresReducing Database Pain & Costs with Postgres
Reducing Database Pain & Costs with Postgres
 
Product Update: EDB Postgres Platform 2017
Product Update: EDB Postgres Platform 2017Product Update: EDB Postgres Platform 2017
Product Update: EDB Postgres Platform 2017
 
PayPal Big Data and MySQL Cluster
PayPal Big Data and MySQL ClusterPayPal Big Data and MySQL Cluster
PayPal Big Data and MySQL Cluster
 
Simplify Consolidation with Oracle Database 12c
Simplify Consolidation with Oracle Database 12cSimplify Consolidation with Oracle Database 12c
Simplify Consolidation with Oracle Database 12c
 
Oh2 opportunity for_smart_db
Oh2 opportunity for_smart_dbOh2 opportunity for_smart_db
Oh2 opportunity for_smart_db
 

Ähnlich wie A Journey from Oracle to PostgreSQL

COUG_AAbate_Oracle_Database_12c_New_Features
COUG_AAbate_Oracle_Database_12c_New_FeaturesCOUG_AAbate_Oracle_Database_12c_New_Features
COUG_AAbate_Oracle_Database_12c_New_Features
Alfredo Abate
 

Ähnlich wie A Journey from Oracle to PostgreSQL (20)

COUG_AAbate_Oracle_Database_12c_New_Features
COUG_AAbate_Oracle_Database_12c_New_FeaturesCOUG_AAbate_Oracle_Database_12c_New_Features
COUG_AAbate_Oracle_Database_12c_New_Features
 
Optimize with Open Source
Optimize with Open SourceOptimize with Open Source
Optimize with Open Source
 
Save money with Postgres on IBM PowerLinux
Save money with Postgres on IBM PowerLinuxSave money with Postgres on IBM PowerLinux
Save money with Postgres on IBM PowerLinux
 
My C.V
My C.VMy C.V
My C.V
 
Transform Your Data Integration Platform From Informatica To ODI
Transform Your Data Integration Platform From Informatica To ODI Transform Your Data Integration Platform From Informatica To ODI
Transform Your Data Integration Platform From Informatica To ODI
 
Oracle big data appliance and solutions
Oracle big data appliance and solutionsOracle big data appliance and solutions
Oracle big data appliance and solutions
 
Whats new in Oracle Database 12c release 12.1.0.2
Whats new in Oracle Database 12c release 12.1.0.2Whats new in Oracle Database 12c release 12.1.0.2
Whats new in Oracle Database 12c release 12.1.0.2
 
Reducing Database Pain & Costs with Postgres
Reducing Database Pain & Costs with PostgresReducing Database Pain & Costs with Postgres
Reducing Database Pain & Costs with Postgres
 
Introducing NoSQL and MongoDB to complement Relational Databases (AMIS SIG 14...
Introducing NoSQL and MongoDB to complement Relational Databases (AMIS SIG 14...Introducing NoSQL and MongoDB to complement Relational Databases (AMIS SIG 14...
Introducing NoSQL and MongoDB to complement Relational Databases (AMIS SIG 14...
 
ADV Slides: Platforming Your Data for Success – Databases, Hadoop, Managed Ha...
ADV Slides: Platforming Your Data for Success – Databases, Hadoop, Managed Ha...ADV Slides: Platforming Your Data for Success – Databases, Hadoop, Managed Ha...
ADV Slides: Platforming Your Data for Success – Databases, Hadoop, Managed Ha...
 
An AMIS overview of database 12c
An AMIS overview of database 12cAn AMIS overview of database 12c
An AMIS overview of database 12c
 
ГАННА КАПЛУН «noSQL vs SQL: порівняння використання реляційних та нереляційни...
ГАННА КАПЛУН «noSQL vs SQL: порівняння використання реляційних та нереляційни...ГАННА КАПЛУН «noSQL vs SQL: порівняння використання реляційних та нереляційни...
ГАННА КАПЛУН «noSQL vs SQL: порівняння використання реляційних та нереляційни...
 
An AMIS Overview of Oracle database 12c (12.1)
An AMIS Overview of Oracle database 12c (12.1)An AMIS Overview of Oracle database 12c (12.1)
An AMIS Overview of Oracle database 12c (12.1)
 
From ddd to DDD : My journey from data-driven development to Domain-Driven De...
From ddd to DDD : My journey from data-driven development to Domain-Driven De...From ddd to DDD : My journey from data-driven development to Domain-Driven De...
From ddd to DDD : My journey from data-driven development to Domain-Driven De...
 
Lessons Learned Replatforming A Large Machine Learning Application To Apache ...
Lessons Learned Replatforming A Large Machine Learning Application To Apache ...Lessons Learned Replatforming A Large Machine Learning Application To Apache ...
Lessons Learned Replatforming A Large Machine Learning Application To Apache ...
 
Gruter TECHDAY 2014 Realtime Processing in Telco
Gruter TECHDAY 2014 Realtime Processing in TelcoGruter TECHDAY 2014 Realtime Processing in Telco
Gruter TECHDAY 2014 Realtime Processing in Telco
 
Justin Sheppard & Ankur Gupta from Sears Holdings Corporation - Single point ...
Justin Sheppard & Ankur Gupta from Sears Holdings Corporation - Single point ...Justin Sheppard & Ankur Gupta from Sears Holdings Corporation - Single point ...
Justin Sheppard & Ankur Gupta from Sears Holdings Corporation - Single point ...
 
Optimizing Open Source for Greater Database Savings & Control
Optimizing Open Source for Greater Database Savings & ControlOptimizing Open Source for Greater Database Savings & Control
Optimizing Open Source for Greater Database Savings & Control
 
Ibm_IoT_Architecture_and_Capabilities
Ibm_IoT_Architecture_and_CapabilitiesIbm_IoT_Architecture_and_Capabilities
Ibm_IoT_Architecture_and_Capabilities
 
Webinar: How MongoDB is Used to Manage Reference Data - May 2014
Webinar: How MongoDB is Used to Manage Reference Data - May 2014Webinar: How MongoDB is Used to Manage Reference Data - May 2014
Webinar: How MongoDB is Used to Manage Reference Data - May 2014
 

Mehr von EDB

EFM Office Hours - APJ - July 29, 2021
EFM Office Hours - APJ - July 29, 2021EFM Office Hours - APJ - July 29, 2021
EFM Office Hours - APJ - July 29, 2021
EDB
 
Is There Anything PgBouncer Can’t Do?
Is There Anything PgBouncer Can’t Do?Is There Anything PgBouncer Can’t Do?
Is There Anything PgBouncer Can’t Do?
EDB
 
A Deeper Dive into EXPLAIN
A Deeper Dive into EXPLAINA Deeper Dive into EXPLAIN
A Deeper Dive into EXPLAIN
EDB
 

Mehr von EDB (20)

Cloud Migration Paths: Kubernetes, IaaS, or DBaaS
Cloud Migration Paths: Kubernetes, IaaS, or DBaaSCloud Migration Paths: Kubernetes, IaaS, or DBaaS
Cloud Migration Paths: Kubernetes, IaaS, or DBaaS
 
Migre sus bases de datos Oracle a la nube
Migre sus bases de datos Oracle a la nube Migre sus bases de datos Oracle a la nube
Migre sus bases de datos Oracle a la nube
 
EFM Office Hours - APJ - July 29, 2021
EFM Office Hours - APJ - July 29, 2021EFM Office Hours - APJ - July 29, 2021
EFM Office Hours - APJ - July 29, 2021
 
Benchmarking Cloud Native PostgreSQL
Benchmarking Cloud Native PostgreSQLBenchmarking Cloud Native PostgreSQL
Benchmarking Cloud Native PostgreSQL
 
Las Variaciones de la Replicación de PostgreSQL
Las Variaciones de la Replicación de PostgreSQLLas Variaciones de la Replicación de PostgreSQL
Las Variaciones de la Replicación de PostgreSQL
 
NoSQL and Spatial Database Capabilities using PostgreSQL
NoSQL and Spatial Database Capabilities using PostgreSQLNoSQL and Spatial Database Capabilities using PostgreSQL
NoSQL and Spatial Database Capabilities using PostgreSQL
 
Is There Anything PgBouncer Can’t Do?
Is There Anything PgBouncer Can’t Do?Is There Anything PgBouncer Can’t Do?
Is There Anything PgBouncer Can’t Do?
 
Data Analysis with TensorFlow in PostgreSQL
Data Analysis with TensorFlow in PostgreSQLData Analysis with TensorFlow in PostgreSQL
Data Analysis with TensorFlow in PostgreSQL
 
Practical Partitioning in Production with Postgres
Practical Partitioning in Production with PostgresPractical Partitioning in Production with Postgres
Practical Partitioning in Production with Postgres
 
A Deeper Dive into EXPLAIN
A Deeper Dive into EXPLAINA Deeper Dive into EXPLAIN
A Deeper Dive into EXPLAIN
 
IOT with PostgreSQL
IOT with PostgreSQLIOT with PostgreSQL
IOT with PostgreSQL
 
Psql is awesome!
Psql is awesome!Psql is awesome!
Psql is awesome!
 
Comment sauvegarder correctement vos données
Comment sauvegarder correctement vos donnéesComment sauvegarder correctement vos données
Comment sauvegarder correctement vos données
 
Cloud Native PostgreSQL - Italiano
Cloud Native PostgreSQL - ItalianoCloud Native PostgreSQL - Italiano
Cloud Native PostgreSQL - Italiano
 
New enhancements for security and usability in EDB 13
New enhancements for security and usability in EDB 13New enhancements for security and usability in EDB 13
New enhancements for security and usability in EDB 13
 
Best Practices in Security with PostgreSQL
Best Practices in Security with PostgreSQLBest Practices in Security with PostgreSQL
Best Practices in Security with PostgreSQL
 
Cloud Native PostgreSQL - APJ
Cloud Native PostgreSQL - APJCloud Native PostgreSQL - APJ
Cloud Native PostgreSQL - APJ
 
Best Practices in Security with PostgreSQL
Best Practices in Security with PostgreSQLBest Practices in Security with PostgreSQL
Best Practices in Security with PostgreSQL
 
EDB Postgres & Tools in a Smart City Project
EDB Postgres & Tools in a Smart City ProjectEDB Postgres & Tools in a Smart City Project
EDB Postgres & Tools in a Smart City Project
 
Migrate Today: Proactive Steps to Unhook from Oracle
Migrate Today: Proactive Steps to Unhook from OracleMigrate Today: Proactive Steps to Unhook from Oracle
Migrate Today: Proactive Steps to Unhook from Oracle
 

Kürzlich hochgeladen

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Kürzlich hochgeladen (20)

Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 

A Journey from Oracle to PostgreSQL

  • 1. Oracle to PostgreSQL migration journey Dominic Mortimer April 30, 2021
  • 2. Agenda About me ACI Overview Starting point Target destination Extensions Technology decisions (DDL, code, data) Application code changes Cut over
  • 3. About me 3 Confidential • Worked in many parts of the payments industry for over 20 years • Had a number of roles, both technical and non-technical. • Naturally gravitate towards the database tier, covering DB2 Z/os, Oracle, MSSQL and PostgreSQL! • Worked on Oracle to PostgreSQL migration for last 2 – 3 years
  • 4. ACI Spans the Payments Ecosystem 4 Confidential WHAT WE DO PROCESS AND MANAGE DIGITAL PAYMENTS • Banks • Processors • Central Infrastructures • Networks • Acquirers • Merchant Intermediaries ENABLE OMNI-COMMERCE PAYMENTS • Merchants PRESENT AND PROCESS BILL PAYMENTS • Billers MANAGE FRAUD AND RISK • Banks • Processors • Central Infrastructures • Networks • Acquirers • Billers • Merchant Intermediaries
  • 5. ACI by the Numbers 5 Confidential EMEA ~450 customers Americas 5,300+ customers Asia/Pacific ~250 customers Support 19 of the top 20 banks worldwide Prevent fraud for 1,500+ banks, intermediaries and merchants. Serve 80,000+ merchants directly and through payment service providers Support thousands of billers 45 years in payments 6,000+ global organizations rely on ACI ~4,000 employees globally $1.29B 2020 revenue
  • 6. 6 Confidential Starting point – Oracle topology • Issues − Operational complexity ▪ Replication latency ▪ Multiple replication techniques – multiple points of failure ▪ DR failover – need to set up replication in DR site − Non ACID − Code complexity ▪ Logic to know where to look for data ▪ DDL – must align table changes between instances and custom code. TX processing 0-6 month old data Historic DB1 6-18 months old data Historic DB2 18 + months old data Config DB Configuration app Payment engine Reporting engine Database link Materialized views Database link Materialized views Custom data movement code Database link Custom data movement code
  • 7. 7 Confidential Final destination Lead Master Config + 0- 6 month Logical Standby Config + all data Configuration app Payment engine Reporting engine HAProxy Shadow Master Config + 0- 6 month HAProxy Lead Master Config + 0- 6 month Logical Standby Config + all data Shadow Master Config + 0- 6 month Configuration app Payment engine Reporting engine HAProxy HAProxy Primary Site Secondary Site BDR Sync rep BDR Sync rep BDR Async rep BDR Async rep BDR Async rep BDR Filter Deletes BDR Filter Deletes • Benefits • Reduced operational complexity • Simplified DDL deployment • Simplified application code • All replication handled by BDR • Improved performance (no network lag) • Lower cost • Still able to offload of read heavy queries Jenkins Ansible Liquibase
  • 8. Define business objective of migration • Why do the project (reduce cost/operational complexity, increase availability, make product more sellable, etc) Define scope • Which schemas/apps are to be impacted Talk to budget holders and decision makers • Set expectations around tools, infrastructure, risks and timescales 8 Confidential Before you start
  • 9. • Different approaches − Reverse engineer (convert to generalised data model eg power designer) − Convert already exported generated DDL (Text conversion) − Read Oracle metadata and convert • Things to consider − Migration frequency − Network speed − Execute migration multiple times with different options − Flexibility of index/FK creation – only want after data has been loaded − Repeatability − Is this a one off 9 Confidential Migration technology decisions (DDL) Tools • Ora2PG • AWS • SQL Lines • Easyfrom • Pentaho
  • 10. • orafce − This is a very useful extension in your migration project − Mimics a number of important (non iso standard functions) − Download from git hub and compile against your version of PostgreSQL − https://github.com/orafce/orafce • Pgcrypto − Replacement for DBMS_OBFUSCATION_TOOLKIT 10 Confidential Code migration - Extensions dbms_pipe dbms_alert dbms_sql (separate project) dbms_assert dbms_random date functions date operators dbms_output utl_file
  • 11. 11 Confidential DB code migration tools Assess code Report on gaps Run migration Apply manual changes Compile/Test Post migration custom process Update tool Update custom process More manual changes How to decide on which tool to use: • Volume of gaps reported • Is amount of manual code change acceptable? • Frequency of migration • Can the tool be updated? • How much effort in creating post migration process Tool Licence DDL Data Uses orafce ora2pg Open source Y Y Y AWS schema conversion tool Free Y Y N Ispirer Migration and modernisation toolkit Commercial Y Y Y EDB PL Translate tool Commercial N (use ora2pg) N Y EDB Advanced server Commercial Y Y N – Oracle emulator 3rd Party Commercial Y Y Possible
  • 12. • Public synonym/Synonym – use search path, assuming synonym name and object name is the same • Collections – manual migration • autonomous transactions – Use dblink • Packages - Split into functions and procedures − Object name contains package and function/package name schema.package__function • Nested functions/procedures not supported – be careful with local variables • DBMS_OBFUSCATION_TOOLKIT – use pgcrypto 12 Confidential Can’t migrate – work arounds
  • 13. • Unit − Apples to apples (same results Oracle or PostgreSQL) − Consider adding unit test to overnight test – pgTap framework • Functional testing − Use test automation − Likely minimal changes to test automation suite − Apples to apples • Non functional requirements testing − Performance – results may not be the same but still must meet NFR − Availability – Same or better than Oracle 13 Confidential Testing
  • 14. • Things to consider − Size of source data − Rate of change in source system − Migration time frame − Impact on source system − Acceptable latency − Cost − Replicate changes • Tool options − File based (eg Ora2pg) − cdc replication tool (eg qlik/striim) − SQL replication tool (eg nifi) − Foreign data wrapper 14 Confidential Data migration - Options Approach/tool type Approach Source data size Cut over timeframe Impact on source system Replicate changes Cost Foreign Data Wrapper Insert into target select * from FDW table Can be iterative eg 1 day at a time Small/Med Med Med Possible Use MERGE Need a way to determine change, eg last update date Free File based Eg ora2pg Create unload file SFTP to target copy in to target DB Small/Med Related to data size Low/Med Possible but complex. Open source SQL replication Eg nifi Load then replicate changes Large Small Medium/high Yes Replicate changes by querying source table. Need a way to determine change, eg last update date Open source or commercial CDC replication Eg qlik/striim Initial load then replicate changes Large Small Low Yes – read log in source/CDC Commercial
  • 15. • Same code base Oracle and PostgreSQL – Use ISO standard SQL or orafce supported • Changes we made − Rownum ▪ Rownum in select list – use row_number() over(order by ‘1’) window function ▪ Rownum as a predicate – fetch/offset ▪ SYSDATE – use current_timestamp − Handle changed package names – replace package name/function name separator ▪ Oracle – schema.package_name.function_name ▪ PostgreSQL – schema.package_name__function_name − New data source for PostgreSQL 15 Confidential Application code changes
  • 16. 16 Confidential Cut over - Set up TX processing 0-6 month old data Historic DB 6-18 months old data Historic DB 18 + months old data Config DB Configuration app Payment engine Reporting engine Lead Master Config + 0- 6 month Logical Standby Config + all data HAProxy Shadow Master Config + 0- 6 month Qlik replication (load only) Qlik load and changes HAProxy
  • 17. 17 Confidential Cut over – RO TX processing 0-6 month old data Historic DB 6-18 months old data Historic DB 18 + months old data Config DB Configuration app Payment engine Reporting engine Lead Master Config + 0- 6 month Logical Standby Config + all data HAProxy Shadow Master Config + 0- 6 month Qlik replication (load only) Qlik load and changes HAProxy
  • 18. 18 Confidential Cut over – RW TX processing 0-6 month old data Historic DB 6-18 months old data Historic DB 18 + months old data Config DB Configuration app Payment engine Reporting engine Lead Master Config + 0- 6 month Logical Standby Config + all data HAProxy Shadow Master Config + 0- 6 month Qlik replication (load only) Qlik load and changes HAProxy