35
INSIGHTS Presentation Series SQL Azure Introduction to Azure SQL DB Environments James Donahoe Azure SQL DBA Chris Foot VP Tech Strategies Webinar Video Inside

Introduction to Azure SQL DB

Embed Size (px)

Citation preview

Page 1: Introduction to Azure SQL DB

INSIGHTS Presentation Series SQL Azure

Introduction to Azure SQL DB EnvironmentsJames Donahoe Azure SQL DBA

Chris Foot VP Tech Strategies

Webinar

Video Inside

Page 2: Introduction to Azure SQL DB

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

Page 3: Introduction to Azure SQL DB

Including Cloud Database Management Systems

Infrastructure as a Service (IaaS)

Database as a Service (DBaaS)

Supported Technologies

Page 4: Introduction to Azure SQL DB

January RDX Insights Series Presentation

Strategies Tools Techniques Best Practices

Heterogeneous and homogeneous on-

premises DBMS

Migrating On-Premises DBs to the Cloud

Page 5: Introduction to Azure SQL DB

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

Page 6: Introduction to Azure SQL DB

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

Page 7: Introduction to Azure SQL DB

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

Page 8: Introduction to Azure SQL DB

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

Page 9: Introduction to Azure SQL DB

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

Page 10: Introduction to Azure SQL DB

• 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

Page 11: Introduction to Azure SQL DB

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

Page 12: Introduction to Azure SQL DB

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/

Page 13: Introduction to Azure SQL DB

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/

Page 14: Introduction to Azure SQL DB

https://azure.microsoft.com/en-us/regions/

Azure Regions

Page 15: Introduction to Azure SQL DB

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

Page 16: Introduction to Azure SQL DB

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

Page 17: Introduction to Azure SQL DB

DB

Elastic Pools

Databases vs Elastic Pools

Leverage Azure Portal Advisor elastic pool recommendations to reduce costs

Jim Recommends

Page 18: Introduction to Azure SQL DB

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

Page 19: Introduction to Azure SQL DB

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

Page 20: Introduction to Azure SQL DB

Configuring Geo-Replication

Page 21: Introduction to Azure SQL DB

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

Page 22: Introduction to Azure SQL DB

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

Page 23: Introduction to Azure SQL DB

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

Page 24: Introduction to Azure SQL DB

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

Page 25: Introduction to 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

Page 26: Introduction to Azure SQL DB

• 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

Page 27: Introduction to Azure SQL DB

Configuring Automatic Tuning

Page 28: Introduction to Azure SQL DB

Tuning Microsoft’s Production Databases

https://docs.microsoft.com/en-us/azure/sql-database/sql-database-automatic-tuning

Page 29: Introduction to Azure SQL DB

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

Page 30: Introduction to Azure SQL DB

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

Page 31: Introduction to Azure SQL DB

Six Ways RDX is Better for Business

Vulnerability Assessments

https://docs.microsoft.com/en-us/azure/sql-database/sql-vulnerability-assessment

Page 32: Introduction to Azure SQL DB

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

Page 33: Introduction to Azure SQL DB

DatabaseBackups

Weekly Full Backups

Hourly Differentials

T-Logs Every 5 Minutes

Database Backups

Azure Performs

Page 34: Introduction to Azure SQL DB

Azure SQL DB Demo

View Azure Demo on YouTube

Page 35: Introduction to Azure SQL DB

Questions and Additional Information

[email protected]

[email protected]

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