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
Common Migration failures Plan Test Execute Manage
Free Reference Material Videos, ReferenceLinks,Tips, and slide deck can be found at procuresql.com/azure-migration-resources/
Agenda • Where Should My DataGo? • How do I plan asuccessfulmigration? • How to migrate myData? • How to leverage PaaSBenefits? • What am I responsible for PostMigration (DoesDBAJobgo away)?
About John Sterrett 5 john@procuresql.com @johnsterrett johnsterrett.com procuresql.com linkedin.com/in/johnsterrett
Three reasons people are migrating? 6
Cost Comparison 7 Qty Item Cost TotalCost FiveYears TenYears 2PowerEdgeR9302xE7-8893v4 (16cores) 54,224.05 $108,448.10 $21,689.62 $10,844.81 8SQL2016 Enterprise Cores(2 CorePack) 14,256.00 $114,048.00 $22,809.60 $11,404.80 Support Power $222,496.10 $44,499.22 $22,249.61 4PowerEdgeR9302xE7-8893v4 (16cores) 54,224.05 $216,896.20 $43,379.24 $21,689.62 16SQL2016 Enterprise Cores(2 CorePack) 14,256.00 $342,144.00 $68,428.80 $34,214.40 Support Power $559,040.20 $111,808.04 $55,904.02 Monthly Yearly Premium Elastic Database -eDTU250 1,398.72 $16,784.64 Support(Standard) 300.00 $3,600.00 Power $0.00 $20,384.64 Premium Elastic Database - eDTU1500 8,370.00 $100,440.00 Support (ProfessionalDirect) 1,000.00 $12,000.00 $112,440.00 P11Single Database 7,001.04 $84,012.48 Support (ProfessionalDirect) 1,000.00 $12,000.00 $96,012.48
Security Enhancements Firewall Secure Connections DataIn Flight DataAt Rest Audit Threat Detection
Azure SQL Features… Security Azure Data Sync Active Geo- Replicas Performanc e Insight Automate d Tuning Intellect Query Processing
• https://docs.microsoft.com/en-us/azure/sql-database/sql-database-features
Where Should My Data Go? Single Databas e (PaaS) Elastic Pool (PaaS) Managed Instance (PaaS) SQLVM(IaaS)
Pricing Models DTU/vCore [single database] eDTU/vCore [elastic pool] Hyperscale (Preview)
What problems does Hyperscale Solve? • What ishyperscale? • It’s anew storage architecture for cloud scaledatabases • Query engine is not changed. • Manage Very LargeDatabases (VLDBs)without the headache of VLDB’s! • Support to 100TB+sizedatabases • Restore VLDB’sin minutes not hours. (snapshots to blobstorage) • Low latency, high throughput disk I/O • Limitations asof 6/1/19? • Doesn’t support Managed Instances or ElasticPools • Migration is one way. Cannot go back without BACPAC • Video: Kevin Farlee at SQLBitson Hyperscale • BOL:Hyperscale with 100TB+ database
What is DTU? Image Source: Microsoft Docs
DTU vs vCore? Image Source: Microsoft Docs
vCore to DTU ratio • Each100DTU in Standard tier requires at least 1vCore inGeneral Purpose tier • Each125DTU in Premium tier requires at least 1vCore inBusiness Criticaltier
Pricing DTU vs vCore
What performance tier should we use? Dtucalculator.azurewebsites.net
DTU Calculator Results
How you should find the right performance tier
How do you successfully Migrate Databases? 22
Migrating Your Data ToAzure SQL Database +Schema Data Migration=
Options to Move Your Data… BACKPAC Transactional Replication DataMigration Service RestoreBackup (Managed Instance) Log Shipping/A G (VM)
Migrating to Azure SQL Database AssessDB (DMA) Prepare Fixes Implement Fixes Export Bacpac Import Bacpac https://azure.microsoft.com/en-us/documentation/articles/sql-database-cloud-migrate/
Migrate Schema with Data Migration Assistant
Select Tables to Move
Deploy with SSMS
Migrate with SQLPackage.exe
Migrate with Dbatools.io (my favorite)
How do I make my migration go faster?
Easy Guide to Quickly Migrating Data Increas e Tier CopyData Reduc e Tier
Migrating 60GB Database with S0 33
Migrating a 60gb Database to P1 34
Overloading during Bulk Insert 35
How do you manage Azure SQL Databases Today? 36
Biggest Database Management Mistake.. Create it and forgetit…
Manage Azure SQL DB Post Migration Business continuity Disaster Recovery Security and Compliance SyncData DataTransfer Monitor and Improve Performance
High Availability with Failover Groups
Azure Database Maintenance • Integrity Checks source • Backups • Restores (you control) • Point in Time • Deleted Database • GeoRestore • Index Maintenance • OlaHallengren Solution Works;-) • Statistics Maintenance • GeoReplication / Failover Groups
Automating Maintenance Tasks •Azure SQLAgent (Managed Instance & VMOnly) • Linked Server • PowerShell • Azure • AzureAutomation • AzureFunctions • Azure Elastic Jobs
Alerts
How do you monitor and improve performance?
DTU Is….. DTU =DTU Percent* DTU Limit
Calculating DTU ISNULL( d t u _ l imi t , 0) * (SELECT Max(v) FROM (VALUES (avg_cpu_percent), (avg_data_io_percent), ( avg_log_write_percent ) ) AS value( v) ) / 100.0 AS DTU
SYS.DM_DB_RESOURCE_STATS User Database Captured EveryFifteen Seconds OneHour Historical Data Idle Database hasData
SYS.RESOURCE_STATS Master Database EveryFive Minutes 14 DaysHistorical Data Idle databases may not haverows
DTU DMV Example
Azure Wait Stats
Azure SQL Database Waits IO_QUEUE_LIMIT Disk Usage LogUsage LOG_RATE_GOVERNOR CPU SOS_SCHEDULER_YIELD bit.ly/azureSQLWaits
Wait Statistics
Indexes in Azure SQL Database Automated CreateIndex Automated Drop Index Index Fragmentation Missing Indexes Index Usage Querie s Missing Indexes
Automated Index Tuning
Azure SQL Database Tuning Tools
Azure SQL Database Performance Tools Query Store DMVs Extended Events AzurePortal Query Performanc e Insight Auto-Tuning Index
Automatic Tuning
• FreeHelpful Content • http://azuresqldbresources.procuresql.com/ Thank you! john@procuresql.com @johnsterrett johnsterrett.com procuresql.com linkedin.com/in/johnsterrett

Successfully migrating existing databases to Azure