Post on 21-Jan-2018
INSIGHTS Presentation Series SQL Azure
Introduction to Azure SQL DB EnvironmentsJames Donahoe Azure SQL DBA
Chris Foot VP Tech Strategies
Webinar
Video Inside
Who We Are
The Largest Pure Play Provider of Managed Data Infrastructure Services
20YEARS OF
SERVICE DELIVERY
EXPERIENCE
Database Platforms
SQL Server
Oracle
PostgreSQL*
DB2
MongoDB*
MySQL*
Operating Systems
Unix/Linux*Windows
Edge Technologies
SQL Server BI
Oracle EBS
SharePoint
Exchange
Environment
450+ Customers
10,000 Servers
200+ DBAs
Fortune 100s
Startups
All Verticals
Cloud Systems
Amazon AWS/RDS
Oracle Cloud DB
DBaaS
Msoft Azure
IaaS (dozens)
Hybrid Cloud
* All distributions
Including Cloud Database Management Systems
Infrastructure as a Service (IaaS)
Database as a Service (DBaaS)
Supported Technologies
January RDX Insights Series Presentation
Strategies Tools Techniques Best Practices
Heterogeneous and homogeneous on-
premises DBMS
Migrating On-Premises DBs to the Cloud
Features and Benefits
Azure SQL DB BenefitsInherent Cloud Benefits
• Microsoft is stating that new features will be released for cloud systems before on-premises
• Tuning advisors and automation• Advanced threat detection and security
including encryption, data masking and row-level security
• Elastic pools reduce costs and multi-database management activities
• Robust monitoring and administration interfaces
• In-Memory processing available• Automatic backups/self-service restore• Active geo-replication for DR• AD integration• JSON document support
• Elasticity• Scalability• Pay-as-you-go rental fees• CapEx to OpEx• Reduce datacenter costs• Reduce administration costs• High availability SLAs• Ease of implementing HA• Ease of implementing DR• Faster application time-to-market
Different Types of
Cloud Platforms
On-premises vs
IaaS and PaaS
On-Premises
• Server is onsite at your
physical plant
• You buy it and provide server
room, power, air, connectivity
• YOU support all hardware
• YOU support all software from
OS up, including database
IaaS – Infrastructure as a
Service
• Server is hosted by a provider
• You rent their hardware
• They provide server room,
power, air, connectivity….
• PROVIDER supports hardware
• YOU provide and support all
software from OS up, including
database
PaaS – Platform as a Service
• Server is hosted by a provider
• You rent their hardware
• They provide server room, air,
connectivity….
• PROVIDER supports hardware
• YOU RENT the OS and database
• PROVIDER supports OS and
database software
Cloud
Azure SQL DB is a PaaS Platform
IaaS vs DBaaSThe buzzword for PaaS offerings for databases is….
DBaaSWhich is PaaS for databases!
Infrastructure-as-a-Service Database-as-a-Service
• Have to purchase DB and OS licenses
• Able to install any software you choose – databases,
applications, third-party tools
• Easy to integrate your on-premises toolsets – monitoring,
security, application development…
• Allows you to maintain tight control of OS and DB
configuration
• Tight control over database utility execution – backups,
index maintenance
• Able to leverage cloud benefits that include elasticity,
scalability and flexibility
• Able to leverage features to reduce administrative time
(varies according to vendor and particular offering selected)
• Database products are limited by vendor offering
• Rental fees include DB and OS licenses
• Provider assumes greater administrative control over your
environment (software installation, DB and OS
configuration, patching, DB upgrades)
• WATCH VENDOR SCHEDULING WINDOWS
• Complex systems (HA, DR) are more easily configured
• Data geo-redundancy is often inherent to offering
• Provides backup and maintenance utility interfaces
• Pricing can be complex and is configured by selecting tiers
based on CPU, memory, disk utilization and performance
• If you are renting the software, when relationship is over,
you don’t own anything
Data Factory
Azure for MySQL
Microsoft Azure Cloud DB Offerings
Azure for PostgreSQL
SQL Data Warehouse
SQL Server Stretch DB
Cosmos DB
Redis Cache
Table Storage
SQL Server Platforms
VMs
On-Premises Infrastructure-as-a-Service Database-as-a-Service
Most control Moderate Control Less Control
Higher administration costs Lower administration costs Lowest administration costs
Hardware and software costs Software costs Software costs
Purchase licenses Rent OS, DB BYOL or rental Rent
No system SLAs 99.95% on VM only 99.99% for entire environment
Fewest system provided automations Some system provided automations Most system provided automations
No changes to existing support procedures Minimal changes to existing support procedures
Most changes to existing support procedures
Build your own HA and DR (hardware and software)
Design, install and configure your own HA and DR (software)
System provided HA and DR (design and configure only)
No changes to migrate DB Minimal to no changes to migrate on-premises DB
Changes often required to migrate on-premises DB
Slowest application time-to-market Moderate application time-to-market Fastest application time-to-market
• New Staffing Roles and Responsibilities• Policies and Procedures• Impact on Existing Tools and
Technologies• Change Management
Cloud DBs Will Change the Way Your
Organization Provides Support
• Costing Models• Security• Training and Education• Become More Reliant on
3rd Parties
Cloud Impact on Support
• Storage• Compute• Provisioning• Monitoring Tools• Admin Tools• Backup• Security• Data Access
• Performance• Vendor Lock In• DB Features• Elasticity• Scalability• Server Redundancy• Disaster Recovery
Greater Impact DBaaS
Less Impact IaaS
When Migrating On-Premises SQL Server
To Azure SQL DB – KNOW the Feature
Differences
RDX Recommendation
• Always On Avail Groups• Attach a database• BACKUP command• Change data capture• Database mail• Database mirroring• Database snapshots• Event notifications
https://docs.microsoft.com/en-us/azure/sql-database/sql-database-features
• Distributed transactions• Extended stored
procedures• Filestream• Linked servers• Log shipping• Polybase• Policy based management
• RESTORE command• Semantic search• Service broker• SQL Server Agent• SSIS/SSAS/SSRS• SQL Server profiler• Windows Server Failover
Clustering
Azure SQL Managed Instances
• GA in 2018• SQL Server “Instance as a Service”• Same architecture as PaaS• All PaaS features• Near 100% compatibility with on-
premises• Easy migration with DMS
Native backup/restore Log Shipping
• SQL Agent, 3-part names, DBMail, CDC…• Native support for virtual networks
(injected into your VNET)• Allows private IP addresses• SSIS/SSAS/SSRS – Not available
Azure Data Factory (SSIS PaaS) Azure Analysis Services Virtual machines Migrate to Power BI
Platform as a Service Benefits
On-Premises Compatibility+ Azure DBaaS
ManagedInstance
ManagedInstance
ElasticPool
Single DB
More control compared to traditional Azure DBaaSLower costs when compared to SQL Server on VMs
https://azure.microsoft.com/en-us/blog/new-options-to-modernize-your-application-with-azure-sql-database/
Azure SQL DB Pricing
• 36 Worldwide Regions• Single DB vs Elastic Pool• Tiers
• Basic• Standard• Premium RS• Premium
• Performance Level• DTU and eDTU• Storage• DBs per Elastic Pool
• Number of DBs or Pools• Time Period
• Hours• Months • Days
https://azure.microsoft.com/en-us/pricing/calculator/
Database Transaction Units
CPU
MEMORY
WRITESREADS
HIGH
HIGH
HIGH HIGHLOW
Microsoft measures database workloads by combining
CPU, Memory and I/O into a unit of measurement called a
DTU for single databases and eDTU’s for elastic pools
DB Elastic Pools
• Multiple databases• Share resources and costs amongst group• Good for DBs that have spikey workloads• Performance levels control sizing of other
resources• Disk storage• In-Memory allocations• #DBs in pools• Max requests, logins, sessions• Min and Max eDTUs
• Single database• No resource/cost sharing• Performance Levels control sizing of
other resources• Disk storage• In-Memory allocations• Max requests, logins, sessions• Min and Max DTUs
Databases vs Elastic Pools
Azure Portal
provides pool
recommendations
DB
Elastic Pools
Databases vs Elastic Pools
Leverage Azure Portal Advisor elastic pool recommendations to reduce costs
Jim Recommends
UNDERSTAND Azure SQL DB’s pricing models –they can be complex
MEASURE your current and estimate future workloads (Microsoft provides tools)
TAKE YOUR TIME during configuration
MONITOR consumption regularly
BE PREPARED to adjust your configuration
SET UP billing alerts
Cloud DBMS Charges
Don’t Get Surprised!
RDX Recommends
Availability Features
https://docs.microsoft.com/en-us/azure/sql-database/sql-database-geo-replication-portal
Geo-Replication• Choose a region that will store secondary database
• Secondary must have same name and service level as primary
• Uses asynchronous replication (changes committed on primary before being sent to secondary) for duplication
• Manual failover from 1 of 4 readable secondaries in same or different region. Need to update connection strings to point to new primary
• The secondary switches to become primary during failover process
• Other secondaries are auto-linked to new primary
• Azure SQL DB Failover Groups are in preview• Readable secondaries• One failover secondary in a different region is used for
automatic failover• Configure auto-failover polices that trigger activation• Configure one address that does not need to be updated
during failover. Like a Windows Cluster Name…
Currently, PowerShell worksbetter than the Portal GUI for administration
Jim Recommends
Configuring Geo-Replication
Performance Features
• Able to easily increase or decrease resource allocations
• Scale out using Elastic Database features (sharding)
• In-memory capabilities
• Robust array of performance monitoring dashboards, drilldowns, metrics and visuals
• Azure Intelligent Insights
• Automatic index management (not maintenance)
• Plan regression
• Robust monitoring alert configurations
Performance Monitoring
• Traditional tuning strategy of starting with high-level information and drilling down into specific details
• Robust array of performance monitoring dashboards, drilldowns, metrics and visuals
• Query Performance Insights accesses the Query Store to provide individual query performance data and recommendations
• Create monitoring metric threshold alerts (DTU, CPU, I/O, failed connections, storage)
• Metrics can be logged to Azure Event Hubs, Azure Log Analytics and Azure Storage
https://docs.microsoft.com/en-us/azure/sql-database/sql-database-performance
Monitoring Alerts
• Configure using portal, PowerShell, CLI, REST API• Alerts are configured at the database level• Able to create both performance and availability alerts
https://docs.microsoft.com/en-us/azure/sql-database/sql-database-insights-alerts-portal
In-Memory OLTP
• Azure SQL DB shares same in-memory implementation with SQL Server on-premises• Uses less resources to process workloads• Can be used with single DBs and databases in elastic pools• Azure Portal provides recommendations on tables that may benefit from in-memory
In-Memory ConfigurationStandard DB Configuration
https://channel9.msdn.com/Shows/Data-Exposed/In-Memory-OTLP-in-Azure-SQL-DB
Intelligent Performance Analysis
Intelligence Insights
• Continuous monitoring• Creates baselines for SQL workload• Detects poor performance events• Sophisticated displays and drill-down features• Provides root cause analysis
https://channel9.msdn.com/Events/Ignite/Microsoft-Ignite-Orlando-2017/BRK3087
• Azure’s monitoring process continuously analyzes performance
• Learns about the databases’ workload characteristics
• Tuning activities include:• Index creation• Index deletion• Plan regression
• Actions that don’t improve performance are rolled back
• Can be set to perform all steps automatically
MonitorLearn
Adjust
Verify
Index/Plan
Management
Automatic Management
• Understand how it works• Implement in test• Monitor closely
Jim Recommends
Configuring Automatic Tuning
Tuning Microsoft’s Production Databases
https://docs.microsoft.com/en-us/azure/sql-database/sql-database-automatic-tuning
Sharding
• Data is distributed to shards based on a shard key (individual key, range, hash)
• The shard map manager contains global mapping information about all shards (DBs) in a shard set
• Shard databases have identical structures
• Elastic queries, transactions and jobs are used to access the shards in the shard set
• Split-Merge utility and Elastic Database client libraries used to manage data and sharded environment
• Good for:• Large amounts of data• High transaction throughput• SAS multi-tenant applications• Split data to different geographic
areas
Shard
1
Horizontally
Scalable
Horizontal Scalability
Shard
3
Shard
2
Shard
X
Shard Key
1-100
Shard Key
101-200
Shard Key
101-200
Elastic Query
Elastic Transactions
Elastic Jobs
https://docs.microsoft.com/en-us/azure/sql-database/sql-database-elastic-scale-introduction#sharding
Allows you to scan, review, analyze and resolve issues. Can then set baseline. Subsequent
reports show baseline exceptions
Vulnerability Scanning
Capture, retain, report and analyze selected events
Auditing
Detects suspicious activities that may be potential threats. Alerts
can be configured for notification
Threat Detection
Protects data at rest, during transfer and in use. Encryption keys can be
stored in Azure Key Vault
Always Encrypted
Allows cloud and on-premises access to Active Directory
information
Azure Active Directory Integration
Policy-based security feature that hides data in the result set without
changing data stored in DB
Data Masking
Security
Six Ways RDX is Better for Business
Vulnerability Assessments
https://docs.microsoft.com/en-us/azure/sql-database/sql-vulnerability-assessment
Six Ways RDX is Better for Business
Automatic Threat Detection
• $15/Month per server
• Able to configure email alerts for a wide range of security events
• Notifications include all of the information you need to begin your analysis
• The alerts provide recommendations to help investigation and mitigate impact
• Links to SQL audit records during time of the event
https://docs.microsoft.com/en-us/azure/sql-database/sql-database-threat-detection
DatabaseBackups
Weekly Full Backups
Hourly Differentials
T-Logs Every 5 Minutes
Database Backups
Azure Performs
Questions and Additional Information
jdonahoe@rdx.com
cfoot@rdx.com
January’s Presentation – Migrating On-Premises Databases to the
Cloud
The RDX ReportMicrosoft Power BI Overview and Demo, MySQL in the Cloud, Microsoft’s Big Data Cloud
Solutions, Top Security Threats – Mobile, Website, Network
LinkedInSelecting Cloud DBMS, NoSQL Architectures, Database Security Series, Improving
Customer Service20YEARS OF
SERVICE DELIVERY
EXPERIENCE
Video recording of this presentation can be found
on RDX’s YouTube Channel:
https://youtu.be/L7YWfv9iGDg