More Related Content Similar to Migrating Microsoft SQL to AWS - AWS Online Tech Talks (20) More from Amazon Web Services (20) Migrating Microsoft SQL to AWS - AWS Online Tech Talks1. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Arun Thiagarajan – DMS Database Engineer
7th December 2017
Migrating your SQL Server
database to AWS using DMS
2. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Agenda
3. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
What to expect from this session
1. Know about different ways to migrate a SQL Server
database to AWS
2. Know how to use DMS to migrate a SQL Server
database to AWS
3. Know the internals of how DMS migrates a SQL Server
database
4. Advantages of DMS in database migrations
5. Demo
4. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Ways to migrate your SQL Server database
5. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Ways to migrate
1. Backup and restore
2. SQL Server Replication or use AlwaysOn availability
group
3. Use AWS DMS to bulk load data and replicate on-going
changes
6. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Database Migration Service
7. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Database Migration Process
Step 1: Convert or Copy your Schema
Source DB or DW
AWS SCT
Native Tool
Destination DB or DW
Step 2: Move your data
Source DB or DW
AWS SCT
Destination DB or DW
AWS DMS
8. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
How does DMS work?
Customer
premises
Application users
AWS
Internet
VPN
Start a replication instance
Connect to source and target
databases
Create Tasks
Let AWS DMS create tables,
load data, and keep them in
sync
Switch applications over to
the target at your convenience
AWS
DMS
9. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
DMS Multi-AZ
Customer
premises
or AWS
AWS
Internet
VPN
AWS DMS
AWS DMS
10. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
DMS – SQL Server as a source
11. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
The process
1. Enable replication for DB using sp_replicationdboption
2. Create a publication artefact with a 1=0 filter for the
database.
Note – this is done to make sure all required statements
are logged into the transaction log
3. Use fn_dblog() and fn_dump_dblog() functions to read
changes from transaction log according to the LSN
12. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
DMS - SQL Server as a source
Start table full load (BCP by default). Also enable
publication on table with 1=0 filter for extra logging
Collect cached changes from transaction log using
fn_dblog() and fn_dump_dblog() during table full load
Once cached changes are applied, use same functions
to read changes according to LSN and apply on target
Use awsdms_truncation_safeguard table (by default) to
maintain transaction read from active transaction log
13. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Database Migration Service - Advantages
14. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Why use DMS and 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
15. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Advantages
Modernize Migrate Replicate
Modernize your database tier –
• Commercial to open-source
• Commercial to Amazon Aurora
Modernize your Data Warehouse –
• Commercial to Redshift
• Migrate business-critical
applications
• Migrate from Classic to VPC
• Migrate data warehouse to
Redshift
• Create cross-regions Read Replicas
• Run your analytics in the cloud
• Keep your dev/test and production
environment sync
16. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Demo
17. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Thank you!