Migrate SQL Server to Azure Thomas Bjørvåg TSP Data Platform thbjo@microsoft.com
Data platform Shared Lower cost On premises Hybrid Cloud Off premises Dedicated Higher cost Higher administration Lower administration
SQL Server in Azure VM Infrastructure as a service (IaaS) 100 % compatibility with SQL Server Full control Pay-as you-go SLA of 99,95 %
SQL Database Service A relational database as a service, fully managed by Microsoft. For cloud-designed apps when near-zero administration and enterprise-grade capabilities are key. Perfect for cloud architects and developers looking for programmatic A-like functionality.
Intelligent capabilities Built-in performance monitoring with intelligent advisors helps reduce troubleshooting time The Azure management portal exposes real-time metrics Azure SQL Database includes Intelligent advisors: o o o o Index Advisor Query Performance Insight Threat Detection Query Store
Scalable performance, no downtime With one mouse click or a single API call, scale up the apps resources to accommodate growth periods or peak workload demand Rescale the resource needs of your application with no database downtime and no application rewrites Pay only for the performance you need, when you need it Get guaranteed resources for your databases so that users get a predictable performance experience Get up to 30X performance gains with In-Memory OLTP Get real time insights and 100x performance gains with In-Memory Analytics
SQL Database service tiers (single model) BASIC STANDARD PREMIUM S0 S1 S2 S3 P1 P2 P4 P6 P11 Built For Available SLA Max Storage Point-in-time Restore ( oops Recovery) Business Continuity Security Performance Objectives Light transactional workloads Medium transactional workloads Heavy Transactional Workloads 99.99%* 2 GB 250 GB 500 GB Any point within 7 days Any point within 14 days Any point within 35 days Geo-restore, Active geo-replication, up to four readable secondary backups Always Encrypted, Transparent Data Encryption, Azure Active Directory authentication, Auditing, row-level security, dynamic data masking Transactions per hour Transactions per minute Transactions per second 1 TB Database Transaction Units (DTUs) 5 10 20 50 100 125 250 500 1,000 1,750 Available Tiers ($/Month) and GA Price $4.99 $15 $30 $75 $150 $465 $930 $1,860 $3,720 $7,001 *The 99.99% availability SLA does not apply to the existing Web and Business editions, which will continue to be supported at 99.9% availability.
Choosing performance levels Migration from on-premises installations You have to test! Switching between levels Use userdb.sys.dm_db_resource_stats Query tuning sys.dm_exec_query_stats sys.dm_exec_query_sql_text() sys.dm_exec_query_plan sys.dm_exec_requests sys.dm_exec_sessions
Azure SQL Database vs VMs SQL Server in a VM Azure SQL Database BEST FOR You need a customized IT environment with full administrative rights You need built-in high availability, disaster recovery, and upgrade mechanisms RESOURCES TCO BENEFITS BUSINESS CONTINUITY HYBRID CLOUD Eliminates hardware costs You can build high availability and disaster recovery solutions Extend Active Directory Domain, AlwaysOn Availability Groups, transactional replication Eliminates hardware costs Reduces administrative costs Built-in fault tolerance, high availability, and disaster recovery Extend Active Directory Domain, Stretch, transactional replication
Migration tools SQL Server in a VM Azure SQL Database Deploy database wizard in SSMS < 1 TB On-premise backup and manually copy files Backup to URL and restore from URL Detach and copy to Azure blob storage and attach to VM Deploy database to Microsoft Azure SQL database -Small to medium databases Export/Import Data Tier Application Wizard -Medium to large databases Transactional Replication SQL Azure Migration Wizard AlwaysOn, add replica in Azure SQL Server Data Tools in Visual Studio Transactional replication
Migrating to Azure SQL Database (v12) Migrate an on-premises SQL Server database to Azure SQL Database (v12) Get near-complete engine compatibility with SQL Server 2014* Simplify migration: Straightforward migration for the majority of databases Requires few or no changes to schema No re-engineering of applications**
Migration methodologies Method 1 Method 2 Method 3 SSMS 1. Export.bacpac 2. Import OR SQL Server Source Target 1. Deploy SQL Azure Migration Wizard SQL Server Source T-SQL Target 1. Generate 2. Execute SSMS 6. Export/ Import or Deploy 4. Copy SQL Server Source Copy Target 1. Import 5. Publish Visual Studio Database Project *.sql 4. Publish (schema only) 2. Transform 3. Edit, Build & Test SQL Azure Migrati on Wizard Azure SQL Database Azure SQL Database Azure SQL Database Migrate a compatible database using SSMS Migrate a near-compatible database using SAMW Update the database schema offline using Visual Studio and SAMW, and then deploy it with SSMS
Method 1 SSMS 1. Export.bacpac 2. Import OR SQL Server Source 1. Deploy Migrate a compatible database using SSMS Use SSMS to deploy to Azure SQL Database Use SSMS to export a BACPAC and then import it to Azure SQL Database Target Azure SQL Database
Method 2 SQL Azure Migration Wizard SQL Server Source T-SQL 1. Generate 2. Execute Migrate a near-compatible database using SAMW Provision a new database Analyze and migrate a database with SAMW Fix errors reported by SAMW Deploy database to Azure SQL Database using SAMW Target Azure SQL Database
Method 3 SSMS 6. Export/Import or Deploy 4. Copy SQL Server Source Copy Target 1. Import 5. Publish Visual Studio Database Project *.sql 4. Publish (schema only) 2. Transform SQL Azure Migration Wizard 3. Edit, Build & Test Update the database schema offline using Visual Studio and SAMW, and then deploy it with SSMS Create a new database project using SSDT Import your database into the project Select the target database as Azure SQL Database v12 preview Generate the scripts Process the scripts using SAMW Correct any errors reported by SAMW and deploy the scripts to Azure SQL Database Azure SQL Database
DEMO