SlideShare a Scribd company logo
STUMBLING STONES
WHEN MIGRATING
FROM ORACLE
BY LAURENZ ALBE
ABOUT
ME AND MY
COMPANY
■ Who is Laurenz Albe?
■ Who is CYBERTEC?
LAURENZ ALBE
SENIOR DATABASE CONSULTANT
■ contributions to PostgreSQL and related
projects since 2006
■ maintainer of the Oracle Foreign Data Wrapper
■ PostgreSQL support, training, consulting and
development
■ working for CYBERTEC since 2017
M A I L laurenz.albe@cybertec.at
P H O N E +43 2622 930 22-7
W E B www.cybertec-postgresql.com
Specialized in data services
About Inhouse development
Owner-managed since 2000
International team of developers
DATABASE SERVICES
DATA Science
▪ Artificial Intelligence
▪ Machine Learning
▪ Big Data
▪ Business Intelligence
▪ Data Mining
▪ etc.
POSTGRESQL Services
▪ 24/7 Support
▪ Training
▪ Consulting
▪ Performance Tuning
▪ Clustering
▪ etc.
▪ ICT
▪ University
▪ Government
▪ Automotive
▪ Industry
▪ Trade
▪ Finance
▪ etc.
CLIENT
SECTORS
AGENDA
■ Overview
■ Understanding open source and PostgreSQL
■ Migrate the schema (DDL)
■ Data migration
■ Migrating stored code
■ Migrating SQL
■ Migrating the application
■ Migration tools
OVERVIEW
MIGRATION STEPS
■ understand open source software and PostgreSQL
■ migrate the schema (DDL)
■ migrate the data
■ migrate stored code (PL/SQL, Java)
■ migrate SQL
■ migrate the application
MIGRATION STEPS
(ACTUAL SIZE)
■ understand open source software and PostgreSQL
■ migrate the schema (DDL)
■ migrate the data
■ migrate stored code (PL/SQL, Java)
■ migrate SQL
■ migrate the application
UNDERSTANDING OPEN
SOURCE AND POSTGRESQL
THE SHIFT TO OPEN SOURCE
■ This is written by some enthusiasts in their spare time, right?
■ Is this “enterprise ready”?
■ Where can I get support?
■ Why do I have to install and integrate so many different pieces of
software (PostgreSQL, PostGIS, backup software, extensions, GUI clients,
monitoring,...)?
■ What if open source software is no longer maintained?
■ It’s for free, so I don’t have to invest anything, right?
TRANSACTIONS, UNDO,
MULTIVERSIONING
■ both Oracle and PostgreSQL use multiversioning, so concurrency and locking
are similar (but not equal!)
■ big transactions are no problem in PostgreSQL (but long transactions are), so
less need to “batch” large transactions
■ no UNDO tablespace in PostgreSQL, no “snapshot too old”, immediate rollback
But:
■ UPDATE-heavy workloads are problematic in PostgreSQL (may need “HOT
update” and autovacuum tuning)
■ table size will grow (all that visibility information)
■ I no statement-level rollback
SCHEMAS, USERS AND
SYNONYMS
Oracle has a reduced metadata model:
■ a schema is always tied to a user with the same name
■ ownership is determined by the schema
■ only objects in your own schema can be referenced without schema
Synonyms are there largely to overcome these limitations
■ can often be replaced by an appropriate search_path setting
■ for other uses, a view is usually just as good
VIEWS AND DEPENDENCIES
■ Oracle tables be dropped/modified even if views depend on them
■ views become “invalid” and cause an error when used
■ PostgreSQL is stricter about data integrity
■ Schema upgrade procedures more difficult in PostgreSQL
■ but to make up for it, we have transactional DDL
■ Materialized View support much more sophisticated in Oracle
■ replace ON COMMIT REFRESHwith triggers in PostgreSQL
TABLESPACES
■ tablespaces are important in Oracle
■ Oracle essentially implements its own file system
■ PostgreSQL uses the host file system
■ tablespaces are rarely necessary
■ Resist the urge to create tablespaces during migration!
MIGRATE THE
SCHEMA (DDL)
DATA TYPE TRANSLATION
■ PostgreSQL has way more data types, so the problem is often which
one to choose
■ DATE to date or timestamp(0)?
■ NUMBER to integer, bigint, double precision or numeric?
■ Oracle allows foreign keys from NUMBER(5) to NUMBER
■ must take care to migrate them to the same data type
■ BLOB to bytea or Large Objects?
■ easy, use bytea
DATA MIGRATION
GENERAL CONSIDERATIONS
■ Oracle makes it hard to export data in clear text
■ probably on purpose to make migration harder
■ this is often the least complicated step, but the one that causes the
most down time
■ reducing down time is difficult
■ run migration of table data in parallel
■ use “change data capture” for replication and switch-over with
little down time (only available with commercial tools)
DATA MIGRATION PROBLEMS
■ corrupted strings in Oracle (more common than you think!)
invalid byte sequence for encoding "UTF8": 0x80
■ zero bytes in Oracle
invalid byte sequence for encoding "UTF8": 0x00
■ can be filtered out during migration
■ infinite numbers (~ and -~)
■ can be mapped to Infinity in double precision, problematic
otherwise
Most of these problems have to be solved in Oracle before migration.
MIGRATING STORED CODE
MIGRATING PL/SQL
■ PL/pgSQL is a clone of PL/SQL, but sufficiently different
(e.g., RETURNS vs. RETURN)
■ some tools provide automated translation, but a lot of manual work may remain
■ no COMMIT/ROLLBACKin PostgreSQL functions, limited support in procedures
■ often in “batched deletes”, → can be omitted
■ no PRAGMA AUTONOMOUS_TRANSACTIONin PostgreSQL
■ can sometimes be worked around with dblink
■ no BULK COLLECTwith arrays
■ process row by row
Shift transaction management to the application.
MIGRATING PL/SQL PACKAGES
■ option to use closed source fork from EDB
■ workaround: creating a schema with functions
■ no “package global variables” and types
■ no large PL/SQL library in PostgreSQL
■ move code to the application
■ re-implement code in PL/Python or PL/PerlU
■ extension “orafce” provides some compatibility
MIGRATING PL/SQL TRIGGERS
■ has to be split in two parts: trigger function and trigger
■ benefit: easier code reuse
■ auto-increment triggers fetching from a sequence can be simplified to
column DEFAULT
■ no “logon triggers” in PostgreSQL
■ avoid or shift code to the application
MIGRATING SQL
WHERE DOES SQL OCCUR?
■ application code
■ ORMs and other abstraction layers reduce this
■ views
■ PL/SQL code
■ column DEFAULT clauses
■ index definitions
Usually requires manual intervention; migration tools may help.
SQL: JOIN SYNTAX
SELECT b.col1, a.col2
FROM base_table b, attributes a
WHERE b.id=a.b_id(+);
has to be translated to
SELECT b.col1, a.col2
FROM base_table b
LEFT JOIN attributes a ON b.id = a.b_id;
Always simple, but annoying!
SQL: EMPTY STRINGS
■ Oracle treats empty strings as NULL
■ as a consequence,
'hello' || NULL
is not NULL in Oracle
■ translate into
concat('hello', NULL)
or use “coalesce(strcol, '')”
This is a very frequent problem.
SQL: CURRENT DATE/TIME
■ most Oracle code uses proprietary functions:
■ SYSDATE
■ SYSTIMESTAMP
■ has to be translated:
■ the literal translation would be clock_timestamp()
■ sometimes current_dateor current_timestampis better
■ easy with search and replace
SQL: SEQUENCES
■ Oracle code to fetch the next sequence value:
asequence.NEXTVAL
■ PostgreSQL code to fetch the next sequence value:
nextval('asequence')
■ both don’t support the SQL standard way:
NEXT VALUE FOR asequence
MIGRATING THE APPLICATION
MIGRATING THE APPLICATION
■ can be hard
■ hard coded dynamically composed SQL everywhere
■ can be almost trivial
■ use an ORM that supports both Oracle and PostgreSQL
■ requires thorough testing
■ some differences (transaction handling, concurrency) may cause
problems only during testing
MIGRATION TOOLS
POSTGRESQL FORKS
■ some PostgreSQL forks (for example EDB) provide good compatibility
■ but believe no claim of “drop-in replacement”
■ carefully consider if you want to end up with closed source
■ consider using “orafce” for more compatibility
■ open source, but still another dependency
■ it may be worth the effort to invest a little more and end up with free
standard PostgreSQL
ORA2PG
■ the most widely used open source migration tool
■ time-tested and proven, but not 100% bug free
■ generates a DDL script, exports and imports data
■ universally usable, but takes its time
■ attempts to translate PL/SQL
■ simple search/replace, quality limited
ORA_MIGRATOR
■ open source, uses the Oracle Foreign Data Wrapper
■ directly migrates data into the target database
■ no export/import, therefore faster
■ requires oracle_fdw in the target database
■ usually not an option with hosted databases
■ no attempt to migrate PL/SQL
■ provides a simple replication solution using triggers to reduce down
time
CYBERTEC MIGRATOR
CYBERTEC MIGRATOR
■ commercial
■ comfortable GUI driven migration
■ fast, highly parallelized data migration
■ high-quality PL/SQL conversion
■ close-to zero downtime with change data capture under development
More information:
https://www.cybertec-postgresql.com/en/products/cybertec-migrator/
QUESTIONS?

More Related Content

What's hot

Oracle RAC 19c - the Basis for the Autonomous Database
Oracle RAC 19c - the Basis for the Autonomous DatabaseOracle RAC 19c - the Basis for the Autonomous Database
Oracle RAC 19c - the Basis for the Autonomous Database
Markus Michalewicz
 
Oracle Database Applianceのご紹介(詳細)
Oracle Database Applianceのご紹介(詳細)Oracle Database Applianceのご紹介(詳細)
Oracle Database Applianceのご紹介(詳細)
オラクルエンジニア通信
 
GoldenGate and Stream Processing with Special Guest Rakuten
GoldenGate and Stream Processing with Special Guest RakutenGoldenGate and Stream Processing with Special Guest Rakuten
GoldenGate and Stream Processing with Special Guest Rakuten
Jeffrey T. Pollock
 
Top 10 Mistakes When Migrating From Oracle to PostgreSQL
Top 10 Mistakes When Migrating From Oracle to PostgreSQLTop 10 Mistakes When Migrating From Oracle to PostgreSQL
Top 10 Mistakes When Migrating From Oracle to PostgreSQL
Jim Mlodgenski
 
Building Modern Data Platform with Microsoft Azure
Building Modern Data Platform with Microsoft AzureBuilding Modern Data Platform with Microsoft Azure
Building Modern Data Platform with Microsoft Azure
Dmitry Anoshin
 
How to Migrate from Oracle to EDB Postgres
How to Migrate from Oracle to EDB PostgresHow to Migrate from Oracle to EDB Postgres
How to Migrate from Oracle to EDB Postgres
Ashnikbiz
 
How We Optimize Spark SQL Jobs With parallel and sync IO
How We Optimize Spark SQL Jobs With parallel and sync IOHow We Optimize Spark SQL Jobs With parallel and sync IO
How We Optimize Spark SQL Jobs With parallel and sync IO
Databricks
 
Best Practices for Building an Enterprise SOA Infrastructure on Oracle SOA Suite
Best Practices for Building an Enterprise SOA Infrastructure on Oracle SOA SuiteBest Practices for Building an Enterprise SOA Infrastructure on Oracle SOA Suite
Best Practices for Building an Enterprise SOA Infrastructure on Oracle SOA Suite
Matt Wright
 
Oracle RAC Virtualized - In VMs, in Containers, On-premises, and in the Cloud
Oracle RAC Virtualized - In VMs, in Containers, On-premises, and in the CloudOracle RAC Virtualized - In VMs, in Containers, On-premises, and in the Cloud
Oracle RAC Virtualized - In VMs, in Containers, On-premises, and in the Cloud
Markus Michalewicz
 
【旧版】Oracle Database Cloud Service:サービス概要のご紹介 [2021年7月版]
【旧版】Oracle Database Cloud Service:サービス概要のご紹介 [2021年7月版]【旧版】Oracle Database Cloud Service:サービス概要のご紹介 [2021年7月版]
【旧版】Oracle Database Cloud Service:サービス概要のご紹介 [2021年7月版]
オラクルエンジニア通信
 
Tuning SQL for Oracle Exadata: The Good, The Bad, and The Ugly Tuning SQL fo...
 Tuning SQL for Oracle Exadata: The Good, The Bad, and The Ugly Tuning SQL fo... Tuning SQL for Oracle Exadata: The Good, The Bad, and The Ugly Tuning SQL fo...
Tuning SQL for Oracle Exadata: The Good, The Bad, and The Ugly Tuning SQL fo...Enkitec
 
PostgreSQL for Oracle Developers and DBA's
PostgreSQL for Oracle Developers and DBA'sPostgreSQL for Oracle Developers and DBA's
PostgreSQL for Oracle Developers and DBA's
Gerger
 
Massive Data Processing in Adobe Using Delta Lake
Massive Data Processing in Adobe Using Delta LakeMassive Data Processing in Adobe Using Delta Lake
Massive Data Processing in Adobe Using Delta Lake
Databricks
 
Application modernization patterns with apache kafka, debezium, and kubernete...
Application modernization patterns with apache kafka, debezium, and kubernete...Application modernization patterns with apache kafka, debezium, and kubernete...
Application modernization patterns with apache kafka, debezium, and kubernete...
Bilgin Ibryam
 
Oracle Partitioning for DBAs and Developers
Oracle Partitioning for DBAs and DevelopersOracle Partitioning for DBAs and Developers
Oracle Partitioning for DBAs and Developers
Franky Weber Faust
 
OCI Overview
OCI OverviewOCI Overview
OCI Overview
Kamil Wieczorek
 
Reducing Database Pain & Costs with Postgres
Reducing Database Pain & Costs with PostgresReducing Database Pain & Costs with Postgres
Reducing Database Pain & Costs with Postgres
EDB
 
SQL & NoSQL
SQL & NoSQLSQL & NoSQL
DB Time, Average Active Sessions, and ASH Math - Oracle performance fundamentals
DB Time, Average Active Sessions, and ASH Math - Oracle performance fundamentalsDB Time, Average Active Sessions, and ASH Math - Oracle performance fundamentals
DB Time, Average Active Sessions, and ASH Math - Oracle performance fundamentals
John Beresniewicz
 
Oracle GoldenGate on Docker
Oracle GoldenGate on DockerOracle GoldenGate on Docker
Oracle GoldenGate on Docker
Bobby Curtis
 

What's hot (20)

Oracle RAC 19c - the Basis for the Autonomous Database
Oracle RAC 19c - the Basis for the Autonomous DatabaseOracle RAC 19c - the Basis for the Autonomous Database
Oracle RAC 19c - the Basis for the Autonomous Database
 
Oracle Database Applianceのご紹介(詳細)
Oracle Database Applianceのご紹介(詳細)Oracle Database Applianceのご紹介(詳細)
Oracle Database Applianceのご紹介(詳細)
 
GoldenGate and Stream Processing with Special Guest Rakuten
GoldenGate and Stream Processing with Special Guest RakutenGoldenGate and Stream Processing with Special Guest Rakuten
GoldenGate and Stream Processing with Special Guest Rakuten
 
Top 10 Mistakes When Migrating From Oracle to PostgreSQL
Top 10 Mistakes When Migrating From Oracle to PostgreSQLTop 10 Mistakes When Migrating From Oracle to PostgreSQL
Top 10 Mistakes When Migrating From Oracle to PostgreSQL
 
Building Modern Data Platform with Microsoft Azure
Building Modern Data Platform with Microsoft AzureBuilding Modern Data Platform with Microsoft Azure
Building Modern Data Platform with Microsoft Azure
 
How to Migrate from Oracle to EDB Postgres
How to Migrate from Oracle to EDB PostgresHow to Migrate from Oracle to EDB Postgres
How to Migrate from Oracle to EDB Postgres
 
How We Optimize Spark SQL Jobs With parallel and sync IO
How We Optimize Spark SQL Jobs With parallel and sync IOHow We Optimize Spark SQL Jobs With parallel and sync IO
How We Optimize Spark SQL Jobs With parallel and sync IO
 
Best Practices for Building an Enterprise SOA Infrastructure on Oracle SOA Suite
Best Practices for Building an Enterprise SOA Infrastructure on Oracle SOA SuiteBest Practices for Building an Enterprise SOA Infrastructure on Oracle SOA Suite
Best Practices for Building an Enterprise SOA Infrastructure on Oracle SOA Suite
 
Oracle RAC Virtualized - In VMs, in Containers, On-premises, and in the Cloud
Oracle RAC Virtualized - In VMs, in Containers, On-premises, and in the CloudOracle RAC Virtualized - In VMs, in Containers, On-premises, and in the Cloud
Oracle RAC Virtualized - In VMs, in Containers, On-premises, and in the Cloud
 
【旧版】Oracle Database Cloud Service:サービス概要のご紹介 [2021年7月版]
【旧版】Oracle Database Cloud Service:サービス概要のご紹介 [2021年7月版]【旧版】Oracle Database Cloud Service:サービス概要のご紹介 [2021年7月版]
【旧版】Oracle Database Cloud Service:サービス概要のご紹介 [2021年7月版]
 
Tuning SQL for Oracle Exadata: The Good, The Bad, and The Ugly Tuning SQL fo...
 Tuning SQL for Oracle Exadata: The Good, The Bad, and The Ugly Tuning SQL fo... Tuning SQL for Oracle Exadata: The Good, The Bad, and The Ugly Tuning SQL fo...
Tuning SQL for Oracle Exadata: The Good, The Bad, and The Ugly Tuning SQL fo...
 
PostgreSQL for Oracle Developers and DBA's
PostgreSQL for Oracle Developers and DBA'sPostgreSQL for Oracle Developers and DBA's
PostgreSQL for Oracle Developers and DBA's
 
Massive Data Processing in Adobe Using Delta Lake
Massive Data Processing in Adobe Using Delta LakeMassive Data Processing in Adobe Using Delta Lake
Massive Data Processing in Adobe Using Delta Lake
 
Application modernization patterns with apache kafka, debezium, and kubernete...
Application modernization patterns with apache kafka, debezium, and kubernete...Application modernization patterns with apache kafka, debezium, and kubernete...
Application modernization patterns with apache kafka, debezium, and kubernete...
 
Oracle Partitioning for DBAs and Developers
Oracle Partitioning for DBAs and DevelopersOracle Partitioning for DBAs and Developers
Oracle Partitioning for DBAs and Developers
 
OCI Overview
OCI OverviewOCI Overview
OCI Overview
 
Reducing Database Pain & Costs with Postgres
Reducing Database Pain & Costs with PostgresReducing Database Pain & Costs with Postgres
Reducing Database Pain & Costs with Postgres
 
SQL & NoSQL
SQL & NoSQLSQL & NoSQL
SQL & NoSQL
 
DB Time, Average Active Sessions, and ASH Math - Oracle performance fundamentals
DB Time, Average Active Sessions, and ASH Math - Oracle performance fundamentalsDB Time, Average Active Sessions, and ASH Math - Oracle performance fundamentals
DB Time, Average Active Sessions, and ASH Math - Oracle performance fundamentals
 
Oracle GoldenGate on Docker
Oracle GoldenGate on DockerOracle GoldenGate on Docker
Oracle GoldenGate on Docker
 

Similar to Stumbling stones when migrating from Oracle

Oracle vs NoSQL – The good, the bad and the ugly
Oracle vs NoSQL – The good, the bad and the uglyOracle vs NoSQL – The good, the bad and the ugly
Oracle vs NoSQL – The good, the bad and the ugly
John Kanagaraj
 
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_FeaturesAlfredo Abate
 
CDC to the Max!
CDC to the Max!CDC to the Max!
CDC to the Max!
Bronco Oostermeyer
 
Rails DB migrate SAFE.pdf
Rails DB migrate SAFE.pdfRails DB migrate SAFE.pdf
Rails DB migrate SAFE.pdf
GowthamvelPalanivel
 
NoSQL and CouchDB: the view from MOO
NoSQL and CouchDB: the view from MOONoSQL and CouchDB: the view from MOO
NoSQL and CouchDB: the view from MOOJames Hollingworth
 
Plpgsql russia-pgconf
Plpgsql russia-pgconfPlpgsql russia-pgconf
Plpgsql russia-pgconf
Pavel Stěhule
 
PL/pgSQL - An Introduction on Using Imperative Programming in PostgreSQL
PL/pgSQL - An Introduction on Using Imperative Programming in PostgreSQLPL/pgSQL - An Introduction on Using Imperative Programming in PostgreSQL
PL/pgSQL - An Introduction on Using Imperative Programming in PostgreSQL
Reactive.IO
 
Data Pipline Observability meetup
Data Pipline Observability meetup Data Pipline Observability meetup
Data Pipline Observability meetup
Omid Vahdaty
 
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...
Lucas Jellema
 
What SQL should actually be...
What SQL should actually be...What SQL should actually be...
What SQL should actually be...Open Academy
 
Are we there Yet?? (The long journey of Migrating from close source to opens...
Are we there Yet?? (The long journey of Migrating from close source to opens...Are we there Yet?? (The long journey of Migrating from close source to opens...
Are we there Yet?? (The long journey of Migrating from close source to opens...
Marco Tusa
 
PostgreSQL versus MySQL - What Are The Real Differences
PostgreSQL versus MySQL - What Are The Real DifferencesPostgreSQL versus MySQL - What Are The Real Differences
PostgreSQL versus MySQL - What Are The Real Differences
All Things Open
 
SQL vs NoSQL: Why you’ll never dump your relations - Dave Shuttleworth, EXASOL
SQL vs NoSQL: Why you’ll never dump your relations - Dave Shuttleworth, EXASOLSQL vs NoSQL: Why you’ll never dump your relations - Dave Shuttleworth, EXASOL
SQL vs NoSQL: Why you’ll never dump your relations - Dave Shuttleworth, EXASOL
BCS Data Management Specialist Group
 
CDC patterns in Apache Kafka®
CDC patterns in Apache Kafka®CDC patterns in Apache Kafka®
CDC patterns in Apache Kafka®
confluent
 
A Journey from Oracle to PostgreSQL
A Journey from Oracle to PostgreSQLA Journey from Oracle to PostgreSQL
A Journey from Oracle to PostgreSQL
EDB
 
Lessons PostgreSQL learned from commercial databases, and didn’t
Lessons PostgreSQL learned from commercial databases, and didn’tLessons PostgreSQL learned from commercial databases, and didn’t
Lessons PostgreSQL learned from commercial databases, and didn’t
PGConf APAC
 
The Real Scoop on Migrating from Oracle Databases
The Real Scoop on Migrating from Oracle DatabasesThe Real Scoop on Migrating from Oracle Databases
The Real Scoop on Migrating from Oracle Databases
EDB
 
Agile Oracle to PostgreSQL migrations (PGConf.EU 2013)
Agile Oracle to PostgreSQL migrations (PGConf.EU 2013)Agile Oracle to PostgreSQL migrations (PGConf.EU 2013)
Agile Oracle to PostgreSQL migrations (PGConf.EU 2013)
Gabriele Bartolini
 
Ten query tuning techniques every SQL Server programmer should know
Ten query tuning techniques every SQL Server programmer should knowTen query tuning techniques every SQL Server programmer should know
Ten query tuning techniques every SQL Server programmer should know
Kevin Kline
 

Similar to Stumbling stones when migrating from Oracle (20)

Oracle vs NoSQL – The good, the bad and the ugly
Oracle vs NoSQL – The good, the bad and the uglyOracle vs NoSQL – The good, the bad and the ugly
Oracle vs NoSQL – The good, the bad and the ugly
 
NoSQL
NoSQLNoSQL
NoSQL
 
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
 
CDC to the Max!
CDC to the Max!CDC to the Max!
CDC to the Max!
 
Rails DB migrate SAFE.pdf
Rails DB migrate SAFE.pdfRails DB migrate SAFE.pdf
Rails DB migrate SAFE.pdf
 
NoSQL and CouchDB: the view from MOO
NoSQL and CouchDB: the view from MOONoSQL and CouchDB: the view from MOO
NoSQL and CouchDB: the view from MOO
 
Plpgsql russia-pgconf
Plpgsql russia-pgconfPlpgsql russia-pgconf
Plpgsql russia-pgconf
 
PL/pgSQL - An Introduction on Using Imperative Programming in PostgreSQL
PL/pgSQL - An Introduction on Using Imperative Programming in PostgreSQLPL/pgSQL - An Introduction on Using Imperative Programming in PostgreSQL
PL/pgSQL - An Introduction on Using Imperative Programming in PostgreSQL
 
Data Pipline Observability meetup
Data Pipline Observability meetup Data Pipline Observability meetup
Data Pipline Observability meetup
 
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...
 
What SQL should actually be...
What SQL should actually be...What SQL should actually be...
What SQL should actually be...
 
Are we there Yet?? (The long journey of Migrating from close source to opens...
Are we there Yet?? (The long journey of Migrating from close source to opens...Are we there Yet?? (The long journey of Migrating from close source to opens...
Are we there Yet?? (The long journey of Migrating from close source to opens...
 
PostgreSQL versus MySQL - What Are The Real Differences
PostgreSQL versus MySQL - What Are The Real DifferencesPostgreSQL versus MySQL - What Are The Real Differences
PostgreSQL versus MySQL - What Are The Real Differences
 
SQL vs NoSQL: Why you’ll never dump your relations - Dave Shuttleworth, EXASOL
SQL vs NoSQL: Why you’ll never dump your relations - Dave Shuttleworth, EXASOLSQL vs NoSQL: Why you’ll never dump your relations - Dave Shuttleworth, EXASOL
SQL vs NoSQL: Why you’ll never dump your relations - Dave Shuttleworth, EXASOL
 
CDC patterns in Apache Kafka®
CDC patterns in Apache Kafka®CDC patterns in Apache Kafka®
CDC patterns in Apache Kafka®
 
A Journey from Oracle to PostgreSQL
A Journey from Oracle to PostgreSQLA Journey from Oracle to PostgreSQL
A Journey from Oracle to PostgreSQL
 
Lessons PostgreSQL learned from commercial databases, and didn’t
Lessons PostgreSQL learned from commercial databases, and didn’tLessons PostgreSQL learned from commercial databases, and didn’t
Lessons PostgreSQL learned from commercial databases, and didn’t
 
The Real Scoop on Migrating from Oracle Databases
The Real Scoop on Migrating from Oracle DatabasesThe Real Scoop on Migrating from Oracle Databases
The Real Scoop on Migrating from Oracle Databases
 
Agile Oracle to PostgreSQL migrations (PGConf.EU 2013)
Agile Oracle to PostgreSQL migrations (PGConf.EU 2013)Agile Oracle to PostgreSQL migrations (PGConf.EU 2013)
Agile Oracle to PostgreSQL migrations (PGConf.EU 2013)
 
Ten query tuning techniques every SQL Server programmer should know
Ten query tuning techniques every SQL Server programmer should knowTen query tuning techniques every SQL Server programmer should know
Ten query tuning techniques every SQL Server programmer should know
 

More from EDB

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
EDB
 
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
EDB
 
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
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
 
Benchmarking Cloud Native PostgreSQL
Benchmarking Cloud Native PostgreSQLBenchmarking Cloud Native PostgreSQL
Benchmarking Cloud Native PostgreSQL
EDB
 
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
EDB
 
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
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
 
Data Analysis with TensorFlow in PostgreSQL
Data Analysis with TensorFlow in PostgreSQLData Analysis with TensorFlow in PostgreSQL
Data Analysis with TensorFlow in PostgreSQL
EDB
 
Practical Partitioning in Production with Postgres
Practical Partitioning in Production with PostgresPractical Partitioning in Production with Postgres
Practical Partitioning in Production with Postgres
EDB
 
A Deeper Dive into EXPLAIN
A Deeper Dive into EXPLAINA Deeper Dive into EXPLAIN
A Deeper Dive into EXPLAIN
EDB
 
IOT with PostgreSQL
IOT with PostgreSQLIOT with PostgreSQL
IOT with PostgreSQL
EDB
 
Psql is awesome!
Psql is awesome!Psql is awesome!
Psql is awesome!
EDB
 
EDB 13 - New Enhancements for Security and Usability - APJ
EDB 13 - New Enhancements for Security and Usability - APJEDB 13 - New Enhancements for Security and Usability - APJ
EDB 13 - New Enhancements for Security and Usability - APJ
EDB
 
Comment sauvegarder correctement vos données
Comment sauvegarder correctement vos donnéesComment sauvegarder correctement vos données
Comment sauvegarder correctement vos données
EDB
 
Cloud Native PostgreSQL - Italiano
Cloud Native PostgreSQL - ItalianoCloud Native PostgreSQL - Italiano
Cloud Native PostgreSQL - Italiano
EDB
 
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
EDB
 
Best Practices in Security with PostgreSQL
Best Practices in Security with PostgreSQLBest Practices in Security with PostgreSQL
Best Practices in Security with PostgreSQL
EDB
 
Cloud Native PostgreSQL - APJ
Cloud Native PostgreSQL - APJCloud Native PostgreSQL - APJ
Cloud Native PostgreSQL - APJ
EDB
 
Best Practices in Security with PostgreSQL
Best Practices in Security with PostgreSQLBest Practices in Security with PostgreSQL
Best Practices in Security with PostgreSQL
EDB
 

More from 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
 
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
 
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!
 
EDB 13 - New Enhancements for Security and Usability - APJ
EDB 13 - New Enhancements for Security and Usability - APJEDB 13 - New Enhancements for Security and Usability - APJ
EDB 13 - New Enhancements for Security and Usability - APJ
 
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
 

Recently uploaded

A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
James Anderson
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
Pierluigi Pugliese
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
SOFTTECHHUB
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofszkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
Alex Pruden
 

Recently uploaded (20)

A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofszkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
 

Stumbling stones when migrating from Oracle

  • 1. STUMBLING STONES WHEN MIGRATING FROM ORACLE BY LAURENZ ALBE
  • 2. ABOUT ME AND MY COMPANY ■ Who is Laurenz Albe? ■ Who is CYBERTEC?
  • 3. LAURENZ ALBE SENIOR DATABASE CONSULTANT ■ contributions to PostgreSQL and related projects since 2006 ■ maintainer of the Oracle Foreign Data Wrapper ■ PostgreSQL support, training, consulting and development ■ working for CYBERTEC since 2017 M A I L laurenz.albe@cybertec.at P H O N E +43 2622 930 22-7 W E B www.cybertec-postgresql.com
  • 4. Specialized in data services About Inhouse development Owner-managed since 2000 International team of developers
  • 5. DATABASE SERVICES DATA Science ▪ Artificial Intelligence ▪ Machine Learning ▪ Big Data ▪ Business Intelligence ▪ Data Mining ▪ etc. POSTGRESQL Services ▪ 24/7 Support ▪ Training ▪ Consulting ▪ Performance Tuning ▪ Clustering ▪ etc.
  • 6.
  • 7. ▪ ICT ▪ University ▪ Government ▪ Automotive ▪ Industry ▪ Trade ▪ Finance ▪ etc. CLIENT SECTORS
  • 8. AGENDA ■ Overview ■ Understanding open source and PostgreSQL ■ Migrate the schema (DDL) ■ Data migration ■ Migrating stored code ■ Migrating SQL ■ Migrating the application ■ Migration tools
  • 10. MIGRATION STEPS ■ understand open source software and PostgreSQL ■ migrate the schema (DDL) ■ migrate the data ■ migrate stored code (PL/SQL, Java) ■ migrate SQL ■ migrate the application
  • 11. MIGRATION STEPS (ACTUAL SIZE) ■ understand open source software and PostgreSQL ■ migrate the schema (DDL) ■ migrate the data ■ migrate stored code (PL/SQL, Java) ■ migrate SQL ■ migrate the application
  • 13. THE SHIFT TO OPEN SOURCE ■ This is written by some enthusiasts in their spare time, right? ■ Is this “enterprise ready”? ■ Where can I get support? ■ Why do I have to install and integrate so many different pieces of software (PostgreSQL, PostGIS, backup software, extensions, GUI clients, monitoring,...)? ■ What if open source software is no longer maintained? ■ It’s for free, so I don’t have to invest anything, right?
  • 14. TRANSACTIONS, UNDO, MULTIVERSIONING ■ both Oracle and PostgreSQL use multiversioning, so concurrency and locking are similar (but not equal!) ■ big transactions are no problem in PostgreSQL (but long transactions are), so less need to “batch” large transactions ■ no UNDO tablespace in PostgreSQL, no “snapshot too old”, immediate rollback But: ■ UPDATE-heavy workloads are problematic in PostgreSQL (may need “HOT update” and autovacuum tuning) ■ table size will grow (all that visibility information) ■ I no statement-level rollback
  • 15. SCHEMAS, USERS AND SYNONYMS Oracle has a reduced metadata model: ■ a schema is always tied to a user with the same name ■ ownership is determined by the schema ■ only objects in your own schema can be referenced without schema Synonyms are there largely to overcome these limitations ■ can often be replaced by an appropriate search_path setting ■ for other uses, a view is usually just as good
  • 16. VIEWS AND DEPENDENCIES ■ Oracle tables be dropped/modified even if views depend on them ■ views become “invalid” and cause an error when used ■ PostgreSQL is stricter about data integrity ■ Schema upgrade procedures more difficult in PostgreSQL ■ but to make up for it, we have transactional DDL ■ Materialized View support much more sophisticated in Oracle ■ replace ON COMMIT REFRESHwith triggers in PostgreSQL
  • 17. TABLESPACES ■ tablespaces are important in Oracle ■ Oracle essentially implements its own file system ■ PostgreSQL uses the host file system ■ tablespaces are rarely necessary ■ Resist the urge to create tablespaces during migration!
  • 19. DATA TYPE TRANSLATION ■ PostgreSQL has way more data types, so the problem is often which one to choose ■ DATE to date or timestamp(0)? ■ NUMBER to integer, bigint, double precision or numeric? ■ Oracle allows foreign keys from NUMBER(5) to NUMBER ■ must take care to migrate them to the same data type ■ BLOB to bytea or Large Objects? ■ easy, use bytea
  • 21. GENERAL CONSIDERATIONS ■ Oracle makes it hard to export data in clear text ■ probably on purpose to make migration harder ■ this is often the least complicated step, but the one that causes the most down time ■ reducing down time is difficult ■ run migration of table data in parallel ■ use “change data capture” for replication and switch-over with little down time (only available with commercial tools)
  • 22. DATA MIGRATION PROBLEMS ■ corrupted strings in Oracle (more common than you think!) invalid byte sequence for encoding "UTF8": 0x80 ■ zero bytes in Oracle invalid byte sequence for encoding "UTF8": 0x00 ■ can be filtered out during migration ■ infinite numbers (~ and -~) ■ can be mapped to Infinity in double precision, problematic otherwise Most of these problems have to be solved in Oracle before migration.
  • 24. MIGRATING PL/SQL ■ PL/pgSQL is a clone of PL/SQL, but sufficiently different (e.g., RETURNS vs. RETURN) ■ some tools provide automated translation, but a lot of manual work may remain ■ no COMMIT/ROLLBACKin PostgreSQL functions, limited support in procedures ■ often in “batched deletes”, → can be omitted ■ no PRAGMA AUTONOMOUS_TRANSACTIONin PostgreSQL ■ can sometimes be worked around with dblink ■ no BULK COLLECTwith arrays ■ process row by row Shift transaction management to the application.
  • 25. MIGRATING PL/SQL PACKAGES ■ option to use closed source fork from EDB ■ workaround: creating a schema with functions ■ no “package global variables” and types ■ no large PL/SQL library in PostgreSQL ■ move code to the application ■ re-implement code in PL/Python or PL/PerlU ■ extension “orafce” provides some compatibility
  • 26. MIGRATING PL/SQL TRIGGERS ■ has to be split in two parts: trigger function and trigger ■ benefit: easier code reuse ■ auto-increment triggers fetching from a sequence can be simplified to column DEFAULT ■ no “logon triggers” in PostgreSQL ■ avoid or shift code to the application
  • 28. WHERE DOES SQL OCCUR? ■ application code ■ ORMs and other abstraction layers reduce this ■ views ■ PL/SQL code ■ column DEFAULT clauses ■ index definitions Usually requires manual intervention; migration tools may help.
  • 29. SQL: JOIN SYNTAX SELECT b.col1, a.col2 FROM base_table b, attributes a WHERE b.id=a.b_id(+); has to be translated to SELECT b.col1, a.col2 FROM base_table b LEFT JOIN attributes a ON b.id = a.b_id; Always simple, but annoying!
  • 30. SQL: EMPTY STRINGS ■ Oracle treats empty strings as NULL ■ as a consequence, 'hello' || NULL is not NULL in Oracle ■ translate into concat('hello', NULL) or use “coalesce(strcol, '')” This is a very frequent problem.
  • 31. SQL: CURRENT DATE/TIME ■ most Oracle code uses proprietary functions: ■ SYSDATE ■ SYSTIMESTAMP ■ has to be translated: ■ the literal translation would be clock_timestamp() ■ sometimes current_dateor current_timestampis better ■ easy with search and replace
  • 32. SQL: SEQUENCES ■ Oracle code to fetch the next sequence value: asequence.NEXTVAL ■ PostgreSQL code to fetch the next sequence value: nextval('asequence') ■ both don’t support the SQL standard way: NEXT VALUE FOR asequence
  • 34. MIGRATING THE APPLICATION ■ can be hard ■ hard coded dynamically composed SQL everywhere ■ can be almost trivial ■ use an ORM that supports both Oracle and PostgreSQL ■ requires thorough testing ■ some differences (transaction handling, concurrency) may cause problems only during testing
  • 36. POSTGRESQL FORKS ■ some PostgreSQL forks (for example EDB) provide good compatibility ■ but believe no claim of “drop-in replacement” ■ carefully consider if you want to end up with closed source ■ consider using “orafce” for more compatibility ■ open source, but still another dependency ■ it may be worth the effort to invest a little more and end up with free standard PostgreSQL
  • 37. ORA2PG ■ the most widely used open source migration tool ■ time-tested and proven, but not 100% bug free ■ generates a DDL script, exports and imports data ■ universally usable, but takes its time ■ attempts to translate PL/SQL ■ simple search/replace, quality limited
  • 38. ORA_MIGRATOR ■ open source, uses the Oracle Foreign Data Wrapper ■ directly migrates data into the target database ■ no export/import, therefore faster ■ requires oracle_fdw in the target database ■ usually not an option with hosted databases ■ no attempt to migrate PL/SQL ■ provides a simple replication solution using triggers to reduce down time
  • 40. CYBERTEC MIGRATOR ■ commercial ■ comfortable GUI driven migration ■ fast, highly parallelized data migration ■ high-quality PL/SQL conversion ■ close-to zero downtime with change data capture under development More information: https://www.cybertec-postgresql.com/en/products/cybertec-migrator/