SlideShare a Scribd company logo
1 of 36
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Arun Thiagarajan – DMS Database Engineer
15th June 2018
Migrating your Oracle
database to Amazon Aurora
using DMS and SCT
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Agenda
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
What to expect from this session
1. Introduction
2. Migration Playbook
3. Common Oracle to Aurora PostgreSQL Feature
Comparison with Examples
4. Schema Conversion Tool
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Introduction - Database Migration Service (DMS)
& Schema Conversion Tool (SCT)
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
What are DMS and SCT?
AWS Database Migration Service (DMS) easily and securely
migrates and/or replicate your databases and data
warehouses to AWS
AWS Schema Conversion Tool (SCT) converts your commercial
database and data warehouse schemas to open-source engines or
AWS-native services, such as Amazon Aurora and Redshift
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Database Migration Process
Step 1: Convert or Copy your Schema
Source DB or DW
AWS SCT
Native Tool
Destination DB or DW
Step 2: Move your data
Source DB or DW
AWS SCT
Destination DB or DW
AWS DMS
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
How does DMS work?
Customer
premises
Application users
AWS
Internet
VPN
Start a replication instance
Connect to source and target
databases
Create Tasks
 Let AWS DMS create tables,
load data, and keep them in
sync
 Switch applications over to
the target at your convenience
AWS
DMS
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Oracle to Aurora Migration Playbook
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Oracle to Aurora Migration PlaybookOracle to Aurora Migration Playbook
• Topic-by-topic overview of Oracle to Aurora
PostgreSQL migrations and “hand-on” best
practices
• How to migrate from proprietary features and the
different database objects
• Migration best practices
SCT DMS Playbook
Schema Data Best Practices
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Top Oracle to Aurora PostgreSQL Feature
Comparison
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Materialized Views
Oracle PostgreSQL
Creation CREATE MATERIALIZED
VIEW mv1
AS SELECT * FROM
employees;
CREATE MATERIALIZED VIEW
mv1
AS SELECT * FROM
employees;
Manual
Refresh
DBMS_MVIEW.REFRESH('mv
1', 'cf');
The --cf parameter configured
the refresh method: c is
complete and f is fast
REFRESH MATERIALIZED VIEW
mv1;
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Materialized Views
CREATE MATERIALIZED VIEW mv1
REFRESH FAST ON COMMIT AS
SELECT * FROM employees;
- Supports automatic incremental refresh
- Supports DML on the materialized view
Create a trigger that will initiate a
refresh after every DML command on
the underlying tables:
CREATE OR REPLACE FUNCTION
refresh_mv1()
returns trigger language
plpgsql
as $$
begin
refresh materialized view
mv1;
return null;
end $$;
create trigger refresh_ mv1
after insert or update or
delete or truncate
on employees for each
statement
execute procedure
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Partitioning
• PostgreSQL started supporting declarative partitioning
from version 10.
• Prior to PostgreSQL 10, partitions could be used via
inheritance.
• Oracle supports various partitioning mechanisms (hash,
range, list, composite) whereas PostgreSQL currently
supports list and range partitioning.
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Partitioning
Oracle example: List Partitioning
SQL> CREATE TABLE SYSTEM_LOGS
(EVENT_NO NUMBER NOT NULL,
EVENT_DATE DATE NOT NULL,
EVENT_STR VARCHAR2(500),
ERROR_CODE VARCHAR2(10))
PARTITION BY LIST (ERROR_CODE)
(PARTITION warning VALUES ('err1', 'err2', 'err3') TABLESPACE TB1,
PARTITION critical VALUES ('err4', 'err5', 'err6') TABLESPACE TB2);
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Partitioning
PostgreSQL example: List Partitioning
It is a 5 step process using inheritance prior to PostgreSQL 10:
1. Create parent table
2. Create child tables with check constraints
3. Create indexes on child tables
4. Create a function to redirect data inserted into the parent
table
5. Create trigger to execute function on DML event
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Partitioning
1. Create Parent table:
demo=# CREATE TABLE SYSTEM_LOGS
(EVENT_NO NUMERIC NOT NULL,
EVENT_DATE DATE NOT NULL,
EVENT_STR VARCHAR(500),
ERROR_CODE VARCHAR(10));
2. Create Child tables with check constraints:
demo=# CREATE TABLE SYSTEM_LOGS_WARNING (
CHECK (ERROR_CODE IN('err1', 'err2', 'err3')))
INHERITS (SYSTEM_LOGS);
demo=# CREATE TABLE SYSTEM_LOGS_CRITICAL (
CHECK (ERROR_CODE IN('err4', 'err5', 'err6')))
INHERITS (SYSTEM_LOGS);
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Partitioning
3. Create indexes on each of the child tables (“partitions”):
demo=# CREATE INDEX IDX_SYSTEM_LOGS_WARNING ON
SYSTEM_LOGS_WARNING(ERROR_CODE);
demo=# CREATE INDEX IDX_SYSTEM_LOGS_CRITICAL ON
SYSTEM_LOGS_CRITICAL(ERROR_CODE);
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Partitioning
4. Create a function to redirect data inserted into the parent
table
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Partitioning
4. Create trigger to execute function on DML
demo=# CREATE TRIGGER SYSTEM_LOGS_ERR_TRIG
BEFORE INSERT ON SYSTEM_LOGS FOR EACH ROW
EXECUTE PROCEDURE SYSTEM_LOGS_ERR_CODE_INS();
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Triggers
Oracle PostgreSQL
Triggers can be executed after:
a. DML
b. DDL
c. Certain database operations
Triggers can be execute:
a. DML
b. Event (DDL is also covered in this)
Different types:
a. DML trigger
b. Instead of trigger
c. System event trigger
Different types:
a. BEFORE OR AFTER events
b. INSTEAD OF
c. For each row or statement
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
PostgreSQL triggers
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
DML Trigger Example - Oracle
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
DML Trigger Example - PostgreSQL
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Sequences
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Sequence caching in PostgreSQL per session
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Virtual Columns
Oracle PostgreSQL
Oracle Virtual Columns appear as normal
columns but their values are calculated
instead of being stored in the database.
No virtual column support. It can be
created through views or function as a
column.
Virtual Columns cannot be created based
on other Virtual Columns and can only
reference columns from the same table
NA
When creating a Virtual Column, you can
explicitly specify the datatype or let the
database choose the datatype based on
the expression.
If the column needs to be part of the object,
a view must be created. If not, function as
a column can be used as part of the select
statement.
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Virtual Columns - Oracle
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Virtual Columns - PostgreSQL
1.
2.
3.
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Virtual Columns - PostgreSQL
OR
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Number in Oracle vs integer or bigint in PostgreSQL
• The limit for numbers in Postgres (up to 131072 digits before the decimal
point; up to 16383 digits after the decimal point) is much higher than in
Oracle.
• The appropriate data type for NUMBER in Oracle might seem to be
NUMERIC in PostgreSQL. However, PostgreSQL Numeric field is less
efficient than native integer / bigint fields.
• Given the implementation differences, we have many customers who
reduced CPU usage on Aurora from 100% to 20% by changing the
generated column data types from Numeric to Bigint on Primary keys.
• If a number field in Oracle is being used as a PK or FK (relating to another
table), we should look at using integer or bigint in Aurora PostgreSQL.
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Character Sets
Oracle PostgreSQL
Supports most national and international
character sets including Unicode.
PostgreSQL supports a variety of different
character sets, also known as encoding,
including support for both
single-byte and multi-byte languages.
Supports VARCHAR2 (for non-Unicode)
and NVARCHAR2 (for UTF-16).
Does not natively support NVARCHAR2 or
UTF-16.
Can be defined at the instance level or
pluggable database level.
Called encoding at database level and
locale at table/column level.
Changing character set might require an
export/import or use database migration
assistant for Unicode.
Changing character set requires
export/import to a new database.
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Schema Conversion Tool (SCT)
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
When to use SCT?
Modernize
Modernize your database tier
Modernize and Migrate your Data
Warehouse to Amazon Redshift
Amazon Aurora
Amazon Redshift
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
SCT Migration Assessment Report
• Assessment of migration
compatibility of source databases
with open-source database
engines – RDS MySQL, RDS
PostgreSQL and Aurora
• Recommends best target engine
• Provides details level of efforts to
complete migration
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
SCT helps with converting tables, views, and code
Sequences
User-defined types
Synonyms
Packages
Stored procedures
Functions
Triggers
Schemas
Tables
Indexes
Views
Sort and distribution keys
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Thank you!

More Related Content

What's hot

Microsoft SQL Server Migration Strategies (WIN302) - AWS re:Invent 2018
Microsoft SQL Server Migration Strategies (WIN302) - AWS re:Invent 2018Microsoft SQL Server Migration Strategies (WIN302) - AWS re:Invent 2018
Microsoft SQL Server Migration Strategies (WIN302) - AWS re:Invent 2018Amazon Web Services
 
Migrating Databases to the Cloud: Introduction to AWS DMS - SRV215 - Atlanta ...
Migrating Databases to the Cloud: Introduction to AWS DMS - SRV215 - Atlanta ...Migrating Databases to the Cloud: Introduction to AWS DMS - SRV215 - Atlanta ...
Migrating Databases to the Cloud: Introduction to AWS DMS - SRV215 - Atlanta ...Amazon Web Services
 
Building with AWS Databases: Match Your Workload to the Right Database (DAT30...
Building with AWS Databases: Match Your Workload to the Right Database (DAT30...Building with AWS Databases: Match Your Workload to the Right Database (DAT30...
Building with AWS Databases: Match Your Workload to the Right Database (DAT30...Amazon Web Services
 
What's New in Amazon Aurora (DAT204-R1) - AWS re:Invent 2018
What's New in Amazon Aurora (DAT204-R1) - AWS re:Invent 2018What's New in Amazon Aurora (DAT204-R1) - AWS re:Invent 2018
What's New in Amazon Aurora (DAT204-R1) - AWS re:Invent 2018Amazon Web Services
 
Database Migration Using AWS DMS and AWS SCT (GPSCT307) - AWS re:Invent 2018
Database Migration Using AWS DMS and AWS SCT (GPSCT307) - AWS re:Invent 2018Database Migration Using AWS DMS and AWS SCT (GPSCT307) - AWS re:Invent 2018
Database Migration Using AWS DMS and AWS SCT (GPSCT307) - AWS re:Invent 2018Amazon Web Services
 
Migrating Databases to the Cloud: Introduction to AWS DMS - SRV215 - Anaheim ...
Migrating Databases to the Cloud: Introduction to AWS DMS - SRV215 - Anaheim ...Migrating Databases to the Cloud: Introduction to AWS DMS - SRV215 - Anaheim ...
Migrating Databases to the Cloud: Introduction to AWS DMS - SRV215 - Anaheim ...Amazon Web Services
 
Migrating Databases to the Cloud: Introduction to AWS DMS - SRV215 - Toronto ...
Migrating Databases to the Cloud: Introduction to AWS DMS - SRV215 - Toronto ...Migrating Databases to the Cloud: Introduction to AWS DMS - SRV215 - Toronto ...
Migrating Databases to the Cloud: Introduction to AWS DMS - SRV215 - Toronto ...Amazon Web Services
 
Migrating Massive Databases and Data Warehouses to the Cloud - ENT327 - re:In...
Migrating Massive Databases and Data Warehouses to the Cloud - ENT327 - re:In...Migrating Massive Databases and Data Warehouses to the Cloud - ENT327 - re:In...
Migrating Massive Databases and Data Warehouses to the Cloud - ENT327 - re:In...Amazon Web Services
 
Best Practices for Running Oracle Databases on Amazon RDS (DAT317) - AWS re:I...
Best Practices for Running Oracle Databases on Amazon RDS (DAT317) - AWS re:I...Best Practices for Running Oracle Databases on Amazon RDS (DAT317) - AWS re:I...
Best Practices for Running Oracle Databases on Amazon RDS (DAT317) - AWS re:I...Amazon Web Services
 
Best practices for optimizing your EC2 costs with Spot Instances | AWS Floor28
Best practices for optimizing your EC2 costs with Spot Instances | AWS Floor28Best practices for optimizing your EC2 costs with Spot Instances | AWS Floor28
Best practices for optimizing your EC2 costs with Spot Instances | AWS Floor28Amazon Web Services
 
Deep Dive on PostgreSQL Databases on Amazon RDS (DAT324) - AWS re:Invent 2018
Deep Dive on PostgreSQL Databases on Amazon RDS (DAT324) - AWS re:Invent 2018Deep Dive on PostgreSQL Databases on Amazon RDS (DAT324) - AWS re:Invent 2018
Deep Dive on PostgreSQL Databases on Amazon RDS (DAT324) - AWS re:Invent 2018Amazon Web Services
 
Deep Dive on Amazon Aurora PostgreSQL Performance Tuning (DAT428-R1) - AWS re...
Deep Dive on Amazon Aurora PostgreSQL Performance Tuning (DAT428-R1) - AWS re...Deep Dive on Amazon Aurora PostgreSQL Performance Tuning (DAT428-R1) - AWS re...
Deep Dive on Amazon Aurora PostgreSQL Performance Tuning (DAT428-R1) - AWS re...Amazon Web Services
 
Accelerate Database Development and Testing with Amazon Aurora (DAT313) - AWS...
Accelerate Database Development and Testing with Amazon Aurora (DAT313) - AWS...Accelerate Database Development and Testing with Amazon Aurora (DAT313) - AWS...
Accelerate Database Development and Testing with Amazon Aurora (DAT313) - AWS...Amazon Web Services
 
Building Serverless ETL Pipelines with AWS Glue
Building Serverless ETL Pipelines with AWS GlueBuilding Serverless ETL Pipelines with AWS Glue
Building Serverless ETL Pipelines with AWS GlueAmazon Web Services
 
What's New in Amazon Relational Database Service (DAT203) - AWS re:Invent 2018
What's New in Amazon Relational Database Service (DAT203) - AWS re:Invent 2018What's New in Amazon Relational Database Service (DAT203) - AWS re:Invent 2018
What's New in Amazon Relational Database Service (DAT203) - AWS re:Invent 2018Amazon Web Services
 
Oracle zdm Migrate Amazon RDS Oracle to Oracle Autonomous 2021 Kamalesh Ramas...
Oracle zdm Migrate Amazon RDS Oracle to Oracle Autonomous 2021 Kamalesh Ramas...Oracle zdm Migrate Amazon RDS Oracle to Oracle Autonomous 2021 Kamalesh Ramas...
Oracle zdm Migrate Amazon RDS Oracle to Oracle Autonomous 2021 Kamalesh Ramas...Kamalesh Ramasamy
 
Microsoft SQL Server Migration Strategies
Microsoft SQL Server Migration StrategiesMicrosoft SQL Server Migration Strategies
Microsoft SQL Server Migration StrategiesAmazon Web Services
 
Deep Dive on Amazon Aurora MySQL Performance Tuning (DAT429-R1) - AWS re:Inve...
Deep Dive on Amazon Aurora MySQL Performance Tuning (DAT429-R1) - AWS re:Inve...Deep Dive on Amazon Aurora MySQL Performance Tuning (DAT429-R1) - AWS re:Inve...
Deep Dive on Amazon Aurora MySQL Performance Tuning (DAT429-R1) - AWS re:Inve...Amazon Web Services
 
Heterogenous Migration with DMS & SCT
Heterogenous Migration with DMS & SCTHeterogenous Migration with DMS & SCT
Heterogenous Migration with DMS & SCTAmazon Web Services
 
Going Deep on Amazon Aurora Serverless (DAT427-R1) - AWS re:Invent 2018
Going Deep on Amazon Aurora Serverless (DAT427-R1) - AWS re:Invent 2018Going Deep on Amazon Aurora Serverless (DAT427-R1) - AWS re:Invent 2018
Going Deep on Amazon Aurora Serverless (DAT427-R1) - AWS re:Invent 2018Amazon Web Services
 

What's hot (20)

Microsoft SQL Server Migration Strategies (WIN302) - AWS re:Invent 2018
Microsoft SQL Server Migration Strategies (WIN302) - AWS re:Invent 2018Microsoft SQL Server Migration Strategies (WIN302) - AWS re:Invent 2018
Microsoft SQL Server Migration Strategies (WIN302) - AWS re:Invent 2018
 
Migrating Databases to the Cloud: Introduction to AWS DMS - SRV215 - Atlanta ...
Migrating Databases to the Cloud: Introduction to AWS DMS - SRV215 - Atlanta ...Migrating Databases to the Cloud: Introduction to AWS DMS - SRV215 - Atlanta ...
Migrating Databases to the Cloud: Introduction to AWS DMS - SRV215 - Atlanta ...
 
Building with AWS Databases: Match Your Workload to the Right Database (DAT30...
Building with AWS Databases: Match Your Workload to the Right Database (DAT30...Building with AWS Databases: Match Your Workload to the Right Database (DAT30...
Building with AWS Databases: Match Your Workload to the Right Database (DAT30...
 
What's New in Amazon Aurora (DAT204-R1) - AWS re:Invent 2018
What's New in Amazon Aurora (DAT204-R1) - AWS re:Invent 2018What's New in Amazon Aurora (DAT204-R1) - AWS re:Invent 2018
What's New in Amazon Aurora (DAT204-R1) - AWS re:Invent 2018
 
Database Migration Using AWS DMS and AWS SCT (GPSCT307) - AWS re:Invent 2018
Database Migration Using AWS DMS and AWS SCT (GPSCT307) - AWS re:Invent 2018Database Migration Using AWS DMS and AWS SCT (GPSCT307) - AWS re:Invent 2018
Database Migration Using AWS DMS and AWS SCT (GPSCT307) - AWS re:Invent 2018
 
Migrating Databases to the Cloud: Introduction to AWS DMS - SRV215 - Anaheim ...
Migrating Databases to the Cloud: Introduction to AWS DMS - SRV215 - Anaheim ...Migrating Databases to the Cloud: Introduction to AWS DMS - SRV215 - Anaheim ...
Migrating Databases to the Cloud: Introduction to AWS DMS - SRV215 - Anaheim ...
 
Migrating Databases to the Cloud: Introduction to AWS DMS - SRV215 - Toronto ...
Migrating Databases to the Cloud: Introduction to AWS DMS - SRV215 - Toronto ...Migrating Databases to the Cloud: Introduction to AWS DMS - SRV215 - Toronto ...
Migrating Databases to the Cloud: Introduction to AWS DMS - SRV215 - Toronto ...
 
Migrating Massive Databases and Data Warehouses to the Cloud - ENT327 - re:In...
Migrating Massive Databases and Data Warehouses to the Cloud - ENT327 - re:In...Migrating Massive Databases and Data Warehouses to the Cloud - ENT327 - re:In...
Migrating Massive Databases and Data Warehouses to the Cloud - ENT327 - re:In...
 
Best Practices for Running Oracle Databases on Amazon RDS (DAT317) - AWS re:I...
Best Practices for Running Oracle Databases on Amazon RDS (DAT317) - AWS re:I...Best Practices for Running Oracle Databases on Amazon RDS (DAT317) - AWS re:I...
Best Practices for Running Oracle Databases on Amazon RDS (DAT317) - AWS re:I...
 
Best practices for optimizing your EC2 costs with Spot Instances | AWS Floor28
Best practices for optimizing your EC2 costs with Spot Instances | AWS Floor28Best practices for optimizing your EC2 costs with Spot Instances | AWS Floor28
Best practices for optimizing your EC2 costs with Spot Instances | AWS Floor28
 
Deep Dive on PostgreSQL Databases on Amazon RDS (DAT324) - AWS re:Invent 2018
Deep Dive on PostgreSQL Databases on Amazon RDS (DAT324) - AWS re:Invent 2018Deep Dive on PostgreSQL Databases on Amazon RDS (DAT324) - AWS re:Invent 2018
Deep Dive on PostgreSQL Databases on Amazon RDS (DAT324) - AWS re:Invent 2018
 
Deep Dive on Amazon Aurora PostgreSQL Performance Tuning (DAT428-R1) - AWS re...
Deep Dive on Amazon Aurora PostgreSQL Performance Tuning (DAT428-R1) - AWS re...Deep Dive on Amazon Aurora PostgreSQL Performance Tuning (DAT428-R1) - AWS re...
Deep Dive on Amazon Aurora PostgreSQL Performance Tuning (DAT428-R1) - AWS re...
 
Accelerate Database Development and Testing with Amazon Aurora (DAT313) - AWS...
Accelerate Database Development and Testing with Amazon Aurora (DAT313) - AWS...Accelerate Database Development and Testing with Amazon Aurora (DAT313) - AWS...
Accelerate Database Development and Testing with Amazon Aurora (DAT313) - AWS...
 
Building Serverless ETL Pipelines with AWS Glue
Building Serverless ETL Pipelines with AWS GlueBuilding Serverless ETL Pipelines with AWS Glue
Building Serverless ETL Pipelines with AWS Glue
 
What's New in Amazon Relational Database Service (DAT203) - AWS re:Invent 2018
What's New in Amazon Relational Database Service (DAT203) - AWS re:Invent 2018What's New in Amazon Relational Database Service (DAT203) - AWS re:Invent 2018
What's New in Amazon Relational Database Service (DAT203) - AWS re:Invent 2018
 
Oracle zdm Migrate Amazon RDS Oracle to Oracle Autonomous 2021 Kamalesh Ramas...
Oracle zdm Migrate Amazon RDS Oracle to Oracle Autonomous 2021 Kamalesh Ramas...Oracle zdm Migrate Amazon RDS Oracle to Oracle Autonomous 2021 Kamalesh Ramas...
Oracle zdm Migrate Amazon RDS Oracle to Oracle Autonomous 2021 Kamalesh Ramas...
 
Microsoft SQL Server Migration Strategies
Microsoft SQL Server Migration StrategiesMicrosoft SQL Server Migration Strategies
Microsoft SQL Server Migration Strategies
 
Deep Dive on Amazon Aurora MySQL Performance Tuning (DAT429-R1) - AWS re:Inve...
Deep Dive on Amazon Aurora MySQL Performance Tuning (DAT429-R1) - AWS re:Inve...Deep Dive on Amazon Aurora MySQL Performance Tuning (DAT429-R1) - AWS re:Inve...
Deep Dive on Amazon Aurora MySQL Performance Tuning (DAT429-R1) - AWS re:Inve...
 
Heterogenous Migration with DMS & SCT
Heterogenous Migration with DMS & SCTHeterogenous Migration with DMS & SCT
Heterogenous Migration with DMS & SCT
 
Going Deep on Amazon Aurora Serverless (DAT427-R1) - AWS re:Invent 2018
Going Deep on Amazon Aurora Serverless (DAT427-R1) - AWS re:Invent 2018Going Deep on Amazon Aurora Serverless (DAT427-R1) - AWS re:Invent 2018
Going Deep on Amazon Aurora Serverless (DAT427-R1) - AWS re:Invent 2018
 

Similar to Oracle to Amazon Aurora Migration, Step by Step - AWS Online Tech Talks

Use AWS DMS to Securely Migrate Your Oracle Database to Amazon Aurora with Mi...
Use AWS DMS to Securely Migrate Your Oracle Database to Amazon Aurora with Mi...Use AWS DMS to Securely Migrate Your Oracle Database to Amazon Aurora with Mi...
Use AWS DMS to Securely Migrate Your Oracle Database to Amazon Aurora with Mi...Amazon Web Services
 
GPS: Migrate Your Databases with the AWS Database Migration Service and AWS S...
GPS: Migrate Your Databases with the AWS Database Migration Service and AWS S...GPS: Migrate Your Databases with the AWS Database Migration Service and AWS S...
GPS: Migrate Your Databases with the AWS Database Migration Service and AWS S...Amazon Web Services
 
GPSWKS408-GPS Migrate Your Databases with AWS Database Migration Service and ...
GPSWKS408-GPS Migrate Your Databases with AWS Database Migration Service and ...GPSWKS408-GPS Migrate Your Databases with AWS Database Migration Service and ...
GPSWKS408-GPS Migrate Your Databases with AWS Database Migration Service and ...Amazon Web Services
 
DAT317_Migrating Databases and Data Warehouses to the Cloud
DAT317_Migrating Databases and Data Warehouses to the CloudDAT317_Migrating Databases and Data Warehouses to the Cloud
DAT317_Migrating Databases and Data Warehouses to the CloudAmazon Web Services
 
Report from the Field on the PostgreSQL-compatible Edition of Amazon Aurora -...
Report from the Field on the PostgreSQL-compatible Edition of Amazon Aurora -...Report from the Field on the PostgreSQL-compatible Edition of Amazon Aurora -...
Report from the Field on the PostgreSQL-compatible Edition of Amazon Aurora -...Amazon Web Services
 
DAT316_Report from the field on Aurora PostgreSQL Performance
DAT316_Report from the field on Aurora PostgreSQL PerformanceDAT316_Report from the field on Aurora PostgreSQL Performance
DAT316_Report from the field on Aurora PostgreSQL PerformanceAmazon Web Services
 
SQL Server to Amazon Aurora Migration, Step by Step (DAT405) - AWS re:Invent ...
SQL Server to Amazon Aurora Migration, Step by Step (DAT405) - AWS re:Invent ...SQL Server to Amazon Aurora Migration, Step by Step (DAT405) - AWS re:Invent ...
SQL Server to Amazon Aurora Migration, Step by Step (DAT405) - AWS re:Invent ...Amazon Web Services
 
Migrating Your Databases to AWS – Tools and Services (Level 100)
Migrating Your Databases to AWS – Tools and Services (Level 100)Migrating Your Databases to AWS – Tools and Services (Level 100)
Migrating Your Databases to AWS – Tools and Services (Level 100)Amazon Web Services
 
Heterogenous Migration with DMS and SCT: Database Week San Francisco
Heterogenous Migration with DMS and SCT: Database Week San FranciscoHeterogenous Migration with DMS and SCT: Database Week San Francisco
Heterogenous Migration with DMS and SCT: Database Week San FranciscoAmazon Web Services
 
Heterogenous Migration with DMS & SCT - Michael Russo
Heterogenous Migration with DMS & SCT - Michael RussoHeterogenous Migration with DMS & SCT - Michael Russo
Heterogenous Migration with DMS & SCT - Michael RussoAmazon Web Services
 
A Practitioner’s Guide on Migrating to, and Running on Amazon Aurora - DAT315...
A Practitioner’s Guide on Migrating to, and Running on Amazon Aurora - DAT315...A Practitioner’s Guide on Migrating to, and Running on Amazon Aurora - DAT315...
A Practitioner’s Guide on Migrating to, and Running on Amazon Aurora - DAT315...Amazon Web Services
 
Migrating Open Source Databases from Amazon EC2 to Aurora PostgreSQL (DAT339)...
Migrating Open Source Databases from Amazon EC2 to Aurora PostgreSQL (DAT339)...Migrating Open Source Databases from Amazon EC2 to Aurora PostgreSQL (DAT339)...
Migrating Open Source Databases from Amazon EC2 to Aurora PostgreSQL (DAT339)...Amazon Web Services
 
Migrating Your Databases to AWS - Tools and Services.pdf
Migrating Your Databases to AWS -  Tools and Services.pdfMigrating Your Databases to AWS -  Tools and Services.pdf
Migrating Your Databases to AWS - Tools and Services.pdfAmazon Web Services
 
Best Practices for Running PostgreSQL on AWS - DAT314 - re:Invent 2017
Best Practices for Running PostgreSQL on AWS - DAT314 - re:Invent 2017Best Practices for Running PostgreSQL on AWS - DAT314 - re:Invent 2017
Best Practices for Running PostgreSQL on AWS - DAT314 - re:Invent 2017Amazon Web Services
 
Migrazione di Database e Data Warehouse su AWS
Migrazione di Database e Data Warehouse su AWSMigrazione di Database e Data Warehouse su AWS
Migrazione di Database e Data Warehouse su AWSAmazon Web Services
 
Deep Dive on Amazon Athena - AWS Online Tech Talks
Deep Dive on Amazon Athena - AWS Online Tech TalksDeep Dive on Amazon Athena - AWS Online Tech Talks
Deep Dive on Amazon Athena - AWS Online Tech TalksAmazon Web Services
 
Migrating On-Premises Databases to Cloud
Migrating On-Premises Databases to CloudMigrating On-Premises Databases to Cloud
Migrating On-Premises Databases to CloudAmazon Web Services
 
DAT309_Best Practices for Migrating from Oracle and SQL Server to Amazon RDS
DAT309_Best Practices for Migrating from Oracle and SQL Server to Amazon RDSDAT309_Best Practices for Migrating from Oracle and SQL Server to Amazon RDS
DAT309_Best Practices for Migrating from Oracle and SQL Server to Amazon RDSAmazon Web Services
 
Migrating your traditional Data Warehouse to a Modern Data Lake
Migrating your traditional Data Warehouse to a Modern Data LakeMigrating your traditional Data Warehouse to a Modern Data Lake
Migrating your traditional Data Warehouse to a Modern Data LakeAmazon Web Services
 

Similar to Oracle to Amazon Aurora Migration, Step by Step - AWS Online Tech Talks (20)

Use AWS DMS to Securely Migrate Your Oracle Database to Amazon Aurora with Mi...
Use AWS DMS to Securely Migrate Your Oracle Database to Amazon Aurora with Mi...Use AWS DMS to Securely Migrate Your Oracle Database to Amazon Aurora with Mi...
Use AWS DMS to Securely Migrate Your Oracle Database to Amazon Aurora with Mi...
 
GPS: Migrate Your Databases with the AWS Database Migration Service and AWS S...
GPS: Migrate Your Databases with the AWS Database Migration Service and AWS S...GPS: Migrate Your Databases with the AWS Database Migration Service and AWS S...
GPS: Migrate Your Databases with the AWS Database Migration Service and AWS S...
 
GPSWKS408-GPS Migrate Your Databases with AWS Database Migration Service and ...
GPSWKS408-GPS Migrate Your Databases with AWS Database Migration Service and ...GPSWKS408-GPS Migrate Your Databases with AWS Database Migration Service and ...
GPSWKS408-GPS Migrate Your Databases with AWS Database Migration Service and ...
 
DAT317_Migrating Databases and Data Warehouses to the Cloud
DAT317_Migrating Databases and Data Warehouses to the CloudDAT317_Migrating Databases and Data Warehouses to the Cloud
DAT317_Migrating Databases and Data Warehouses to the Cloud
 
Report from the Field on the PostgreSQL-compatible Edition of Amazon Aurora -...
Report from the Field on the PostgreSQL-compatible Edition of Amazon Aurora -...Report from the Field on the PostgreSQL-compatible Edition of Amazon Aurora -...
Report from the Field on the PostgreSQL-compatible Edition of Amazon Aurora -...
 
DAT316_Report from the field on Aurora PostgreSQL Performance
DAT316_Report from the field on Aurora PostgreSQL PerformanceDAT316_Report from the field on Aurora PostgreSQL Performance
DAT316_Report from the field on Aurora PostgreSQL Performance
 
SQL Server to Amazon Aurora Migration, Step by Step (DAT405) - AWS re:Invent ...
SQL Server to Amazon Aurora Migration, Step by Step (DAT405) - AWS re:Invent ...SQL Server to Amazon Aurora Migration, Step by Step (DAT405) - AWS re:Invent ...
SQL Server to Amazon Aurora Migration, Step by Step (DAT405) - AWS re:Invent ...
 
Migrating Your Databases to AWS – Tools and Services (Level 100)
Migrating Your Databases to AWS – Tools and Services (Level 100)Migrating Your Databases to AWS – Tools and Services (Level 100)
Migrating Your Databases to AWS – Tools and Services (Level 100)
 
Heterogenous Migration with DMS and SCT: Database Week San Francisco
Heterogenous Migration with DMS and SCT: Database Week San FranciscoHeterogenous Migration with DMS and SCT: Database Week San Francisco
Heterogenous Migration with DMS and SCT: Database Week San Francisco
 
Heterogenous Migration with DMS & SCT - Michael Russo
Heterogenous Migration with DMS & SCT - Michael RussoHeterogenous Migration with DMS & SCT - Michael Russo
Heterogenous Migration with DMS & SCT - Michael Russo
 
A Practitioner’s Guide on Migrating to, and Running on Amazon Aurora - DAT315...
A Practitioner’s Guide on Migrating to, and Running on Amazon Aurora - DAT315...A Practitioner’s Guide on Migrating to, and Running on Amazon Aurora - DAT315...
A Practitioner’s Guide on Migrating to, and Running on Amazon Aurora - DAT315...
 
Migrating Open Source Databases from Amazon EC2 to Aurora PostgreSQL (DAT339)...
Migrating Open Source Databases from Amazon EC2 to Aurora PostgreSQL (DAT339)...Migrating Open Source Databases from Amazon EC2 to Aurora PostgreSQL (DAT339)...
Migrating Open Source Databases from Amazon EC2 to Aurora PostgreSQL (DAT339)...
 
Migrating Your Databases to AWS - Tools and Services.pdf
Migrating Your Databases to AWS -  Tools and Services.pdfMigrating Your Databases to AWS -  Tools and Services.pdf
Migrating Your Databases to AWS - Tools and Services.pdf
 
Best Practices for Running PostgreSQL on AWS - DAT314 - re:Invent 2017
Best Practices for Running PostgreSQL on AWS - DAT314 - re:Invent 2017Best Practices for Running PostgreSQL on AWS - DAT314 - re:Invent 2017
Best Practices for Running PostgreSQL on AWS - DAT314 - re:Invent 2017
 
Migrazione di Database e Data Warehouse su AWS
Migrazione di Database e Data Warehouse su AWSMigrazione di Database e Data Warehouse su AWS
Migrazione di Database e Data Warehouse su AWS
 
Deep Dive on Amazon Athena - AWS Online Tech Talks
Deep Dive on Amazon Athena - AWS Online Tech TalksDeep Dive on Amazon Athena - AWS Online Tech Talks
Deep Dive on Amazon Athena - AWS Online Tech Talks
 
Migrating On-Premises Databases to Cloud
Migrating On-Premises Databases to CloudMigrating On-Premises Databases to Cloud
Migrating On-Premises Databases to Cloud
 
Migrating database to cloud
Migrating database to cloudMigrating database to cloud
Migrating database to cloud
 
DAT309_Best Practices for Migrating from Oracle and SQL Server to Amazon RDS
DAT309_Best Practices for Migrating from Oracle and SQL Server to Amazon RDSDAT309_Best Practices for Migrating from Oracle and SQL Server to Amazon RDS
DAT309_Best Practices for Migrating from Oracle and SQL Server to Amazon RDS
 
Migrating your traditional Data Warehouse to a Modern Data Lake
Migrating your traditional Data Warehouse to a Modern Data LakeMigrating your traditional Data Warehouse to a Modern Data Lake
Migrating your traditional Data Warehouse to a Modern Data Lake
 

More from Amazon Web Services

Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Amazon Web Services
 
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Amazon Web Services
 
Esegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateEsegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateAmazon Web Services
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSAmazon Web Services
 
Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Amazon Web Services
 
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Amazon Web Services
 
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...Amazon Web Services
 
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsMicrosoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsAmazon Web Services
 
Database Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareDatabase Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareAmazon Web Services
 
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSCrea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSAmazon Web Services
 
API moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAPI moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAmazon Web Services
 
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareDatabase Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareAmazon Web Services
 
Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWSAmazon Web Services
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckAmazon Web Services
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without serversAmazon Web Services
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...Amazon Web Services
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceAmazon Web Services
 

More from Amazon Web Services (20)

Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
 
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
 
Esegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateEsegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS Fargate
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWS
 
Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot
 
Open banking as a service
Open banking as a serviceOpen banking as a service
Open banking as a service
 
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
 
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
 
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsMicrosoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
 
Computer Vision con AWS
Computer Vision con AWSComputer Vision con AWS
Computer Vision con AWS
 
Database Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareDatabase Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatare
 
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSCrea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
 
API moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAPI moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e web
 
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareDatabase Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
 
Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWS
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch Deck
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
 
Fundraising Essentials
Fundraising EssentialsFundraising Essentials
Fundraising Essentials
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container Service
 

Oracle to Amazon Aurora Migration, Step by Step - AWS Online Tech Talks

  • 1. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Arun Thiagarajan – DMS Database Engineer 15th June 2018 Migrating your Oracle database to Amazon Aurora using DMS and SCT
  • 2. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Agenda
  • 3. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. What to expect from this session 1. Introduction 2. Migration Playbook 3. Common Oracle to Aurora PostgreSQL Feature Comparison with Examples 4. Schema Conversion Tool
  • 4. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Introduction - Database Migration Service (DMS) & Schema Conversion Tool (SCT)
  • 5. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. What are DMS and SCT? AWS Database Migration Service (DMS) easily and securely migrates and/or replicate your databases and data warehouses to AWS AWS Schema Conversion Tool (SCT) converts your commercial database and data warehouse schemas to open-source engines or AWS-native services, such as Amazon Aurora and Redshift
  • 6. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Database Migration Process Step 1: Convert or Copy your Schema Source DB or DW AWS SCT Native Tool Destination DB or DW Step 2: Move your data Source DB or DW AWS SCT Destination DB or DW AWS DMS
  • 7. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. How does DMS work? Customer premises Application users AWS Internet VPN Start a replication instance Connect to source and target databases Create Tasks  Let AWS DMS create tables, load data, and keep them in sync  Switch applications over to the target at your convenience AWS DMS
  • 8. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Oracle to Aurora Migration Playbook
  • 9. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Oracle to Aurora Migration PlaybookOracle to Aurora Migration Playbook • Topic-by-topic overview of Oracle to Aurora PostgreSQL migrations and “hand-on” best practices • How to migrate from proprietary features and the different database objects • Migration best practices SCT DMS Playbook Schema Data Best Practices
  • 10. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Top Oracle to Aurora PostgreSQL Feature Comparison
  • 11. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Materialized Views Oracle PostgreSQL Creation CREATE MATERIALIZED VIEW mv1 AS SELECT * FROM employees; CREATE MATERIALIZED VIEW mv1 AS SELECT * FROM employees; Manual Refresh DBMS_MVIEW.REFRESH('mv 1', 'cf'); The --cf parameter configured the refresh method: c is complete and f is fast REFRESH MATERIALIZED VIEW mv1;
  • 12. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Materialized Views CREATE MATERIALIZED VIEW mv1 REFRESH FAST ON COMMIT AS SELECT * FROM employees; - Supports automatic incremental refresh - Supports DML on the materialized view Create a trigger that will initiate a refresh after every DML command on the underlying tables: CREATE OR REPLACE FUNCTION refresh_mv1() returns trigger language plpgsql as $$ begin refresh materialized view mv1; return null; end $$; create trigger refresh_ mv1 after insert or update or delete or truncate on employees for each statement execute procedure
  • 13. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Partitioning • PostgreSQL started supporting declarative partitioning from version 10. • Prior to PostgreSQL 10, partitions could be used via inheritance. • Oracle supports various partitioning mechanisms (hash, range, list, composite) whereas PostgreSQL currently supports list and range partitioning.
  • 14. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Partitioning Oracle example: List Partitioning SQL> CREATE TABLE SYSTEM_LOGS (EVENT_NO NUMBER NOT NULL, EVENT_DATE DATE NOT NULL, EVENT_STR VARCHAR2(500), ERROR_CODE VARCHAR2(10)) PARTITION BY LIST (ERROR_CODE) (PARTITION warning VALUES ('err1', 'err2', 'err3') TABLESPACE TB1, PARTITION critical VALUES ('err4', 'err5', 'err6') TABLESPACE TB2);
  • 15. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Partitioning PostgreSQL example: List Partitioning It is a 5 step process using inheritance prior to PostgreSQL 10: 1. Create parent table 2. Create child tables with check constraints 3. Create indexes on child tables 4. Create a function to redirect data inserted into the parent table 5. Create trigger to execute function on DML event
  • 16. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Partitioning 1. Create Parent table: demo=# CREATE TABLE SYSTEM_LOGS (EVENT_NO NUMERIC NOT NULL, EVENT_DATE DATE NOT NULL, EVENT_STR VARCHAR(500), ERROR_CODE VARCHAR(10)); 2. Create Child tables with check constraints: demo=# CREATE TABLE SYSTEM_LOGS_WARNING ( CHECK (ERROR_CODE IN('err1', 'err2', 'err3'))) INHERITS (SYSTEM_LOGS); demo=# CREATE TABLE SYSTEM_LOGS_CRITICAL ( CHECK (ERROR_CODE IN('err4', 'err5', 'err6'))) INHERITS (SYSTEM_LOGS);
  • 17. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Partitioning 3. Create indexes on each of the child tables (“partitions”): demo=# CREATE INDEX IDX_SYSTEM_LOGS_WARNING ON SYSTEM_LOGS_WARNING(ERROR_CODE); demo=# CREATE INDEX IDX_SYSTEM_LOGS_CRITICAL ON SYSTEM_LOGS_CRITICAL(ERROR_CODE);
  • 18. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Partitioning 4. Create a function to redirect data inserted into the parent table
  • 19. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Partitioning 4. Create trigger to execute function on DML demo=# CREATE TRIGGER SYSTEM_LOGS_ERR_TRIG BEFORE INSERT ON SYSTEM_LOGS FOR EACH ROW EXECUTE PROCEDURE SYSTEM_LOGS_ERR_CODE_INS();
  • 20. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Triggers Oracle PostgreSQL Triggers can be executed after: a. DML b. DDL c. Certain database operations Triggers can be execute: a. DML b. Event (DDL is also covered in this) Different types: a. DML trigger b. Instead of trigger c. System event trigger Different types: a. BEFORE OR AFTER events b. INSTEAD OF c. For each row or statement
  • 21. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. PostgreSQL triggers
  • 22. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. DML Trigger Example - Oracle
  • 23. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. DML Trigger Example - PostgreSQL
  • 24. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Sequences
  • 25. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Sequence caching in PostgreSQL per session
  • 26. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Virtual Columns Oracle PostgreSQL Oracle Virtual Columns appear as normal columns but their values are calculated instead of being stored in the database. No virtual column support. It can be created through views or function as a column. Virtual Columns cannot be created based on other Virtual Columns and can only reference columns from the same table NA When creating a Virtual Column, you can explicitly specify the datatype or let the database choose the datatype based on the expression. If the column needs to be part of the object, a view must be created. If not, function as a column can be used as part of the select statement.
  • 27. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Virtual Columns - Oracle
  • 28. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Virtual Columns - PostgreSQL 1. 2. 3.
  • 29. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Virtual Columns - PostgreSQL OR
  • 30. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Number in Oracle vs integer or bigint in PostgreSQL • The limit for numbers in Postgres (up to 131072 digits before the decimal point; up to 16383 digits after the decimal point) is much higher than in Oracle. • The appropriate data type for NUMBER in Oracle might seem to be NUMERIC in PostgreSQL. However, PostgreSQL Numeric field is less efficient than native integer / bigint fields. • Given the implementation differences, we have many customers who reduced CPU usage on Aurora from 100% to 20% by changing the generated column data types from Numeric to Bigint on Primary keys. • If a number field in Oracle is being used as a PK or FK (relating to another table), we should look at using integer or bigint in Aurora PostgreSQL.
  • 31. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Character Sets Oracle PostgreSQL Supports most national and international character sets including Unicode. PostgreSQL supports a variety of different character sets, also known as encoding, including support for both single-byte and multi-byte languages. Supports VARCHAR2 (for non-Unicode) and NVARCHAR2 (for UTF-16). Does not natively support NVARCHAR2 or UTF-16. Can be defined at the instance level or pluggable database level. Called encoding at database level and locale at table/column level. Changing character set might require an export/import or use database migration assistant for Unicode. Changing character set requires export/import to a new database.
  • 32. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Schema Conversion Tool (SCT)
  • 33. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. When to use SCT? Modernize Modernize your database tier Modernize and Migrate your Data Warehouse to Amazon Redshift Amazon Aurora Amazon Redshift
  • 34. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. SCT Migration Assessment Report • Assessment of migration compatibility of source databases with open-source database engines – RDS MySQL, RDS PostgreSQL and Aurora • Recommends best target engine • Provides details level of efforts to complete migration
  • 35. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. SCT helps with converting tables, views, and code Sequences User-defined types Synonyms Packages Stored procedures Functions Triggers Schemas Tables Indexes Views Sort and distribution keys
  • 36. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Thank you!