SQL Server in Azure Marek Chmel Microsoft MVP: Data Platform Microsoft MCSE: Data Management & Analytics Certified Ethical Hacker
Options to run SQL Server database Azure SQL Database Microsoft SQL Server 2017 Microsoft SQL Server 2017 on-premise Azure VM Azure DB Elastic Pool Managed Instance Azure SQL DW
Iaas vs. PaaS
Your Responsibility
Advantages of Azure SQL Database RDBMS hosted as a service in Microsoft Azure Compatible with Microsoft SQL Server Same T-SQL Same Data types Same clients Same protocols Cloud First Release Model - New features go to Azure SQL Database before going into the retail SQL Server product. Shares code base with on-premise SQL Server
Azure SQL Database single DB
Single Database Database hosted on logical server A server in Azure SQL Database is a logical entity for grouping databases. Databases on one logical server run on different physical servers Login management for mapping logins to DB users
Limitations Several common services are missing SQL Server Agent Azure Webjobs Azure SQL Elastic Job (S0 tier and higher) Azure Automation Azure Functions On-premise SQL or Azure VM SQL Server with Agent SSIS Azure Data Factory SSAS Azure Analysis Services SSRS PowerBI Iaas SQL VM with SSRS
More limitations Azure SQL DB is a PaaS offering, you can t manage SQL Server instance Cross-database queries System views Server roles DB file management Common SQL Server backup
Database Security Server firewall Can also use virtual network, exposing the DBs only to limited set of resources Database firewall Authentication SQL Server Authentication Azure AD authentication Authorization Classic SQL Server model for database-level objects
Improved Security Features
Understanding Service Tiers The service tier determines the size, performance, features and recovery characteristics of the database First Release Configurations Web up to 5GB Business up to 150GB Current Configuration Basic Standard Premium 3 rd Generation Configuration vcore based
DTU Explanation A DTU is a unit of measure of the resources that are guaranteed to be available to an Azure SQL database at a specific performance level. Measures how powerful your database is! Blends CPU + Memory + Data IO + Log IO It is based on a Microsoft OLTP benchmark You can move from a lower tier to a higher one and vice versa at any point in time. For an initial estimate, there is a DTU Calculator at http://dtucalculator.azurewebsites.net developed by Justin Henriksen, Azure Solutions Architect at Microsoft.
Not Only Performance matters.. Basic Standard Premium Target workload Development and production Development and production Development and production Uptime SLA 99.99% 99.99% 99.99% Backup retention 7 days 35 days 35 days CPU Low Low, Medium, High Medium, High IO throughput (approximate) 2.5 IOPS per DTU 2.5 IOPS per DTU 48 IOPS per DTU IO latency (approximate) 5 ms (read), 10 ms (write) 5 ms (read), 10 ms (write) 2 ms (read/write) Columnstore indexing N/A S3 and above Supported In-memory OLTP N/A N/A Supported
Changing Tiers
Backups Backups happen automatically as part of the service. All databases support point-in-time recovery with a 12 hour RTO and 5 minute RPO for the in-region backups. Retention Period based on service tier Tier Basic Standard Premium Days 7 35 35 Backups are replicated to a paired Azure region. In the event of a region outage, you can restore your backups to another region. Type Full Differential TransactionLog Frequency Weekly Hourly 5 minutes
Retention
SQL Elastic Pool
SQL Elastic Pools More efficient way to distribute the available performance across more DBs Can be more cost efficient, especially of DBs have short performance spikes 20 databases can share 100 edtus over this time period. This results in a 20x reduction in DTUs and a 13x price reduction compared to placing each of the databases in S3 compute sizes for single databases
SQL Managed Instances
SQL Server Managed Instances Still in preview, GA expected on 1 st October Nearly 100% compatible with on-premise deployment
Different Pricing Tiers vcore-based purchasing model General Purpose service tier Business critical service tier Feature Number of vcores* Max storage size Expected storage IOPS Description 8, 16, 24 (Gen 4), 7GB RAM per vcore 8, 16, 24, 32, 40, 64, 80 (Gen 5), 5.5GB RAM per vcore 8 TB 500-7500 IOPS per data file (depends on data file). See Premium Storage Number of log files (LOG) per database 1 Managed automated backups HA Yes Data stored in Azure Storage and Azure Service Fabric
Managed Instance vs. On-premise SQL Server User backups have to be COPY_ONLY No disk interaction Backup to URL No BULK INSERT Can t change DB status and recovery model SQL Server Agent supports only T-SQL steps