SlideShare una empresa de Scribd logo
1 de 47
Descargar para leer sin conexión
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS re:Invent
Best Practices for Migrating from Oracle
and SQL Server to Amazon RDS
K e v i n J e r n i g a n , S e n i o r P r o d u c t M a n a g e r , A u r o r a P o s t g r e S Q L
J o h n W i n f o r d , S e n i o r T e c h n i c a l P r o d u c t M a n a g e r , D a t a b a s e S e r v i c e s
D A T 3 0 9
N o v e m b e r 2 7 , 2 0 1 7
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Agenda
• Why migrate to Amazon RDS?
• Homogeneous migrations
• Migrating to open source: MySQL and PostgreSQL
• Amazon Aurora
• Doing the work: database migration
• Conclusion
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Migrating databases to AWS
Why migrate databases to the cloud?
Reduce costs
Simplify operations
Increase flexibility and possibilities
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon RDS—an introduction
A managed database platform
• Multi-engine support: Amazon Aurora, MySQL,
MariaDB, PostgreSQL, Oracle, SQL Server
• Automated provisioning, patching, scaling,
backup/restore, failover
• High availability with Amazon RDS Multi-AZ
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Why migrate to Amazon RDS?
Power, HVAC, net
Rack & stack
Server maintenance
OS patches
DB s/w patches
Database backups
Scaling
High availability
DB s/w installs
OS installation
you
App optimization
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Why migrate to Amazon RDS?
OS patches
DB s/w patches
Database backups
Scaling
High availability
DB s/w installs
you
App optimization
Power, HVAC, net
Rack & stack
Server maintenance
OS installation
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Why migrate to Amazon RDS?
you
App optimization
Power, HVAC, net
Rack & stack
Server maintenance
OS patches
DB s/w patches
Database backups
High availability
DB s/w installs
OS installation
Scaling
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Homogeneous migrations
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Homogeneous migrations
If you’re not switching engines and can take downtime:
- SQL Server: bak file import
- Oracle: SQL Developer, Data Pump, Export/Import
- MySQL: read replicas
- PostgreSQL: pg_dump
Why use RDS for Microsoft
and Oracle Databases?
• Speed of provisioning, secure, fully managed Amazon RDS
experience
• Single-click high availability, easy scaling
• Broad set of engine features supported
• Flexible licensing models
• Bring your own license (BYOL)
• License included (LI)
• SQL Server Express, Web, Standard & Enterprise editions
supported—2014, 2016, and 2017
• Oracle Standard and Enterprise Editions
Amazon RDS for Oracle
Recently shipped features
• OEM Agent 13c
• Oracle Spatial/Locator/Multimedia
• Customer-initiated snapshot upgrade
• Support for APEX 5.0
• R4, t2.xlarge, t2.2xlarge, and m4.16xlarge instances
• Support for up to 16 TB of storage per instance
Amazon RDS for SQL Server
Recently shipped features
• Support for forced SSL
• HIPAA BAA inclusion
• Region expansion for Enterprise Edition License included
• Storage scaling up to 16 TB
• SQL Server 2017 support
• R4 and m4.16xlarge instances
• Storage reconfiguration on snapshot restore
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Migrating to open-source databases
Why migrate from Oracle or SQL Server
to open source?
Simplicity and innovations of open source
Lower cost and no licensing
Reduce uncertainty
Compatibility between Oracle/SQL Server
and PostgreSQL
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
A brief history of MySQL
• World’s most commonly used relational database
• Key component of the LAMP open-source web application software stack
• Used in open source applications such as WordPress, Joomla, Redmine, and Drupal
• History
• First released in 1995 in Sweden by MySQL AB
• Acquired by Sun in 2008
• Launched as first Amazon RDS engine in 2009
• Acquired by Oracle in 2010
• Popular branches
• MySQL Community Edition
• MySQL Enterprise Edition
• MariaDB Server
• Percona Server
• Amazon Aurora MySQL
Amazon RDS
 Open-source database
 In active development for 20 years
 Owned by a foundation, not a single company
 Permissive innovation-friendly open-source license
 High performance out of the box
 Object-oriented and ANSI-SQL:2008-compatible
 Most geospatial features of any open-source database
 Supports stored procedures in 12 languages (Java, Perl, Python,
Ruby, Tcl, C/C++, its own Oracle-like PL/pgSQL, etc.)
 Most Oracle-compatible open-source database
 Highest AWS Schema Conversion Tool automatic conversion rates
are from Oracle to PostgreSQL
PostgreSQL fast facts
Open Source Initiative
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon Aurora
A service-oriented architecture
applied to the database
Move the logging and storage layer into a
multitenant, scale-out, database-optimized
storage service
Integrate with other AWS services like
Amazon EC2, Amazon VPC, Amazon
DynamoDB, Amazon SWF, and Amazon
Route 53 for control and monitoring
Make it a managed service—using Amazon
RDS; takes care of management and
administrative functions
Amazon
DynamoDB
Amazon SWF
Amazon Route 53
Logging + Storage
SQL
Transactions
Caching
Amazon S3
1
2
3
Amazon RDS
Scale-out, distributed, log-structured storage
Master Replica Replica Replica
Availability Zone 1
Shared Storage Volume – Transaction Aware
Primary
Database
Node
Read
Replica /
Secondary
Node
Read
Replica /
Secondary
Node
Read
Replica /
Secondary
Node
Availability Zone 2 Availability Zone 3
AWS Region
Storage
Monitoring
Database and
Instance
Monitoring
Amazon Aurora storage engine overview
Data is replicated six times across three Availability
Zones
Continuous backup to Amazon S3
(built for 11 9s of durability)
Continuous monitoring of nodes and disks for repair
10 GB segments as unit of repair or hotspot rebalance
Quorum system for read/write; latency-tolerant
Quorum membership changes do not stall writes
Storage volume automatically grows up to 64 TB
AZ 1 AZ 2 AZ 3
Amazon S3
Database
Node
Storage
Node
Storage
Node
Storage
Node
Storage
Node
Storage
Node
Storage
Node
Storage
Monitoring
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Database migration
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
DB migration is part of the cloud journey
How quickly and easily can I migrate my on-premises data to the cloud?
How can I minimize application downtime during database migration?
Are there ways to automate schema conversion and conflict analysis?
How can my databases be merged or modularized during the migration for data
consolidation and application refactoring?
Can I migrate off commercial databases?
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
What are AWS DMS and AWS SCT?
AWS Database Migration Service (AWS DMS) easily and
securely migrate and/or replicate your databases and data
warehouses to AWS
AWS Schema Conversion Tool (AWS SCT) convert your commercial
database and data warehouse schemas to open-source engines or
AWS-native services, such as Amazon Aurora and Amazon Redshift
We have migrated over 45,000 unique databases—and counting…
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
When should I use it?
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
When to use AWS DMS and AWS SCT?
Modernize Migrate Replicate
Modernize your database tier
• Commercial to open-source
• Commercial to Amazon Aurora
Modernize your data warehouse –
• Commercial to Amazon Redshift
• Migrate business-critical applications
• Migrate from Classic to Amazon VPC
• Migrate data warehouse to
Amazon Redshift
• Upgrade to a minor version
• Consolidate shards into
Amazon Aurora
• Create cross-regions Read Replicas
• Run your analytics in the cloud
• Keep your dev/test and production
environment in sync
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
When to use AWS DMS
Migrate databases Migrate business-critical applications
Migrate from Classic to Amazon VPC
Migrate data warehouse to Amazon Redshift
Upgrade to a minor version
Consolidate shards into Amazon Aurora
Migrate from NoSQL to SQL, SQL
to NoSQL or NoSQL to NoSQL
Amazon S3
Amazon Dynamo
DB
Amazon
Redshift
Amazon S3
Amazon
Aurora
Sources
Targets
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
When to use AWS SCT
Convert schemas
Migrate warehouses
Convert database schemas
Optimize data warehouse
Migrate data warehouses to Amazon Redshift
Mass migration using AWS Snowball
DB Schema
Data Warehouses
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Why use AWS DMS and AWS SCT?
Secure
Cost-Effective
Remove Barriers
to Entry
Allow DB
Freedom
Keep a Leg in
the Cloud
Easy to Use, but
Sophisticated…
Near-Zero
Downtime
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
How does it work?
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Database migration process
Source
Oracle Database on-premises
in Amazon EC2 or Amazon RDS
Source
Oracle Database on-premises
in Amazon EC2 or Amazon RDS
AWS Schema Conversion Tool
Target
Amazon Aurora PostgreSQL
Target
Amazon Aurora PostgreSQL
Step 1
Step 2
AWS Database Migration Service
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS Schema Conversion Tool (AWS SCT)
Features
Converting database schema
Converting data warehouse schema
Converting application SQL
Code browser that highlights places where
manual edits are required
Secure connections to your databases with SSL
The AWS Schema Conversion Tool helps automate many
database schema and code conversion tasks when
migrating from source to target database engines
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Database migration assessment
Connect AWS SCT to
source and target
databases
Run assessment report
Read executive
summary
Follow detailed
instructions
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Components of the AWS SCT console
1. Source schema
2. Action items
3. Target schema
4. Schema element details
5. Edit window
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Customer
premises
Application users
AWS
Internet
VPN
Keep your apps running during the migration
 Start a replication instance
 Connect to source and target
databases
 Select tables, schemas, or
databases
 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.
Change data capture (CDC) and apply
Replication instance
Target
Transactions
Change apply after bulk load
t1
t2
Source
t1 t2
Update
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Demo
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Things to consider
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Native replication
 Your target supports native
replication
 You need to move all the data
 You don’t need any
transformation
 Your target is a new database
Dump/Restore
 You don’t have a huge database
(actually you have a small
database)
 You can take a downtime which
is bigger than the time to dump
and restore
 You will need all the data
 You will not transform schema
or data
AWS DMS and AWS SCT
 You are switching database
engines
 You need to convert your
schema
 You cannot afford downtime
 The data is so large you need
AWS Snowball
Migration methodology
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Migration is a multiphase process
Phase Description Automation Effort (%)
1 Assessment SCT 2
2 Database Schema Conversion SCT/DMS 14
3 Application Conversion/Remediation SCT 25
4 Scripts Conversion SCT 7
5 Integration with third-party applications 3
6 Data Migration DMS 4
7 Functional testing of the entire system 29
8 Performance tuning SCT 2
9 Integration and deployment 7
10 Training and knowledge 2
11 Documentation and version control 2
12 Post-production support 3
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Understand your environment
Your database
 What is the size of your database? Any large tables?
 How many schemas and tables do you have?
 What are the transaction boundaries?
 Unique data types to consider?
 Do you have LOBs in your tables, and how big are they?
 How hot is your source database?
And your network
 How to access your database (firewalls, tunnels, VPNs)
 Do you understand VPCs?
 Which security group should be used?
 Do you have enough bandwidth to move all your data?
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
What affects speed?
 The size of the source database and the associated activity
 The size of the target
 Availability of bandwidth
 Replication instance size
 Schema breakdown (a single large table can slow things down)
 LOBs in the schema
 Big transactions
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Find the right people Start small Ramp up
Other considerations
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Other best practices
• Keep backups disabled during the migration
• Set up parameter group for each instance to set
parameters per-instance
• Use AWS SCT to classify databases based on level of
work to convert
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Other best practices for PostgreSQL
Use lowercase for DB object names
• Oracle by default saves everything in UPPERCASE
and PostgreSQL by default saves everything in
LOWERCASE
• Convert all the object names to lowercase in
PostgreSQL
• AWS SCT does this by default while migrating
objects from Oracle to PostgreSQL
• Lowercase names help to avoid object reference
complications
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Other best practices for PostgreSQL
• Cutover planning
• Downtime window to stop writes on Oracle and
change configs to make PostgreSQL the new data
source
• Enable all user triggers in PostgreSQL after stopping
replication and before connecting users
• Pre-cutover validation steps
• Post-cutover validation steps
• Rollback strategy
• Use log_fdw, pg_repack, and pg_audit post-cutover
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Thank you!

Más contenido relacionado

La actualidad más candente

GAM310_Build a Telemetry and Analytics Pipeline for Game Balancing
GAM310_Build a Telemetry and Analytics Pipeline for Game BalancingGAM310_Build a Telemetry and Analytics Pipeline for Game Balancing
GAM310_Build a Telemetry and Analytics Pipeline for Game Balancing
Amazon Web Services
 

La actualidad más candente (20)

SID344-Soup to Nuts Identity Federation for AWS
SID344-Soup to Nuts Identity Federation for AWSSID344-Soup to Nuts Identity Federation for AWS
SID344-Soup to Nuts Identity Federation for AWS
 
GAM310_Build a Telemetry and Analytics Pipeline for Game Balancing
GAM310_Build a Telemetry and Analytics Pipeline for Game BalancingGAM310_Build a Telemetry and Analytics Pipeline for Game Balancing
GAM310_Build a Telemetry and Analytics Pipeline for Game Balancing
 
Deploying Business Analytics at Enterprise Scale - AWS Online Tech Talks
Deploying Business Analytics at Enterprise Scale - AWS Online Tech TalksDeploying Business Analytics at Enterprise Scale - AWS Online Tech Talks
Deploying Business Analytics at Enterprise Scale - AWS Online Tech Talks
 
GPSTEC310_IAM Best Practices and Becoming an IAM Ninja
GPSTEC310_IAM Best Practices and Becoming an IAM NinjaGPSTEC310_IAM Best Practices and Becoming an IAM Ninja
GPSTEC310_IAM Best Practices and Becoming an IAM Ninja
 
GPSTEC302_Anti-Patterns- Learning through Failure
GPSTEC302_Anti-Patterns- Learning through FailureGPSTEC302_Anti-Patterns- Learning through Failure
GPSTEC302_Anti-Patterns- Learning through Failure
 
FSV308-Culture Shift How to Move a Global Financial Services Organization to ...
FSV308-Culture Shift How to Move a Global Financial Services Organization to ...FSV308-Culture Shift How to Move a Global Financial Services Organization to ...
FSV308-Culture Shift How to Move a Global Financial Services Organization to ...
 
Enabling Governance, Compliance, and Operational and Risk Auditing with AWS M...
Enabling Governance, Compliance, and Operational and Risk Auditing with AWS M...Enabling Governance, Compliance, and Operational and Risk Auditing with AWS M...
Enabling Governance, Compliance, and Operational and Risk Auditing with AWS M...
 
WIN302-Deep Dive on Active Directory From One to Many AWS Regions.pdf
WIN302-Deep Dive on Active Directory From One to Many AWS Regions.pdfWIN302-Deep Dive on Active Directory From One to Many AWS Regions.pdf
WIN302-Deep Dive on Active Directory From One to Many AWS Regions.pdf
 
DVC303-Technological Accelerants for Organizational Transformation
DVC303-Technological Accelerants for Organizational TransformationDVC303-Technological Accelerants for Organizational Transformation
DVC303-Technological Accelerants for Organizational Transformation
 
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 ...
 
ENT223_Leveraging the AWS Cloud Adoption Framework to Build Your Cloud Action...
ENT223_Leveraging the AWS Cloud Adoption Framework to Build Your Cloud Action...ENT223_Leveraging the AWS Cloud Adoption Framework to Build Your Cloud Action...
ENT223_Leveraging the AWS Cloud Adoption Framework to Build Your Cloud Action...
 
An Introduction to AI Services on AWS - Web Summit Lisbon
An Introduction to AI Services on AWS -  Web Summit LisbonAn Introduction to AI Services on AWS -  Web Summit Lisbon
An Introduction to AI Services on AWS - Web Summit Lisbon
 
NEW LAUNCH! Building Alexa Skills for Businesses (ALX204)
NEW LAUNCH! Building Alexa Skills for Businesses (ALX204) NEW LAUNCH! Building Alexa Skills for Businesses (ALX204)
NEW LAUNCH! Building Alexa Skills for Businesses (ALX204)
 
Migrating Your Microsoft Applications to AWS - ENT325 - re:Invent 2017
Migrating Your Microsoft Applications to AWS - ENT325 - re:Invent 2017Migrating Your Microsoft Applications to AWS - ENT325 - re:Invent 2017
Migrating Your Microsoft Applications to AWS - ENT325 - re:Invent 2017
 
SRV213-Thirty Serverless Architectures in 30 Minutes
SRV213-Thirty Serverless Architectures in 30 MinutesSRV213-Thirty Serverless Architectures in 30 Minutes
SRV213-Thirty Serverless Architectures in 30 Minutes
 
Scaling Up to Your First 10 Million Users
Scaling Up to Your First 10 Million UsersScaling Up to Your First 10 Million Users
Scaling Up to Your First 10 Million Users
 
HLC305_How Verge Health Leverages Automation
HLC305_How Verge Health Leverages AutomationHLC305_How Verge Health Leverages Automation
HLC305_How Verge Health Leverages Automation
 
規劃大規模遷移到 AWS 的最佳實踐
規劃大規模遷移到 AWS 的最佳實踐規劃大規模遷移到 AWS 的最佳實踐
規劃大規模遷移到 AWS 的最佳實踐
 
How Nextdoor Built a Scalable, Serverless Data Pipeline for Billions of Event...
How Nextdoor Built a Scalable, Serverless Data Pipeline for Billions of Event...How Nextdoor Built a Scalable, Serverless Data Pipeline for Billions of Event...
How Nextdoor Built a Scalable, Serverless Data Pipeline for Billions of Event...
 
Operation Monitoring and Alerting at Scale in GE Transportation - ENT340 - re...
Operation Monitoring and Alerting at Scale in GE Transportation - ENT340 - re...Operation Monitoring and Alerting at Scale in GE Transportation - ENT340 - re...
Operation Monitoring and Alerting at Scale in GE Transportation - ENT340 - re...
 

Similar a DAT309_Best Practices for Migrating from Oracle and SQL Server to Amazon RDS

ABD324_Migrating Your Oracle Data Warehouse to Amazon Redshift Using AWS DMS ...
ABD324_Migrating Your Oracle Data Warehouse to Amazon Redshift Using AWS DMS ...ABD324_Migrating Your Oracle Data Warehouse to Amazon Redshift Using AWS DMS ...
ABD324_Migrating Your Oracle Data Warehouse to Amazon Redshift Using AWS DMS ...
Amazon Web Services
 

Similar a DAT309_Best Practices for Migrating from Oracle and SQL Server to Amazon RDS (20)

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
 
Oracle Enterprise Solutions on AWS - ENT326 - re:Invent 2017
Oracle Enterprise Solutions on AWS - ENT326 - re:Invent 2017Oracle Enterprise Solutions on AWS - ENT326 - re:Invent 2017
Oracle Enterprise Solutions on AWS - ENT326 - re:Invent 2017
 
WIN301-Migrating Microsoft SQL Server Databases to AWS-Best Practices and Pat...
WIN301-Migrating Microsoft SQL Server Databases to AWS-Best Practices and Pat...WIN301-Migrating Microsoft SQL Server Databases to AWS-Best Practices and Pat...
WIN301-Migrating Microsoft SQL Server Databases to AWS-Best Practices and Pat...
 
Migrating Microsoft SQL Server Databases to AWS – Best Practices and Patterns...
Migrating Microsoft SQL Server Databases to AWS – Best Practices and Patterns...Migrating Microsoft SQL Server Databases to AWS – Best Practices and Patterns...
Migrating Microsoft SQL Server Databases to AWS – Best Practices and Patterns...
 
GPSWKS407-Strategies for Migrating Microsoft SQL Databases to AWS
GPSWKS407-Strategies for Migrating Microsoft SQL Databases to AWSGPSWKS407-Strategies for Migrating Microsoft SQL Databases to AWS
GPSWKS407-Strategies for Migrating Microsoft SQL Databases to AWS
 
Migrating Your Oracle Database to PostgreSQL - AWS Online Tech Talks
Migrating Your Oracle Database to PostgreSQL - AWS Online Tech TalksMigrating Your Oracle Database to PostgreSQL - AWS Online Tech Talks
Migrating Your Oracle Database to PostgreSQL - AWS Online Tech Talks
 
Migrating Your Oracle Database to PostgreSQL - AWS Online Tech Talks
Migrating Your Oracle Database to PostgreSQL - AWS Online Tech TalksMigrating Your Oracle Database to PostgreSQL - AWS Online Tech Talks
Migrating Your Oracle Database to PostgreSQL - 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...
 
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
 
Running Oracle Databases on Amazon RDS and Migrating to PostgreSQL (DAT307-R1...
Running Oracle Databases on Amazon RDS and Migrating to PostgreSQL (DAT307-R1...Running Oracle Databases on Amazon RDS and Migrating to PostgreSQL (DAT307-R1...
Running Oracle Databases on Amazon RDS and Migrating to PostgreSQL (DAT307-R1...
 
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...
 
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...
 
ABD324_Migrating Your Oracle Data Warehouse to Amazon Redshift Using AWS DMS ...
ABD324_Migrating Your Oracle Data Warehouse to Amazon Redshift Using AWS DMS ...ABD324_Migrating Your Oracle Data Warehouse to Amazon Redshift Using AWS DMS ...
ABD324_Migrating Your Oracle Data Warehouse to Amazon Redshift Using AWS DMS ...
 
What’s New in Amazon RDS for Open-Source and Commercial Databases:
What’s New in Amazon RDS for Open-Source and Commercial Databases: What’s New in Amazon RDS for Open-Source and Commercial Databases:
What’s New in Amazon RDS for Open-Source and Commercial Databases:
 
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...
 
Heterogenous Migration with DMS & SCT
Heterogenous Migration with DMS & SCTHeterogenous Migration with DMS & SCT
Heterogenous Migration with DMS & SCT
 
Strategies for Migrating Microsoft SQL Databases to AWS - WIN314 - re:Invent ...
Strategies for Migrating Microsoft SQL Databases to AWS - WIN314 - re:Invent ...Strategies for Migrating Microsoft SQL Databases to AWS - WIN314 - re:Invent ...
Strategies for Migrating Microsoft SQL Databases to AWS - WIN314 - re:Invent ...
 
Running SQL Server on Amazon RDS and Migrating to MySQL (DAT306-R1) - AWS re:...
Running SQL Server on Amazon RDS and Migrating to MySQL (DAT306-R1) - AWS re:...Running SQL Server on Amazon RDS and Migrating to MySQL (DAT306-R1) - AWS re:...
Running SQL Server on Amazon RDS and Migrating to MySQL (DAT306-R1) - AWS re:...
 
SRV422 Deep Dive on AWS Database Migration Service
SRV422 Deep Dive on AWS Database Migration ServiceSRV422 Deep Dive on AWS Database Migration Service
SRV422 Deep Dive on AWS Database Migration Service
 

Más de Amazon 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 AWS
Amazon 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 Deck
Amazon Web Services
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
Amazon 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
 

Más de 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
 

DAT309_Best Practices for Migrating from Oracle and SQL Server to Amazon RDS

  • 1. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS re:Invent Best Practices for Migrating from Oracle and SQL Server to Amazon RDS K e v i n J e r n i g a n , S e n i o r P r o d u c t M a n a g e r , A u r o r a P o s t g r e S Q L J o h n W i n f o r d , S e n i o r T e c h n i c a l P r o d u c t M a n a g e r , D a t a b a s e S e r v i c e s D A T 3 0 9 N o v e m b e r 2 7 , 2 0 1 7
  • 2. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Agenda • Why migrate to Amazon RDS? • Homogeneous migrations • Migrating to open source: MySQL and PostgreSQL • Amazon Aurora • Doing the work: database migration • Conclusion
  • 3. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Migrating databases to AWS
  • 4. Why migrate databases to the cloud? Reduce costs Simplify operations Increase flexibility and possibilities
  • 5. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon RDS—an introduction A managed database platform • Multi-engine support: Amazon Aurora, MySQL, MariaDB, PostgreSQL, Oracle, SQL Server • Automated provisioning, patching, scaling, backup/restore, failover • High availability with Amazon RDS Multi-AZ
  • 6. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Why migrate to Amazon RDS? Power, HVAC, net Rack & stack Server maintenance OS patches DB s/w patches Database backups Scaling High availability DB s/w installs OS installation you App optimization
  • 7. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Why migrate to Amazon RDS? OS patches DB s/w patches Database backups Scaling High availability DB s/w installs you App optimization Power, HVAC, net Rack & stack Server maintenance OS installation
  • 8. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Why migrate to Amazon RDS? you App optimization Power, HVAC, net Rack & stack Server maintenance OS patches DB s/w patches Database backups High availability DB s/w installs OS installation Scaling
  • 9. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Homogeneous migrations
  • 10. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Homogeneous migrations If you’re not switching engines and can take downtime: - SQL Server: bak file import - Oracle: SQL Developer, Data Pump, Export/Import - MySQL: read replicas - PostgreSQL: pg_dump
  • 11. Why use RDS for Microsoft and Oracle Databases? • Speed of provisioning, secure, fully managed Amazon RDS experience • Single-click high availability, easy scaling • Broad set of engine features supported • Flexible licensing models • Bring your own license (BYOL) • License included (LI) • SQL Server Express, Web, Standard & Enterprise editions supported—2014, 2016, and 2017 • Oracle Standard and Enterprise Editions
  • 12. Amazon RDS for Oracle Recently shipped features • OEM Agent 13c • Oracle Spatial/Locator/Multimedia • Customer-initiated snapshot upgrade • Support for APEX 5.0 • R4, t2.xlarge, t2.2xlarge, and m4.16xlarge instances • Support for up to 16 TB of storage per instance
  • 13. Amazon RDS for SQL Server Recently shipped features • Support for forced SSL • HIPAA BAA inclusion • Region expansion for Enterprise Edition License included • Storage scaling up to 16 TB • SQL Server 2017 support • R4 and m4.16xlarge instances • Storage reconfiguration on snapshot restore
  • 14. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Migrating to open-source databases
  • 15. Why migrate from Oracle or SQL Server to open source? Simplicity and innovations of open source Lower cost and no licensing Reduce uncertainty Compatibility between Oracle/SQL Server and PostgreSQL
  • 16. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. A brief history of MySQL • World’s most commonly used relational database • Key component of the LAMP open-source web application software stack • Used in open source applications such as WordPress, Joomla, Redmine, and Drupal • History • First released in 1995 in Sweden by MySQL AB • Acquired by Sun in 2008 • Launched as first Amazon RDS engine in 2009 • Acquired by Oracle in 2010 • Popular branches • MySQL Community Edition • MySQL Enterprise Edition • MariaDB Server • Percona Server • Amazon Aurora MySQL Amazon RDS
  • 17.  Open-source database  In active development for 20 years  Owned by a foundation, not a single company  Permissive innovation-friendly open-source license  High performance out of the box  Object-oriented and ANSI-SQL:2008-compatible  Most geospatial features of any open-source database  Supports stored procedures in 12 languages (Java, Perl, Python, Ruby, Tcl, C/C++, its own Oracle-like PL/pgSQL, etc.)  Most Oracle-compatible open-source database  Highest AWS Schema Conversion Tool automatic conversion rates are from Oracle to PostgreSQL PostgreSQL fast facts Open Source Initiative
  • 18. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Aurora
  • 19. A service-oriented architecture applied to the database Move the logging and storage layer into a multitenant, scale-out, database-optimized storage service Integrate with other AWS services like Amazon EC2, Amazon VPC, Amazon DynamoDB, Amazon SWF, and Amazon Route 53 for control and monitoring Make it a managed service—using Amazon RDS; takes care of management and administrative functions Amazon DynamoDB Amazon SWF Amazon Route 53 Logging + Storage SQL Transactions Caching Amazon S3 1 2 3 Amazon RDS
  • 20. Scale-out, distributed, log-structured storage Master Replica Replica Replica Availability Zone 1 Shared Storage Volume – Transaction Aware Primary Database Node Read Replica / Secondary Node Read Replica / Secondary Node Read Replica / Secondary Node Availability Zone 2 Availability Zone 3 AWS Region Storage Monitoring Database and Instance Monitoring
  • 21. Amazon Aurora storage engine overview Data is replicated six times across three Availability Zones Continuous backup to Amazon S3 (built for 11 9s of durability) Continuous monitoring of nodes and disks for repair 10 GB segments as unit of repair or hotspot rebalance Quorum system for read/write; latency-tolerant Quorum membership changes do not stall writes Storage volume automatically grows up to 64 TB AZ 1 AZ 2 AZ 3 Amazon S3 Database Node Storage Node Storage Node Storage Node Storage Node Storage Node Storage Node Storage Monitoring
  • 22. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Database migration
  • 23. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. DB migration is part of the cloud journey How quickly and easily can I migrate my on-premises data to the cloud? How can I minimize application downtime during database migration? Are there ways to automate schema conversion and conflict analysis? How can my databases be merged or modularized during the migration for data consolidation and application refactoring? Can I migrate off commercial databases?
  • 24. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. What are AWS DMS and AWS SCT? AWS Database Migration Service (AWS DMS) easily and securely migrate and/or replicate your databases and data warehouses to AWS AWS Schema Conversion Tool (AWS SCT) convert your commercial database and data warehouse schemas to open-source engines or AWS-native services, such as Amazon Aurora and Amazon Redshift We have migrated over 45,000 unique databases—and counting…
  • 25. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. When should I use it?
  • 26. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. When to use AWS DMS and AWS SCT? Modernize Migrate Replicate Modernize your database tier • Commercial to open-source • Commercial to Amazon Aurora Modernize your data warehouse – • Commercial to Amazon Redshift • Migrate business-critical applications • Migrate from Classic to Amazon VPC • Migrate data warehouse to Amazon Redshift • Upgrade to a minor version • Consolidate shards into Amazon Aurora • Create cross-regions Read Replicas • Run your analytics in the cloud • Keep your dev/test and production environment in sync
  • 27. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. When to use AWS DMS Migrate databases Migrate business-critical applications Migrate from Classic to Amazon VPC Migrate data warehouse to Amazon Redshift Upgrade to a minor version Consolidate shards into Amazon Aurora Migrate from NoSQL to SQL, SQL to NoSQL or NoSQL to NoSQL Amazon S3 Amazon Dynamo DB Amazon Redshift Amazon S3 Amazon Aurora Sources Targets
  • 28. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. When to use AWS SCT Convert schemas Migrate warehouses Convert database schemas Optimize data warehouse Migrate data warehouses to Amazon Redshift Mass migration using AWS Snowball DB Schema Data Warehouses
  • 29. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Why use AWS DMS and AWS SCT? Secure Cost-Effective Remove Barriers to Entry Allow DB Freedom Keep a Leg in the Cloud Easy to Use, but Sophisticated… Near-Zero Downtime
  • 30. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. How does it work?
  • 31. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Database migration process Source Oracle Database on-premises in Amazon EC2 or Amazon RDS Source Oracle Database on-premises in Amazon EC2 or Amazon RDS AWS Schema Conversion Tool Target Amazon Aurora PostgreSQL Target Amazon Aurora PostgreSQL Step 1 Step 2 AWS Database Migration Service
  • 32. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Schema Conversion Tool (AWS SCT) Features Converting database schema Converting data warehouse schema Converting application SQL Code browser that highlights places where manual edits are required Secure connections to your databases with SSL The AWS Schema Conversion Tool helps automate many database schema and code conversion tasks when migrating from source to target database engines
  • 33. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Database migration assessment Connect AWS SCT to source and target databases Run assessment report Read executive summary Follow detailed instructions
  • 34. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Components of the AWS SCT console 1. Source schema 2. Action items 3. Target schema 4. Schema element details 5. Edit window
  • 35. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Customer premises Application users AWS Internet VPN Keep your apps running during the migration  Start a replication instance  Connect to source and target databases  Select tables, schemas, or databases  Let AWS DMS create tables, load data, and keep them in sync  Switch applications over to the target at your convenience AWS DMS
  • 36. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Change data capture (CDC) and apply Replication instance Target Transactions Change apply after bulk load t1 t2 Source t1 t2 Update
  • 37. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Demo
  • 38. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Things to consider
  • 39. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Native replication  Your target supports native replication  You need to move all the data  You don’t need any transformation  Your target is a new database Dump/Restore  You don’t have a huge database (actually you have a small database)  You can take a downtime which is bigger than the time to dump and restore  You will need all the data  You will not transform schema or data AWS DMS and AWS SCT  You are switching database engines  You need to convert your schema  You cannot afford downtime  The data is so large you need AWS Snowball Migration methodology
  • 40. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Migration is a multiphase process Phase Description Automation Effort (%) 1 Assessment SCT 2 2 Database Schema Conversion SCT/DMS 14 3 Application Conversion/Remediation SCT 25 4 Scripts Conversion SCT 7 5 Integration with third-party applications 3 6 Data Migration DMS 4 7 Functional testing of the entire system 29 8 Performance tuning SCT 2 9 Integration and deployment 7 10 Training and knowledge 2 11 Documentation and version control 2 12 Post-production support 3
  • 41. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Understand your environment Your database  What is the size of your database? Any large tables?  How many schemas and tables do you have?  What are the transaction boundaries?  Unique data types to consider?  Do you have LOBs in your tables, and how big are they?  How hot is your source database? And your network  How to access your database (firewalls, tunnels, VPNs)  Do you understand VPCs?  Which security group should be used?  Do you have enough bandwidth to move all your data?
  • 42. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. What affects speed?  The size of the source database and the associated activity  The size of the target  Availability of bandwidth  Replication instance size  Schema breakdown (a single large table can slow things down)  LOBs in the schema  Big transactions
  • 43. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Find the right people Start small Ramp up Other considerations
  • 44. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Other best practices • Keep backups disabled during the migration • Set up parameter group for each instance to set parameters per-instance • Use AWS SCT to classify databases based on level of work to convert
  • 45. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Other best practices for PostgreSQL Use lowercase for DB object names • Oracle by default saves everything in UPPERCASE and PostgreSQL by default saves everything in LOWERCASE • Convert all the object names to lowercase in PostgreSQL • AWS SCT does this by default while migrating objects from Oracle to PostgreSQL • Lowercase names help to avoid object reference complications
  • 46. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Other best practices for PostgreSQL • Cutover planning • Downtime window to stop writes on Oracle and change configs to make PostgreSQL the new data source • Enable all user triggers in PostgreSQL after stopping replication and before connecting users • Pre-cutover validation steps • Post-cutover validation steps • Rollback strategy • Use log_fdw, pg_repack, and pg_audit post-cutover
  • 47. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Thank you!