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

[Pages:560]Step-by-Step Walkthroughs

Database Migration Guide

Copyright ? 2023 Amazon Web Services, Inc. and/or its affiliates. All rights reserved.

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

Table of Contents

Step-by-Step Walkthroughs

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 .......................................................................................................................................................... 3

Migrating Databases to Amazon Web Services Managed Databases ............................................ 4 Migrating a MySQL Database to RDS for MySQL or Aurora MySQL .................................................. 4 Full Load ................................................................................................................................................... 5 Performance Comparison .................................................................................................................... 11 AWS DMS Ongoing Replication ......................................................................................................... 11 Resources ................................................................................................................................................ 12 Migrating PostgreSQL Databases to Amazon RDS for PostgreSQL or Amazon Aurora PostgreSQL .................................................................................................................................................. 12 Full Load ................................................................................................................................................. 14 Performance Comparison .................................................................................................................... 26 Ongoing Replication ............................................................................................................................. 28 Summary ................................................................................................................................................. 28 Resources ................................................................................................................................................ 29 Migrating PostgreSQL databases to Amazon RDS for PostgreSQL with DMS homogeneous data migrations .......................................................................................................................................... 29 Prerequisites ........................................................................................................................................... 30 Migration Overview .............................................................................................................................. 31 Step-by-Step Migration ....................................................................................................................... 32 Clean Up ................................................................................................................................................. 46 Migrating an Oracle Database to Amazon RDS for Oracle ................................................................ 47 Full Load ................................................................................................................................................. 48 Performance Comparison .................................................................................................................... 60 Ongoing Replication ............................................................................................................................. 61 Summary ................................................................................................................................................. 62 Resources ................................................................................................................................................ 62

iii

Database Migration Guide

Step-by-Step Walkthroughs

Migrating a SQL Server Always On Database to Amazon Web Services ......................................... 63 Prerequisites ........................................................................................................................................... 63 SQL Server Always On Availability Groups ..................................................................................... 64

Migrating an Amazon RDS for MySQL Database to an Amazon DynamoDB target ...................... 67 Why use AWS DMS? ............................................................................................................................. 68 Example data set .................................................................................................................................. 68 Solution overview ................................................................................................................................. 70 Prerequisites ........................................................................................................................................... 71 Step-by-step migration ....................................................................................................................... 72

Migrating an RDS for MySQL database to an S3 data lake ............................................................... 94 Solution Overview ................................................................................................................................ 95 Use case .................................................................................................................................................. 96 Choosing an instance class and storage size .................................................................................. 97 Step-By-Step Migration ....................................................................................................................... 99 Step 0: Configure the Source Amazon RDS for MySQL Database ............................................... 99 Step 1: Create a Replication Instance ............................................................................................ 100 Step 2: Create an AWS DMS Source Endpoint ............................................................................. 102 Step 3: Configure a Target Amazon S3 Bucket ............................................................................ 104 Step 5: Create an AWS DMS Task ................................................................................................... 110 Step 6: Run and monitor your AWS DMS Task ............................................................................ 114 Step 7: Monitor your migration ...................................................................................................... 114 Limitations ............................................................................................................................................ 116 Conclusion ............................................................................................................................................ 116

Migrating an RDS PostgreSQL database to an S3 data lake ........................................................... 116 Why AWS DMS? .................................................................................................................................. 117 Use case ................................................................................................................................................ 117 Example data set ................................................................................................................................ 118 Solution Overview .............................................................................................................................. 118 Prerequisites ........................................................................................................................................ 119 Step by step migration ..................................................................................................................... 120 Conclusion ............................................................................................................................................ 136

Migrating SQL Server Databases to Amazon RDS for SQL Server ................................................. 137 Full Load ............................................................................................................................................... 138 Performance Comparison ................................................................................................................. 147 Ongoing Replication .......................................................................................................................... 149 Summary .............................................................................................................................................. 149

iv

Database Migration Guide

Step-by-Step Walkthroughs

Resources .............................................................................................................................................. 150 Migrating from Amazon RDS for Oracle to Amazon RDS for PostgreSQL and Aurora PostgreSQL ................................................................................................................................................ 150

Can My Oracle Database Migrate? .................................................................................................. 151 Migration Strategies ........................................................................................................................... 153 The 12 Step Migration Process ....................................................................................................... 154 Automation .......................................................................................................................................... 157 Future State Architecture Design .................................................................................................... 157 Database Schema Conversion .......................................................................................................... 159 Application Conversion or Remediation ........................................................................................ 161 Script/ETL/Report Conversion ......................................................................................................... 162 Integration with Third-Party Applications .................................................................................... 163 Data Migration Mechanism ............................................................................................................... 164 Testing and Bug Fixing ...................................................................................................................... 165 Performance Tuning ........................................................................................................................... 167 Setup, DevOps, Integration, Deployment, and Security ............................................................. 168 Documentation and Knowledge Transfer ...................................................................................... 171 Project Management and Version Control .................................................................................... 171 Post-Production Support .................................................................................................................. 172 Platform Differences .......................................................................................................................... 172 Migrating from SAP ASE to Amazon Aurora MySQL ........................................................................ 174 Prerequisites ........................................................................................................................................ 175 Preparation and Assessment ............................................................................................................ 176 Database Migration ............................................................................................................................ 179 Best Practices ...................................................................................................................................... 184 Migrating Databases to the Amazon Web Services Cloud Using the Database Migration Service .......................................................................................................................................... 186 Migrating an On-Premises Oracle Database to Amazon Aurora MySQL ...................................... 187 Costs ...................................................................................................................................................... 189 Migration High-Level Outline .......................................................................................................... 189 Migration Step-by-Step Guide ......................................................................................................... 193 Working with the Sample Database for Migration ...................................................................... 215 Migrating an Amazon RDS for Oracle Database to Amazon Aurora MySQL ................................ 216 Costs ...................................................................................................................................................... 217 Prerequisites ........................................................................................................................................ 218 Migration Architecture ....................................................................................................................... 219

v

Database Migration Guide

Step-by-Step Walkthroughs

Step-by-Step Migration ..................................................................................................................... 221 Next Steps ............................................................................................................................................ 257 Migrating a SQL Server Database to Amazon Aurora MySQL ........................................................ 257 Prerequisites ........................................................................................................................................ 258 Step-by-Step Migration ..................................................................................................................... 260 Troubleshooting .................................................................................................................................. 282 Migrating a SQL Server AlwaysOn Database on Primary Replica to Amazon Aurora PostgreSQL ................................................................................................................................................ 282 Why Amazon Aurora PostgreSQL? .................................................................................................. 283 Common database migration challenges ...................................................................................... 283 Why AWS DMS? .................................................................................................................................. 284 Migration Overview ............................................................................................................................ 284 Prerequisites ........................................................................................................................................ 286 AWS DMS migration ? Step by Step .............................................................................................. 287 Migrating an Amazon RDS for Oracle Database to an Amazon S3 Data Lake ............................. 306 Why use AWS DMS? ........................................................................................................................... 307 Example data set ................................................................................................................................ 307 Solution Overview .............................................................................................................................. 309 Prerequisites ........................................................................................................................................ 310 Step-by-Step Migration ..................................................................................................................... 311 Conclusion ............................................................................................................................................ 330 Migrating an Amazon RDS for SQL Server Database to an Amazon S3 Data Lake ..................... 330 Why Amazon S3? ................................................................................................................................ 331 Why AWS DMS? .................................................................................................................................. 331 Solution Overview .............................................................................................................................. 332 Prerequisites ........................................................................................................................................ 334 Step-by-Step Migration ..................................................................................................................... 335 Migrating an Oracle Database to PostgreSQL ................................................................................... 356 Prerequisites ........................................................................................................................................ 357 Step-by-Step Migration ..................................................................................................................... 358 Rolling Back the Migration ............................................................................................................... 381 Troubleshooting .................................................................................................................................. 382 Migrating Oracle databases to Amazon Aurora MySQL with DMS Schema Conversion ............ 382 Prerequisites ........................................................................................................................................ 383 Migration Overview ............................................................................................................................ 384 Step-by-Step Migration ..................................................................................................................... 385

vi

Database Migration Guide

Step-by-Step Walkthroughs

Next Steps ............................................................................................................................................ 400 Migrating Oracle databases to Amazon RDS for PostgreSQL with DMS Schema Conversion ... 401

Prerequisites ........................................................................................................................................ 402 Migration Overview ............................................................................................................................ 402 Step-by-Step Migration ..................................................................................................................... 403 Next Steps ............................................................................................................................................ 417 Migrating SQL Server databases to Amazon Aurora PostgreSQL with DMS Schema Conversion ................................................................................................................................................. 418 Prerequisites ........................................................................................................................................ 419 Migration Overview ............................................................................................................................ 419 Step-by-Step Migration ..................................................................................................................... 420 Next Steps ............................................................................................................................................ 434 Migrating SQL Server databases to Amazon RDS for MySQL with DMS Schema Conversion ... 435 Prerequisites ........................................................................................................................................ 436 Migration Overview ............................................................................................................................ 437 Step-by-Step Migration ..................................................................................................................... 438 Next Steps ............................................................................................................................................ 453 Migrating an Amazon RDS for Oracle Database to Amazon Redshift ........................................... 454 Prerequisites ........................................................................................................................................ 455 Migration Architecture ....................................................................................................................... 456 Step-by-Step Migration ..................................................................................................................... 457 Next Steps ............................................................................................................................................ 488 Migrating a BigQuery Project to Amazon Redshift .......................................................................... 489 Prerequisites ........................................................................................................................................ 490 Migration Overview ............................................................................................................................ 490 Step-by-Step Migration ..................................................................................................................... 495 Next Steps ............................................................................................................................................ 504 Migrating MySQL-Compatible Databases to AWS ............................................................................ 504 Migrating a MySQL-Compatible Database to Amazon Aurora MySQL .......................................... 506 Migrating Data from an External MySQL Database to an Amazon Aurora MySQL Using Amazon S3 ........................................................................................................................................... 506 Migrating MySQL to Amazon Aurora MySQL by Using mysqldump ........................................ 521 Migrating Data from an Amazon RDS MySQL DB Instance to an Amazon Aurora MySQL DB Cluster ................................................................................................................................................... 521 Migrating a MariaDB Database to Amazon RDS for MySQL or Amazon Aurora MySQL ............ 531 Set up MariaDB as a source database ............................................................................................ 532

vii

Database Migration Guide

Step-by-Step Walkthroughs

Set up Aurora MySQL as a target database .................................................................................. 536 Set up an AWS DMS replication instance ...................................................................................... 538 Test the endpoints ............................................................................................................................. 539 Create a migration task .................................................................................................................... 540 Validate the migration ...................................................................................................................... 541 Cut over ................................................................................................................................................ 541 Migrating from MongoDB to Amazon DocumentDB ........................................................................ 543 Launch an Amazon EC2 instance .................................................................................................... 544 Install and configure MongoDB community edition ................................................................... 545 Create an AWS DMS replication instance ...................................................................................... 547 Create source and target endpoints ............................................................................................... 547 Create and run a migration task ..................................................................................................... 550

viii

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

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

Google Online Preview   Download