You can watch the replay for this Geek Sync webcast, Successfully Migrating Existing Databases to Azure SQL Database, on the IDERA Resource Center, http://ow.ly/k4p050A4rBA.
First impressions have long-lasting effects. When dealing with an architecture change like migrating to Azure SQL Database the last thing you want to do is leave a bad first impression by having an unsuccessful migration. In this session, you will learn the difference between Azure SQL Database, SQL Managed Instances, and Elastic Pools. How to use tools to test migrations for compatibility issues before you start the migration process. You will learn how to successfully migrate your database schema and data to the cloud. Finally, you will learn how to determine which performance tier is a good starting point for your existing workload(s) and how to monitor your workload over time to make sure your users have a great experience while you save as much money as possible.
Speaker: John Sterrett is an MCSE: Data Platform, Principal Consultant and the Founder of Procure SQL LLC. John has presented at many community events, including Microsoft Ignite, PASS Member Summit, SQLRally, 24 Hours of PASS, SQLSaturdays, PASS Chapters, and Virtual Chapter meetings. John is a leader of the Austin SQL Server User Group and the founder of the HADR Virtual Chapter.
1. Topics
▪ Click to edit Master text styles
• Second level
• Third level
− Fourth level
• Fifth level
Successfully migrate
existing databases to
Azure SQL Database
John Sterrett
Principal Consultant
2. Topics
▪ Click to edit Master text styles
• Second level
• Third level
− Fourth level
• Fifth level
‹#›
Common Migration failures
Plan Test Execute Manage
3. Topics
▪ Click to edit Master text styles
• Second level
• Third level
− Fourth level
• Fifth level
‹#›
Free Reference Material
Videos, Reference Links, Tips, and slide deck
can be found at
http://azuresqldbresources.procuresql.com/
4. Topics
▪ Click to edit Master text styles
• Second level
• Third level
− Fourth level
• Fifth level
‹#›
Agenda
• Where Should My Data Go?
• How do I plan a successful migration?
• How to migrate my Data?
• How to leverage PaaS Benefits?
• What am I responsible for Post Migration (Does DBA
Job go away)?
5. Topics
▪ Click to edit Master text styles
• Second level
• Third level
− Fourth level
• Fifth level
‹#›
About John Sterrett
5
john@procuresql.com
@johnsterrett
johnsterrett.com
procuresql.com
linkedin.com/in/johnsterrett
6. Topics
▪ Click to edit Master text styles
• Second level
• Third level
− Fourth level
• Fifth level
‹#›
Three reasons people are migrating?
7. Topics
▪ Click to edit Master text styles
• Second level
• Third level
− Fourth level
• Fifth level
‹#›
Qty Item Cost Total Cost Five Years Ten Years
2PowerEdge R930 2xE7-8893 v4 (16 cores) 54,224.05 $108,448.10 $21,689.62 $10,844.81
8SQL 2016 Enterprise Cores (2 Core Pack) 14,256.00 $114,048.00 $22,809.60 $11,404.80
Support
Power
$222,496.10 $44,499.22 $22,249.61
4PowerEdge R930 2xE7-8893 v4 (16 cores) 54,224.05 $216,896.20 $43,379.24 $21,689.62
16SQL 2016 Enterprise Cores (2 Core Pack) 14,256.00 $342,144.00 $68,428.80 $34,214.40
Support
Power
$559,040.20 $111,808.04 $55,904.02
Cost Comparison
Monthly Yearly
Premium Elastic Database -eDTU 250 1,398.72 $16,784.64
Support (Standard) 300.00 $3,600.00
Power $0.00
$20,384.64
Premium Elastic Database - eDTU 1500 8,370.00 $100,440.00
Support (Professional Direct) 1,000.00 $12,000.00
$112,440.00
P11 Single Database 7,001.04 $84,012.48
Support (Professional Direct) 1,000.00 $12,000.00
$96,012.48
8. Topics
▪ Click to edit Master text styles
• Second level
• Third level
− Fourth level
• Fifth level
‹#›
Why Azure is a DBA’s best friend!
DBA’s can drive
more value!
DBA’s no longer
an cost center!
Azure SQL DB
features are
easier to use.
Azure SQL
Database starts
at $5/month
Blog: Does Automation Kill the DBA?
9. Topics
▪ Click to edit Master text styles
• Second level
• Third level
− Fourth level
• Fifth level
‹#›
Security Enhancements
Firewall
Secure
Connections
Data In
Flight
Data At Rest Audit
Threat
Detection
10. Topics
▪ Click to edit Master text styles
• Second level
• Third level
− Fourth level
• Fifth level
‹#›
Azure SQL Features…
Security
Azure Data
Sync
Active Geo-
Replicas
Performance
Insight
Automated
Tuning
Intellect
Query
Processing
11. Topics
▪ Click to edit Master text styles
• Second level
• Third level
− Fourth level
• Fifth level
‹#›
• https://docs.microsoft.com/en-us/azure/sql-database/sql-database-features
12. Topics
▪ Click to edit Master text styles
• Second level
• Third level
− Fourth level
• Fifth level
‹#›
Where Should My Data Go?
Single
Database
(PaaS)
Elastic Pool
(PaaS)
Managed
Instance
(PaaS)
SQL VM
(IaaS)
13. Topics
▪ Click to edit Master text styles
• Second level
• Third level
− Fourth level
• Fifth level
‹#›
Pricing Models
DTU/vCore
[single
database]
eDTU/vCore
[elastic pool]
Hyperscale
(Preview)
14. Topics
▪ Click to edit Master text styles
• Second level
• Third level
− Fourth level
• Fifth level
‹#›
What problems does Hyperscale Solve?
• What is hyperscale?
• It’s a new storage architecture for cloud scale databases
• Query engine is not changed.
• Manage Very Large Databases (VLDBs) without the headache of VLDB’s!
• Support to 100TB+ size databases
• Restore VLDB’s in minutes not hours. (snapshots to blob storage)
• Low latency, high throughput disk I/O
• Limitations as of 6/1/19?
• Doesn’t support Managed Instances or Elastic Pools
• Migration is one way. Cannot go back without BACPAC
• Video: Kevin Farlee at SQLBits on Hyperscale
• BOL: Hyperscale with 100TB+ database
15. Topics
▪ Click to edit Master text styles
• Second level
• Third level
− Fourth level
• Fifth level
‹#›
What is DTU?
Image Source: Microsoft Docs
16. Topics
▪ Click to edit Master text styles
• Second level
• Third level
− Fourth level
• Fifth level
‹#›
DTU vs vCore?
Image Source: Microsoft Docs
17. Topics
▪ Click to edit Master text styles
• Second level
• Third level
− Fourth level
• Fifth level
‹#›
vCore to DTU ratio
• Each 100 DTU in Standard tier requires at least 1
vCore in General Purpose tier
• Each 125 DTU in Premium tier requires at least 1
vCore in Business Critical tier
18. Topics
▪ Click to edit Master text styles
• Second level
• Third level
− Fourth level
• Fifth level
‹#›
Pricing DTU vs vCore
19. Topics
▪ Click to edit Master text styles
• Second level
• Third level
− Fourth level
• Fifth level
‹#›
What performance tier should we use?
Dtucalculator.azurewebsites.net
20. Topics
▪ Click to edit Master text styles
• Second level
• Third level
− Fourth level
• Fifth level
‹#›
DTU Calculator Results
21. Topics
▪ Click to edit Master text styles
• Second level
• Third level
− Fourth level
• Fifth level
‹#›
How do you successfully
Migrate Databases?
22. Topics
▪ Click to edit Master text styles
• Second level
• Third level
− Fourth level
• Fifth level
‹#›
Migrating Your Data To Azure SQL Database
+Schema Data Migration=
23. Topics
▪ Click to edit Master text styles
• Second level
• Third level
− Fourth level
• Fifth level
‹#›
Options to Move Your Data…
BACKPAC
Transactional
Replication
Data Migration
Service
Restore Backup
(Managed
Instance)
24. Topics
▪ Click to edit Master text styles
• Second level
• Third level
− Fourth level
• Fifth level
‹#›
Migrating to Azure SQL Database
Assess
DB (DMA)
Prepare
Fixes
Implement
Fixes
Export
Bacpac
Import
Bacpac
https://azure.microsoft.com/en-us/documentation/articles/sql-database-cloud-migrate/
25. Topics
▪ Click to edit Master text styles
• Second level
• Third level
− Fourth level
• Fifth level
‹#›
Migrate Schema with Data Migration Assistant
26. Topics
▪ Click to edit Master text styles
• Second level
• Third level
− Fourth level
• Fifth level
‹#›
Select Tables to Move
27. Topics
▪ Click to edit Master text styles
• Second level
• Third level
− Fourth level
• Fifth level
‹#›
Deploy with SSMS
28. Topics
▪ Click to edit Master text styles
• Second level
• Third level
− Fourth level
• Fifth level
‹#›
Migrate with SQLPackage.exe
29. Topics
▪ Click to edit Master text styles
• Second level
• Third level
− Fourth level
• Fifth level
‹#›
How do I make my migration go faster?
30. Topics
▪ Click to edit Master text styles
• Second level
• Third level
− Fourth level
• Fifth level
‹#›
Easy Guide to Quickly Migrating Data
Increase
Tier
Copy
Data
Reduce
Tier
31. Topics
▪ Click to edit Master text styles
• Second level
• Third level
− Fourth level
• Fifth level
‹#›
Migrating 60GB Database with S0
32. Topics
▪ Click to edit Master text styles
• Second level
• Third level
− Fourth level
• Fifth level
‹#›
Overloading during Bulk Insert
33. Topics
▪ Click to edit Master text styles
• Second level
• Third level
− Fourth level
• Fifth level
‹#›
Migrating a 60gb Database to P1
34. Topics
▪ Click to edit Master text styles
• Second level
• Third level
− Fourth level
• Fifth level
‹#›
How do you manage Azure SQL
Databases Today?
35. Topics
▪ Click to edit Master text styles
• Second level
• Third level
− Fourth level
• Fifth level
‹#›
Biggest Database Management Mistake..
•Create it and forget it…
36. Topics
▪ Click to edit Master text styles
• Second level
• Third level
− Fourth level
• Fifth level
‹#›
Manage Azure SQL DB Post Migration
Business
continuity
Disaster
Recovery
Security and
Compliance
Sync Data
Data
Transfer
Monitor and
Improve
Performance
37. Topics
▪ Click to edit Master text styles
• Second level
• Third level
− Fourth level
• Fifth level
‹#›
High Availability with Failover Groups
38. Topics
▪ Click to edit Master text styles
• Second level
• Third level
− Fourth level
• Fifth level
‹#›
39. Topics
▪ Click to edit Master text styles
• Second level
• Third level
− Fourth level
• Fifth level
‹#›
• Integrity Checks source
• Backups
• Restores (you control)
– Point in Time
– Deleted Database
– Geo Restore
• Index Maintenance
• Ola Hallengren Solution Works ;-)
• Statistics Maintenance
• Geo Replication / Failover Groups
Azure Database Maintenance
40. Topics
▪ Click to edit Master text styles
• Second level
• Third level
− Fourth level
• Fifth level
‹#›
Automating Maintenance Tasks
• Azure SQL Agent (Managed Instance Only)
• Linked Server
• PowerShell
• Azure
• Azure Automation
• Azure Functions
• Azure Elastic Jobs
41. Topics
▪ Click to edit Master text styles
• Second level
• Third level
− Fourth level
• Fifth level
‹#›
Alerts
42. Topics
▪ Click to edit Master text styles
• Second level
• Third level
− Fourth level
• Fifth level
‹#›
How do you monitor and
improve performance?
43. Topics
▪ Click to edit Master text styles
• Second level
• Third level
− Fourth level
• Fifth level
‹#›
DTU Is…..
DTU = DTU Percent *
DTU Limit
44. Topics
▪ Click to edit Master text styles
• Second level
• Third level
− Fourth level
• Fifth level
‹#›
Calculating DTU
ISNULL(dtu_limit,0) *
(SELECT Max(v)
FROM (VALUES (avg_cpu_percent),
(avg_data_io_percent),
(avg_log_write_percent)) AS value(v)) / 100.0
AS DTU
45. Topics
▪ Click to edit Master text styles
• Second level
• Third level
− Fourth level
• Fifth level
‹#›
SYS.DM_DB_RESOURCE_STATS
User Database
Captured Every Fifteen Seconds
One Hour Historical Data
Idle Database has Data
46. Topics
▪ Click to edit Master text styles
• Second level
• Third level
− Fourth level
• Fifth level
‹#›
SYS.RESOURCE_STATS
Master Database
Every Five Minutes
14 Days Historical Data
Idle databases may not have rows
47. Topics
▪ Click to edit Master text styles
• Second level
• Third level
− Fourth level
• Fifth level
‹#›
DTU DMV Example
48. Topics
▪ Click to edit Master text styles
• Second level
• Third level
− Fourth level
• Fifth level
Azure Wait Stats
49. Topics
▪ Click to edit Master text styles
• Second level
• Third level
− Fourth level
• Fifth level
‹#›
Azure SQL Database Waits
Disk Usage
IO_QUEUE_LIMIT
Log Usage
LOG_RATE_GOVERNOR
CPU
SOS_SCHEDULER_YIELD
bit.ly/azureSQLWaits
50. Topics
▪ Click to edit Master text styles
• Second level
• Third level
− Fourth level
• Fifth level
‹#›
Wait Statistics
51. Topics
▪ Click to edit Master text styles
• Second level
• Third level
− Fourth level
• Fifth level
‹#›
CPU Throttling
52. Topics
▪ Click to edit Master text styles
• Second level
• Third level
− Fourth level
• Fifth level
‹#›
I/O Throttling
53. Topics
▪ Click to edit Master text styles
• Second level
• Third level
− Fourth level
• Fifth level
‹#›
Automated
Create Index
Automated
Drop Index
Index
Fragmentation
Missing
Indexes
Index Usage
Queries
Missing
Indexes
Indexes in Azure SQL Database
54. Topics
▪ Click to edit Master text styles
• Second level
• Third level
− Fourth level
• Fifth level
‹#›
Automated Index Tuning
55. Topics
▪ Click to edit Master text styles
• Second level
• Third level
− Fourth level
• Fifth level
Azure SQL Database
Tuning Tools
56. Topics
▪ Click to edit Master text styles
• Second level
• Third level
− Fourth level
• Fifth level
‹#›
Azure SQL Database Performance Tools
Query Store DMVs
Extended
Events
Azure Portal
Query
Performance
Insight
Auto-Tuning
Index
57. Topics
▪ Click to edit Master text styles
• Second level
• Third level
− Fourth level
• Fifth level
‹#›
Automatic Tuning
58. Topics
▪ Click to edit Master text styles
• Second level
• Third level
− Fourth level
• Fifth level
‹#›
Thank you!
• Free Helpful Content
• http://azuresqldbresources.procuresql.com/
john@procuresql.com
@johnsterrett
johnsterrett.com
procuresql.com
linkedin.com/in/johnsterrett