SlideShare uma empresa Scribd logo
1 de 38
Baixar para ler offline
Workshop
Oracle to Postgres Migration
Part 1 - migrating the database
2016-05-30 @IDM
Chris Mair
http://www.pgtraining.com
2016-05-30OracletoPostgresMigration-part1
The Workshop
• part 1
• Oracle Database ™
• how an application interacts with an RDBMS
• the ora2pg tool
• part 2
• PostgreSQL features for DBAs and developers
2016-05-30OracletoPostgresMigration-part1
Important Note
• Postgres is an advanced Open Source RDBMS with
roots in the '80s at UC Berkeley. It has been developed
as a comunity project since 1996
• the project's goal is to develop the most advanced
Open Source enterprise-class RDBMS. Notably, its SQL
implementation strongly conforms to the ANSI-SQL:2008
standard
• Postgres has never been, is not, and never will be some
sort of drop-in replacement for Oracle Database ™ - if
you need such a thing, you need to look elsewhere
2016-05-30OracletoPostgresMigration-part1
Getting to know
Oracle Database ™
2016-05-30OracletoPostgresMigration-part1
Get your own Instance
• the two quickest ways I know to get your own
instance running are:
• Oracle Database Express Edition ™ (running on
your own Linux server → "Oracle XE"
• Oracle Database Standard Edition One ™ as a
service on AWS → "Oracle SE"
• other approaches need more investment in time (the
installation takes some care) or money (licensing)
2016-05-30OracletoPostgresMigration-part1
Oracle XE on own Server
• Oracle XE is gratis-ware (read the exact license
terms, though)
• product is limited to using 1 core, 1 GB RAM and
up to 11 GB user data - the machine can (and
should) be larger, however
• you need a (free) OTN account to download it
• I recommend running it on CentOS
• download version 11.2 (~ 300 MB .rpm) here
2016-05-30OracletoPostgresMigration-part1
Oracle SE One on AWS
• many RDBMS can be run as a managed service on Amazon
Web Services (AWS) - among others also Postgres and Oracle
Database ™
• Oracle SE One 11.2 or 12.1 can be run in a very interesting
"license included model": the license cost is included in the AWS
cost and charged by the hour used (depending on machine
size, the extra cost starts at ~ 2 cent / h more than for a free
RDBMS)
• this product is still limited by the SE One license in socket count,
so AWS can offer it only with at most 16 logical cores per
instance, but there is no other (low) limit in RAM or disk size
• see the AWS website for details
2016-05-30OracletoPostgresMigration-part1
Manuals
• Oracle offers two "easy" manuals here for Oracle XE that can
be a starting point:
• 2 Day DBA
• 2 Day Developer's Guide
• depending on you background be prepared to do some
reading...
• generally speaking, being a DBA in the Oracle world can be
challenging - fortunately you don't need the full DBA-foo if
you're just interested in supporting migrations and/or are
using XE or SE as a service
2016-05-30OracletoPostgresMigration-part1
Tools
• Oracles traditional command line tool is called
SQL*Plus, it comes bundled with Oracle XE or
can be downloaded with the so called "instant
client" package (more later)
• the "official" GUI tool is Oracle SQL Developer:
this is a JAVA application that can be
downloaded here (~ 300 MB)
• both are gratis-ware and are available for Linux
(and other OSes too)
2016-05-30OracletoPostgresMigration-part1
Getting to know
Postgres
2016-05-30OracletoPostgresMigration-part1
Get your own Instance 1/2
• Postgres is in the standard repo of all major Linux
distribution, so that's just one of the usual
commands away:
yum install postgresql postgresql-server
apt-get install postgresql-client postgresql
• however, the major Linux distributions often carry
pretty outdated versions (I'm looking at you, Centos
7, carrying version 9.2, that is three major versions
behind the current 9.5) or package the product in
unusual ways (I'm looking at you, Debian)
2016-05-30OracletoPostgresMigration-part1
Get your own Instance 2/2
• I recommend getting more recent releases from the official
download page
• the project maintains its own repositories for all major Linux
distributions, so you can still use yum, apt, etc. to install and
update everything - note that Postgres issues a major version
about once a year and supports it for 5 years
• it is pretty much possible to compile from source too (I even
prefer to do so, although I'm not recommending this to new
users)
• as mentioned, Postgres is also available as a service on AWS
2016-05-30OracletoPostgresMigration-part1
Manuals
• the official (huge) manual is available here for
reading online or downloading as PDF
• many good books are available - please pay
attention to the publication date, you probably
should pick something from 2012 or newer
(covering version 9.1 or newer)
• the second part of this workshop will deal with
Postgres, attending it is a very good way to
getting started :)
2016-05-30OracletoPostgresMigration-part1
Tools
• Postgres' traditional command line tool is called
psql - again, this can be installed from your Linux
distribution's repo or from the Postgres repo
• there is no "official" GUI tool, though!
• some people use pgAdmin (Open Source), some
people use propretiary multi-product tools, some
people just use psql
• I recommend sticking with psql
2016-05-30OracletoPostgresMigration-part1
Hands-on Setup
2016-05-30OracletoPostgresMigration-part1
Talking with a RDBMS 1/3
• when using a RDBMS you don't deal with files, but rather use a
client or client application that comunicates with the RDBMS
over a network socket
• each product has its own native networking protocol
• Oracle uses the proprietary "TNS" protocol with the default TCP
port 1521 and the OCI library as native call interface
• Postgres uses its own "frontend/backend" protocol with the
default TCP port 5432 and the libpq library as native call
interface
• these two sets of protocols / libraries have nothing whatsoever in
common
2016-05-30OracletoPostgresMigration-part1
Talking with a RDBMS 2/3
• the structured query language (SQL) is used to "instruct"
a RDBMS
• it is used to define the database schema (DDL
statements), to manipulate the data (DML statements)
and to query the data
• information about the database schema is stored as
data in the "catalog", so SQL can be used to query the
catalog too
• there is an ANSI SQL standard that covers many, but not
all aspects
2016-05-30OracletoPostgresMigration-part1
Talking with a RDBMS 3/3
• fortunately most applications written for Oracle
Database ™ don't use TNS/OCI natively but send
SQL statements over a higher level API such as
ODBC (Win/C++), JDBC (Java), the .NET data
provider API (C#), etc.
• drivers for these APIs are (of course) available for
Postgres too
• hence, ideally, migrating an application that talks
SQL over - say - JDBC is not too hard ... ideally...
2016-05-30OracletoPostgresMigration-part1
Example App
• a super simple web app written in Java: it
displays the countries from the "hr"-sample
database
2016-05-30OracletoPostgresMigration-part1
Example App - Code
JDBCdriverandconnectioninfo
SQL
JDBC-APIcalls
2016-05-30OracletoPostgresMigration-part1
Can this run on Postgres?
• yes! we need to:
• create the schema (table countries) in
Postgres
• copy over the data
• change the JDBC driver and connection info
• let's do that (manually exporting the table, using
SQL Developer)...
2016-05-30OracletoPostgresMigration-part1
With some work...
• the app was easy:
• the data too, but the
schema was not (data
types are not really
portable: varchar2 vs
varchar, case
sensitivity of quoted
identifiers, ...)
2016-05-30OracletoPostgresMigration-part1
We need a Tool!
• ora2pg by Gilles Darold comes to the rescue
• ora2og connects to Oracle and dumps schema and
data in a Postgres-compatible format; it is highly
configurable and can even connect to Postgres and
migrate everything on the fly
• ora2pg reads Oracle's catalog and knows how to create
the equivalent Postgres objects (tables, views,
sequences, indexes), with unique, primary, foreign key
and check constraints without syntactic pitfalls
• let's install ora2pg on our third machine ("migration")
2016-05-30OracletoPostgresMigration-part1
Installing ora2pg 1/4
• we need to install the Oracle instant client rpms
from here - get these three files:
oracle-instantclient12.1-basic-12.1.0.2.0-1.x86_64.rpm
oracle-instantclient12.1-devel-12.1.0.2.0-1.x86_64.rpm
oracle-instantclient12.1-sqlplus-12.1.0.2.0-1.x86_64.rpm
• and set the environment:
export LD_LIBRARY_PATH=/usr/lib/oracle/12.1/client64/lib:$LD_LIBRARY_PATH
export PATH=/usr/lib/oracle/12.1/client64/bin:$PATH
export ORACLE_HOME=/usr/lib/oracle/12.1/client64
• let's try connecting to the Oracle server:
sqlplus hr/hr@oracle-xe.pgtraining.com ✓
2016-05-30OracletoPostgresMigration-part1
Installing ora2pg 2/4
• analogously, we want to install the Postgres
client:
yum install postgresql
• and test it by connecting to the Postgres server:
psql -h postgres.pgtraining.com -U hr hr
(note all these machines are firewalled, you do not
want to leave ports 1521 and 5432 open to the world,
especially not with such silly passwords)
✓
2016-05-30OracletoPostgresMigration-part1
Installing ora2pg 3/4
• then we need to install a few Perl modules,
among which is DBD::Oracle - as it's not
distributed by Red Hat, we need to download it
from CPAN and build it:
yum install perl-DBI perl-DBD-Pg perl-ExtUtils-MakeMaker gcc
wget http://search.cpan.org/CPAN/authors/id/P/PY/PYTHIAN/DBD-
Oracle-1.74.tar.gz
tar xf DBD-Oracle-1.74.tar.gz
cd DBD-Oracle-1.74
perl Makefile.PL -l # watch out for missing Perl modules
make
make install
2016-05-30OracletoPostgresMigration-part1
Installing ora2pg 4/4
• finally we can install ora2pg:
wget https://github.com/darold/ora2pg/archive/v17.4.tar.gz
tar xf v17.4.tar.gz
cd ora2pg-17.4
perl Makefile.PL # watch out for missing Perl modules
make
make install
• and verify that it is installed:
/usr/local/bin/ora2pg -v ✓
2016-05-30OracletoPostgresMigration-part1
Configuration
• a template configuration file is installed in
/etc/ora2pg/ora2pg.conf.dist
• there are way to many parameters to list here,
see the ora2pg documentation...
ORACLE_HOME /usr/lib/oracle/12.1/client64
ORACLE_DSN dbi:Oracle:host=oracle-xe.pgtraining.com;sid=xe
ORACLE_USER hr
ORACLE_PWD hr
USER_GRANTS 1
SCHEMA hr
TYPE TABLE,VIEW,PROCEDURE,TRIGGER
DROP_FKEY 1
2016-05-30OracletoPostgresMigration-part1
Run 1
• ora2pg-schema-to-file.conf → dump schema to output.sql
/usr/local/bin/ora2pg -c ora2pg-schema-to-file.conf
[========================>] 7/7 tables (100.0%) end of scanning.
[========================>] 7/7 tables (100.0%) end of table export.
[========================>] 1/1 views (100.0%) end of output.
[========================>] 2/2 procedures (100.0%) end of output.
[========================>] 1/1 triggers (100.0%) end of output.
psql -h postgres.pgtraining.com -U hr hr
Password for user hr:
psql (9.2.15, server 9.5.3)
WARNING: psql version 9.2, server version 9.5.
Some psql features might not work.
SSL connection (cipher: ECDHE-RSA-AES256-GCM-SHA384, bits: 256)
Type "help" for help.
hr=> i output.sql
2016-05-30OracletoPostgresMigration-part1
Run 2
• ora2pg-all-to-file.conf → dump schema and data to output.sql
/usr/local/bin/ora2pg -c ora2pg-all-to-file.conf
[========================>] 7/7 tables (100.0%) end of scanning.
[========================>] 7/7 tables (100.0%) end of table export.
[========================>] 1/1 views (100.0%) end of output.
[========================>] 2/2 procedures (100.0%) end of output.
[========================>] 1/1 triggers (100.0%) end of output.
[========================>] 25/25 rows (100.0%) Table COUNTRIES (25 recs/sec)
[========================>] 27/27 rows (100.0%) Table DEPARTMENTS (27 recs/sec)
[========================>] 107/107 rows (100.0%) Table EMPLOYEES (107 recs/sec)
[========================>] 19/19 rows (100.0%) Table JOBS (19 recs/sec)
[========================>] 10/10 rows (100.0%) Table JOB_HISTORY (10 recs/sec)
[========================>] 23/23 rows (100.0%) Table LOCATIONS (23 recs/sec)
[========================>] 4/4 rows (100.0%) Table REGIONS (4 recs/sec)
[========================>] 215/215 rows (100.0%) on total
estimated data (1 sec., avg: 215 recs/sec)
psql -h postgres.pgtraining.com -U hr hr
Password for user hr:
psql (9.2.15, server 9.5.3)
[...]
hr=> i output.sql
2016-05-30OracletoPostgresMigration-part1
Post-Migration Testing...
hr=> select * from job_history;
employee_id | start_date | end_date | job_id | department_id
-------------+---------------------+---------------------+------------+---------------
102 | 2001-01-13 00:00:00 | 2006-07-24 00:00:00 | IT_PROG | 60
[...]
200 | 2002-07-01 00:00:00 | 2006-12-31 00:00:00 | AC_ACCOUNT | 90
(10 rows)
hr=> update employees set job_id = 'ST_MAN' where employee_id = 100;
UPDATE 1
hr=> select * from job_history;
employee_id | start_date | end_date | job_id | department_id
-------------+---------------------+--------------------------+------------+---------------
102 | 2001-01-13 00:00:00 | 2006-07-24 00:00:00 | IT_PROG | 60
[...]
200 | 2002-07-01 00:00:00 | 2006-12-31 00:00:00 | AC_ACCOUNT | 90
100 | 2003-06-17 00:00:00 | 2016-05-30 03:38:32.7629 | AD_PRES | 90
(11 rows)
2016-05-30OracletoPostgresMigration-part1
PL/SQL vs PL/PgSQL
• ora2pg can automatically translate only very simple
procedures or functions (as the trigger examples in the hr
demo schema)
• more complicated procedures need to be translated
manually
• fortunately, PL/PgSQL is easy and rich in features: in my
experience typical procedures can be rewritten without too
much hassle most of the times
• some people suggest getting rid of procedures alltogether
when migrating (move them to the middle tier) - I tend to find it
easier to just translate them!
2016-05-30OracletoPostgresMigration-part1
Scenario 1: Bad
• application is linked against OCI / uses TNS
natively (like the SQL*Plus executable)
• if the source code is not available, a migration is
not possible
• if the source code is available and can be
changed, at the very least the database access
layer needs to be rewritten from scratch (using
libpq)
2016-05-30OracletoPostgresMigration-part1
Scenario 2: Bad
• application uses some proprietary software or
component such as Oracle Forms ™
• an easy migration is generally not possible
2016-05-30OracletoPostgresMigration-part1
Scenario 3: so-so
• application uses ODBC, JDBC, etc. - however, it uses
lots of queries with Oracle custom-syntax (such as (+)
instead of outer joins, mixes quoted and unquoted
identifiers, uses lots of Oracle specific functions etc.)
and has long and complex PL/SQL procedures
• if the source code is not available, a migration is not
possible
• if the source code is available, and can be changed,
queries and procedures need to be translated
manually
2016-05-30OracletoPostgresMigration-part1
Scenario 4: good
• application uses ODBC, JDBC, etc. - also, it
either uses no or very few Oracle custom-syntax
and PL/SQL procedures or the vendor has made
a version for Postgres backends available
• application that use abstractions layers such as
ORM-wrappers usually fall into this category
• a migration is normally not too hard (unless the
software is completely locked-down and does not
even allow to select the ODBC, JDBC, etc. driver)
2016-05-30OracletoPostgresMigration-part1
What is you scenario?
2016-05-30OracletoPostgresMigration-part1
'k thx bye ;)

Mais conteúdo relacionado

Mais procurados

Improve PostgreSQL replication with Oracle GoldenGate
Improve PostgreSQL replication with Oracle GoldenGateImprove PostgreSQL replication with Oracle GoldenGate
Improve PostgreSQL replication with Oracle GoldenGateBobby Curtis
 
Stumbling stones when migrating from Oracle
 Stumbling stones when migrating from Oracle Stumbling stones when migrating from Oracle
Stumbling stones when migrating from OracleEDB
 
Migrate from Oracle to Aurora PostgreSQL: Best Practices, Design Patterns, & ...
Migrate from Oracle to Aurora PostgreSQL: Best Practices, Design Patterns, & ...Migrate from Oracle to Aurora PostgreSQL: Best Practices, Design Patterns, & ...
Migrate from Oracle to Aurora PostgreSQL: Best Practices, Design Patterns, & ...Amazon Web Services
 
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 PostgreSQLJim Mlodgenski
 
Always on in sql server 2017
Always on in sql server 2017Always on in sql server 2017
Always on in sql server 2017Gianluca Hotz
 
Getting started with postgresql
Getting started with postgresqlGetting started with postgresql
Getting started with postgresqlbotsplash.com
 
New availability features in oracle rac 12c release 2 anair ss
New availability features in oracle rac 12c release 2 anair   ssNew availability features in oracle rac 12c release 2 anair   ss
New availability features in oracle rac 12c release 2 anair ssAnil Nair
 
Reducing Database Pain & Costs with Postgres
Reducing Database Pain & Costs with PostgresReducing Database Pain & Costs with Postgres
Reducing Database Pain & Costs with PostgresEDB
 
Migrating from Oracle to Postgres
Migrating from Oracle to PostgresMigrating from Oracle to Postgres
Migrating from Oracle to PostgresEDB
 
Accelerate Oracle to Aurora PostgreSQL Migration (GPSTEC313) - AWS re:Invent ...
Accelerate Oracle to Aurora PostgreSQL Migration (GPSTEC313) - AWS re:Invent ...Accelerate Oracle to Aurora PostgreSQL Migration (GPSTEC313) - AWS re:Invent ...
Accelerate Oracle to Aurora PostgreSQL Migration (GPSTEC313) - AWS re:Invent ...Amazon Web Services
 
Migration to Oracle Multitenant
Migration to Oracle MultitenantMigration to Oracle Multitenant
Migration to Oracle MultitenantJitendra Singh
 
HA, Scalability, DR & MAA in Oracle Database 21c - Overview
HA, Scalability, DR & MAA in Oracle Database 21c - OverviewHA, Scalability, DR & MAA in Oracle Database 21c - Overview
HA, Scalability, DR & MAA in Oracle Database 21c - OverviewMarkus Michalewicz
 
Comparison of ACFS and DBFS
Comparison of ACFS and DBFSComparison of ACFS and DBFS
Comparison of ACFS and DBFSDanielHillinger
 
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'sGerger
 
The Top 5 Reasons to Deploy Your Applications on Oracle RAC
The Top 5 Reasons to Deploy Your Applications on Oracle RACThe Top 5 Reasons to Deploy Your Applications on Oracle RAC
The Top 5 Reasons to Deploy Your Applications on Oracle RACMarkus Michalewicz
 
Big Data Analytics Architectural Patterns and Best Practices (ANT201-R1) - AW...
Big Data Analytics Architectural Patterns and Best Practices (ANT201-R1) - AW...Big Data Analytics Architectural Patterns and Best Practices (ANT201-R1) - AW...
Big Data Analytics Architectural Patterns and Best Practices (ANT201-R1) - AW...Amazon Web Services
 
Oracle RAC 19c: Best Practices and Secret Internals
Oracle RAC 19c: Best Practices and Secret InternalsOracle RAC 19c: Best Practices and Secret Internals
Oracle RAC 19c: Best Practices and Secret InternalsAnil Nair
 
Presto: Fast SQL-on-Anything (including Delta Lake, Snowflake, Elasticsearch ...
Presto: Fast SQL-on-Anything (including Delta Lake, Snowflake, Elasticsearch ...Presto: Fast SQL-on-Anything (including Delta Lake, Snowflake, Elasticsearch ...
Presto: Fast SQL-on-Anything (including Delta Lake, Snowflake, Elasticsearch ...Databricks
 
[2018] MySQL 이중화 진화기
[2018] MySQL 이중화 진화기[2018] MySQL 이중화 진화기
[2018] MySQL 이중화 진화기NHN FORWARD
 

Mais procurados (20)

Improve PostgreSQL replication with Oracle GoldenGate
Improve PostgreSQL replication with Oracle GoldenGateImprove PostgreSQL replication with Oracle GoldenGate
Improve PostgreSQL replication with Oracle GoldenGate
 
Stumbling stones when migrating from Oracle
 Stumbling stones when migrating from Oracle Stumbling stones when migrating from Oracle
Stumbling stones when migrating from Oracle
 
Migrate from Oracle to Aurora PostgreSQL: Best Practices, Design Patterns, & ...
Migrate from Oracle to Aurora PostgreSQL: Best Practices, Design Patterns, & ...Migrate from Oracle to Aurora PostgreSQL: Best Practices, Design Patterns, & ...
Migrate from Oracle to Aurora PostgreSQL: Best Practices, Design Patterns, & ...
 
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
 
Always on in sql server 2017
Always on in sql server 2017Always on in sql server 2017
Always on in sql server 2017
 
Getting started with postgresql
Getting started with postgresqlGetting started with postgresql
Getting started with postgresql
 
New availability features in oracle rac 12c release 2 anair ss
New availability features in oracle rac 12c release 2 anair   ssNew availability features in oracle rac 12c release 2 anair   ss
New availability features in oracle rac 12c release 2 anair ss
 
Reducing Database Pain & Costs with Postgres
Reducing Database Pain & Costs with PostgresReducing Database Pain & Costs with Postgres
Reducing Database Pain & Costs with Postgres
 
Migrating from Oracle to Postgres
Migrating from Oracle to PostgresMigrating from Oracle to Postgres
Migrating from Oracle to Postgres
 
Accelerate Oracle to Aurora PostgreSQL Migration (GPSTEC313) - AWS re:Invent ...
Accelerate Oracle to Aurora PostgreSQL Migration (GPSTEC313) - AWS re:Invent ...Accelerate Oracle to Aurora PostgreSQL Migration (GPSTEC313) - AWS re:Invent ...
Accelerate Oracle to Aurora PostgreSQL Migration (GPSTEC313) - AWS re:Invent ...
 
Migration to Oracle Multitenant
Migration to Oracle MultitenantMigration to Oracle Multitenant
Migration to Oracle Multitenant
 
HA, Scalability, DR & MAA in Oracle Database 21c - Overview
HA, Scalability, DR & MAA in Oracle Database 21c - OverviewHA, Scalability, DR & MAA in Oracle Database 21c - Overview
HA, Scalability, DR & MAA in Oracle Database 21c - Overview
 
Comparison of ACFS and DBFS
Comparison of ACFS and DBFSComparison of ACFS and DBFS
Comparison of ACFS and DBFS
 
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
 
The Top 5 Reasons to Deploy Your Applications on Oracle RAC
The Top 5 Reasons to Deploy Your Applications on Oracle RACThe Top 5 Reasons to Deploy Your Applications on Oracle RAC
The Top 5 Reasons to Deploy Your Applications on Oracle RAC
 
Big Data Analytics Architectural Patterns and Best Practices (ANT201-R1) - AW...
Big Data Analytics Architectural Patterns and Best Practices (ANT201-R1) - AW...Big Data Analytics Architectural Patterns and Best Practices (ANT201-R1) - AW...
Big Data Analytics Architectural Patterns and Best Practices (ANT201-R1) - AW...
 
Oracle GoldenGate
Oracle GoldenGate Oracle GoldenGate
Oracle GoldenGate
 
Oracle RAC 19c: Best Practices and Secret Internals
Oracle RAC 19c: Best Practices and Secret InternalsOracle RAC 19c: Best Practices and Secret Internals
Oracle RAC 19c: Best Practices and Secret Internals
 
Presto: Fast SQL-on-Anything (including Delta Lake, Snowflake, Elasticsearch ...
Presto: Fast SQL-on-Anything (including Delta Lake, Snowflake, Elasticsearch ...Presto: Fast SQL-on-Anything (including Delta Lake, Snowflake, Elasticsearch ...
Presto: Fast SQL-on-Anything (including Delta Lake, Snowflake, Elasticsearch ...
 
[2018] MySQL 이중화 진화기
[2018] MySQL 이중화 진화기[2018] MySQL 이중화 진화기
[2018] MySQL 이중화 진화기
 

Destaque

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
 
Key Methodologies for Migrating from Oracle to Postgres
Key Methodologies for Migrating from Oracle to PostgresKey Methodologies for Migrating from Oracle to Postgres
Key Methodologies for Migrating from Oracle to PostgresEDB
 
Product Update: EDB Postgres Platform 2017
Product Update: EDB Postgres Platform 2017Product Update: EDB Postgres Platform 2017
Product Update: EDB Postgres Platform 2017EDB
 
Love Your Database (ESC 2k16)
Love Your Database (ESC 2k16)Love Your Database (ESC 2k16)
Love Your Database (ESC 2k16)PgTraining
 
PGADMIN, Aplicaciones
PGADMIN, AplicacionesPGADMIN, Aplicaciones
PGADMIN, AplicacionesIsabelAlisson
 
Shaping Optimizer's Search Space
Shaping Optimizer's Search SpaceShaping Optimizer's Search Space
Shaping Optimizer's Search SpaceGerger
 
Overview of cloud computing
Overview of cloud computingOverview of cloud computing
Overview of cloud computingTarek Nader
 
Reducing the Risks of Migrating Off Oracle
Reducing the Risks of Migrating Off OracleReducing the Risks of Migrating Off Oracle
Reducing the Risks of Migrating Off OracleEDB
 
Ashnik EnterpriseDB PostgreSQL - A real alternative to Oracle
Ashnik EnterpriseDB PostgreSQL - A real alternative to Oracle Ashnik EnterpriseDB PostgreSQL - A real alternative to Oracle
Ashnik EnterpriseDB PostgreSQL - A real alternative to Oracle Ashnikbiz
 
10 Reasons to Start Your Analytics Project with PostgreSQL
10 Reasons to Start Your Analytics Project with PostgreSQL10 Reasons to Start Your Analytics Project with PostgreSQL
10 Reasons to Start Your Analytics Project with PostgreSQLSatoshi Nagayasu
 
DBaaS with EDB Postgres on AWS
DBaaS with EDB Postgres on AWSDBaaS with EDB Postgres on AWS
DBaaS with EDB Postgres on AWSEDB
 
Optimizing Your Postgres ROI Through Best Practices
Optimizing Your Postgres ROI Through Best PracticesOptimizing Your Postgres ROI Through Best Practices
Optimizing Your Postgres ROI Through Best PracticesEDB
 
EDB Postgres DBA Best Practices
EDB Postgres DBA Best PracticesEDB Postgres DBA Best Practices
EDB Postgres DBA Best PracticesEDB
 
5 Postgres DBA Tips
5 Postgres DBA Tips5 Postgres DBA Tips
5 Postgres DBA TipsEDB
 
Why we love pgpool-II and why we hate it!
Why we love pgpool-II and why we hate it!Why we love pgpool-II and why we hate it!
Why we love pgpool-II and why we hate it!PGConf APAC
 
In-Database Analyticsの必要性と可能性
In-Database Analyticsの必要性と可能性In-Database Analyticsの必要性と可能性
In-Database Analyticsの必要性と可能性Satoshi Nagayasu
 

Destaque (18)

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)
 
Key Methodologies for Migrating from Oracle to Postgres
Key Methodologies for Migrating from Oracle to PostgresKey Methodologies for Migrating from Oracle to Postgres
Key Methodologies for Migrating from Oracle to Postgres
 
Product Update: EDB Postgres Platform 2017
Product Update: EDB Postgres Platform 2017Product Update: EDB Postgres Platform 2017
Product Update: EDB Postgres Platform 2017
 
Love Your Database (ESC 2k16)
Love Your Database (ESC 2k16)Love Your Database (ESC 2k16)
Love Your Database (ESC 2k16)
 
PGADMIN, Aplicaciones
PGADMIN, AplicacionesPGADMIN, Aplicaciones
PGADMIN, Aplicaciones
 
Shaping Optimizer's Search Space
Shaping Optimizer's Search SpaceShaping Optimizer's Search Space
Shaping Optimizer's Search Space
 
Overview of cloud computing
Overview of cloud computingOverview of cloud computing
Overview of cloud computing
 
Reducing the Risks of Migrating Off Oracle
Reducing the Risks of Migrating Off OracleReducing the Risks of Migrating Off Oracle
Reducing the Risks of Migrating Off Oracle
 
Ashnik EnterpriseDB PostgreSQL - A real alternative to Oracle
Ashnik EnterpriseDB PostgreSQL - A real alternative to Oracle Ashnik EnterpriseDB PostgreSQL - A real alternative to Oracle
Ashnik EnterpriseDB PostgreSQL - A real alternative to Oracle
 
Why use PostgreSQL?
Why use PostgreSQL?Why use PostgreSQL?
Why use PostgreSQL?
 
10 Reasons to Start Your Analytics Project with PostgreSQL
10 Reasons to Start Your Analytics Project with PostgreSQL10 Reasons to Start Your Analytics Project with PostgreSQL
10 Reasons to Start Your Analytics Project with PostgreSQL
 
DBaaS with EDB Postgres on AWS
DBaaS with EDB Postgres on AWSDBaaS with EDB Postgres on AWS
DBaaS with EDB Postgres on AWS
 
Optimizing Your Postgres ROI Through Best Practices
Optimizing Your Postgres ROI Through Best PracticesOptimizing Your Postgres ROI Through Best Practices
Optimizing Your Postgres ROI Through Best Practices
 
EDB Postgres DBA Best Practices
EDB Postgres DBA Best PracticesEDB Postgres DBA Best Practices
EDB Postgres DBA Best Practices
 
5 Postgres DBA Tips
5 Postgres DBA Tips5 Postgres DBA Tips
5 Postgres DBA Tips
 
Google In China - Case Study
Google In China - Case StudyGoogle In China - Case Study
Google In China - Case Study
 
Why we love pgpool-II and why we hate it!
Why we love pgpool-II and why we hate it!Why we love pgpool-II and why we hate it!
Why we love pgpool-II and why we hate it!
 
In-Database Analyticsの必要性と可能性
In-Database Analyticsの必要性と可能性In-Database Analyticsの必要性と可能性
In-Database Analyticsの必要性と可能性
 

Semelhante a Oracle to Postgres Migration - part 1

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
 
pandas.(to/from)_sql is simple but not fast
pandas.(to/from)_sql is simple but not fastpandas.(to/from)_sql is simple but not fast
pandas.(to/from)_sql is simple but not fastUwe Korn
 
spark example spark example spark examplespark examplespark examplespark example
spark example spark example spark examplespark examplespark examplespark examplespark example spark example spark examplespark examplespark examplespark example
spark example spark example spark examplespark examplespark examplespark exampleShidrokhGoudarzi1
 
MOUG17: SQLT Utility for Tuning - Practical Examples
MOUG17: SQLT Utility for Tuning - Practical ExamplesMOUG17: SQLT Utility for Tuning - Practical Examples
MOUG17: SQLT Utility for Tuning - Practical ExamplesMonica Li
 
MOUG17: DB Security; Secure your Data
MOUG17: DB Security; Secure your DataMOUG17: DB Security; Secure your Data
MOUG17: DB Security; Secure your DataMonica Li
 
PostgreSQL Enterprise Class Features and Capabilities
PostgreSQL Enterprise Class Features and CapabilitiesPostgreSQL Enterprise Class Features and Capabilities
PostgreSQL Enterprise Class Features and CapabilitiesPGConf APAC
 
Doing More with Postgres - Yesterday's Vision Becomes Today's Reality
Doing More with Postgres - Yesterday's Vision Becomes Today's RealityDoing More with Postgres - Yesterday's Vision Becomes Today's Reality
Doing More with Postgres - Yesterday's Vision Becomes Today's RealityEDB
 
PostgreSQL: present and near future
PostgreSQL: present and near futurePostgreSQL: present and near future
PostgreSQL: present and near futureNaN-tic
 
Hadoop Meetup Jan 2019 - Overview of Ozone
Hadoop Meetup Jan 2019 - Overview of OzoneHadoop Meetup Jan 2019 - Overview of Ozone
Hadoop Meetup Jan 2019 - Overview of OzoneErik Krogen
 
Ruby on Rails (RoR) as a back-end processor for Apex
Ruby on Rails (RoR) as a back-end processor for Apex Ruby on Rails (RoR) as a back-end processor for Apex
Ruby on Rails (RoR) as a back-end processor for Apex Espen Brækken
 
Introduction to Apache Spark :: Lagos Scala Meetup session 2
Introduction to Apache Spark :: Lagos Scala Meetup session 2 Introduction to Apache Spark :: Lagos Scala Meetup session 2
Introduction to Apache Spark :: Lagos Scala Meetup session 2 Olalekan Fuad Elesin
 
Pune-Cocoa: Blocks and GCD
Pune-Cocoa: Blocks and GCDPune-Cocoa: Blocks and GCD
Pune-Cocoa: Blocks and GCDPrashant Rane
 
Machine Learning With H2O vs SparkML
Machine Learning With H2O vs SparkMLMachine Learning With H2O vs SparkML
Machine Learning With H2O vs SparkMLArnab Biswas
 
Apache Spark Tutorial
Apache Spark TutorialApache Spark Tutorial
Apache Spark TutorialAhmet Bulut
 
Apache Spark e AWS Glue
Apache Spark e AWS GlueApache Spark e AWS Glue
Apache Spark e AWS GlueLaercio Serra
 
Sanger, upcoming Openstack for Bio-informaticians
Sanger, upcoming Openstack for Bio-informaticiansSanger, upcoming Openstack for Bio-informaticians
Sanger, upcoming Openstack for Bio-informaticiansPeter Clapham
 
LCA14: LCA14-209: ODP Project Update
LCA14: LCA14-209: ODP Project UpdateLCA14: LCA14-209: ODP Project Update
LCA14: LCA14-209: ODP Project UpdateLinaro
 

Semelhante a Oracle to Postgres Migration - part 1 (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
 
pandas.(to/from)_sql is simple but not fast
pandas.(to/from)_sql is simple but not fastpandas.(to/from)_sql is simple but not fast
pandas.(to/from)_sql is simple but not fast
 
spark example spark example spark examplespark examplespark examplespark example
spark example spark example spark examplespark examplespark examplespark examplespark example spark example spark examplespark examplespark examplespark example
spark example spark example spark examplespark examplespark examplespark example
 
MOUG17: SQLT Utility for Tuning - Practical Examples
MOUG17: SQLT Utility for Tuning - Practical ExamplesMOUG17: SQLT Utility for Tuning - Practical Examples
MOUG17: SQLT Utility for Tuning - Practical Examples
 
MOUG17: DB Security; Secure your Data
MOUG17: DB Security; Secure your DataMOUG17: DB Security; Secure your Data
MOUG17: DB Security; Secure your Data
 
PostgreSQL Enterprise Class Features and Capabilities
PostgreSQL Enterprise Class Features and CapabilitiesPostgreSQL Enterprise Class Features and Capabilities
PostgreSQL Enterprise Class Features and Capabilities
 
Doing More with Postgres - Yesterday's Vision Becomes Today's Reality
Doing More with Postgres - Yesterday's Vision Becomes Today's RealityDoing More with Postgres - Yesterday's Vision Becomes Today's Reality
Doing More with Postgres - Yesterday's Vision Becomes Today's Reality
 
PostgreSQL: present and near future
PostgreSQL: present and near futurePostgreSQL: present and near future
PostgreSQL: present and near future
 
Hadoop Meetup Jan 2019 - Overview of Ozone
Hadoop Meetup Jan 2019 - Overview of OzoneHadoop Meetup Jan 2019 - Overview of Ozone
Hadoop Meetup Jan 2019 - Overview of Ozone
 
Ruby on Rails (RoR) as a back-end processor for Apex
Ruby on Rails (RoR) as a back-end processor for Apex Ruby on Rails (RoR) as a back-end processor for Apex
Ruby on Rails (RoR) as a back-end processor for Apex
 
Introduction to Apache Spark :: Lagos Scala Meetup session 2
Introduction to Apache Spark :: Lagos Scala Meetup session 2 Introduction to Apache Spark :: Lagos Scala Meetup session 2
Introduction to Apache Spark :: Lagos Scala Meetup session 2
 
Pune-Cocoa: Blocks and GCD
Pune-Cocoa: Blocks and GCDPune-Cocoa: Blocks and GCD
Pune-Cocoa: Blocks and GCD
 
Oracle OpenWo2014 review part 03 three_paa_s_database
Oracle OpenWo2014 review part 03 three_paa_s_databaseOracle OpenWo2014 review part 03 three_paa_s_database
Oracle OpenWo2014 review part 03 three_paa_s_database
 
Machine Learning With H2O vs SparkML
Machine Learning With H2O vs SparkMLMachine Learning With H2O vs SparkML
Machine Learning With H2O vs SparkML
 
Apache Spark Tutorial
Apache Spark TutorialApache Spark Tutorial
Apache Spark Tutorial
 
Apache Spark e AWS Glue
Apache Spark e AWS GlueApache Spark e AWS Glue
Apache Spark e AWS Glue
 
Sanger, upcoming Openstack for Bio-informaticians
Sanger, upcoming Openstack for Bio-informaticiansSanger, upcoming Openstack for Bio-informaticians
Sanger, upcoming Openstack for Bio-informaticians
 
Flexible compute
Flexible computeFlexible compute
Flexible compute
 
LCA14: LCA14-209: ODP Project Update
LCA14: LCA14-209: ODP Project UpdateLCA14: LCA14-209: ODP Project Update
LCA14: LCA14-209: ODP Project Update
 
Stackato v5
Stackato v5Stackato v5
Stackato v5
 

Mais de PgTraining

Webminar del 12.03.2012
Webminar del 12.03.2012Webminar del 12.03.2012
Webminar del 12.03.2012PgTraining
 
Webminar del 12.03.2012
Webminar del 12.03.2012Webminar del 12.03.2012
Webminar del 12.03.2012PgTraining
 
Weminar 12.03.2021 . JIT
Weminar 12.03.2021 . JITWeminar 12.03.2021 . JIT
Weminar 12.03.2021 . JITPgTraining
 
Openday - PostgreSQL: primi passi con Json/Jsonb
Openday - PostgreSQL: primi passi con Json/Jsonb Openday - PostgreSQL: primi passi con Json/Jsonb
Openday - PostgreSQL: primi passi con Json/Jsonb PgTraining
 
Pgtraining bdr
Pgtraining bdrPgtraining bdr
Pgtraining bdrPgTraining
 

Mais de PgTraining (7)

Webminar del 12.03.2012
Webminar del 12.03.2012Webminar del 12.03.2012
Webminar del 12.03.2012
 
Webminar del 12.03.2012
Webminar del 12.03.2012Webminar del 12.03.2012
Webminar del 12.03.2012
 
Weminar 12.03.2021 . JIT
Weminar 12.03.2021 . JITWeminar 12.03.2021 . JIT
Weminar 12.03.2021 . JIT
 
Openday - PostgreSQL: primi passi con Json/Jsonb
Openday - PostgreSQL: primi passi con Json/Jsonb Openday - PostgreSQL: primi passi con Json/Jsonb
Openday - PostgreSQL: primi passi con Json/Jsonb
 
Pgtraining bdr
Pgtraining bdrPgtraining bdr
Pgtraining bdr
 
Messa in rete
Messa in reteMessa in rete
Messa in rete
 
Apcamp
ApcampApcamp
Apcamp
 

Último

Introduction-to-Machine-Learning (1).pptx
Introduction-to-Machine-Learning (1).pptxIntroduction-to-Machine-Learning (1).pptx
Introduction-to-Machine-Learning (1).pptxfirstjob4
 
FESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfFESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfMarinCaroMartnezBerg
 
Data-Analysis for Chicago Crime Data 2023
Data-Analysis for Chicago Crime Data  2023Data-Analysis for Chicago Crime Data  2023
Data-Analysis for Chicago Crime Data 2023ymrp368
 
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Callshivangimorya083
 
Vip Model Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...
Vip Model  Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...Vip Model  Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...
Vip Model Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...shivangimorya083
 
100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptxAnupama Kate
 
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Callshivangimorya083
 
Carero dropshipping via API with DroFx.pptx
Carero dropshipping via API with DroFx.pptxCarero dropshipping via API with DroFx.pptx
Carero dropshipping via API with DroFx.pptxolyaivanovalion
 
Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 night
Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 nightCheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 night
Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 nightDelhi Call girls
 
Ravak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptxRavak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptxolyaivanovalion
 
Edukaciniai dropshipping via API with DroFx
Edukaciniai dropshipping via API with DroFxEdukaciniai dropshipping via API with DroFx
Edukaciniai dropshipping via API with DroFxolyaivanovalion
 
Call Girls 🫤 Dwarka ➡️ 9711199171 ➡️ Delhi 🫦 Two shot with one girl
Call Girls 🫤 Dwarka ➡️ 9711199171 ➡️ Delhi 🫦 Two shot with one girlCall Girls 🫤 Dwarka ➡️ 9711199171 ➡️ Delhi 🫦 Two shot with one girl
Call Girls 🫤 Dwarka ➡️ 9711199171 ➡️ Delhi 🫦 Two shot with one girlkumarajju5765
 
Invezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signalsInvezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signalsInvezz1
 
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfMarket Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfRachmat Ramadhan H
 
Capstone Project on IBM Data Analytics Program
Capstone Project on IBM Data Analytics ProgramCapstone Project on IBM Data Analytics Program
Capstone Project on IBM Data Analytics ProgramMoniSankarHazra
 
Midocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFxMidocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFxolyaivanovalion
 
VidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptxVidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptxolyaivanovalion
 
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...amitlee9823
 
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al BarshaAl Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al BarshaAroojKhan71
 

Último (20)

Introduction-to-Machine-Learning (1).pptx
Introduction-to-Machine-Learning (1).pptxIntroduction-to-Machine-Learning (1).pptx
Introduction-to-Machine-Learning (1).pptx
 
FESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfFESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdf
 
Data-Analysis for Chicago Crime Data 2023
Data-Analysis for Chicago Crime Data  2023Data-Analysis for Chicago Crime Data  2023
Data-Analysis for Chicago Crime Data 2023
 
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
 
Vip Model Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...
Vip Model  Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...Vip Model  Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...
Vip Model Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...
 
Abortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Doha Qatar (+966572737505 ! Get CytotecAbortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Doha Qatar (+966572737505 ! Get Cytotec
 
100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx
 
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
 
Carero dropshipping via API with DroFx.pptx
Carero dropshipping via API with DroFx.pptxCarero dropshipping via API with DroFx.pptx
Carero dropshipping via API with DroFx.pptx
 
Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 night
Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 nightCheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 night
Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 night
 
Ravak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptxRavak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptx
 
Edukaciniai dropshipping via API with DroFx
Edukaciniai dropshipping via API with DroFxEdukaciniai dropshipping via API with DroFx
Edukaciniai dropshipping via API with DroFx
 
Call Girls 🫤 Dwarka ➡️ 9711199171 ➡️ Delhi 🫦 Two shot with one girl
Call Girls 🫤 Dwarka ➡️ 9711199171 ➡️ Delhi 🫦 Two shot with one girlCall Girls 🫤 Dwarka ➡️ 9711199171 ➡️ Delhi 🫦 Two shot with one girl
Call Girls 🫤 Dwarka ➡️ 9711199171 ➡️ Delhi 🫦 Two shot with one girl
 
Invezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signalsInvezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signals
 
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfMarket Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
 
Capstone Project on IBM Data Analytics Program
Capstone Project on IBM Data Analytics ProgramCapstone Project on IBM Data Analytics Program
Capstone Project on IBM Data Analytics Program
 
Midocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFxMidocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFx
 
VidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptxVidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptx
 
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
 
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al BarshaAl Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
 

Oracle to Postgres Migration - part 1

  • 1. Workshop Oracle to Postgres Migration Part 1 - migrating the database 2016-05-30 @IDM Chris Mair http://www.pgtraining.com
  • 2. 2016-05-30OracletoPostgresMigration-part1 The Workshop • part 1 • Oracle Database ™ • how an application interacts with an RDBMS • the ora2pg tool • part 2 • PostgreSQL features for DBAs and developers
  • 3. 2016-05-30OracletoPostgresMigration-part1 Important Note • Postgres is an advanced Open Source RDBMS with roots in the '80s at UC Berkeley. It has been developed as a comunity project since 1996 • the project's goal is to develop the most advanced Open Source enterprise-class RDBMS. Notably, its SQL implementation strongly conforms to the ANSI-SQL:2008 standard • Postgres has never been, is not, and never will be some sort of drop-in replacement for Oracle Database ™ - if you need such a thing, you need to look elsewhere
  • 5. 2016-05-30OracletoPostgresMigration-part1 Get your own Instance • the two quickest ways I know to get your own instance running are: • Oracle Database Express Edition ™ (running on your own Linux server → "Oracle XE" • Oracle Database Standard Edition One ™ as a service on AWS → "Oracle SE" • other approaches need more investment in time (the installation takes some care) or money (licensing)
  • 6. 2016-05-30OracletoPostgresMigration-part1 Oracle XE on own Server • Oracle XE is gratis-ware (read the exact license terms, though) • product is limited to using 1 core, 1 GB RAM and up to 11 GB user data - the machine can (and should) be larger, however • you need a (free) OTN account to download it • I recommend running it on CentOS • download version 11.2 (~ 300 MB .rpm) here
  • 7. 2016-05-30OracletoPostgresMigration-part1 Oracle SE One on AWS • many RDBMS can be run as a managed service on Amazon Web Services (AWS) - among others also Postgres and Oracle Database ™ • Oracle SE One 11.2 or 12.1 can be run in a very interesting "license included model": the license cost is included in the AWS cost and charged by the hour used (depending on machine size, the extra cost starts at ~ 2 cent / h more than for a free RDBMS) • this product is still limited by the SE One license in socket count, so AWS can offer it only with at most 16 logical cores per instance, but there is no other (low) limit in RAM or disk size • see the AWS website for details
  • 8. 2016-05-30OracletoPostgresMigration-part1 Manuals • Oracle offers two "easy" manuals here for Oracle XE that can be a starting point: • 2 Day DBA • 2 Day Developer's Guide • depending on you background be prepared to do some reading... • generally speaking, being a DBA in the Oracle world can be challenging - fortunately you don't need the full DBA-foo if you're just interested in supporting migrations and/or are using XE or SE as a service
  • 9. 2016-05-30OracletoPostgresMigration-part1 Tools • Oracles traditional command line tool is called SQL*Plus, it comes bundled with Oracle XE or can be downloaded with the so called "instant client" package (more later) • the "official" GUI tool is Oracle SQL Developer: this is a JAVA application that can be downloaded here (~ 300 MB) • both are gratis-ware and are available for Linux (and other OSes too)
  • 11. 2016-05-30OracletoPostgresMigration-part1 Get your own Instance 1/2 • Postgres is in the standard repo of all major Linux distribution, so that's just one of the usual commands away: yum install postgresql postgresql-server apt-get install postgresql-client postgresql • however, the major Linux distributions often carry pretty outdated versions (I'm looking at you, Centos 7, carrying version 9.2, that is three major versions behind the current 9.5) or package the product in unusual ways (I'm looking at you, Debian)
  • 12. 2016-05-30OracletoPostgresMigration-part1 Get your own Instance 2/2 • I recommend getting more recent releases from the official download page • the project maintains its own repositories for all major Linux distributions, so you can still use yum, apt, etc. to install and update everything - note that Postgres issues a major version about once a year and supports it for 5 years • it is pretty much possible to compile from source too (I even prefer to do so, although I'm not recommending this to new users) • as mentioned, Postgres is also available as a service on AWS
  • 13. 2016-05-30OracletoPostgresMigration-part1 Manuals • the official (huge) manual is available here for reading online or downloading as PDF • many good books are available - please pay attention to the publication date, you probably should pick something from 2012 or newer (covering version 9.1 or newer) • the second part of this workshop will deal with Postgres, attending it is a very good way to getting started :)
  • 14. 2016-05-30OracletoPostgresMigration-part1 Tools • Postgres' traditional command line tool is called psql - again, this can be installed from your Linux distribution's repo or from the Postgres repo • there is no "official" GUI tool, though! • some people use pgAdmin (Open Source), some people use propretiary multi-product tools, some people just use psql • I recommend sticking with psql
  • 16. 2016-05-30OracletoPostgresMigration-part1 Talking with a RDBMS 1/3 • when using a RDBMS you don't deal with files, but rather use a client or client application that comunicates with the RDBMS over a network socket • each product has its own native networking protocol • Oracle uses the proprietary "TNS" protocol with the default TCP port 1521 and the OCI library as native call interface • Postgres uses its own "frontend/backend" protocol with the default TCP port 5432 and the libpq library as native call interface • these two sets of protocols / libraries have nothing whatsoever in common
  • 17. 2016-05-30OracletoPostgresMigration-part1 Talking with a RDBMS 2/3 • the structured query language (SQL) is used to "instruct" a RDBMS • it is used to define the database schema (DDL statements), to manipulate the data (DML statements) and to query the data • information about the database schema is stored as data in the "catalog", so SQL can be used to query the catalog too • there is an ANSI SQL standard that covers many, but not all aspects
  • 18. 2016-05-30OracletoPostgresMigration-part1 Talking with a RDBMS 3/3 • fortunately most applications written for Oracle Database ™ don't use TNS/OCI natively but send SQL statements over a higher level API such as ODBC (Win/C++), JDBC (Java), the .NET data provider API (C#), etc. • drivers for these APIs are (of course) available for Postgres too • hence, ideally, migrating an application that talks SQL over - say - JDBC is not too hard ... ideally...
  • 19. 2016-05-30OracletoPostgresMigration-part1 Example App • a super simple web app written in Java: it displays the countries from the "hr"-sample database
  • 20. 2016-05-30OracletoPostgresMigration-part1 Example App - Code JDBCdriverandconnectioninfo SQL JDBC-APIcalls
  • 21. 2016-05-30OracletoPostgresMigration-part1 Can this run on Postgres? • yes! we need to: • create the schema (table countries) in Postgres • copy over the data • change the JDBC driver and connection info • let's do that (manually exporting the table, using SQL Developer)...
  • 22. 2016-05-30OracletoPostgresMigration-part1 With some work... • the app was easy: • the data too, but the schema was not (data types are not really portable: varchar2 vs varchar, case sensitivity of quoted identifiers, ...)
  • 23. 2016-05-30OracletoPostgresMigration-part1 We need a Tool! • ora2pg by Gilles Darold comes to the rescue • ora2og connects to Oracle and dumps schema and data in a Postgres-compatible format; it is highly configurable and can even connect to Postgres and migrate everything on the fly • ora2pg reads Oracle's catalog and knows how to create the equivalent Postgres objects (tables, views, sequences, indexes), with unique, primary, foreign key and check constraints without syntactic pitfalls • let's install ora2pg on our third machine ("migration")
  • 24. 2016-05-30OracletoPostgresMigration-part1 Installing ora2pg 1/4 • we need to install the Oracle instant client rpms from here - get these three files: oracle-instantclient12.1-basic-12.1.0.2.0-1.x86_64.rpm oracle-instantclient12.1-devel-12.1.0.2.0-1.x86_64.rpm oracle-instantclient12.1-sqlplus-12.1.0.2.0-1.x86_64.rpm • and set the environment: export LD_LIBRARY_PATH=/usr/lib/oracle/12.1/client64/lib:$LD_LIBRARY_PATH export PATH=/usr/lib/oracle/12.1/client64/bin:$PATH export ORACLE_HOME=/usr/lib/oracle/12.1/client64 • let's try connecting to the Oracle server: sqlplus hr/hr@oracle-xe.pgtraining.com ✓
  • 25. 2016-05-30OracletoPostgresMigration-part1 Installing ora2pg 2/4 • analogously, we want to install the Postgres client: yum install postgresql • and test it by connecting to the Postgres server: psql -h postgres.pgtraining.com -U hr hr (note all these machines are firewalled, you do not want to leave ports 1521 and 5432 open to the world, especially not with such silly passwords) ✓
  • 26. 2016-05-30OracletoPostgresMigration-part1 Installing ora2pg 3/4 • then we need to install a few Perl modules, among which is DBD::Oracle - as it's not distributed by Red Hat, we need to download it from CPAN and build it: yum install perl-DBI perl-DBD-Pg perl-ExtUtils-MakeMaker gcc wget http://search.cpan.org/CPAN/authors/id/P/PY/PYTHIAN/DBD- Oracle-1.74.tar.gz tar xf DBD-Oracle-1.74.tar.gz cd DBD-Oracle-1.74 perl Makefile.PL -l # watch out for missing Perl modules make make install
  • 27. 2016-05-30OracletoPostgresMigration-part1 Installing ora2pg 4/4 • finally we can install ora2pg: wget https://github.com/darold/ora2pg/archive/v17.4.tar.gz tar xf v17.4.tar.gz cd ora2pg-17.4 perl Makefile.PL # watch out for missing Perl modules make make install • and verify that it is installed: /usr/local/bin/ora2pg -v ✓
  • 28. 2016-05-30OracletoPostgresMigration-part1 Configuration • a template configuration file is installed in /etc/ora2pg/ora2pg.conf.dist • there are way to many parameters to list here, see the ora2pg documentation... ORACLE_HOME /usr/lib/oracle/12.1/client64 ORACLE_DSN dbi:Oracle:host=oracle-xe.pgtraining.com;sid=xe ORACLE_USER hr ORACLE_PWD hr USER_GRANTS 1 SCHEMA hr TYPE TABLE,VIEW,PROCEDURE,TRIGGER DROP_FKEY 1
  • 29. 2016-05-30OracletoPostgresMigration-part1 Run 1 • ora2pg-schema-to-file.conf → dump schema to output.sql /usr/local/bin/ora2pg -c ora2pg-schema-to-file.conf [========================>] 7/7 tables (100.0%) end of scanning. [========================>] 7/7 tables (100.0%) end of table export. [========================>] 1/1 views (100.0%) end of output. [========================>] 2/2 procedures (100.0%) end of output. [========================>] 1/1 triggers (100.0%) end of output. psql -h postgres.pgtraining.com -U hr hr Password for user hr: psql (9.2.15, server 9.5.3) WARNING: psql version 9.2, server version 9.5. Some psql features might not work. SSL connection (cipher: ECDHE-RSA-AES256-GCM-SHA384, bits: 256) Type "help" for help. hr=> i output.sql
  • 30. 2016-05-30OracletoPostgresMigration-part1 Run 2 • ora2pg-all-to-file.conf → dump schema and data to output.sql /usr/local/bin/ora2pg -c ora2pg-all-to-file.conf [========================>] 7/7 tables (100.0%) end of scanning. [========================>] 7/7 tables (100.0%) end of table export. [========================>] 1/1 views (100.0%) end of output. [========================>] 2/2 procedures (100.0%) end of output. [========================>] 1/1 triggers (100.0%) end of output. [========================>] 25/25 rows (100.0%) Table COUNTRIES (25 recs/sec) [========================>] 27/27 rows (100.0%) Table DEPARTMENTS (27 recs/sec) [========================>] 107/107 rows (100.0%) Table EMPLOYEES (107 recs/sec) [========================>] 19/19 rows (100.0%) Table JOBS (19 recs/sec) [========================>] 10/10 rows (100.0%) Table JOB_HISTORY (10 recs/sec) [========================>] 23/23 rows (100.0%) Table LOCATIONS (23 recs/sec) [========================>] 4/4 rows (100.0%) Table REGIONS (4 recs/sec) [========================>] 215/215 rows (100.0%) on total estimated data (1 sec., avg: 215 recs/sec) psql -h postgres.pgtraining.com -U hr hr Password for user hr: psql (9.2.15, server 9.5.3) [...] hr=> i output.sql
  • 31. 2016-05-30OracletoPostgresMigration-part1 Post-Migration Testing... hr=> select * from job_history; employee_id | start_date | end_date | job_id | department_id -------------+---------------------+---------------------+------------+--------------- 102 | 2001-01-13 00:00:00 | 2006-07-24 00:00:00 | IT_PROG | 60 [...] 200 | 2002-07-01 00:00:00 | 2006-12-31 00:00:00 | AC_ACCOUNT | 90 (10 rows) hr=> update employees set job_id = 'ST_MAN' where employee_id = 100; UPDATE 1 hr=> select * from job_history; employee_id | start_date | end_date | job_id | department_id -------------+---------------------+--------------------------+------------+--------------- 102 | 2001-01-13 00:00:00 | 2006-07-24 00:00:00 | IT_PROG | 60 [...] 200 | 2002-07-01 00:00:00 | 2006-12-31 00:00:00 | AC_ACCOUNT | 90 100 | 2003-06-17 00:00:00 | 2016-05-30 03:38:32.7629 | AD_PRES | 90 (11 rows)
  • 32. 2016-05-30OracletoPostgresMigration-part1 PL/SQL vs PL/PgSQL • ora2pg can automatically translate only very simple procedures or functions (as the trigger examples in the hr demo schema) • more complicated procedures need to be translated manually • fortunately, PL/PgSQL is easy and rich in features: in my experience typical procedures can be rewritten without too much hassle most of the times • some people suggest getting rid of procedures alltogether when migrating (move them to the middle tier) - I tend to find it easier to just translate them!
  • 33. 2016-05-30OracletoPostgresMigration-part1 Scenario 1: Bad • application is linked against OCI / uses TNS natively (like the SQL*Plus executable) • if the source code is not available, a migration is not possible • if the source code is available and can be changed, at the very least the database access layer needs to be rewritten from scratch (using libpq)
  • 34. 2016-05-30OracletoPostgresMigration-part1 Scenario 2: Bad • application uses some proprietary software or component such as Oracle Forms ™ • an easy migration is generally not possible
  • 35. 2016-05-30OracletoPostgresMigration-part1 Scenario 3: so-so • application uses ODBC, JDBC, etc. - however, it uses lots of queries with Oracle custom-syntax (such as (+) instead of outer joins, mixes quoted and unquoted identifiers, uses lots of Oracle specific functions etc.) and has long and complex PL/SQL procedures • if the source code is not available, a migration is not possible • if the source code is available, and can be changed, queries and procedures need to be translated manually
  • 36. 2016-05-30OracletoPostgresMigration-part1 Scenario 4: good • application uses ODBC, JDBC, etc. - also, it either uses no or very few Oracle custom-syntax and PL/SQL procedures or the vendor has made a version for Postgres backends available • application that use abstractions layers such as ORM-wrappers usually fall into this category • a migration is normally not too hard (unless the software is completely locked-down and does not even allow to select the ODBC, JDBC, etc. driver)