AWS Database Migration Service - Step-by-Step Migration …

[Pages:416]Database Migration Guide

Step-by-Step Walkthroughs

Database Migration Guide Step-by-Step Walkthroughs

Database Migration Guide: Step-by-Step Walkthroughs

Copyright ? 2023 Amazon Web Services, Inc. and/or its affiliates. All rights reserved. Amazon's trademarks and trade dress may not be used in connection with any product or service that is not Amazon's, in any manner that is likely to cause confusion among customers, or in any manner that disparages or discredits Amazon. All other trademarks not owned by Amazon are the property of their respective owners, who may or may not be affiliated with, connected to, or sponsored by Amazon.

Database Migration Guide Step-by-Step Walkthroughs

Table of Contents

Database Migration Step-by-Step Walkthroughs .................................................................................... 1 Oracle Database ......................................................................................................................... 1 Microsoft SQL Server .................................................................................................................. 1 MySQL ...................................................................................................................................... 2 BigQuery ................................................................................................................................... 2 MariaDB .................................................................................................................................... 2 MongoDB .................................................................................................................................. 2 PostgreSQL ............................................................................................................................... 2 SAP ASE .................................................................................................................................... 2

Migrating Databases to Amazon Web Services Managed Databases .......................................................... 3 Migrating a MySQL Database to RDS for MySQL or Aurora MySQL .................................................... 3 Full Load ........................................................................................................................... 4 Performance Comparison .................................................................................................... 8 AWS DMS Ongoing Replication ............................................................................................ 8 Resources .......................................................................................................................... 9 Migrating PostgreSQL Databases to Amazon RDS for PostgreSQL or Amazon Aurora PostgreSQL .......... 9 Full Load ......................................................................................................................... 11 Performance Comparison .................................................................................................. 19 Ongoing Replication ......................................................................................................... 21 Summary ........................................................................................................................ 21 Resources ........................................................................................................................ 21 Migrating PostgreSQL databases to Amazon RDS for PostgreSQL with DMS homogeneous data migrations ............................................................................................................................... 22 Prerequisites .................................................................................................................... 23 Migration Overview .......................................................................................................... 23 Step-by-Step Migration ..................................................................................................... 24 Clean Up ......................................................................................................................... 33 Migrating an Oracle Database to Amazon RDS for Oracle .............................................................. 34 Full Load ......................................................................................................................... 36 Performance Comparison .................................................................................................. 45 Ongoing Replication ......................................................................................................... 46 Summary ........................................................................................................................ 47 Resources ........................................................................................................................ 47 Migrating a SQL Server Always On Database to Amazon Web Services ............................................ 47 Prerequisites .................................................................................................................... 48 SQL Server Always On Availability Groups ........................................................................... 48 Migrating an Amazon RDS for MySQL Database to an Amazon DynamoDB target .............................. 51 Why use AWS DMS? ......................................................................................................... 51 Example data set ............................................................................................................. 52 Solution overview ............................................................................................................. 53 Prerequisites .................................................................................................................... 55 Step-by-step migration ..................................................................................................... 55 Migrating an RDS for MySQL database to an S3 data lake ............................................................. 71 Solution Overview ............................................................................................................ 72 Use case .......................................................................................................................... 73 Choosing an instance class and storage size ......................................................................... 74 Step-By-Step Migration ..................................................................................................... 75 Step 0: Configure the Source Amazon RDS for MySQL Database ............................................. 76 Step 1: Create a Replication Instance .................................................................................. 77 Step 2: Create an AWS DMS Source Endpoint ...................................................................... 77 Step 3: Configure a Target Amazon S3 Bucket ..................................................................... 79 Step 5: Create an AWS DMS Task ....................................................................................... 83 Step 6: Run and monitor your AWS DMS Task ...................................................................... 86 Step 7: Monitor your migration .......................................................................................... 86

iii

Database Migration Guide Step-by-Step Walkthroughs

Limitations ...................................................................................................................... 87 Conclusion ....................................................................................................................... 87 Migrating an RDS PostgreSQL database to an S3 data lake ............................................................ 87 Why AWS DMS? ............................................................................................................... 88 Use case .......................................................................................................................... 88 Example data set ............................................................................................................. 88 Solution Overview ............................................................................................................ 88 Prerequisites .................................................................................................................... 90 Step by step migration ..................................................................................................... 90 Conclusion ..................................................................................................................... 102 Migrating SQL Server Databases to Amazon RDS for SQL Server ................................................... 103 Full Load ....................................................................................................................... 105 Performance Comparison ................................................................................................ 112 Ongoing Replication ....................................................................................................... 114 Summary ....................................................................................................................... 114 Resources ...................................................................................................................... 114 Migrating from Amazon RDS for Oracle to Amazon RDS for PostgreSQL and Aurora PostgreSQL ........ 115 Can My Oracle Database Migrate? .................................................................................... 115 Migration Strategies ........................................................................................................ 116 The 12 Step Migration Process ......................................................................................... 117 Automation .................................................................................................................... 119 Future State Architecture Design ...................................................................................... 119 Database Schema Conversion ........................................................................................... 121 Application Conversion or Remediation ............................................................................. 122 Script/ETL/Report Conversion .......................................................................................... 123 Integration with Third-Party Applications .......................................................................... 124 Data Migration Mechanism .............................................................................................. 124 Testing and Bug Fixing .................................................................................................... 125 Performance Tuning ........................................................................................................ 127 Setup, DevOps, Integration, Deployment, and Security ........................................................ 127 Documentation and Knowledge Transfer ........................................................................... 130 Project Management and Version Control .......................................................................... 130 Post-Production Support ................................................................................................. 131 Platform Differences ....................................................................................................... 131 Migrating from SAP ASE to Amazon Aurora MySQL .................................................................... 132 Prerequisites .................................................................................................................. 134 Preparation and Assessment ............................................................................................ 134 Database Migration ......................................................................................................... 136 Best Practices ................................................................................................................. 141 Migrating Databases to the Amazon Web Services Cloud Using the Database Migration Service ................. 142 Migrating an On-Premises Oracle Database to Amazon Aurora MySQL ........................................... 143 Costs ............................................................................................................................. 144 Migration High-Level Outline ........................................................................................... 144 Migration Step-by-Step Guide .......................................................................................... 147 Working with the Sample Database for Migration ............................................................... 161 Migrating an Amazon RDS for Oracle Database to Amazon Aurora MySQL ...................................... 162 Costs ............................................................................................................................. 163 Prerequisites .................................................................................................................. 163 Migration Architecture ..................................................................................................... 164 Step-by-Step Migration ................................................................................................... 165 Next Steps ..................................................................................................................... 195 Migrating a SQL Server Database to Amazon Aurora MySQL ........................................................ 195 Prerequisites .................................................................................................................. 195 Step-by-Step Migration ................................................................................................... 196 Troubleshooting ............................................................................................................. 211 Migrating a SQL Server AlwaysOn Database on Primary Replica to Amazon Aurora PostgreSQL ......... 212 Why Amazon Aurora PostgreSQL? .................................................................................... 212

iv

Database Migration Guide Step-by-Step Walkthroughs

Common database migration challenges ........................................................................... 212 Why AWS DMS? ............................................................................................................. 213 Migration Overview ........................................................................................................ 213 Prerequisites .................................................................................................................. 216 AWS DMS migration ? Step by Step .................................................................................. 216 Migrating an Amazon RDS for Oracle Database to an Amazon S3 Data Lake ................................... 231 Why use AWS DMS? ........................................................................................................ 231 Example data set ............................................................................................................ 232 Solution Overview .......................................................................................................... 233 Prerequisites .................................................................................................................. 235 Step-by-Step Migration ................................................................................................... 236 Conclusion ..................................................................................................................... 249 Migrating an Amazon RDS for SQL Server Database to an Amazon S3 Data Lake ............................. 249 Why Amazon S3? ........................................................................................................... 249 Why AWS DMS? ............................................................................................................. 250 Solution Overview .......................................................................................................... 250 Prerequisites .................................................................................................................. 252 Step-by-Step Migration ................................................................................................... 253 Migrating an Oracle Database to PostgreSQL ............................................................................. 269 Prerequisites .................................................................................................................. 269 Step-by-Step Migration ................................................................................................... 270 Rolling Back the Migration ............................................................................................... 286 Troubleshooting ............................................................................................................. 286 Migrating Oracle databases to Amazon Aurora MySQL with DMS Schema Conversion ....................... 287 Prerequisites .................................................................................................................. 287 Migration Overview ........................................................................................................ 288 Step-by-Step Migration ................................................................................................... 289 Next Steps ..................................................................................................................... 298 Migrating Oracle databases to Amazon RDS for PostgreSQL with DMS Schema Conversion ............... 299 Prerequisites .................................................................................................................. 300 Migration Overview ........................................................................................................ 300 Step-by-Step Migration ................................................................................................... 301 Next Steps ..................................................................................................................... 310 Migrating SQL Server databases to Amazon Aurora PostgreSQL with DMS Schema Conversion .......... 311 Prerequisites .................................................................................................................. 312 Migration Overview ........................................................................................................ 312 Step-by-Step Migration ................................................................................................... 313 Next Steps ..................................................................................................................... 322 Migrating SQL Server databases to Amazon RDS for MySQL with DMS Schema Conversion ............... 323 Prerequisites .................................................................................................................. 324 Migration Overview ........................................................................................................ 324 Step-by-Step Migration ................................................................................................... 325 Next Steps ..................................................................................................................... 335 Migrating an Amazon RDS for Oracle Database to Amazon Redshift .............................................. 336 Prerequisites .................................................................................................................. 336 Migration Architecture ..................................................................................................... 337 Step-by-Step Migration ................................................................................................... 338 Next Steps ..................................................................................................................... 368 Migrating a BigQuery Project to Amazon Redshift ...................................................................... 368 Prerequisites .................................................................................................................. 369 Migration Overview ........................................................................................................ 369 Step-by-Step Migration ................................................................................................... 372 Next Steps ..................................................................................................................... 379 Migrating MySQL-Compatible Databases to AWS ........................................................................ 379 Migrating a MySQL-Compatible Database to Amazon Aurora MySQL ............................................. 380 Migrating Data from an External MySQL Database to an Amazon Aurora MySQL Using Amazon S3 ................................................................................................................................. 380

v

Database Migration Guide Step-by-Step Walkthroughs Migrating MySQL to Amazon Aurora MySQL by Using mysqldump ........................................ 389 Migrating Data from an Amazon RDS MySQL DB Instance to an Amazon Aurora MySQL DB Cluster .......................................................................................................................... 389 Migrating a MariaDB Database to Amazon RDS for MySQL or Amazon Aurora MySQL ....................... 396 Set up MariaDB as a source database ................................................................................ 397 Set up Aurora MySQL as a target database ........................................................................ 399 Set up an AWS DMS replication instance ........................................................................... 401 Test the endpoints .......................................................................................................... 401 Create a migration task ................................................................................................... 402 Validate the migration .................................................................................................... 403 Cut over ........................................................................................................................ 403 Migrating from MongoDB to Amazon DocumentDB .................................................................... 404 Launch an Amazon EC2 instance ...................................................................................... 405 Install and configure MongoDB community edition ............................................................. 405 Create an AWS DMS replication instance ........................................................................... 407 Create source and target endpoints .................................................................................. 407 Create and run a migration task ....................................................................................... 409

vi

Database Migration Guide Step-by-Step Walkthroughs Oracle Database

Database Migration Step-by-Step Walkthroughs

You can use AWS Database Migration Service (AWS DMS) to migrate your data to and from most widely used commercial and open-source databases such as Oracle, PostgreSQL, Microsoft SQL Server, Amazon Redshift, Amazon Aurora, MariaDB, and MySQL. The service supports homogeneous migrations such as Oracle to Oracle, and also heterogeneous migrations between different database platforms, such as Oracle to MySQL or MySQL to Amazon Aurora MySQL-Compatible Edition. Alternatively, you can use AWS DMS to move from existing, self-managed, open-source, and commercial databases to fully managed AWS databases of the same engine.

You can use DMS Schema Conversion to migrate to a different database engine. This service automatically assesses and converts your source schemas to a new target engine. Alternatively, you can download the AWS Schema Conversion Tool AWS SCT to your local PC to convert your source schemas.

In this guide, you can find step-by-step walkthroughs that go through the process of schema conversion and data migration of the following source databases:

Oracle Database

? the section called "Migrating an On-Premises Oracle Database to Amazon Aurora MySQL" (p. 143) ? the section called "Migrating an Amazon RDS for Oracle Database to Amazon Aurora MySQL" (p. 162) ? the section called "Migrating an Amazon RDS for Oracle Database to an Amazon S3 Data

Lake" (p. 231) ? Migrating an Oracle Database to PostgreSQL (p. 269) ? the section called "Migrating Oracle databases to Amazon Aurora MySQL with DMS Schema

Conversion" (p. 287) ? the section called "Migrating Oracle databases to Amazon RDS for PostgreSQL with DMS Schema

Conversion" (p. 299) ? Migrating an Amazon RDS for Oracle Database to Amazon Redshift (p. 336) ? Migrating an Oracle Database to Amazon RDS for Oracle (p. 34) ? Migrating from Amazon RDS for Oracle to Amazon RDS for PostgreSQL and Aurora

PostgreSQL (p. 115)

Microsoft SQL Server

? Migrating a SQL Server Database to Amazon Aurora MySQL (p. 195) ? Migrating an Amazon RDS for SQL Server Database to an Amazon S3 Data Lake (p. 249) ? the section called "Migrating SQL Server databases to Amazon Aurora PostgreSQL with DMS Schema

Conversion" (p. 311) ? the section called "Migrating SQL Server databases to Amazon RDS for MySQL with DMS Schema

Conversion" (p. 323) ? Migrating a SQL Server Always On Database (p. 47) ? Migrating SQL Server Databases to Amazon RDS for SQL Server (p. 103)

1

Database Migration Guide Step-by-Step Walkthroughs MySQL

MySQL

? Migrating MySQL-Compatible Databases (p. 379) ? Migrating a MySQL-Compatible Database to Amazon Aurora MySQL (p. 380) ? Migrating a MySQL Database to Amazon RDS for MySQL or Amazon Aurora MySQL (p. 3)

BigQuery

? Migrating a BigQuery Project to Amazon Redshift (p. 368)

MariaDB

? Migrating a MariaDB Database to Amazon RDS for MySQL or Amazon Aurora MySQL (p. 396)

MongoDB

? Migrating from MongoDB to Amazon DocumentDB (p. 404)

PostgreSQL

? Migrating PostgreSQL Databases to Amazon RDS for PostgreSQL or Amazon Aurora PostgreSQL (p. 9)

? the section called "Migrating PostgreSQL databases to Amazon RDS for PostgreSQL with DMS homogeneous data migrations" (p. 22)

SAP ASE

? Migrating from SAP ASE to Amazon Aurora MySQL (p. 132) In the DMS User Guide, you can find additional resources: ? Migrating large data stores

2

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download