SlideShare a Scribd company logo
#azuresatpn
Azure PaaS Databases
Gianluca Hotz
#azuresatpn
Chi sono
• Gianluca Hotz | @glhotz | ghotz@ugiss.org
• Fondatore e Mentor SolidQ
• 20+ anni con SQL Server (dalla 4.21 nel 1996)
• Modellazione basi di dati, dimensionamento e amministrazione, sviluppo,
ottimizzazione
• Interessi
• Modello relazionale, architettura DBMS, alta disponibilità e Disaster Recovery
• Community
• 20 anni Microsoft MVP SQL Server (dal 1998)
• Fondatore e presidente UGISS
• User Group Italiano SQL Server (PASS Chapter)
#azuresatpn
Introduzione
Azure PaaS Databases
#azuresatpn
Quante volte avete visto questa slide?
#azuresatpn
«Platform as a Service (PaaS)»
• Database fruibile come servizio
• Pagamento a consumo
• Completamente gestito
• Hardware, sistema operativo e software
• Alta disponibilità e «Disaster Recovery» incorporati
• Scalabilità dinamica
• «Cloud First»
• Novità SQL Server introdotte prima in Azure SQL Database…
• … ma c’è una sola codebase, quelle che ha senso arrivano anche On-Premise
#azuresatpn
Azure Operational Data Services
SQL-based
• Azure SQL Database
• Traditional
• Managed Instance
• Azure Database for PostgreSQL
• Azure Database for MySQL
• Azure Database for MariaDB (preview)
NoSQL-based
• Azure Cosmos DB
• Redis Cache
My
#azuresatpn
Azure Modern Datawarehouse
Ingestion
• Azure Event Hubs
• Azure Data Factory
Storage
• Azure Blob Storage
• Azure Data Lake Storage
Preparation
• Azure Databricks
• Azure Data Lake Analytics
• Azure HDInsight
Model/serve
• Azure SQL Datawarehouse
• Azure Analysis Services
• Power BI
#azuresatpn
SQL Server 2019
Big Data Clusters (Preview)
Compute pool
SQL Compute
Node
SQL Compute
Node
SQL Compute
Node
…
Compute pool
SQL Compute
Node
IoT data
Directly
read from
HDFS
Persistent storage
…
Storage pool
SQL
Server
Spark
HDFS Data Node
SQL
Server
Spark
HDFS Data Node
SQL
Server
Spark
HDFS Data Node
Kubernetes pod
Analytics
Custom
apps BI
SQL Server
master instance
Node Node Node Node Node Node Node
SQL
Data mart
SQL Data
Node
SQL Data
Node
Compute pool
SQL Compute
Node
Storage Storage
#azuresatpn
Novità annunciate a Ignite 2018
• SQL Database Managed Instance (GA)
• SQL Database Hyperscale (Preview)
• Reserved capacity (GA)
• Advanced Data Security
• Vulnerability Assessment (GA)
• Data Classification and Discovery (Preview)
• SQL Threat Detection enhanced capabilities
• Always Encrypted with Secure Enclave
• Intelligent Database
• SQL Graph enhancements
• Intelligent QP enhancements
• Approximate QP
• Enterprise reliability
• Accelerated Database Recovery
• Parallel PFS updates
• Resumable online index create/rebuild
#azuresatpn
Azure SQL Database
Azure PaaS Databases
#azuresatpn
Azure SQL Database deployment options
Elastic PoolSingle
Azure SQL Database
Modello a singolo database con
prestazioni carico di lavoro prevedibili
Modello molteplici database con risorse
condivise, ottimizzato per maggiore
efficienza applicazioni multi-tenant
Best for
applicazioni che richiedono risorse
garantite a livello di database
Best for
Applicazioni in modalità SaaS con
molteplici database che possono
condividere risorse
Best for
modernizzazione su larga
scala con minori sforzi e atriti
Managed Instance
Modello a istanza con elevata compatibilità con
SQL Server IaaS mantenendo i vantaggi di un PaaS
SQL
#azuresatpn
Azure SQL Database Logical Server
• Contenitore logico
• «Database», «Elastic Pool» e «Data Warehouse»
• Fornisce ambito
• «Endpoint» connessione (es. dbdemo.database.windows.net)
• Utenti per gestire più database
• «Policy» (es. «Audit», «Threat detection»)
• Simile a istanza «on-premise»
• Ma senza funzionalità a livello di istanza
• Garantisce collocamento fisico database solo per regione
#azuresatpn
Livelli di servizio
#azuresatpn
Database Transaction Unit (DTU)
• Unità di misura rappresenta potenza relativa
• CPU, memoria, letture e scritture
• Espressa in numero di transazioni
• Completate a pieno carico
• Mix di transazioni OLTP
• Benchmark documentato
• Utile per confronti
• Calcolatore per stime…
Image source: https://docs.microsoft.com/en-us/azure/sql-database/sql-database-what-is-a-dtu
#azuresatpn
Livelli di servizio basati su DTU
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
https://docs.microsoft.com/en-us/azure/sql-database/sql-database-dtu-resource-limits
#azuresatpn
Livelli di servizio basati su vCore
General Purpose Business Critical
Best for Most business workloads. Offers budget
oriented balanced and scalable compute
and storage options.
Business applications with high IO requirements. Offers
highest resilience to failures using several isolated
replicas.
Compute Gen4: 1 to 24 vCore
Gen5: 1 to 80 vCore
Gen4: 1 to 24 vCore
Gen5: 1 to 80 vCore
Memory Gen4: 7 GB per core
Gen5: 5.5 GB per core
Gen4: 7 GB per core
Gen5: 5.5 GB per core
Storage Premium remote storage
5 GB - 4 TB
Local SSD storage
5 GB - 1 TB
IO throughput (approximate) 500 IOPS per vCore
with 7500 maximum IOPS
5000 IOPS per vCore
with 200.000 maximum IOPS
Availability 1 replica, no read-scale 3 replicas, 1 read-scale, zone redundant HA
Backups RA-GRS, 7-35 days (7 days by default) RA-GRS, 7-35 days (7 days by default)
In-Memory N/A Supported
https://docs.microsoft.com/en-us/azure/sql-database/sql-database-vcore-resource-limits
#azuresatpn
Pattern comuni di scalabilità
#azuresatpn
Scalabilità con Azure SQL Database
• Verticale: «Scale up» o «Scale down»
• Orizzontale: «Scale out» o «Scale in»
Scale out/in
Scaleup/down
Premium
Basic
Standard
Basic Basic Basic
Premium
#azuresatpn
«Scale up» e «Scale down»
• Modifica Livello di servizio
• «Service Tier/Performance Level»
• Operazione «Online»: copia via replica
• Database sempre disponibile, interruzione durante «switch»
• Durata dipende dalla dimensione del database
• Attenzione a caratteristiche usate
• Es. dimensione inferiore a massimo spazio disponibile
• Max 4 modifiche ogni 24 ore per database
• Solo per database precedenti la V12
• Comunque limite pratico in base alla dimensione…
#azuresatpn
Problema tipico SaaS
• Carico di lavoro disomogeneo
• Clienti di dimensione diversa
• Collocazione geografica e «Time Zone»
• Stagionalità diverse
• Spesso «Over-provisioning» risorse
• Per assorbimento picchi di utilizzo
• Poco efficiente dal punto di vista dei costi
#azuresatpn
«Elastic Database Pools»
• Pool di risorse condivise da più database
• DTU-Based
• vCore-Based
• «Auto-Scale»
• Database aggiunti/rimossi a caldo
#azuresatpn
«Read Scale-Out»
• Livello di servizio Premium e Business Critical
• Usano AlwaysOn Availability Groups per alta disponibilità
• Ci sono già repliche secondarie disponibili
• «Read Scale-Out» permette di accedere in sola lettura
• No costi aggiuntivi
• Connessioni pilotate da «ApplicationIntent» (parametro di connessione)
• Consistenza a livello di sessione
#azuresatpn
Sfide database di grosse dimensioni (VLDB)
• Operazioni che modificano le dimensioni dei dati sono problematiche
• Possono durare tempi molto lunghi (anche giorni)
• Possono degradare le prestazioni mentre sono in esecuzione
• Possono causare interruzioni del servizio
• Espandere database può essere problematico
• Scalare la potenza di calcolo può essere difficile
• Logistica di spostare tutto su ferro nuovo
• Costi dimensionamento per assorbire picchi massimi
#azuresatpn
Azure SQL Database Hyperscale (Preview)
• Nuovo «Service Tier» per il modello vCore-based
• Supporta 100TB (di più… 100 sono quelli testati)
• Prestazioni elevate dovute a maggiore velocità scrittura transazioni
• log generation rate @ 100MBps (inizialmente)
• «File Snapshots»
• Backup più veloci, hanno zero impatto sulle prestazioni
• Restore estremamente veloci, con tempo costante (Ignite 2018: 50TB in 7 min.)
• «Scale out» rapido
• Creazione di replica in sola lettura per redistribuzione carico di lavoro
• «Scale up/down» rapido
• Tempo costante, minuti, sia «storage» che «compute»
#azuresatpn
Azure SQL Database Hyperscale Componenti
• Compute Node (Query Engine)
• «Stateless», solo cache locale su SSD
• Page Server
• Local SSD cache
• Log Service
• Local SSD cache
• Remote Data Storage
#azuresatpn
Azure SQL Database Hyperscale HA
• SLA con 99.99% disponibilità del servizio
• Livelli multipli di ridondanza
• Nessun «Single Point of Failure»
• Supporto per «Zone Redundant Storage»
• Dati e log risiedono fin da subito su ZRS
• «Compute Node» primario su ZRS quando primo secondario configurato
#azuresatpn
Azure SQL Database Hyperscale Prezzi
• Si paga solo lo spazio usato (non allocato)
• Prezzo in Preview ~50% del prezzo GA (General Availability)
• Prezzo GA sarà tra GP (General Purpose) e BC (Business Critical)
• Costi per «parcheggiare» i dati (prezzi in Preview Ottobre 2018)
• 50 TB con 2 vCore Gen 4 attorno $350/mese
• «Scale up» quando necessario in pochi minuti!
#azuresatpn
Risorse Azure SQL Database Hyperscale
• Panoramica
• https://azure.microsoft.com/en-us/blog/announcing-azure-sql-database-
hyperscale-public-preview
• Documentazione
• https://docs.microsoft.com/en-us/azure/sql-database/sql-database-
hyperscale
• Video
• New performance and scale enhancements for Azure SQL DB (Ignite 2018)
• https://myignite.techcommunity.microsoft.com/sessions/65798
• https://www.youtube.com/watch?v=QihU8UFYHs8
#azuresatpn
Quante volte avete sentito «Lift & Shift»…
#azuresatpn
«Lift & Shift»
• Non sempre possibile in maniera semplice
• Problemi principali
• Non tutte funzionalità «On-Premise» disponibili in Azure SQL Database
• Es. CDC, CLR, FILESTREAM, PBM, Service Broker, …
• https://docs.microsoft.com/en-us/azure/sql-database/sql-database-features
• Non tutti i servizi disponibili in PaaS
• Es. Integration Services (SSIS), Reporting Services (SSRS), Master Data Services (MDS),
Data Quality Services (DQS)
#azuresatpn
Azure SQL Database Managed Instance
• Nuova opzione di Deployment di SQL Database (GA)
• Rappresenta ed espone l’intera istanza di SQL Server
• Molto differente «Azure SQL Database Logical Server»
• 100% copertura funzionalità «On-Premise» (quasi..)
• Mantiene tutti i vantaggi di un PaaS
• Completamente gestita
• «Scale up/down» semplice e rapido
• HA/DR già inclusi
#azuresatpn
M.I. quasi 100% SQL Server «On-Premise»
Data migration
• Native backup/restore
• Configurable DB file Layout
• DMS (migrations at scale)
Programmability
• Global temp tables
• Cross-database queries
and transactions
• Linked servers
• CLR modules
Security
• Integrated Auth (AAD)
• Encryption (TDE, AE)
• Sysadmin Privileges
• SQL Audit
• Row Level Security
• Dynamic Data Masking
Operational
• DMVs & XEvents
• Query Store
• SQL Agent
• DB Mail (external SMTP)
• Resource Governor
#azuresatpn
Funzionalità solo «Cloud» Managed Instance
• HA/DR semplificato sostituisce scenari/funzionalità «On-Premise»
• Always-On Availability Groups sostituito da HA integrata
• Database Mirroring deprecato, geo-replica disponibile
• MDW (Management Data Warehouse) non supportato
• Integrazione con Azure monitoring, Log Analytics e Application Insights
• Sicurezza di rete con VNET e indirizzi privati
• Autenticazione integrata con Azure Active Directory (AAD)
• «Intelligent Insights» su larga scala
• Assessment vulnerabilità
#azuresatpn
SQL Instance #1 SQL Instance #2
IPsec IKE S2S VPN Tunnel оn-premisesVPN / Express Route
Gateway
SQL Instance #3
VNet1
VNet-to-VNet
Network isolation
(customer VNET)
Tenant isolation
(compute, storage)
“Virtual data cluster” dedicated to customer
(virtual private cluster, VNET, private IPs)
Web app
(public IP)
Managed Instance Virtual Data Cluster
#azuresatpn
Managed Instance: isolamento e connettività
#azuresatpn
Rilasci Prossimi Managed Instance
• Configurazione «Collation» a livello di istanza
• Configurazione «Time Zone» a livello di istanza!
• Supporto «R Services»
• «Performance Tuning» automatico
• «Discovery» e classificazione dei dati
#azuresatpn
Rilasci futuri Managed Instance
• Supporto MSDTC per transazioni distribuite
• Filestream/Filetable
• Polybase
• Policy Based Management?
• Stretch Database?
#azuresatpn
Livelli di servizio vCore Managed Instance
General Purpose Business Critical (Preview)
Best for Most business workloads. Offers budget
oriented balanced and scalable compute
and storage options.
Business applications with high IO requirements. Offers
highest resilience to failures using several isolated
replicas.
Compute Gen4: 8 to 24 vCore
Gen5: 8 to 80 vCore
Gen4: 8 to 24 vCore
Gen5: 8 to 80 vCore
Memory Gen4: 7 GB per core
Gen5: 5.5 GB per core
Gen4: 7 GB per core
Gen5: 5.5 GB per core
Storage Premium remote storage
32 GB - 8 TB
Local SSD storage
32 GB - 4 TB
IO throughput (approximate) Depends on size of file 5000 IOPS per vCore
with 200.000 maximum IOPS
Availability 1 replica, no read-scale 3 replicas, 1 read-scale, zone redundant HA
Backups RA-GRS, 7-35 days (7 days by default) RA-GRS, 7-35 days (7 days by default)
In-Memory N/A Supported
https://docs.microsoft.com/en-us/azure/sql-database/sql-database-vcore-resource-limits
#azuresatpn
Roadmap Managed Instances
• Q4 2018
• «General Availability» del livello di servizio «Business Critical»
• Supporto in anteprima «Hyperscale»
• Tutte le funzionalità in prossimo rilascio
• H1 2019
• Supporto per cloud governativi
• Altre opzioni per ridurre i costi
• Istanze con meno di 8 vCore
• Sconti per istanza di sviluppo/test
• Finestre di manutenzione personalizzate
• Molto altro…
#azuresatpn
Esempio soluzione con Managed Instance
Adventure
Works
Adventure
Works DW
Run SQL Agent
4
1
2
Signal
Notification
Service Broker
Query Notification
3
5
App Service
Web App
#azuresatpn
Azure Hybrid Benefit (AHB)
• Risparmio
• VM Windows Server (specie con istanze riservate)
• Azure SQL Database vCore-Based
• SQL Server in Azure VMs
• SQL Server Intergration Service
• Calcolatore
• https://azure.microsoft.com/en-us/pricing/hybrid-benefit
#azuresatpn
Risparmiare 55 % con AHB per SQL Server
Senza tenere in conto Software Assurance Tenendo in conto Software Assurance
Licenza inclusa Con Azure Hybrid Benefit
Risparmio
fino al 55%
Costo mensile
Managed
Instance
Licenza inclusa Con Azure Hybrid Benefit
Risparmio
fino al 30%
Costo mensile
Managed
Instance Costo
Software
Assurance
#azuresatpn
Risparmiare 80% capacità riservata + AHB
• Risparmio fino al 33% prepagando
le risorse di calcolo per 1 o 3 anni
• Fino a 80% quando combinato con
AHB
• Prepagamento risorse per una o
più sottoscrizioni
• Prepagamento si applica a un
qualunque numero di database,
«elastic pool» o «Managed
Istance» nello stesso livello di
servizio
Licenza inclusa Capacità riservata
Risparmio
fino al 33%Costo mensile
Managed
Instance
Capacità riservata
+
Azure Hybrid Benefit
Risparmio1
fino al 80%
Risparmio dipende anche da livello del servizio, regione.
#azuresatpn
Scalabilità orizzontale e «multitenancy»
• Singolo database
• Singolo «tenant»
• Condiviso da più «tenant»
• Molteplici database
• Uno per singolo «tenant»
• Condivisi da più «tenant»
#azuresatpn
«Sharding»
• Molteplici database condivisi da più «tenant»?
• Tecnica «Scale out» distribuzione dati
• Strutturati in maniera identica
• In più database indipendenti
• In base a «Sharding Key»
• Mappature per intervallo di valori o lista
#azuresatpn
«Elastic Database client library»
• «Shard Map Management»
• Mappatura «Shard Keys» e database
• «Shard Keys» liste o intervalli di valori
• «Data Dependent Routing»
• Supporto apertura connessione in base a «Shard Key»
• «Multi-Shard Queries»
• Supporto Query che coinvolge più «Shard»
• Fusione unico «Result Set» con Semantica UNION ALL
#azuresatpn
«Elastic Database split-merge tool»
• «Split Range» distribuisce una «Shard» su due «Shard»
• «Merge Range» accorpa due «Shard» in una «Shard»
• «Move Shardlet»
#azuresatpn
«Elastic Database Jobs»
• Esecuzione Script T-SQL o applicazione DACPAC
• Collezione database personalizzata
• Tutti i database di «Elastic Database Pool»
• «Shard Set»
• Ritenta in caso di fallimento
• Schedulazione
#azuresatpn
Scenari «Elastic Database Jobs»
• Attività amministrative (es. «deploy» nuovo schema)
• Ricostruzione degli indici
• Aggiornamento di dati in comune a più database
• Raccolta dati di telemetria in tabella comune
#azuresatpn
«Elastic Database Queries» (Preview)
• Supporto T-SQL per query distribuite
• CREATE EXTERNAL DATA SOURCE
• CREATE EXTERNAL TABLE
• Partizionamento verticale: «cross-database queries»
• TYPE = RDBMS
• Partizionamento orizzontale: «Sharding»
• TYPE = SHARD_MAP_MANAGER
#azuresatpn
Enterprise Grade Security that is Easy-to Use
17
552
207
90
59
33
0
100
200
300
400
500
600
Vulnerabilità(2010–2018)
SQL Permissions
Row-level security *
Column-level security
Encryption-in-flight (Transport Layer Security TLS)
Encryption-at-rest (Transparent Data Encryption TDE)
Service- or User-managed keys, Backup encryption
Encryption-in-use (Always Encrypted) *
Data masking
Data Discovery and Classification *
SQL Threat Detection
SQL Auditing
Vulnerability Assessment
* Available soon for Azure SQL DW
Network Security
Authentication
Access Control
Data Protection
Threat Protection
SQL Authentication
Azure Active Directory Authentication (w/ MFA)
VNET
SQL Firewall (server and database level)
#azuresatpn
Novità Sicurezza a Ingnite 2018
• Interface Endpoints (con indirizzi IP privati)
• Always Encrypted con Secure Enclaves
• Approfondimenti
• In the security trenches of Azure SQL Database and Azure SQL Data Warehouse
(Ignite 2018)
• https://myignite.techcommunity.microsoft.com/sessions/65796
• https://www.youtube.com/watch?v=IwoLwgznp08
• Confidential computing with SQL secure enclaves (Ignite 2018)
• https://myignite.techcommunity.microsoft.com/sessions/65357
• https://www.youtube.com/watch?v=ce4BdBAR4Gw
#azuresatpn
Always Encrypted
in use
#azuresatpn
Always Encrypted with Secure Enclaves
while
preserving rich queries and
providing in-place encryption
plaintext
Enclave
#azuresatpn
«Row-Level Security»Due
L’utente (es. l’infermiera) seleziona dalla tabella dei pazienti.
Tre
Security Policy riscrive in maniera trasparente la query applicando il predicato.
Database Policy Manager
CREATE FUNCTION dbo.fn_securitypredicate(@wing int)
RETURNS TABLE WITH SCHEMABINDING AS
return SELECT 1 as [fn_securitypredicate_result] FROM
StaffDuties d INNER JOIN Employees e
ON (d.EmpId = e.EmpId)
WHERE e.UserSID = SUSER_SID() AND @wing = d.Wing;
CREATE SECURITY POLICY dbo.SecPol
ADD FILTER PREDICATE dbo.fn_securitypredicate(Wing) ON Patients
WITH (STATE = ON)
Filter
Predicate:
INNER
JOIN…
Security
Policy
Application
Patients
Uno
Il gestore delle Policy crea un predicato per filtrare e una Policy di sicurezza in T-SQL, vincolando il
predicato alla tabelle dei pazienti.
Nurse
SELECT * FROM Patients
SELECT * FROM Patients
SEMIJOIN APPLY dbo.fn_securitypredicate(patients.Wing);
SELECT Patients.* FROM Patients,
StaffDuties d INNER JOIN Employees e ON (d.EmpId = e.EmpId)
WHERE e.UserSID = SUSER_SID() AND Patients.wing = d.Wing;
#azuresatpn
«Row-Level Security» e scalabilità
• Vincola accesso «tenant» quando «Shard» condiviso
• Presuppone disponibilità colonna che lo identifica
Image source: https://docs.microsoft.com/en-us/azure/sql-database/sql-database-elastic-tools-multi-tenant-row-level-security
#azuresatpn
«Dynamic Data Masking»
• Mascheramento
• Real-time
• Diversi tipi di maschera
• Anche parziale
• Basato su Policy
• A livello di tabella/colonna
• Permessi per vedere dati in chiaro
• Configurazione da portale
SQL Database
Table.CreditCardNo
4465-6571-7868-5796
4468-7746-3848-1978
4484-5434-6858-6550
#azuresatpn
«SQL Database Auditing»
• A livello Server logico/Database
• Configurabile tramite «Audit Policy»
• Destinazione eventi
• «Azure Storage Table»
• «Azure Storage Blob»
• «Azure Log Analytics» (Preview)
• «Azure Event Hub» (Preview)
• Analisi
• Portale «Log Analytics» (OMS)
• File Extended Events (SSMS, PowerShell, libreria C#)
• Excel pre configurato con Power Query
#azuresatpn
«Advanced Threat Protection»
• «Data Discovery & Classification»
• «Vulnerability Assessment»
• «Threat Detection»
• Attivazione a livello di database
#azuresatpn
«Data Discovery & Classification» (Preview)
• Rilevamento automatico di
colonne con dati sensibili
• Etichette permanenti aggiunte a
dati sensibili
• Audit accesso a dati sensibili in
base a classificazione
• Gestione etichette a livello di
«Azure Tenant» usando «Azure
Security Center»
#azuresatpn
«Vulnerability Assessment»
• Semplifica gestione «compliancy»
• Circa 45 controlli
• «On-premise» e «Cloud»
• Salvataggio report
• Baseline
• Focus su problemi veri
• Esecuzione periodica
• Mantenimenti «compliancy»
SQL Server on-premises
Azure SQL Database, Azure SQL Data Warehouse
#azuresatpn
«SQL Database Threat Detection»
• Rileva potenziali minacce/vulnerabilità
• Vulnerabilità a «SQL Injection»
• Attacchi di tipo «SQL Injection»
• Accessi anomali (es. da luoghi anomali, con utenti anomali)
• Applicazioni potenzialmente dannose
• Identificazione password tramite forza bruta
• Estrazione dati non autorizzata
• Allarmi
• In tempo reale
• Raccomandazioni cosa investigare/come mitigare/rimediare
• Analisi correlata con «SQL Database Auditing»
#azuresatpn
Supporto Applicazioni: linguaggi
Language Library Windows Linux Mac
C# Microsoft ADO.NET for SQL Server ✔ ✔ ✔
Java Microsoft JDBC Driver for SQL Server ✔ ✔ ✔
PHP Microsoft PHP Driver for SQL Server ✔ ✔ ✔
Node.js Node.js Driver for SQL Server ✔ ✔ ✔
Python Python SQL Driver ✔ ✔ ✔
Ruby Ruby Driver for SQL Server ✔ ✔ ✔
C/C++ Microsoft ODBC Driver for SQL Server ✔ ✔ ✔
#azuresatpn
Supporto Applicazioni: alcuni ORM
Language Library Windows Linux Mac
C#
Entity Framework
Entity Framework Core
✔ ✔ ✔
Java Hibernate ORM ✔ ✔ ✔
PHP Laravel (Eloquent) ✔ ✔
Node.js Sequelize ORM ✔ ✔ ✔
Python Django ✔ ✔ ✔
Ruby Ruby on Rails ✔ ✔ ✔
#azuresatpn
Resilienza applicazioni
• «Time-out» Connessione
• Errori transitori
• Riconfigurazione server o «Failover»
• 40197 The service has encountered an error processing your request…
• Limiti utilizzo risorse
• 40501 The service is currently busy. Retry the request after 10 seconds…
• 49918 Cannot process request. Not enough resources to process request…
• 49919 Cannot process create or update request…
• 49920 Cannot process request. Too many operations in progress…
• Logica di «retry»
• Attendere almeno 5 secondi
• «Backoff» tipo esponenziale fino a 60 secondi (es. 5, 10, 20, 40, 60)
#azuresatpn
Novità Programmabilità a Ingnite 2018
• SQL Graph in Azure SQL Database (Preview)
• Supporto clausola ON MATCH comando MERGE
• Possibilità di usare «Derived Table» in ON MATCH
• «Edge Constraints» vincolano relazione in una direzione
• Advanced graph processing with SQL Graph (Ignite 2018)
• https://myignite.techcommunity.microsoft.com/sessions/65375
• https://www.youtube.com/watch?v=xirfl_t4Gqs
#azuresatpn
Disponibilità «Standard»
• 99.99% SLA
• Si applica a livelli di servizio Basic, Standard, General Purpose
• Modello basato su disaccoppiamento «compute» e «storage»
• Nodi «Compute» gestiti da Azure Service Fabric
• Ci sono sempre dei nodi «Compute» di scorta disponibili
• Disponibilità/ridondanza «built-in» in Azure Storage
• Potenziale degrado prestazioni
• Tempo di transizione
• Cache fredda
#azuresatpn
Disponibilità «Premium»
• 99.99% SLA
• Si applica a livelli di servizio Premium, Business Critical
• Modello basato su «Clustering»
• «Compute» e «Storage» su stesso nodo
• 4 repliche basate su AlwaysOn Availability Groups
• «Read Scale-Out»
• Configurazione «Zone Redundant»
#azuresatpn
Backup automatici
• Frequenza
• «Full» settimanale
• «Differenziale» generalmente ogni 12 ore
• «Log» generalmente ogni 5-10 minuti
• «Backup set»
• Ridondati localmente
• Ridondati geograficamente RA-GRS (regione geo-politica affine)
• «Retention» basata su livello di servizio
• DTU Basic 7 giorni, Standard e Premium 35 giorni
• vCore default ogni 7 giorni si può cambiare a 35
• «Long-Term Backup Retention» (GA)
#azuresatpn
«Long-Term Backup Retention»
• Mantiene i backup settimanali (FULL) per 10 anni in RA-GRS
• Necessita «Azure Recovery Services Vault»
• Costo «Azure Backup Services»
• Non ancora disponibile per Managed Instance
#azuresatpn
«Restore»
• «Point-in-time»
• granularità al secondo fino a un punto in base a «retention»
• «Geo-Restore»
• «Estimated Recovery Time»: <12 ore
• «Recovery Point Objective»: <1 ora
• Non disponibile con «Managed Instance»
• Anche di database cancellati accidentalmente
#azuresatpn
«Active Geo-Replication»
• Fino a 4 copie secondarie asincrone
• Accessibili in sola lettura
• Supportati scenari di aggiornamento e trasferimento
• «Failover» manuale
• «Estimated Recovery Time»: <30 secondi
• «Recovery Point Objective»: <5 secondi
• Disponibile per tutti i «Service Tier», no «Managed Instance»
• Auto-Failover Groups (Preview)
#azuresatpn
Database Export
• Backup per mantenimento a lungo termine
• Restore lento
• Da copia database per garantire consistenza
• Effettuare un ripristino «On-Premise»
• Migrazione
#azuresatpn
Novità prestazioni a Ingnite 2018
• Intelligent Query Processing
• Accelerated Database Recovery
• Parallel PFS updates
• Resumeable online index create/rebuild
#azuresatpn
Intelligent Query Processing (Preview)
Intelligent QP
Adaptive QP
Adaptive Joins
Batch Mode
Interleaved Execution
Memory Grant
Feedback
Batch ModeRow Mode
Table Variable Deferred
Compilation
Approximate QP
Approximate Count
Distinct
#azuresatpn
Azure SQL Database Monitoring
• «Query Performance Insight»
• «Azure SQL Database Advisor»
• «Intelligent Insights» (Preview)
• «Automatic Performance Tuning»
• «Azure SQL Analytics» (Preview)
#azuresatpn
«Query Performance Insight»
• TOP Query per
• Consumo CPU/Disco
• Durata
• Numero esecuzioni
• Basato su Query Store
• Annotazioni
• Da «SQL Database Advisor»
Image source: https://docs.microsoft.com/en-us/azure/sql-database/sql-database-query-performance
#azuresatpn
«Azure SQL Database Advisor»
• Raccomandazioni indici
• Utili (solo «non-clustered»)
• Inutili (solo duplicati)
• Automatizzabile
• Modello ML dietro le quinte
• Annullamento automatico
• Parametrizzazione Query
• Annullamento automatico
• Problemi schema
Image source: https://docs.microsoft.com/en-us/azure/sql-database/sql-database-advisor-portal
Image source: https://docs.microsoft.com/en-us/azure/sql-database/sql-database-advisor-portal
#azuresatpn
Intelligent Insights
• Monitoring Continuo
• Rilevazione eventi dirompenti
• Analisi «root cause»
• Disponibile come log
• Azure SQL Analytics solution
• Stream to Event Hub
• Archive to Storage
Root-cause: Hitting resource limits caused by new ad-hoc query 0X9001RTYU. Impacted query 0X9002FGJR
started timing out. Consider stopping the ad-hoc query or increasing your pricing tier.
Disruptive
event
Queries:
0X9003HA4J OK
0X9002FGJR Regressed query
0X901119GI OK
0X900044RJ OK
#azuresatpn
Azure SQL Database «Automatic Tuning»
• Stesse opzioni «Azure SQL Database Advisor»
• CREATE/DROP INDEX
• FORCE LAST GOOD PLAN
• Evoluzione ma
• Impara orizzontalmente da tutti i database
#azuresatpn
Azure SQL Analytics (Preview)
• Prestazioni Database, Elastic Pool, Managed Instance
• Aiuta nella raccolta, correlazione e visualizzazione dati di telemetria
• Su larga scala, cross-sottoscrizioni
#azuresatpn
Azure Database for OS DBs
Azure PaaS Databases
#azuresatpn
Azure Database for Open Source DBs
• Esperienza «managed» simile a SQL Database per
• Azure Database for PostgreSQL (GA)
• Azure Database for MySQL (GA)
• Azure Database for MariaDB (Preview)
• Servizi che stanno crescendo di più in Azure Data
• 35+ regioni
• 100+ stati
• 26K clienti (paganti)
• +12% clienti (MoM)
My
#azuresatpn
Azure Database for Open Source DBs
• Gestione
• Backup e restore automatici
• Monitoring avanzato
• «Performance Tuning» intelligente
• Protezione basata su Intelligenza Artificiale
• Integrazione con Azure
• «Data Visualization»
• «Advanced Analytics» e Intelligenza Artificiale
• Migrazione database
#azuresatpn
Azure Database for Open Source DBs
• Everything DBAs and IT admins need to know about Azure Database
for MySQL, PostgreSQL, and MariaDB (Ignite 2018)
• https://myignite.techcommunity.microsoft.com/sessions/65385
• https://www.youtube.com/watch?v=e611PPcm70I
#azuresatpn
Migrazione
Azure PaaS Databases
#azuresatpn
Migrazione da «On-Premise» a Managed Instance
#azuresatpn
Instance subnet
SQL Instance #1
storage account
Front end subnet
RESTORE 12 BACKUP TO AZURE
SQL on VM
REPOINT APP3
Esempio di migrazione diretta a M.I.
#azuresatpn
Verifiche compatibilità migrazione
• Database compatibile con funzionalità SQL Server 2016/2017
• Funzionalità supportate parzialmente o non supportate*
• Es. Filestream, Change Data Capture, file placement ecc.
• Funzionalità supportate solo in alcune regioni
• Es. in fase di rilascio (anteprima)
#azuresatpn
Strumenti compatibilità migrazione
• SQL Server Data Migration Assistant (DMA)
• Azure Database Migration Service (DMS)
• SQL Server Data Tools for Visual Studio (SSDT)
• Report SqlPackage (linea di comando)
• SQL Server Management Studio (SSMS)
• «Export Data Tier Application»
• «Deploy Database to Microsoft Azure SQL Database» Wizard
• SQL Azure Migration Wizard DMA
#azuresatpn
Metodologie di migrazione
Method 1 Method 2 Method 3
Target
DB
Azure SQL Database
SQL Server
SSMS
2. Import
1. DeployOR
.bacpac
1. Export
Source
DB
Target
DB
Azure SQL Database
SQL Server
SQL Azure
Migration
Wizard
2. Execute
1. Generate
T-SQL
Source
DB
Target
DB
Azure SQL Database
SQL Server
SSMS
6.
Export/
Import
or Deploy
Data
Migration
Assistant
4. Copy
Copy
DB
Source
DB
5. Publish
1. Import
Visual
Studio
Database
Project
2. Transform
3. Edit, Build
& Test
*.sql
4. Publish (schema only)
Database già compatibile:
copia manuale o con deploy
wizard in SSMS
Database quasi compatibile:
con SQL Azure Migration
Wizard usare DMA e SSMS
Reingegnerizzazione con Visual Studio e
Data Migration Assistant, deploy finale
con SSMS
#azuresatpn
Migrazione con disservizio minimo
• Replica Transazionale
#azuresatpn
Migrazione SSIS/SSAS/SSRS
• Non sono installati side-by-side con l’istanza
• Raccomandazione: passare a modello PaaS se possibile!
• SQL Server Integration Services
• Migrazione package SSIS a Azure Data Factory (Azure-SSIS Integration Runtime)
• Azure Virtual Machine con licenza SQL Server…
• SQL Server Analysis Services
• Migrazione modelli Tabular Azure Analysis Services
• Azure Virtual Machine con licenza SQL Server per modelli Multi Dimensional
• SQL Server Reporting Services
• Migrazione di piattaforma a Power BI
• Azure Virtual Machine con licenza SQL Server…
#azuresatpn
Azure Database Migration Service
On-premises
SQL Server 2005 - 2017
Assessment
SSMA & DMA
Azure Database
Migration Service
My
Subnet used for MI
SQL –SQL DB MI online migration workflow
Subnet used for DMS
On-Premise
Cloud network
SQL DB
Managed Instance
Azure Blob Storage
SMB Network Share
#azuresatpn
Strumentazione
Azure PaaS Databases
#azuresatpn
Strumentazione
• In Linux
• Script configurazione con mssql-conf
• Comandi T-SQL con sqlcmd o mssql-cli
• In Windows
• SQL Server Management Studio (SSMS)
• Visual Studio con SQL Server Data Tools (SSDT)
• Visual Studio Code con estensione mssql
• PowerShell
• Comandi T-SQL con sqlcmd.exe
• Multi-piattaforma (Windows, Mac, Linux)
• SQL Operation Studio (Preview)
• Azure Data Studio (GA)
#azuresatpn
Azure Data Studio (GA)
• Evoluzione di «SQL Operations Studio»
• Open Source
• Multi-piattaforma
• Windows, Mac, Linux
• SQL Server, SQL Database, SQL Data Warehouse
• Orientato ai Devops
• Intellisense, Snippets, Projects, Source Control, Charting, …
• Estensioni (in Preview: Agent, Profiler, Import CSV/JSON basato su PROSE)
• Confronto con SSMS (versione 18.x in Preview)
• https://cloudblogs.microsoft.com/sqlserver/2018/09/25/azure-data-studio-for-sql-
server
#azuresatpn
Azure Data Studio (Preview)
• SQL Server 2019 Extension
• Installazione VSIX Package
• SQL Server 2019 Big Data Cluster support
• Integrazione HDFS e Job Spark
• Azure Data Studio Notebooks
• Notebook Jupyter: integrazione «live» testo MarkDown, codice e risultati
• Supporto Python, Scala (altri in futuro?)
• Azure Resource Explorer
• Polybase Create External Table Wizard
#azuresatpn
Risorse Tools
• MSSQL-CLI
• https://github.com/dbcli/mssql-cli
• https://github.com/dbcli
• mssql-cli, an open source and cross-platform CLI for SQL Server
• https://www.youtube.com/watch?v=C07udTA1loI
• Azure Data Studio
• https://docs.microsoft.com/en-us/sql/azure-data-studio
• https://github.com/Microsoft/azuredatastudio
• The next generation of SQL Server tools (Ignite 2018)
• https://myignite.techcommunity.microsoft.com/sessions/66199
• https://www.youtube.com/watch?v=qXfd4G7JjPI
#azuresatpn
Video Ignite 2018
• 80+ video
• 23 su SQL Server e Data Engineering
• 21 su Intelligenza Artificiale e Machine Learning
• https://blogs.msdn.microsoft.com/buckwoody/2018/10/02/microsof
t-ignite-2018-links-to-training
#azuresatpn
Q&A
• Mi trovate in giro ☺

More Related Content

What's hot

SQL Server Back to Basics: Sicurezza
SQL Server Back to Basics: SicurezzaSQL Server Back to Basics: Sicurezza
SQL Server Back to Basics: Sicurezza
Gianluca Hotz
 
SQL Server Failover Cluster Instances con Azure Managed Disks
SQL Server Failover Cluster Instances con Azure Managed DisksSQL Server Failover Cluster Instances con Azure Managed Disks
SQL Server Failover Cluster Instances con Azure Managed Disks
Gianluca Hotz
 
SQL Server Failover Cluster Instances con Amazon FSx in AWS
SQL Server Failover Cluster Instances con Amazon FSx in AWSSQL Server Failover Cluster Instances con Amazon FSx in AWS
SQL Server Failover Cluster Instances con Amazon FSx in AWS
Gianluca Hotz
 
Azure Data Factory: l'evoluzione della specie della data integration
Azure Data Factory: l'evoluzione della specie della data integrationAzure Data Factory: l'evoluzione della specie della data integration
Azure Data Factory: l'evoluzione della specie della data integration
Roberto Messora
 
SQL Server Data Virtualization with polybase
SQL Server Data Virtualization with polybaseSQL Server Data Virtualization with polybase
SQL Server Data Virtualization with polybase
Gianluca Hotz
 
SQL Server Workload Profiling
SQL Server Workload ProfilingSQL Server Workload Profiling
SQL Server Workload Profiling
Gianluca Hotz
 
Best Practices on SQL Server
Best Practices on SQL ServerBest Practices on SQL Server
Best Practices on SQL Server
Gianluca Hotz
 
Azure SQL Database Ledger
Azure SQL Database LedgerAzure SQL Database Ledger
Azure SQL Database Ledger
Gianluca Hotz
 
Data flow
Data flowData flow
Data flow
Marco Pozzan
 
SQL Server Modern Query Processing
SQL Server Modern Query ProcessingSQL Server Modern Query Processing
SQL Server Modern Query Processing
Gianluca Hotz
 
Implementare e mantenere un progetto azure sql database v.2
Implementare e mantenere un progetto azure sql database v.2Implementare e mantenere un progetto azure sql database v.2
Implementare e mantenere un progetto azure sql database v.2Emanuele Zanchettin
 
Una web farm bilanciata e scalabile con Microsoft Azure
Una web farm bilanciata e scalabile con Microsoft AzureUna web farm bilanciata e scalabile con Microsoft Azure
Una web farm bilanciata e scalabile con Microsoft Azure
Davide Benvegnù
 
Azure PaaS databases
Azure PaaS databasesAzure PaaS databases
Azure PaaS databases
Gianluca Hotz
 
2014.11.14 Implementare e mantenere un progetto Azure SQL Database
2014.11.14 Implementare e mantenere un progetto Azure SQL Database2014.11.14 Implementare e mantenere un progetto Azure SQL Database
2014.11.14 Implementare e mantenere un progetto Azure SQL Database
Emanuele Zanchettin
 
Novità di SQL Server 2017
Novità di SQL Server 2017Novità di SQL Server 2017
Novità di SQL Server 2017
Gianluca Hotz
 
Azure for Game Developers
Azure for Game DevelopersAzure for Game Developers
Azure for Game Developers
Marco Parenzan
 
Azure sql database
Azure sql databaseAzure sql database
Azure sql database
Gianluca Hotz
 
Microservices webinar EMEA Aug. 2017
Microservices webinar EMEA Aug. 2017Microservices webinar EMEA Aug. 2017
Microservices webinar EMEA Aug. 2017MongoDB
 
Sql start!2019 Migliorare la produttività per lo sviluppo su SQL Server
Sql start!2019 Migliorare la produttività per lo sviluppo su SQL ServerSql start!2019 Migliorare la produttività per lo sviluppo su SQL Server
Sql start!2019 Migliorare la produttività per lo sviluppo su SQL Server
Alessandro Alpi
 
Azure Day Rome Reloaded 2019 - Python, Azure Cosmos DB, Docker and Azure Cont...
Azure Day Rome Reloaded 2019 - Python, Azure Cosmos DB, Docker and Azure Cont...Azure Day Rome Reloaded 2019 - Python, Azure Cosmos DB, Docker and Azure Cont...
Azure Day Rome Reloaded 2019 - Python, Azure Cosmos DB, Docker and Azure Cont...
azuredayit
 

What's hot (20)

SQL Server Back to Basics: Sicurezza
SQL Server Back to Basics: SicurezzaSQL Server Back to Basics: Sicurezza
SQL Server Back to Basics: Sicurezza
 
SQL Server Failover Cluster Instances con Azure Managed Disks
SQL Server Failover Cluster Instances con Azure Managed DisksSQL Server Failover Cluster Instances con Azure Managed Disks
SQL Server Failover Cluster Instances con Azure Managed Disks
 
SQL Server Failover Cluster Instances con Amazon FSx in AWS
SQL Server Failover Cluster Instances con Amazon FSx in AWSSQL Server Failover Cluster Instances con Amazon FSx in AWS
SQL Server Failover Cluster Instances con Amazon FSx in AWS
 
Azure Data Factory: l'evoluzione della specie della data integration
Azure Data Factory: l'evoluzione della specie della data integrationAzure Data Factory: l'evoluzione della specie della data integration
Azure Data Factory: l'evoluzione della specie della data integration
 
SQL Server Data Virtualization with polybase
SQL Server Data Virtualization with polybaseSQL Server Data Virtualization with polybase
SQL Server Data Virtualization with polybase
 
SQL Server Workload Profiling
SQL Server Workload ProfilingSQL Server Workload Profiling
SQL Server Workload Profiling
 
Best Practices on SQL Server
Best Practices on SQL ServerBest Practices on SQL Server
Best Practices on SQL Server
 
Azure SQL Database Ledger
Azure SQL Database LedgerAzure SQL Database Ledger
Azure SQL Database Ledger
 
Data flow
Data flowData flow
Data flow
 
SQL Server Modern Query Processing
SQL Server Modern Query ProcessingSQL Server Modern Query Processing
SQL Server Modern Query Processing
 
Implementare e mantenere un progetto azure sql database v.2
Implementare e mantenere un progetto azure sql database v.2Implementare e mantenere un progetto azure sql database v.2
Implementare e mantenere un progetto azure sql database v.2
 
Una web farm bilanciata e scalabile con Microsoft Azure
Una web farm bilanciata e scalabile con Microsoft AzureUna web farm bilanciata e scalabile con Microsoft Azure
Una web farm bilanciata e scalabile con Microsoft Azure
 
Azure PaaS databases
Azure PaaS databasesAzure PaaS databases
Azure PaaS databases
 
2014.11.14 Implementare e mantenere un progetto Azure SQL Database
2014.11.14 Implementare e mantenere un progetto Azure SQL Database2014.11.14 Implementare e mantenere un progetto Azure SQL Database
2014.11.14 Implementare e mantenere un progetto Azure SQL Database
 
Novità di SQL Server 2017
Novità di SQL Server 2017Novità di SQL Server 2017
Novità di SQL Server 2017
 
Azure for Game Developers
Azure for Game DevelopersAzure for Game Developers
Azure for Game Developers
 
Azure sql database
Azure sql databaseAzure sql database
Azure sql database
 
Microservices webinar EMEA Aug. 2017
Microservices webinar EMEA Aug. 2017Microservices webinar EMEA Aug. 2017
Microservices webinar EMEA Aug. 2017
 
Sql start!2019 Migliorare la produttività per lo sviluppo su SQL Server
Sql start!2019 Migliorare la produttività per lo sviluppo su SQL ServerSql start!2019 Migliorare la produttività per lo sviluppo su SQL Server
Sql start!2019 Migliorare la produttività per lo sviluppo su SQL Server
 
Azure Day Rome Reloaded 2019 - Python, Azure Cosmos DB, Docker and Azure Cont...
Azure Day Rome Reloaded 2019 - Python, Azure Cosmos DB, Docker and Azure Cont...Azure Day Rome Reloaded 2019 - Python, Azure Cosmos DB, Docker and Azure Cont...
Azure Day Rome Reloaded 2019 - Python, Azure Cosmos DB, Docker and Azure Cont...
 

Similar to Azure PaaS databases

Microsoft SQL Server PaaS (Platform as a Service)
Microsoft SQL Server PaaS (Platform as a Service)Microsoft SQL Server PaaS (Platform as a Service)
Microsoft SQL Server PaaS (Platform as a Service)
Gianluca Hotz
 
Multitenancy con SQL Server e Azure SQL Database
Multitenancy con SQL Server e Azure SQL DatabaseMultitenancy con SQL Server e Azure SQL Database
Multitenancy con SQL Server e Azure SQL Database
Gianluca Hotz
 
IaaS and PaaS relational databases in the cloud
IaaS and PaaS relational databases in the cloudIaaS and PaaS relational databases in the cloud
IaaS and PaaS relational databases in the cloud
Gianluca Hotz
 
JBoss Data Grid Tech Lab
JBoss Data Grid Tech LabJBoss Data Grid Tech Lab
JBoss Data Grid Tech Lab
Ugo Landini
 
Infinispan codemotion - Codemotion Rome 2015
Infinispan codemotion - Codemotion Rome 2015Infinispan codemotion - Codemotion Rome 2015
Infinispan codemotion - Codemotion Rome 2015Codemotion
 
2014.11.14 Implementare e mantenere un progetto Azure SQL Database
2014.11.14 Implementare e mantenere un progetto Azure SQL Database2014.11.14 Implementare e mantenere un progetto Azure SQL Database
2014.11.14 Implementare e mantenere un progetto Azure SQL Database
Emanuele Zanchettin
 
Azure Synapse Analytics for your IoT Solutions
Azure Synapse Analytics for your IoT SolutionsAzure Synapse Analytics for your IoT Solutions
Azure Synapse Analytics for your IoT Solutions
Marco Parenzan
 
Data grid
Data gridData grid
Data grid
Ugo Landini
 
SQL Saturday 871 - Sardegna 2019 - SQL Server DR on Azure
SQL Saturday 871 - Sardegna 2019 - SQL Server DR on AzureSQL Saturday 871 - Sardegna 2019 - SQL Server DR on Azure
SQL Saturday 871 - Sardegna 2019 - SQL Server DR on Azure
Marco Obinu
 
Azure Synapse: data lake & modern data warehouse dalla A alla Z
Azure Synapse: data lake &  modern data warehouse dalla A alla ZAzure Synapse: data lake &  modern data warehouse dalla A alla Z
Azure Synapse: data lake & modern data warehouse dalla A alla Z
Roberto Messora
 
ASP.NET, ottimizziamo con la cache
ASP.NET, ottimizziamo con la cacheASP.NET, ottimizziamo con la cache
ASP.NET, ottimizziamo con la cache
Andrea Dottor
 
Azure dayroma java, il lato oscuro del cloud
Azure dayroma   java, il lato oscuro del cloudAzure dayroma   java, il lato oscuro del cloud
Azure dayroma java, il lato oscuro del cloud
Riccardo Zamana
 
Metadata Driven Pipeline with Microsoft Fabric
Metadata Driven Pipeline  with Microsoft FabricMetadata Driven Pipeline  with Microsoft Fabric
Metadata Driven Pipeline with Microsoft Fabric
Marco Pozzan
 
Azure Mobile Services con il .NET Framework
Azure Mobile Services con il .NET FrameworkAzure Mobile Services con il .NET Framework
Azure Mobile Services con il .NET Framework
Nicolò Carandini
 
Azure No-Sql approach: DocumentDB
Azure No-Sql approach: DocumentDBAzure No-Sql approach: DocumentDB
Azure No-Sql approach: DocumentDB
Davide Benvegnù
 
Polyglot Persistance con PostgreSQL, CouchDB, MongoDB, Redis e OrientDB
Polyglot Persistance con PostgreSQL, CouchDB, MongoDB, Redis e OrientDBPolyglot Persistance con PostgreSQL, CouchDB, MongoDB, Redis e OrientDB
Polyglot Persistance con PostgreSQL, CouchDB, MongoDB, Redis e OrientDB
Steve Maraspin
 
Ottimizzazione della gestione dei dati sul cloud
Ottimizzazione della gestione dei dati sul cloudOttimizzazione della gestione dei dati sul cloud
Ottimizzazione della gestione dei dati sul cloud
Nicolò Carandini
 
Quanto mi costa SQL Pool Serverless Synapse
Quanto mi costa SQL Pool Serverless SynapseQuanto mi costa SQL Pool Serverless Synapse
Quanto mi costa SQL Pool Serverless Synapse
Marco Pozzan
 
SQL Saturday 2019 - Event Processing with Spark
SQL Saturday 2019 - Event Processing with SparkSQL Saturday 2019 - Event Processing with Spark
SQL Saturday 2019 - Event Processing with Spark
Alessio Biasiutti
 
iot Saturday 2019 - PoC iot in 1 ora
iot Saturday 2019 - PoC iot in 1 oraiot Saturday 2019 - PoC iot in 1 ora
iot Saturday 2019 - PoC iot in 1 ora
Alessio Biasiutti
 

Similar to Azure PaaS databases (20)

Microsoft SQL Server PaaS (Platform as a Service)
Microsoft SQL Server PaaS (Platform as a Service)Microsoft SQL Server PaaS (Platform as a Service)
Microsoft SQL Server PaaS (Platform as a Service)
 
Multitenancy con SQL Server e Azure SQL Database
Multitenancy con SQL Server e Azure SQL DatabaseMultitenancy con SQL Server e Azure SQL Database
Multitenancy con SQL Server e Azure SQL Database
 
IaaS and PaaS relational databases in the cloud
IaaS and PaaS relational databases in the cloudIaaS and PaaS relational databases in the cloud
IaaS and PaaS relational databases in the cloud
 
JBoss Data Grid Tech Lab
JBoss Data Grid Tech LabJBoss Data Grid Tech Lab
JBoss Data Grid Tech Lab
 
Infinispan codemotion - Codemotion Rome 2015
Infinispan codemotion - Codemotion Rome 2015Infinispan codemotion - Codemotion Rome 2015
Infinispan codemotion - Codemotion Rome 2015
 
2014.11.14 Implementare e mantenere un progetto Azure SQL Database
2014.11.14 Implementare e mantenere un progetto Azure SQL Database2014.11.14 Implementare e mantenere un progetto Azure SQL Database
2014.11.14 Implementare e mantenere un progetto Azure SQL Database
 
Azure Synapse Analytics for your IoT Solutions
Azure Synapse Analytics for your IoT SolutionsAzure Synapse Analytics for your IoT Solutions
Azure Synapse Analytics for your IoT Solutions
 
Data grid
Data gridData grid
Data grid
 
SQL Saturday 871 - Sardegna 2019 - SQL Server DR on Azure
SQL Saturday 871 - Sardegna 2019 - SQL Server DR on AzureSQL Saturday 871 - Sardegna 2019 - SQL Server DR on Azure
SQL Saturday 871 - Sardegna 2019 - SQL Server DR on Azure
 
Azure Synapse: data lake & modern data warehouse dalla A alla Z
Azure Synapse: data lake &  modern data warehouse dalla A alla ZAzure Synapse: data lake &  modern data warehouse dalla A alla Z
Azure Synapse: data lake & modern data warehouse dalla A alla Z
 
ASP.NET, ottimizziamo con la cache
ASP.NET, ottimizziamo con la cacheASP.NET, ottimizziamo con la cache
ASP.NET, ottimizziamo con la cache
 
Azure dayroma java, il lato oscuro del cloud
Azure dayroma   java, il lato oscuro del cloudAzure dayroma   java, il lato oscuro del cloud
Azure dayroma java, il lato oscuro del cloud
 
Metadata Driven Pipeline with Microsoft Fabric
Metadata Driven Pipeline  with Microsoft FabricMetadata Driven Pipeline  with Microsoft Fabric
Metadata Driven Pipeline with Microsoft Fabric
 
Azure Mobile Services con il .NET Framework
Azure Mobile Services con il .NET FrameworkAzure Mobile Services con il .NET Framework
Azure Mobile Services con il .NET Framework
 
Azure No-Sql approach: DocumentDB
Azure No-Sql approach: DocumentDBAzure No-Sql approach: DocumentDB
Azure No-Sql approach: DocumentDB
 
Polyglot Persistance con PostgreSQL, CouchDB, MongoDB, Redis e OrientDB
Polyglot Persistance con PostgreSQL, CouchDB, MongoDB, Redis e OrientDBPolyglot Persistance con PostgreSQL, CouchDB, MongoDB, Redis e OrientDB
Polyglot Persistance con PostgreSQL, CouchDB, MongoDB, Redis e OrientDB
 
Ottimizzazione della gestione dei dati sul cloud
Ottimizzazione della gestione dei dati sul cloudOttimizzazione della gestione dei dati sul cloud
Ottimizzazione della gestione dei dati sul cloud
 
Quanto mi costa SQL Pool Serverless Synapse
Quanto mi costa SQL Pool Serverless SynapseQuanto mi costa SQL Pool Serverless Synapse
Quanto mi costa SQL Pool Serverless Synapse
 
SQL Saturday 2019 - Event Processing with Spark
SQL Saturday 2019 - Event Processing with SparkSQL Saturday 2019 - Event Processing with Spark
SQL Saturday 2019 - Event Processing with Spark
 
iot Saturday 2019 - PoC iot in 1 ora
iot Saturday 2019 - PoC iot in 1 oraiot Saturday 2019 - PoC iot in 1 ora
iot Saturday 2019 - PoC iot in 1 ora
 

More from Gianluca Hotz

SQL Server 2022 Programmability & Performance
SQL Server 2022 Programmability & PerformanceSQL Server 2022 Programmability & Performance
SQL Server 2022 Programmability & Performance
Gianluca Hotz
 
SQL Server 2022 Intelligent Query Processing
SQL Server 2022 Intelligent Query ProcessingSQL Server 2022 Intelligent Query Processing
SQL Server 2022 Intelligent Query Processing
Gianluca Hotz
 
Le novità di SQL Server 2022
Le novità di SQL Server 2022Le novità di SQL Server 2022
Le novità di SQL Server 2022
Gianluca Hotz
 
Data Integrity with SQL Database Ledger
Data Integrity with SQL Database LedgerData Integrity with SQL Database Ledger
Data Integrity with SQL Database Ledger
Gianluca Hotz
 
Best Practices for Running Microsoft SQL Server on AWS
Best Practices for Running Microsoft SQL Server on AWSBest Practices for Running Microsoft SQL Server on AWS
Best Practices for Running Microsoft SQL Server on AWS
Gianluca Hotz
 
SQL Server Modernization
SQL Server ModernizationSQL Server Modernization
SQL Server Modernization
Gianluca Hotz
 
Le novità di sql server 2019
Le novità di sql server 2019Le novità di sql server 2019
Le novità di sql server 2019
Gianluca Hotz
 
SQL Server 2019 CTP 2.5
SQL Server 2019 CTP 2.5SQL Server 2019 CTP 2.5
SQL Server 2019 CTP 2.5
Gianluca Hotz
 
Azure PaaS databases
Azure PaaS databasesAzure PaaS databases
Azure PaaS databases
Gianluca Hotz
 
SQL Server 2019 CTP2.4
SQL Server 2019 CTP2.4SQL Server 2019 CTP2.4
SQL Server 2019 CTP2.4
Gianluca Hotz
 

More from Gianluca Hotz (10)

SQL Server 2022 Programmability & Performance
SQL Server 2022 Programmability & PerformanceSQL Server 2022 Programmability & Performance
SQL Server 2022 Programmability & Performance
 
SQL Server 2022 Intelligent Query Processing
SQL Server 2022 Intelligent Query ProcessingSQL Server 2022 Intelligent Query Processing
SQL Server 2022 Intelligent Query Processing
 
Le novità di SQL Server 2022
Le novità di SQL Server 2022Le novità di SQL Server 2022
Le novità di SQL Server 2022
 
Data Integrity with SQL Database Ledger
Data Integrity with SQL Database LedgerData Integrity with SQL Database Ledger
Data Integrity with SQL Database Ledger
 
Best Practices for Running Microsoft SQL Server on AWS
Best Practices for Running Microsoft SQL Server on AWSBest Practices for Running Microsoft SQL Server on AWS
Best Practices for Running Microsoft SQL Server on AWS
 
SQL Server Modernization
SQL Server ModernizationSQL Server Modernization
SQL Server Modernization
 
Le novità di sql server 2019
Le novità di sql server 2019Le novità di sql server 2019
Le novità di sql server 2019
 
SQL Server 2019 CTP 2.5
SQL Server 2019 CTP 2.5SQL Server 2019 CTP 2.5
SQL Server 2019 CTP 2.5
 
Azure PaaS databases
Azure PaaS databasesAzure PaaS databases
Azure PaaS databases
 
SQL Server 2019 CTP2.4
SQL Server 2019 CTP2.4SQL Server 2019 CTP2.4
SQL Server 2019 CTP2.4
 

Azure PaaS databases

  • 2. #azuresatpn Chi sono • Gianluca Hotz | @glhotz | ghotz@ugiss.org • Fondatore e Mentor SolidQ • 20+ anni con SQL Server (dalla 4.21 nel 1996) • Modellazione basi di dati, dimensionamento e amministrazione, sviluppo, ottimizzazione • Interessi • Modello relazionale, architettura DBMS, alta disponibilità e Disaster Recovery • Community • 20 anni Microsoft MVP SQL Server (dal 1998) • Fondatore e presidente UGISS • User Group Italiano SQL Server (PASS Chapter)
  • 4. #azuresatpn Quante volte avete visto questa slide?
  • 5. #azuresatpn «Platform as a Service (PaaS)» • Database fruibile come servizio • Pagamento a consumo • Completamente gestito • Hardware, sistema operativo e software • Alta disponibilità e «Disaster Recovery» incorporati • Scalabilità dinamica • «Cloud First» • Novità SQL Server introdotte prima in Azure SQL Database… • … ma c’è una sola codebase, quelle che ha senso arrivano anche On-Premise
  • 6. #azuresatpn Azure Operational Data Services SQL-based • Azure SQL Database • Traditional • Managed Instance • Azure Database for PostgreSQL • Azure Database for MySQL • Azure Database for MariaDB (preview) NoSQL-based • Azure Cosmos DB • Redis Cache My
  • 7. #azuresatpn Azure Modern Datawarehouse Ingestion • Azure Event Hubs • Azure Data Factory Storage • Azure Blob Storage • Azure Data Lake Storage Preparation • Azure Databricks • Azure Data Lake Analytics • Azure HDInsight Model/serve • Azure SQL Datawarehouse • Azure Analysis Services • Power BI
  • 8. #azuresatpn SQL Server 2019 Big Data Clusters (Preview) Compute pool SQL Compute Node SQL Compute Node SQL Compute Node … Compute pool SQL Compute Node IoT data Directly read from HDFS Persistent storage … Storage pool SQL Server Spark HDFS Data Node SQL Server Spark HDFS Data Node SQL Server Spark HDFS Data Node Kubernetes pod Analytics Custom apps BI SQL Server master instance Node Node Node Node Node Node Node SQL Data mart SQL Data Node SQL Data Node Compute pool SQL Compute Node Storage Storage
  • 9. #azuresatpn Novità annunciate a Ignite 2018 • SQL Database Managed Instance (GA) • SQL Database Hyperscale (Preview) • Reserved capacity (GA) • Advanced Data Security • Vulnerability Assessment (GA) • Data Classification and Discovery (Preview) • SQL Threat Detection enhanced capabilities • Always Encrypted with Secure Enclave • Intelligent Database • SQL Graph enhancements • Intelligent QP enhancements • Approximate QP • Enterprise reliability • Accelerated Database Recovery • Parallel PFS updates • Resumable online index create/rebuild
  • 11. #azuresatpn Azure SQL Database deployment options Elastic PoolSingle Azure SQL Database Modello a singolo database con prestazioni carico di lavoro prevedibili Modello molteplici database con risorse condivise, ottimizzato per maggiore efficienza applicazioni multi-tenant Best for applicazioni che richiedono risorse garantite a livello di database Best for Applicazioni in modalità SaaS con molteplici database che possono condividere risorse Best for modernizzazione su larga scala con minori sforzi e atriti Managed Instance Modello a istanza con elevata compatibilità con SQL Server IaaS mantenendo i vantaggi di un PaaS SQL
  • 12. #azuresatpn Azure SQL Database Logical Server • Contenitore logico • «Database», «Elastic Pool» e «Data Warehouse» • Fornisce ambito • «Endpoint» connessione (es. dbdemo.database.windows.net) • Utenti per gestire più database • «Policy» (es. «Audit», «Threat detection») • Simile a istanza «on-premise» • Ma senza funzionalità a livello di istanza • Garantisce collocamento fisico database solo per regione
  • 14. #azuresatpn Database Transaction Unit (DTU) • Unità di misura rappresenta potenza relativa • CPU, memoria, letture e scritture • Espressa in numero di transazioni • Completate a pieno carico • Mix di transazioni OLTP • Benchmark documentato • Utile per confronti • Calcolatore per stime… Image source: https://docs.microsoft.com/en-us/azure/sql-database/sql-database-what-is-a-dtu
  • 15. #azuresatpn Livelli di servizio basati su DTU 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 https://docs.microsoft.com/en-us/azure/sql-database/sql-database-dtu-resource-limits
  • 16. #azuresatpn Livelli di servizio basati su vCore General Purpose Business Critical Best for Most business workloads. Offers budget oriented balanced and scalable compute and storage options. Business applications with high IO requirements. Offers highest resilience to failures using several isolated replicas. Compute Gen4: 1 to 24 vCore Gen5: 1 to 80 vCore Gen4: 1 to 24 vCore Gen5: 1 to 80 vCore Memory Gen4: 7 GB per core Gen5: 5.5 GB per core Gen4: 7 GB per core Gen5: 5.5 GB per core Storage Premium remote storage 5 GB - 4 TB Local SSD storage 5 GB - 1 TB IO throughput (approximate) 500 IOPS per vCore with 7500 maximum IOPS 5000 IOPS per vCore with 200.000 maximum IOPS Availability 1 replica, no read-scale 3 replicas, 1 read-scale, zone redundant HA Backups RA-GRS, 7-35 days (7 days by default) RA-GRS, 7-35 days (7 days by default) In-Memory N/A Supported https://docs.microsoft.com/en-us/azure/sql-database/sql-database-vcore-resource-limits
  • 18. #azuresatpn Scalabilità con Azure SQL Database • Verticale: «Scale up» o «Scale down» • Orizzontale: «Scale out» o «Scale in» Scale out/in Scaleup/down Premium Basic Standard Basic Basic Basic Premium
  • 19. #azuresatpn «Scale up» e «Scale down» • Modifica Livello di servizio • «Service Tier/Performance Level» • Operazione «Online»: copia via replica • Database sempre disponibile, interruzione durante «switch» • Durata dipende dalla dimensione del database • Attenzione a caratteristiche usate • Es. dimensione inferiore a massimo spazio disponibile • Max 4 modifiche ogni 24 ore per database • Solo per database precedenti la V12 • Comunque limite pratico in base alla dimensione…
  • 20. #azuresatpn Problema tipico SaaS • Carico di lavoro disomogeneo • Clienti di dimensione diversa • Collocazione geografica e «Time Zone» • Stagionalità diverse • Spesso «Over-provisioning» risorse • Per assorbimento picchi di utilizzo • Poco efficiente dal punto di vista dei costi
  • 21. #azuresatpn «Elastic Database Pools» • Pool di risorse condivise da più database • DTU-Based • vCore-Based • «Auto-Scale» • Database aggiunti/rimossi a caldo
  • 22. #azuresatpn «Read Scale-Out» • Livello di servizio Premium e Business Critical • Usano AlwaysOn Availability Groups per alta disponibilità • Ci sono già repliche secondarie disponibili • «Read Scale-Out» permette di accedere in sola lettura • No costi aggiuntivi • Connessioni pilotate da «ApplicationIntent» (parametro di connessione) • Consistenza a livello di sessione
  • 23. #azuresatpn Sfide database di grosse dimensioni (VLDB) • Operazioni che modificano le dimensioni dei dati sono problematiche • Possono durare tempi molto lunghi (anche giorni) • Possono degradare le prestazioni mentre sono in esecuzione • Possono causare interruzioni del servizio • Espandere database può essere problematico • Scalare la potenza di calcolo può essere difficile • Logistica di spostare tutto su ferro nuovo • Costi dimensionamento per assorbire picchi massimi
  • 24. #azuresatpn Azure SQL Database Hyperscale (Preview) • Nuovo «Service Tier» per il modello vCore-based • Supporta 100TB (di più… 100 sono quelli testati) • Prestazioni elevate dovute a maggiore velocità scrittura transazioni • log generation rate @ 100MBps (inizialmente) • «File Snapshots» • Backup più veloci, hanno zero impatto sulle prestazioni • Restore estremamente veloci, con tempo costante (Ignite 2018: 50TB in 7 min.) • «Scale out» rapido • Creazione di replica in sola lettura per redistribuzione carico di lavoro • «Scale up/down» rapido • Tempo costante, minuti, sia «storage» che «compute»
  • 25. #azuresatpn Azure SQL Database Hyperscale Componenti • Compute Node (Query Engine) • «Stateless», solo cache locale su SSD • Page Server • Local SSD cache • Log Service • Local SSD cache • Remote Data Storage
  • 26. #azuresatpn Azure SQL Database Hyperscale HA • SLA con 99.99% disponibilità del servizio • Livelli multipli di ridondanza • Nessun «Single Point of Failure» • Supporto per «Zone Redundant Storage» • Dati e log risiedono fin da subito su ZRS • «Compute Node» primario su ZRS quando primo secondario configurato
  • 27. #azuresatpn Azure SQL Database Hyperscale Prezzi • Si paga solo lo spazio usato (non allocato) • Prezzo in Preview ~50% del prezzo GA (General Availability) • Prezzo GA sarà tra GP (General Purpose) e BC (Business Critical) • Costi per «parcheggiare» i dati (prezzi in Preview Ottobre 2018) • 50 TB con 2 vCore Gen 4 attorno $350/mese • «Scale up» quando necessario in pochi minuti!
  • 28. #azuresatpn Risorse Azure SQL Database Hyperscale • Panoramica • https://azure.microsoft.com/en-us/blog/announcing-azure-sql-database- hyperscale-public-preview • Documentazione • https://docs.microsoft.com/en-us/azure/sql-database/sql-database- hyperscale • Video • New performance and scale enhancements for Azure SQL DB (Ignite 2018) • https://myignite.techcommunity.microsoft.com/sessions/65798 • https://www.youtube.com/watch?v=QihU8UFYHs8
  • 29. #azuresatpn Quante volte avete sentito «Lift & Shift»…
  • 30. #azuresatpn «Lift & Shift» • Non sempre possibile in maniera semplice • Problemi principali • Non tutte funzionalità «On-Premise» disponibili in Azure SQL Database • Es. CDC, CLR, FILESTREAM, PBM, Service Broker, … • https://docs.microsoft.com/en-us/azure/sql-database/sql-database-features • Non tutti i servizi disponibili in PaaS • Es. Integration Services (SSIS), Reporting Services (SSRS), Master Data Services (MDS), Data Quality Services (DQS)
  • 31. #azuresatpn Azure SQL Database Managed Instance • Nuova opzione di Deployment di SQL Database (GA) • Rappresenta ed espone l’intera istanza di SQL Server • Molto differente «Azure SQL Database Logical Server» • 100% copertura funzionalità «On-Premise» (quasi..) • Mantiene tutti i vantaggi di un PaaS • Completamente gestita • «Scale up/down» semplice e rapido • HA/DR già inclusi
  • 32. #azuresatpn M.I. quasi 100% SQL Server «On-Premise» Data migration • Native backup/restore • Configurable DB file Layout • DMS (migrations at scale) Programmability • Global temp tables • Cross-database queries and transactions • Linked servers • CLR modules Security • Integrated Auth (AAD) • Encryption (TDE, AE) • Sysadmin Privileges • SQL Audit • Row Level Security • Dynamic Data Masking Operational • DMVs & XEvents • Query Store • SQL Agent • DB Mail (external SMTP) • Resource Governor
  • 33. #azuresatpn Funzionalità solo «Cloud» Managed Instance • HA/DR semplificato sostituisce scenari/funzionalità «On-Premise» • Always-On Availability Groups sostituito da HA integrata • Database Mirroring deprecato, geo-replica disponibile • MDW (Management Data Warehouse) non supportato • Integrazione con Azure monitoring, Log Analytics e Application Insights • Sicurezza di rete con VNET e indirizzi privati • Autenticazione integrata con Azure Active Directory (AAD) • «Intelligent Insights» su larga scala • Assessment vulnerabilità
  • 34. #azuresatpn SQL Instance #1 SQL Instance #2 IPsec IKE S2S VPN Tunnel оn-premisesVPN / Express Route Gateway SQL Instance #3 VNet1 VNet-to-VNet Network isolation (customer VNET) Tenant isolation (compute, storage) “Virtual data cluster” dedicated to customer (virtual private cluster, VNET, private IPs) Web app (public IP) Managed Instance Virtual Data Cluster
  • 36. #azuresatpn Rilasci Prossimi Managed Instance • Configurazione «Collation» a livello di istanza • Configurazione «Time Zone» a livello di istanza! • Supporto «R Services» • «Performance Tuning» automatico • «Discovery» e classificazione dei dati
  • 37. #azuresatpn Rilasci futuri Managed Instance • Supporto MSDTC per transazioni distribuite • Filestream/Filetable • Polybase • Policy Based Management? • Stretch Database?
  • 38. #azuresatpn Livelli di servizio vCore Managed Instance General Purpose Business Critical (Preview) Best for Most business workloads. Offers budget oriented balanced and scalable compute and storage options. Business applications with high IO requirements. Offers highest resilience to failures using several isolated replicas. Compute Gen4: 8 to 24 vCore Gen5: 8 to 80 vCore Gen4: 8 to 24 vCore Gen5: 8 to 80 vCore Memory Gen4: 7 GB per core Gen5: 5.5 GB per core Gen4: 7 GB per core Gen5: 5.5 GB per core Storage Premium remote storage 32 GB - 8 TB Local SSD storage 32 GB - 4 TB IO throughput (approximate) Depends on size of file 5000 IOPS per vCore with 200.000 maximum IOPS Availability 1 replica, no read-scale 3 replicas, 1 read-scale, zone redundant HA Backups RA-GRS, 7-35 days (7 days by default) RA-GRS, 7-35 days (7 days by default) In-Memory N/A Supported https://docs.microsoft.com/en-us/azure/sql-database/sql-database-vcore-resource-limits
  • 39. #azuresatpn Roadmap Managed Instances • Q4 2018 • «General Availability» del livello di servizio «Business Critical» • Supporto in anteprima «Hyperscale» • Tutte le funzionalità in prossimo rilascio • H1 2019 • Supporto per cloud governativi • Altre opzioni per ridurre i costi • Istanze con meno di 8 vCore • Sconti per istanza di sviluppo/test • Finestre di manutenzione personalizzate • Molto altro…
  • 40. #azuresatpn Esempio soluzione con Managed Instance Adventure Works Adventure Works DW Run SQL Agent 4 1 2 Signal Notification Service Broker Query Notification 3 5 App Service Web App
  • 41. #azuresatpn Azure Hybrid Benefit (AHB) • Risparmio • VM Windows Server (specie con istanze riservate) • Azure SQL Database vCore-Based • SQL Server in Azure VMs • SQL Server Intergration Service • Calcolatore • https://azure.microsoft.com/en-us/pricing/hybrid-benefit
  • 42. #azuresatpn Risparmiare 55 % con AHB per SQL Server Senza tenere in conto Software Assurance Tenendo in conto Software Assurance Licenza inclusa Con Azure Hybrid Benefit Risparmio fino al 55% Costo mensile Managed Instance Licenza inclusa Con Azure Hybrid Benefit Risparmio fino al 30% Costo mensile Managed Instance Costo Software Assurance
  • 43. #azuresatpn Risparmiare 80% capacità riservata + AHB • Risparmio fino al 33% prepagando le risorse di calcolo per 1 o 3 anni • Fino a 80% quando combinato con AHB • Prepagamento risorse per una o più sottoscrizioni • Prepagamento si applica a un qualunque numero di database, «elastic pool» o «Managed Istance» nello stesso livello di servizio Licenza inclusa Capacità riservata Risparmio fino al 33%Costo mensile Managed Instance Capacità riservata + Azure Hybrid Benefit Risparmio1 fino al 80% Risparmio dipende anche da livello del servizio, regione.
  • 44. #azuresatpn Scalabilità orizzontale e «multitenancy» • Singolo database • Singolo «tenant» • Condiviso da più «tenant» • Molteplici database • Uno per singolo «tenant» • Condivisi da più «tenant»
  • 45. #azuresatpn «Sharding» • Molteplici database condivisi da più «tenant»? • Tecnica «Scale out» distribuzione dati • Strutturati in maniera identica • In più database indipendenti • In base a «Sharding Key» • Mappature per intervallo di valori o lista
  • 46. #azuresatpn «Elastic Database client library» • «Shard Map Management» • Mappatura «Shard Keys» e database • «Shard Keys» liste o intervalli di valori • «Data Dependent Routing» • Supporto apertura connessione in base a «Shard Key» • «Multi-Shard Queries» • Supporto Query che coinvolge più «Shard» • Fusione unico «Result Set» con Semantica UNION ALL
  • 47. #azuresatpn «Elastic Database split-merge tool» • «Split Range» distribuisce una «Shard» su due «Shard» • «Merge Range» accorpa due «Shard» in una «Shard» • «Move Shardlet»
  • 48. #azuresatpn «Elastic Database Jobs» • Esecuzione Script T-SQL o applicazione DACPAC • Collezione database personalizzata • Tutti i database di «Elastic Database Pool» • «Shard Set» • Ritenta in caso di fallimento • Schedulazione
  • 49. #azuresatpn Scenari «Elastic Database Jobs» • Attività amministrative (es. «deploy» nuovo schema) • Ricostruzione degli indici • Aggiornamento di dati in comune a più database • Raccolta dati di telemetria in tabella comune
  • 50. #azuresatpn «Elastic Database Queries» (Preview) • Supporto T-SQL per query distribuite • CREATE EXTERNAL DATA SOURCE • CREATE EXTERNAL TABLE • Partizionamento verticale: «cross-database queries» • TYPE = RDBMS • Partizionamento orizzontale: «Sharding» • TYPE = SHARD_MAP_MANAGER
  • 51. #azuresatpn Enterprise Grade Security that is Easy-to Use 17 552 207 90 59 33 0 100 200 300 400 500 600 Vulnerabilità(2010–2018) SQL Permissions Row-level security * Column-level security Encryption-in-flight (Transport Layer Security TLS) Encryption-at-rest (Transparent Data Encryption TDE) Service- or User-managed keys, Backup encryption Encryption-in-use (Always Encrypted) * Data masking Data Discovery and Classification * SQL Threat Detection SQL Auditing Vulnerability Assessment * Available soon for Azure SQL DW Network Security Authentication Access Control Data Protection Threat Protection SQL Authentication Azure Active Directory Authentication (w/ MFA) VNET SQL Firewall (server and database level)
  • 52. #azuresatpn Novità Sicurezza a Ingnite 2018 • Interface Endpoints (con indirizzi IP privati) • Always Encrypted con Secure Enclaves • Approfondimenti • In the security trenches of Azure SQL Database and Azure SQL Data Warehouse (Ignite 2018) • https://myignite.techcommunity.microsoft.com/sessions/65796 • https://www.youtube.com/watch?v=IwoLwgznp08 • Confidential computing with SQL secure enclaves (Ignite 2018) • https://myignite.techcommunity.microsoft.com/sessions/65357 • https://www.youtube.com/watch?v=ce4BdBAR4Gw
  • 54. #azuresatpn Always Encrypted with Secure Enclaves while preserving rich queries and providing in-place encryption plaintext Enclave
  • 55. #azuresatpn «Row-Level Security»Due L’utente (es. l’infermiera) seleziona dalla tabella dei pazienti. Tre Security Policy riscrive in maniera trasparente la query applicando il predicato. Database Policy Manager CREATE FUNCTION dbo.fn_securitypredicate(@wing int) RETURNS TABLE WITH SCHEMABINDING AS return SELECT 1 as [fn_securitypredicate_result] FROM StaffDuties d INNER JOIN Employees e ON (d.EmpId = e.EmpId) WHERE e.UserSID = SUSER_SID() AND @wing = d.Wing; CREATE SECURITY POLICY dbo.SecPol ADD FILTER PREDICATE dbo.fn_securitypredicate(Wing) ON Patients WITH (STATE = ON) Filter Predicate: INNER JOIN… Security Policy Application Patients Uno Il gestore delle Policy crea un predicato per filtrare e una Policy di sicurezza in T-SQL, vincolando il predicato alla tabelle dei pazienti. Nurse SELECT * FROM Patients SELECT * FROM Patients SEMIJOIN APPLY dbo.fn_securitypredicate(patients.Wing); SELECT Patients.* FROM Patients, StaffDuties d INNER JOIN Employees e ON (d.EmpId = e.EmpId) WHERE e.UserSID = SUSER_SID() AND Patients.wing = d.Wing;
  • 56. #azuresatpn «Row-Level Security» e scalabilità • Vincola accesso «tenant» quando «Shard» condiviso • Presuppone disponibilità colonna che lo identifica Image source: https://docs.microsoft.com/en-us/azure/sql-database/sql-database-elastic-tools-multi-tenant-row-level-security
  • 57. #azuresatpn «Dynamic Data Masking» • Mascheramento • Real-time • Diversi tipi di maschera • Anche parziale • Basato su Policy • A livello di tabella/colonna • Permessi per vedere dati in chiaro • Configurazione da portale SQL Database Table.CreditCardNo 4465-6571-7868-5796 4468-7746-3848-1978 4484-5434-6858-6550
  • 58. #azuresatpn «SQL Database Auditing» • A livello Server logico/Database • Configurabile tramite «Audit Policy» • Destinazione eventi • «Azure Storage Table» • «Azure Storage Blob» • «Azure Log Analytics» (Preview) • «Azure Event Hub» (Preview) • Analisi • Portale «Log Analytics» (OMS) • File Extended Events (SSMS, PowerShell, libreria C#) • Excel pre configurato con Power Query
  • 59. #azuresatpn «Advanced Threat Protection» • «Data Discovery & Classification» • «Vulnerability Assessment» • «Threat Detection» • Attivazione a livello di database
  • 60. #azuresatpn «Data Discovery & Classification» (Preview) • Rilevamento automatico di colonne con dati sensibili • Etichette permanenti aggiunte a dati sensibili • Audit accesso a dati sensibili in base a classificazione • Gestione etichette a livello di «Azure Tenant» usando «Azure Security Center»
  • 61. #azuresatpn «Vulnerability Assessment» • Semplifica gestione «compliancy» • Circa 45 controlli • «On-premise» e «Cloud» • Salvataggio report • Baseline • Focus su problemi veri • Esecuzione periodica • Mantenimenti «compliancy» SQL Server on-premises Azure SQL Database, Azure SQL Data Warehouse
  • 62. #azuresatpn «SQL Database Threat Detection» • Rileva potenziali minacce/vulnerabilità • Vulnerabilità a «SQL Injection» • Attacchi di tipo «SQL Injection» • Accessi anomali (es. da luoghi anomali, con utenti anomali) • Applicazioni potenzialmente dannose • Identificazione password tramite forza bruta • Estrazione dati non autorizzata • Allarmi • In tempo reale • Raccomandazioni cosa investigare/come mitigare/rimediare • Analisi correlata con «SQL Database Auditing»
  • 63. #azuresatpn Supporto Applicazioni: linguaggi Language Library Windows Linux Mac C# Microsoft ADO.NET for SQL Server ✔ ✔ ✔ Java Microsoft JDBC Driver for SQL Server ✔ ✔ ✔ PHP Microsoft PHP Driver for SQL Server ✔ ✔ ✔ Node.js Node.js Driver for SQL Server ✔ ✔ ✔ Python Python SQL Driver ✔ ✔ ✔ Ruby Ruby Driver for SQL Server ✔ ✔ ✔ C/C++ Microsoft ODBC Driver for SQL Server ✔ ✔ ✔
  • 64. #azuresatpn Supporto Applicazioni: alcuni ORM Language Library Windows Linux Mac C# Entity Framework Entity Framework Core ✔ ✔ ✔ Java Hibernate ORM ✔ ✔ ✔ PHP Laravel (Eloquent) ✔ ✔ Node.js Sequelize ORM ✔ ✔ ✔ Python Django ✔ ✔ ✔ Ruby Ruby on Rails ✔ ✔ ✔
  • 65. #azuresatpn Resilienza applicazioni • «Time-out» Connessione • Errori transitori • Riconfigurazione server o «Failover» • 40197 The service has encountered an error processing your request… • Limiti utilizzo risorse • 40501 The service is currently busy. Retry the request after 10 seconds… • 49918 Cannot process request. Not enough resources to process request… • 49919 Cannot process create or update request… • 49920 Cannot process request. Too many operations in progress… • Logica di «retry» • Attendere almeno 5 secondi • «Backoff» tipo esponenziale fino a 60 secondi (es. 5, 10, 20, 40, 60)
  • 66. #azuresatpn Novità Programmabilità a Ingnite 2018 • SQL Graph in Azure SQL Database (Preview) • Supporto clausola ON MATCH comando MERGE • Possibilità di usare «Derived Table» in ON MATCH • «Edge Constraints» vincolano relazione in una direzione • Advanced graph processing with SQL Graph (Ignite 2018) • https://myignite.techcommunity.microsoft.com/sessions/65375 • https://www.youtube.com/watch?v=xirfl_t4Gqs
  • 67. #azuresatpn Disponibilità «Standard» • 99.99% SLA • Si applica a livelli di servizio Basic, Standard, General Purpose • Modello basato su disaccoppiamento «compute» e «storage» • Nodi «Compute» gestiti da Azure Service Fabric • Ci sono sempre dei nodi «Compute» di scorta disponibili • Disponibilità/ridondanza «built-in» in Azure Storage • Potenziale degrado prestazioni • Tempo di transizione • Cache fredda
  • 68. #azuresatpn Disponibilità «Premium» • 99.99% SLA • Si applica a livelli di servizio Premium, Business Critical • Modello basato su «Clustering» • «Compute» e «Storage» su stesso nodo • 4 repliche basate su AlwaysOn Availability Groups • «Read Scale-Out» • Configurazione «Zone Redundant»
  • 69. #azuresatpn Backup automatici • Frequenza • «Full» settimanale • «Differenziale» generalmente ogni 12 ore • «Log» generalmente ogni 5-10 minuti • «Backup set» • Ridondati localmente • Ridondati geograficamente RA-GRS (regione geo-politica affine) • «Retention» basata su livello di servizio • DTU Basic 7 giorni, Standard e Premium 35 giorni • vCore default ogni 7 giorni si può cambiare a 35 • «Long-Term Backup Retention» (GA)
  • 70. #azuresatpn «Long-Term Backup Retention» • Mantiene i backup settimanali (FULL) per 10 anni in RA-GRS • Necessita «Azure Recovery Services Vault» • Costo «Azure Backup Services» • Non ancora disponibile per Managed Instance
  • 71. #azuresatpn «Restore» • «Point-in-time» • granularità al secondo fino a un punto in base a «retention» • «Geo-Restore» • «Estimated Recovery Time»: <12 ore • «Recovery Point Objective»: <1 ora • Non disponibile con «Managed Instance» • Anche di database cancellati accidentalmente
  • 72. #azuresatpn «Active Geo-Replication» • Fino a 4 copie secondarie asincrone • Accessibili in sola lettura • Supportati scenari di aggiornamento e trasferimento • «Failover» manuale • «Estimated Recovery Time»: <30 secondi • «Recovery Point Objective»: <5 secondi • Disponibile per tutti i «Service Tier», no «Managed Instance» • Auto-Failover Groups (Preview)
  • 73. #azuresatpn Database Export • Backup per mantenimento a lungo termine • Restore lento • Da copia database per garantire consistenza • Effettuare un ripristino «On-Premise» • Migrazione
  • 74. #azuresatpn Novità prestazioni a Ingnite 2018 • Intelligent Query Processing • Accelerated Database Recovery • Parallel PFS updates • Resumeable online index create/rebuild
  • 75. #azuresatpn Intelligent Query Processing (Preview) Intelligent QP Adaptive QP Adaptive Joins Batch Mode Interleaved Execution Memory Grant Feedback Batch ModeRow Mode Table Variable Deferred Compilation Approximate QP Approximate Count Distinct
  • 76. #azuresatpn Azure SQL Database Monitoring • «Query Performance Insight» • «Azure SQL Database Advisor» • «Intelligent Insights» (Preview) • «Automatic Performance Tuning» • «Azure SQL Analytics» (Preview)
  • 77. #azuresatpn «Query Performance Insight» • TOP Query per • Consumo CPU/Disco • Durata • Numero esecuzioni • Basato su Query Store • Annotazioni • Da «SQL Database Advisor» Image source: https://docs.microsoft.com/en-us/azure/sql-database/sql-database-query-performance
  • 78. #azuresatpn «Azure SQL Database Advisor» • Raccomandazioni indici • Utili (solo «non-clustered») • Inutili (solo duplicati) • Automatizzabile • Modello ML dietro le quinte • Annullamento automatico • Parametrizzazione Query • Annullamento automatico • Problemi schema Image source: https://docs.microsoft.com/en-us/azure/sql-database/sql-database-advisor-portal Image source: https://docs.microsoft.com/en-us/azure/sql-database/sql-database-advisor-portal
  • 79. #azuresatpn Intelligent Insights • Monitoring Continuo • Rilevazione eventi dirompenti • Analisi «root cause» • Disponibile come log • Azure SQL Analytics solution • Stream to Event Hub • Archive to Storage Root-cause: Hitting resource limits caused by new ad-hoc query 0X9001RTYU. Impacted query 0X9002FGJR started timing out. Consider stopping the ad-hoc query or increasing your pricing tier. Disruptive event Queries: 0X9003HA4J OK 0X9002FGJR Regressed query 0X901119GI OK 0X900044RJ OK
  • 80. #azuresatpn Azure SQL Database «Automatic Tuning» • Stesse opzioni «Azure SQL Database Advisor» • CREATE/DROP INDEX • FORCE LAST GOOD PLAN • Evoluzione ma • Impara orizzontalmente da tutti i database
  • 81. #azuresatpn Azure SQL Analytics (Preview) • Prestazioni Database, Elastic Pool, Managed Instance • Aiuta nella raccolta, correlazione e visualizzazione dati di telemetria • Su larga scala, cross-sottoscrizioni
  • 82. #azuresatpn Azure Database for OS DBs Azure PaaS Databases
  • 83. #azuresatpn Azure Database for Open Source DBs • Esperienza «managed» simile a SQL Database per • Azure Database for PostgreSQL (GA) • Azure Database for MySQL (GA) • Azure Database for MariaDB (Preview) • Servizi che stanno crescendo di più in Azure Data • 35+ regioni • 100+ stati • 26K clienti (paganti) • +12% clienti (MoM) My
  • 84. #azuresatpn Azure Database for Open Source DBs • Gestione • Backup e restore automatici • Monitoring avanzato • «Performance Tuning» intelligente • Protezione basata su Intelligenza Artificiale • Integrazione con Azure • «Data Visualization» • «Advanced Analytics» e Intelligenza Artificiale • Migrazione database
  • 85. #azuresatpn Azure Database for Open Source DBs • Everything DBAs and IT admins need to know about Azure Database for MySQL, PostgreSQL, and MariaDB (Ignite 2018) • https://myignite.techcommunity.microsoft.com/sessions/65385 • https://www.youtube.com/watch?v=e611PPcm70I
  • 88. #azuresatpn Instance subnet SQL Instance #1 storage account Front end subnet RESTORE 12 BACKUP TO AZURE SQL on VM REPOINT APP3 Esempio di migrazione diretta a M.I.
  • 89. #azuresatpn Verifiche compatibilità migrazione • Database compatibile con funzionalità SQL Server 2016/2017 • Funzionalità supportate parzialmente o non supportate* • Es. Filestream, Change Data Capture, file placement ecc. • Funzionalità supportate solo in alcune regioni • Es. in fase di rilascio (anteprima)
  • 90. #azuresatpn Strumenti compatibilità migrazione • SQL Server Data Migration Assistant (DMA) • Azure Database Migration Service (DMS) • SQL Server Data Tools for Visual Studio (SSDT) • Report SqlPackage (linea di comando) • SQL Server Management Studio (SSMS) • «Export Data Tier Application» • «Deploy Database to Microsoft Azure SQL Database» Wizard • SQL Azure Migration Wizard DMA
  • 91. #azuresatpn Metodologie di migrazione Method 1 Method 2 Method 3 Target DB Azure SQL Database SQL Server SSMS 2. Import 1. DeployOR .bacpac 1. Export Source DB Target DB Azure SQL Database SQL Server SQL Azure Migration Wizard 2. Execute 1. Generate T-SQL Source DB Target DB Azure SQL Database SQL Server SSMS 6. Export/ Import or Deploy Data Migration Assistant 4. Copy Copy DB Source DB 5. Publish 1. Import Visual Studio Database Project 2. Transform 3. Edit, Build & Test *.sql 4. Publish (schema only) Database già compatibile: copia manuale o con deploy wizard in SSMS Database quasi compatibile: con SQL Azure Migration Wizard usare DMA e SSMS Reingegnerizzazione con Visual Studio e Data Migration Assistant, deploy finale con SSMS
  • 92. #azuresatpn Migrazione con disservizio minimo • Replica Transazionale
  • 93. #azuresatpn Migrazione SSIS/SSAS/SSRS • Non sono installati side-by-side con l’istanza • Raccomandazione: passare a modello PaaS se possibile! • SQL Server Integration Services • Migrazione package SSIS a Azure Data Factory (Azure-SSIS Integration Runtime) • Azure Virtual Machine con licenza SQL Server… • SQL Server Analysis Services • Migrazione modelli Tabular Azure Analysis Services • Azure Virtual Machine con licenza SQL Server per modelli Multi Dimensional • SQL Server Reporting Services • Migrazione di piattaforma a Power BI • Azure Virtual Machine con licenza SQL Server…
  • 94. #azuresatpn Azure Database Migration Service On-premises SQL Server 2005 - 2017 Assessment SSMA & DMA Azure Database Migration Service My
  • 95. Subnet used for MI SQL –SQL DB MI online migration workflow Subnet used for DMS On-Premise Cloud network SQL DB Managed Instance Azure Blob Storage SMB Network Share
  • 97. #azuresatpn Strumentazione • In Linux • Script configurazione con mssql-conf • Comandi T-SQL con sqlcmd o mssql-cli • In Windows • SQL Server Management Studio (SSMS) • Visual Studio con SQL Server Data Tools (SSDT) • Visual Studio Code con estensione mssql • PowerShell • Comandi T-SQL con sqlcmd.exe • Multi-piattaforma (Windows, Mac, Linux) • SQL Operation Studio (Preview) • Azure Data Studio (GA)
  • 98. #azuresatpn Azure Data Studio (GA) • Evoluzione di «SQL Operations Studio» • Open Source • Multi-piattaforma • Windows, Mac, Linux • SQL Server, SQL Database, SQL Data Warehouse • Orientato ai Devops • Intellisense, Snippets, Projects, Source Control, Charting, … • Estensioni (in Preview: Agent, Profiler, Import CSV/JSON basato su PROSE) • Confronto con SSMS (versione 18.x in Preview) • https://cloudblogs.microsoft.com/sqlserver/2018/09/25/azure-data-studio-for-sql- server
  • 99. #azuresatpn Azure Data Studio (Preview) • SQL Server 2019 Extension • Installazione VSIX Package • SQL Server 2019 Big Data Cluster support • Integrazione HDFS e Job Spark • Azure Data Studio Notebooks • Notebook Jupyter: integrazione «live» testo MarkDown, codice e risultati • Supporto Python, Scala (altri in futuro?) • Azure Resource Explorer • Polybase Create External Table Wizard
  • 100. #azuresatpn Risorse Tools • MSSQL-CLI • https://github.com/dbcli/mssql-cli • https://github.com/dbcli • mssql-cli, an open source and cross-platform CLI for SQL Server • https://www.youtube.com/watch?v=C07udTA1loI • Azure Data Studio • https://docs.microsoft.com/en-us/sql/azure-data-studio • https://github.com/Microsoft/azuredatastudio • The next generation of SQL Server tools (Ignite 2018) • https://myignite.techcommunity.microsoft.com/sessions/66199 • https://www.youtube.com/watch?v=qXfd4G7JjPI
  • 101. #azuresatpn Video Ignite 2018 • 80+ video • 23 su SQL Server e Data Engineering • 21 su Intelligenza Artificiale e Machine Learning • https://blogs.msdn.microsoft.com/buckwoody/2018/10/02/microsof t-ignite-2018-links-to-training