SlideShare ist ein Scribd-Unternehmen logo
1 von 33
Downloaden Sie, um offline zu lesen
SQL
START!
2021
–
10°
ANNIVERSARY
SQL Server in AWS
Gianluca Hotz
ghotz@ugiss.org | @glhotz
Chi sono?
• Gianluca Hotz | @glhotz | ghotz@ugiss.org
• Consulente indipendente
• 25 anni su SQL Server (dalla 4.21 nel 1996)
• Modellazione e sviluppo database, dimensionamento e amministrazione
database server, aggiornamenti e migrazioni, performance tuning
• Community
• 23 anni Microsoft MVP SQL Server/Data Platform (dal 1998)
• VMware Experts SQL Server
• Fondatore e presidente UGISS (PASS Chapter)
• Co-organizzatore DAMAG Meetup Community
Partners
SQL Server in AWS
• Amazon RDS for SQL Server (PaaS)
• Amazon EC2 for SQL Server (IaaS)
• Altri scenari
Amazon RDS for SQL Server
SQL Server in AWS
Licensing
• Licenza inclusa
• Versioni
• 2012-2019
• Solo alcune «minor build» supportate
• Edizioni
• SQL Server Express Edition
• SQL Server Web Edition
• SQL Server Standard Edition
• SQL Server Enterprise Edition
• Developer Edition? Va scaricata e installata su istanza EC2
Impostazioni base
• Nome server
• Utente «master» e password
• ruoli server processadmin, public, setupadmin
• ruolo db_owner in tutti i database
Dimensionamento
• Classi
• Standard (include classe «m»)
• «Memory Optimized» (include classi «r» e «x»)
• «Burstable» (include classe «t»)
• Opzionalmente generazioni precedenti
• Cambio di classe
• Possibile a posteriori con disservizio
Storage
• General Purpose (SSD)
• 20GiB - 16TiB
• 3 IOPS x GiB con un minimo di 100 IOPS
• < 1TiB «burst» fino a 3.000 IOPS
• Provisioned Storage (SSD)
• 1.000 - 32.000 IOPS (fino a 64.000 con istanze «Nitro-based»)
• Express: 100 GiB - 16 TiB
• Enterprise, Standard, Web: 20 GiB - 16 TiB
• (Magnetic Storage)
• Supporto per compatibilità: 20GiB - 3TiB, 1.000 IOPS
Storage autoscaling
• Entro una soglia massima
• Default 1.000 GiB (21GiB – 16.384 GiB)
• Condizioni per incremento
• < 10% spazio disponibile per almeno 5 minuti
• >= 6 ore dall’ultima modifica
• Dimensione incremento maggiore tra
• 5 GiB
• 10% dello spazio correntemente allocato
• Previsione crescita prossime 7 ore basato su spazio libero ultima ora
• Magnetic Storage non supportato
Connettività
• Necessario specificare «VPC» e «Subnet group»
• Configurazione accesso pubblico
• Assegnazione indirizzo IP vs. accesso solo da VPC
• VPC «Security Group»
• Regole di accesso all’istanza
• Necessario per accesso pubblico
• AZ predefinita
• Porta TCP/IP per traffico TDS (default 1433)
Altre impostazioni
• Autenticazione integrata
• AWS Managed Microsoft AD
• AD Connector
• «DB Parameter Group»
• Es. Trace Flag, sp_configure, rds.*
• «Option Group»
• Es. backup/restore nativo, TDE, SQL Server Audit, SSAS, SSIS, SSRS, MSDTC
• Time Zone
• «Collation»
• Solo alcune supportate, default SQL_Latin1_General_CP1_CI_AS
Impostazioni di manutenzione
• Backup automatici (point-in-time snapshot)
• «Storage Encryption»
• «Enhanced Monitoring»
• Esportazione log (ERRORLOG e Agent)
• Manutenzione
• Auto-aggiornamento versioni minori
• Finestra di manutenzione (non solo per auto-aggiornamento)
• Protezione dalla cancellazione
Backup Snapshot
• Intera istanza tramite Snapshot a livello di storage
• Automatici o manuali (manuali max 100 per regione)
• Retention 0 – 35 giorni, default 7 (da console, 1 da API/CLI)
• Possibilità di replicare copie in altre regioni
• Ripristino
• Ripristino creando una nuova istamza
• Ripristino a qualunque punto del periodo di retention
• Possibile scostamento fino a 1 secondo tra diversi database…
• Transazione cross-database potrebbero essere inconsistenti!!
• Billing
• Solo spazio che eccede la quantità di storage allocato per istanza
• Es. 100 GiB allocati, 50 GiB snapshot manuali, 75 GiB automatici, 25 pagati
Backup Nativi
• Opzione che deve essere attivata
• Backupset in storage S3 (stessa regione dell’istanza)
• Backup solo FULL e DIFFerenziale
• Attenzione a Snapshot che cambiano base differenziale
• Restore anche dei LOG (es. migrazione)
• Non pensato per sostituire Snapshot (e DR cross-region)
Sicurezza
• Permessi server non disponibili
• Ruoli
• bulkadmin, dbcrerator, diskadmin, securityadmin, serveradmin, sysadmin
• Permessi specifici
• ALTER [RESOURCES, SETTINGS] (si possono usare «DB Parameter Groups»)
• AUTHENTICATE SERVER, CONTROL_SERVER, SHUTDOWN,
• ALTER ANY [CREDENDIAL, DATABASE, EVENT NOTIFICATION]
• DROP ANY DATABASE
• CREATE/ALTER ANY AVAILABILITY GROUP
• EXTERNAL ACCESS ASSEMBLY, UNSAFE ASSEMBLY
• CREATE [ENDPOINT, DDL EVENT NOTIFICATION, TRACE EVENT NOTIFICATION]
Supporto HIPAA
• Auditing
• Basato su SQL Server Audit
• Via «DB Parameter Group» (rds.sqlserver_audit = fedramp_hipaa)
• Transport encryption
• Con certificato apposito
• Forzando SSL per tutte le connessioni
• Via «DB Parameter Group» (rds.force_ssl = 1)
• Encryption at rest
• Transparent Data Encryption (2012-2019 Enterprise, 2019 Standard)
• Amazon RDS encrypted DB instance (no edizione Express)
Multi-AZ Deployment
• Copia sincrona in altra AZ per alta disponibilità
• Scelta automatica in base a build/edizione
• Always On Availability Groups
• Versioni 2016 SP2 CU3+, 2017 CU13+ edizione Enterprise
• Versione 2019+ edizioni Standard/Enterprise
• Database Mirroring (DBM)
• Versioni 2012-2017 edizioni Standard/Enterprise
• Diversa AZ ma nella stessa «Region»
• Login e permessi replicati automaticamente (ma non job e altro)
• Solo una copia di standby
Multi-AZ Read-Replica
• Fino a 5 repliche secondarie asincrone in sola lettura
• SQL Server 2016 SP2 CU3+ solo Enterprise Edition
• Replica primaria Multi-AZ con Always On Availability Group
Altre componenti «managed»
• SQL Server Analysis Services (solo Tabular)
• SQL Server Integration Services
• SQL Server Reporting Services
• Microsoft Distributed Transaction Coordinator
Numero di database limitato
Tipo istanza Single-AZ Multi-AZ con Mirroring Multi-AZ con Always On
AGs
db.*.micro - db.*.medium 30 N/A N/A
db.*.large 30 30 30
db.*.xlarge - db.*.16xlarge 100* 50 75
db.*.24xlarge 100* 50 100*
* Limite di 100 database in parte dovuto a VSS
Limitazioni generali
• Backup Azure Blob Storage
• Database Snapshot
• Log Shipping
• Resource Governor
• FILESTREAM/Filetable
• Endpoint (tutti)
• Extended Stored Procedure
• Trigger a livello server
• Buffer Pool Extension
• Stretch database
• Maintenance plans
• Performance Data Collector
• Policy-Based Management
• Replication
• Data Quality Services
• Master Data Services
• Machine Learning Services
• Polybase
Billing
• Orario
• Istanze riservate
• 1-3 anni
• Opzioni differenziate Single-AZ/Multi-AZ
• Possibile pagamento anticipato (parziale/completo)
• Non include il costo dello storage
• Storage
• Database (SSD generico, SSD «Provisioned IOPS», magnetico)
• Backup
• Data Transfer
• Dettagli
• https://aws.amazon.com/rds/sqlserver/pricing
Amazon EC2 for SQL Server
SQL Server in AWS
«Business as usual…»
• Ambiente virtuale IaaS classico
• Molte guide prescrittive e best practice
• Vantaggi
• Niente è gestito e vincolato, massima flessibilità
• Svantaggi
• Niente è gestito e vincolato, bisogna fare tutto ☺
Perché SQL Server in Amazon EC2
• Controllo completo
• Risorse allocate, installazione e configurazione
• Amministrazione (es. backup, patching, sicurezza)
• Limiti scalabilità Amazon RDS
• Es. storage max IOPS e 16 TiB per istanza
• Possibilità di riassegnare le proprie licenze (BYOL)
• Compresi diritti SA come 1 passivo per HA e 1 passivo per DR inclusi
• Mancanza supporto in Amazon RDS
• Versioni/edizioni specifiche (es. 2008R2, Developer, SSAS MD)
• Funzioni specifiche (es. accesso al file system/FILESTREAM/Filetable)
• Componenti non supportate (es. MDS, DQS, PolyBase)
• Opzioni di alta disponibilità/disaster recovery
SQL Server HA/DR in Amazon EC2
• Log Shipping
• Più repliche secondarie, anche accessibili in sola lettura
• Database Mirroring
• RDS solo sincrono e solo alcune versioni/edizioni
• AlwaysOn Availability Groups
• RDS solo una replica secondaria sincrona e solo alcune versioni/edizioni
• EC2 disponibilità molteplici AG, Basic AG e Distributed AG
• AlwaysOn Failover Cluster Instance
• Ancora una delle più semplici ed efficaci soluzioni per alta disponibilità
• Necessita di storage condiviso (es. iSCSI, Storage Spaces Direct, Amazon FSx)
SQL Server FCI con Amazon FSx in AWS
https://www.youtube.com/watch?v=okl1Yl30iW0
Altri scenari
SQL Server in AWS
Container
• SQL Server 2017/2019 per Linux
• Red Hat Enterprise, SUSE Enterprise, Ubuntu
• Docker Engine 1.8+
• Diversi servizi AWS per container
• Running highly available Microsoft SQL Server containers in Amazon EKS with
Portworx cloud native storage
• Diverse funzionalità/Componenti non disponbili
• Es. FILESTREAM/Filetable, SSAS, SSRS, DQS, MDS
• https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-editions-and-
components-2019#Unsupported
VMware Cloud on AWS for SQL Server
• Gira direttamente su hardware fisico
• No «nested virtualization»
• Modalità pagamento oraria a richiesta o a sottoscrizione
• Scenari specifici
• Estensione data center con risorse a richiesta (es. ambienti di test/collaudo)
• Disaster Recovery
• Migrazione più veloce nel cloud
Babelfish for PostgreSQL
Image from: https://babelfish-for-postgresql.github.io/babelfish-for-postgresql
Grazie! Domande?
SQL Server in AWS

Weitere ähnliche Inhalte

Was ist angesagt?

Best Practices on SQL Server
Best Practices on SQL ServerBest Practices on SQL Server
Best Practices on SQL ServerGianluca 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 DisksGianluca Hotz
 
Azure SQL Database Ledger
Azure SQL Database LedgerAzure SQL Database Ledger
Azure SQL Database LedgerGianluca Hotz
 
Come utilizzare AWS Database Migration Service per migrare SQL Server ad Amaz...
Come utilizzare AWS Database Migration Service per migrare SQL Server ad Amaz...Come utilizzare AWS Database Migration Service per migrare SQL Server ad Amaz...
Come utilizzare AWS Database Migration Service per migrare SQL Server ad Amaz...Gianluca Hotz
 
SQL Server Data Virtualization with polybase
SQL Server Data Virtualization with polybaseSQL Server Data Virtualization with polybase
SQL Server Data Virtualization with polybaseGianluca Hotz
 
Mettere in sicurezza ambienti sql server
Mettere in sicurezza ambienti sql serverMettere in sicurezza ambienti sql server
Mettere in sicurezza ambienti sql serverGianluca Hotz
 
Azure PaaS databases
Azure PaaS databasesAzure PaaS databases
Azure PaaS databasesGianluca Hotz
 
SQL Server Modern Query Processing
SQL Server Modern Query ProcessingSQL Server Modern Query Processing
SQL Server Modern Query ProcessingGianluca 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 integrationRoberto Messora
 
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
 
Novità di SQL Server 2017
Novità di SQL Server 2017Novità di SQL Server 2017
Novità di SQL Server 2017Gianluca Hotz
 
Azure for Game Developers
Azure for Game DevelopersAzure for Game Developers
Azure for Game DevelopersMarco Parenzan
 
Azure PaaS databases
Azure PaaS databasesAzure PaaS databases
Azure PaaS databasesGianluca Hotz
 
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 AzureDavide Benvegnù
 
JBoss Data Grid Tech Lab
JBoss Data Grid Tech LabJBoss Data Grid Tech Lab
JBoss Data Grid Tech LabUgo Landini
 
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 DatabaseEmanuele Zanchettin
 
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 DatabaseEmanuele Zanchettin
 
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 ServerAlessandro Alpi
 

Was ist angesagt? (20)

Best Practices on SQL Server
Best Practices on SQL ServerBest Practices on SQL Server
Best Practices on SQL Server
 
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
 
Azure SQL Database Ledger
Azure SQL Database LedgerAzure SQL Database Ledger
Azure SQL Database Ledger
 
Come utilizzare AWS Database Migration Service per migrare SQL Server ad Amaz...
Come utilizzare AWS Database Migration Service per migrare SQL Server ad Amaz...Come utilizzare AWS Database Migration Service per migrare SQL Server ad Amaz...
Come utilizzare AWS Database Migration Service per migrare SQL Server ad Amaz...
 
SQL Server Data Virtualization with polybase
SQL Server Data Virtualization with polybaseSQL Server Data Virtualization with polybase
SQL Server Data Virtualization with polybase
 
Mettere in sicurezza ambienti sql server
Mettere in sicurezza ambienti sql serverMettere in sicurezza ambienti sql server
Mettere in sicurezza ambienti sql server
 
Azure PaaS databases
Azure PaaS databasesAzure PaaS databases
Azure PaaS databases
 
SQL Server Modern Query Processing
SQL Server Modern Query ProcessingSQL Server Modern Query Processing
SQL Server Modern Query Processing
 
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
 
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
 
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 PaaS databases
Azure PaaS databasesAzure PaaS databases
Azure PaaS databases
 
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
 
JBoss Data Grid Tech Lab
JBoss Data Grid Tech LabJBoss Data Grid Tech Lab
JBoss Data Grid Tech Lab
 
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
 
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
 
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
 
Data flow
Data flowData flow
Data flow
 

Ähnlich wie SQL Server in AWS

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
 
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 cloudGianluca 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 DatabaseGianluca Hotz
 
Infinispan codemotion - Codemotion Rome 2015
Infinispan codemotion - Codemotion Rome 2015Infinispan codemotion - Codemotion Rome 2015
Infinispan codemotion - Codemotion Rome 2015Codemotion
 
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
 
Realizzare una rete aziendale con linux e samba
Realizzare una rete aziendale con linux e sambaRealizzare una rete aziendale con linux e samba
Realizzare una rete aziendale con linux e sambaAndrea Mauro
 
Azure No-Sql approach: DocumentDB
Azure No-Sql approach: DocumentDBAzure No-Sql approach: DocumentDB
Azure No-Sql approach: DocumentDBDavide Benvegnù
 
Come l’Open Source può essere alla base di un business di successo: il caso H...
Come l’Open Source può essere alla base di un business di successo: il caso H...Come l’Open Source può essere alla base di un business di successo: il caso H...
Come l’Open Source può essere alla base di un business di successo: il caso H...MariaDB plc
 
Differenze tra Windows Server 2012 R2 su e Server 2016 Yashi Italia
Differenze tra Windows Server 2012 R2 su e Server 2016 Yashi ItaliaDifferenze tra Windows Server 2012 R2 su e Server 2016 Yashi Italia
Differenze tra Windows Server 2012 R2 su e Server 2016 Yashi ItaliaYashi Italia
 
Smau Milano 2011 Emilio Perotti
Smau Milano 2011 Emilio PerottiSmau Milano 2011 Emilio Perotti
Smau Milano 2011 Emilio PerottiSMAU
 
festival ICT 2013: Windows Server 2012 R2: Lo Storage Enterprise per Tutti
festival ICT 2013: Windows Server 2012 R2: Lo Storage Enterprise per Tutti festival ICT 2013: Windows Server 2012 R2: Lo Storage Enterprise per Tutti
festival ICT 2013: Windows Server 2012 R2: Lo Storage Enterprise per Tutti festival ICT 2016
 
Codemotion fuse presentation
Codemotion fuse presentationCodemotion fuse presentation
Codemotion fuse presentationUgo Landini
 
#vBrownBag.IT - Session 1
#vBrownBag.IT - Session 1#vBrownBag.IT - Session 1
#vBrownBag.IT - Session 1Andrea Mauro
 
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 AzureMarco Obinu
 
CCI2019 - SQL Server ed Azure: Disaster Recovery per tutti
CCI2019 - SQL Server ed Azure: Disaster Recovery per tuttiCCI2019 - SQL Server ed Azure: Disaster Recovery per tutti
CCI2019 - SQL Server ed Azure: Disaster Recovery per tuttiwalk2talk srl
 
MongoDB Atlas: il modo migliore per eseguire MongoDB in ambiente cloud 2
MongoDB Atlas: il modo migliore per eseguire MongoDB in ambiente cloud 2MongoDB Atlas: il modo migliore per eseguire MongoDB in ambiente cloud 2
MongoDB Atlas: il modo migliore per eseguire MongoDB in ambiente cloud 2MongoDB
 
20160402_mlraviol_mariadb_TorinoWordCamp
20160402_mlraviol_mariadb_TorinoWordCamp20160402_mlraviol_mariadb_TorinoWordCamp
20160402_mlraviol_mariadb_TorinoWordCampmlraviol
 
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 OrientDBSteve Maraspin
 

Ähnlich wie SQL Server in AWS (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)
 
Azure sql database
Azure sql databaseAzure sql database
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
 
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
 
Infinispan codemotion - Codemotion Rome 2015
Infinispan codemotion - Codemotion Rome 2015Infinispan codemotion - Codemotion Rome 2015
Infinispan codemotion - Codemotion Rome 2015
 
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...
 
Realizzare una rete aziendale con linux e samba
Realizzare una rete aziendale con linux e sambaRealizzare una rete aziendale con linux e samba
Realizzare una rete aziendale con linux e samba
 
Azure No-Sql approach: DocumentDB
Azure No-Sql approach: DocumentDBAzure No-Sql approach: DocumentDB
Azure No-Sql approach: DocumentDB
 
Data grid
Data gridData grid
Data grid
 
Come l’Open Source può essere alla base di un business di successo: il caso H...
Come l’Open Source può essere alla base di un business di successo: il caso H...Come l’Open Source può essere alla base di un business di successo: il caso H...
Come l’Open Source può essere alla base di un business di successo: il caso H...
 
Differenze tra Windows Server 2012 R2 su e Server 2016 Yashi Italia
Differenze tra Windows Server 2012 R2 su e Server 2016 Yashi ItaliaDifferenze tra Windows Server 2012 R2 su e Server 2016 Yashi Italia
Differenze tra Windows Server 2012 R2 su e Server 2016 Yashi Italia
 
Smau Milano 2011 Emilio Perotti
Smau Milano 2011 Emilio PerottiSmau Milano 2011 Emilio Perotti
Smau Milano 2011 Emilio Perotti
 
festival ICT 2013: Windows Server 2012 R2: Lo Storage Enterprise per Tutti
festival ICT 2013: Windows Server 2012 R2: Lo Storage Enterprise per Tutti festival ICT 2013: Windows Server 2012 R2: Lo Storage Enterprise per Tutti
festival ICT 2013: Windows Server 2012 R2: Lo Storage Enterprise per Tutti
 
Codemotion fuse presentation
Codemotion fuse presentationCodemotion fuse presentation
Codemotion fuse presentation
 
#vBrownBag.IT - Session 1
#vBrownBag.IT - Session 1#vBrownBag.IT - Session 1
#vBrownBag.IT - Session 1
 
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
 
CCI2019 - SQL Server ed Azure: Disaster Recovery per tutti
CCI2019 - SQL Server ed Azure: Disaster Recovery per tuttiCCI2019 - SQL Server ed Azure: Disaster Recovery per tutti
CCI2019 - SQL Server ed Azure: Disaster Recovery per tutti
 
MongoDB Atlas: il modo migliore per eseguire MongoDB in ambiente cloud 2
MongoDB Atlas: il modo migliore per eseguire MongoDB in ambiente cloud 2MongoDB Atlas: il modo migliore per eseguire MongoDB in ambiente cloud 2
MongoDB Atlas: il modo migliore per eseguire MongoDB in ambiente cloud 2
 
20160402_mlraviol_mariadb_TorinoWordCamp
20160402_mlraviol_mariadb_TorinoWordCamp20160402_mlraviol_mariadb_TorinoWordCamp
20160402_mlraviol_mariadb_TorinoWordCamp
 
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
 

Mehr von Gianluca Hotz

SQL Server 2022 Programmability & Performance
SQL Server 2022 Programmability & PerformanceSQL Server 2022 Programmability & Performance
SQL Server 2022 Programmability & PerformanceGianluca Hotz
 
SQL Server 2022 Intelligent Query Processing
SQL Server 2022 Intelligent Query ProcessingSQL Server 2022 Intelligent Query Processing
SQL Server 2022 Intelligent Query ProcessingGianluca Hotz
 
Le novità di SQL Server 2022
Le novità di SQL Server 2022Le novità di SQL Server 2022
Le novità di SQL Server 2022Gianluca Hotz
 
Data Integrity with SQL Database Ledger
Data Integrity with SQL Database LedgerData Integrity with SQL Database Ledger
Data Integrity with SQL Database LedgerGianluca 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 AWSGianluca Hotz
 
SQL Server Modernization
SQL Server ModernizationSQL Server Modernization
SQL Server ModernizationGianluca Hotz
 
Le novità di sql server 2019
Le novità di sql server 2019Le novità di sql server 2019
Le novità di sql server 2019Gianluca Hotz
 
SQL Server 2019 CTP 2.5
SQL Server 2019 CTP 2.5SQL Server 2019 CTP 2.5
SQL Server 2019 CTP 2.5Gianluca Hotz
 
Azure PaaS databases
Azure PaaS databasesAzure PaaS databases
Azure PaaS databasesGianluca Hotz
 
SQL Server 2019 CTP2.4
SQL Server 2019 CTP2.4SQL Server 2019 CTP2.4
SQL Server 2019 CTP2.4Gianluca Hotz
 
SQL Server 2019 ctp2.2
SQL Server 2019 ctp2.2SQL Server 2019 ctp2.2
SQL Server 2019 ctp2.2Gianluca Hotz
 

Mehr von Gianluca Hotz (11)

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
 
SQL Server 2019 ctp2.2
SQL Server 2019 ctp2.2SQL Server 2019 ctp2.2
SQL Server 2019 ctp2.2
 

SQL Server in AWS

  • 1. SQL START! 2021 – 10° ANNIVERSARY SQL Server in AWS Gianluca Hotz ghotz@ugiss.org | @glhotz
  • 2. Chi sono? • Gianluca Hotz | @glhotz | ghotz@ugiss.org • Consulente indipendente • 25 anni su SQL Server (dalla 4.21 nel 1996) • Modellazione e sviluppo database, dimensionamento e amministrazione database server, aggiornamenti e migrazioni, performance tuning • Community • 23 anni Microsoft MVP SQL Server/Data Platform (dal 1998) • VMware Experts SQL Server • Fondatore e presidente UGISS (PASS Chapter) • Co-organizzatore DAMAG Meetup Community
  • 4. SQL Server in AWS • Amazon RDS for SQL Server (PaaS) • Amazon EC2 for SQL Server (IaaS) • Altri scenari
  • 5. Amazon RDS for SQL Server SQL Server in AWS
  • 6. Licensing • Licenza inclusa • Versioni • 2012-2019 • Solo alcune «minor build» supportate • Edizioni • SQL Server Express Edition • SQL Server Web Edition • SQL Server Standard Edition • SQL Server Enterprise Edition • Developer Edition? Va scaricata e installata su istanza EC2
  • 7. Impostazioni base • Nome server • Utente «master» e password • ruoli server processadmin, public, setupadmin • ruolo db_owner in tutti i database
  • 8. Dimensionamento • Classi • Standard (include classe «m») • «Memory Optimized» (include classi «r» e «x») • «Burstable» (include classe «t») • Opzionalmente generazioni precedenti • Cambio di classe • Possibile a posteriori con disservizio
  • 9. Storage • General Purpose (SSD) • 20GiB - 16TiB • 3 IOPS x GiB con un minimo di 100 IOPS • < 1TiB «burst» fino a 3.000 IOPS • Provisioned Storage (SSD) • 1.000 - 32.000 IOPS (fino a 64.000 con istanze «Nitro-based») • Express: 100 GiB - 16 TiB • Enterprise, Standard, Web: 20 GiB - 16 TiB • (Magnetic Storage) • Supporto per compatibilità: 20GiB - 3TiB, 1.000 IOPS
  • 10. Storage autoscaling • Entro una soglia massima • Default 1.000 GiB (21GiB – 16.384 GiB) • Condizioni per incremento • < 10% spazio disponibile per almeno 5 minuti • >= 6 ore dall’ultima modifica • Dimensione incremento maggiore tra • 5 GiB • 10% dello spazio correntemente allocato • Previsione crescita prossime 7 ore basato su spazio libero ultima ora • Magnetic Storage non supportato
  • 11. Connettività • Necessario specificare «VPC» e «Subnet group» • Configurazione accesso pubblico • Assegnazione indirizzo IP vs. accesso solo da VPC • VPC «Security Group» • Regole di accesso all’istanza • Necessario per accesso pubblico • AZ predefinita • Porta TCP/IP per traffico TDS (default 1433)
  • 12. Altre impostazioni • Autenticazione integrata • AWS Managed Microsoft AD • AD Connector • «DB Parameter Group» • Es. Trace Flag, sp_configure, rds.* • «Option Group» • Es. backup/restore nativo, TDE, SQL Server Audit, SSAS, SSIS, SSRS, MSDTC • Time Zone • «Collation» • Solo alcune supportate, default SQL_Latin1_General_CP1_CI_AS
  • 13. Impostazioni di manutenzione • Backup automatici (point-in-time snapshot) • «Storage Encryption» • «Enhanced Monitoring» • Esportazione log (ERRORLOG e Agent) • Manutenzione • Auto-aggiornamento versioni minori • Finestra di manutenzione (non solo per auto-aggiornamento) • Protezione dalla cancellazione
  • 14. Backup Snapshot • Intera istanza tramite Snapshot a livello di storage • Automatici o manuali (manuali max 100 per regione) • Retention 0 – 35 giorni, default 7 (da console, 1 da API/CLI) • Possibilità di replicare copie in altre regioni • Ripristino • Ripristino creando una nuova istamza • Ripristino a qualunque punto del periodo di retention • Possibile scostamento fino a 1 secondo tra diversi database… • Transazione cross-database potrebbero essere inconsistenti!! • Billing • Solo spazio che eccede la quantità di storage allocato per istanza • Es. 100 GiB allocati, 50 GiB snapshot manuali, 75 GiB automatici, 25 pagati
  • 15. Backup Nativi • Opzione che deve essere attivata • Backupset in storage S3 (stessa regione dell’istanza) • Backup solo FULL e DIFFerenziale • Attenzione a Snapshot che cambiano base differenziale • Restore anche dei LOG (es. migrazione) • Non pensato per sostituire Snapshot (e DR cross-region)
  • 16. Sicurezza • Permessi server non disponibili • Ruoli • bulkadmin, dbcrerator, diskadmin, securityadmin, serveradmin, sysadmin • Permessi specifici • ALTER [RESOURCES, SETTINGS] (si possono usare «DB Parameter Groups») • AUTHENTICATE SERVER, CONTROL_SERVER, SHUTDOWN, • ALTER ANY [CREDENDIAL, DATABASE, EVENT NOTIFICATION] • DROP ANY DATABASE • CREATE/ALTER ANY AVAILABILITY GROUP • EXTERNAL ACCESS ASSEMBLY, UNSAFE ASSEMBLY • CREATE [ENDPOINT, DDL EVENT NOTIFICATION, TRACE EVENT NOTIFICATION]
  • 17. Supporto HIPAA • Auditing • Basato su SQL Server Audit • Via «DB Parameter Group» (rds.sqlserver_audit = fedramp_hipaa) • Transport encryption • Con certificato apposito • Forzando SSL per tutte le connessioni • Via «DB Parameter Group» (rds.force_ssl = 1) • Encryption at rest • Transparent Data Encryption (2012-2019 Enterprise, 2019 Standard) • Amazon RDS encrypted DB instance (no edizione Express)
  • 18. Multi-AZ Deployment • Copia sincrona in altra AZ per alta disponibilità • Scelta automatica in base a build/edizione • Always On Availability Groups • Versioni 2016 SP2 CU3+, 2017 CU13+ edizione Enterprise • Versione 2019+ edizioni Standard/Enterprise • Database Mirroring (DBM) • Versioni 2012-2017 edizioni Standard/Enterprise • Diversa AZ ma nella stessa «Region» • Login e permessi replicati automaticamente (ma non job e altro) • Solo una copia di standby
  • 19. Multi-AZ Read-Replica • Fino a 5 repliche secondarie asincrone in sola lettura • SQL Server 2016 SP2 CU3+ solo Enterprise Edition • Replica primaria Multi-AZ con Always On Availability Group
  • 20. Altre componenti «managed» • SQL Server Analysis Services (solo Tabular) • SQL Server Integration Services • SQL Server Reporting Services • Microsoft Distributed Transaction Coordinator
  • 21. Numero di database limitato Tipo istanza Single-AZ Multi-AZ con Mirroring Multi-AZ con Always On AGs db.*.micro - db.*.medium 30 N/A N/A db.*.large 30 30 30 db.*.xlarge - db.*.16xlarge 100* 50 75 db.*.24xlarge 100* 50 100* * Limite di 100 database in parte dovuto a VSS
  • 22. Limitazioni generali • Backup Azure Blob Storage • Database Snapshot • Log Shipping • Resource Governor • FILESTREAM/Filetable • Endpoint (tutti) • Extended Stored Procedure • Trigger a livello server • Buffer Pool Extension • Stretch database • Maintenance plans • Performance Data Collector • Policy-Based Management • Replication • Data Quality Services • Master Data Services • Machine Learning Services • Polybase
  • 23. Billing • Orario • Istanze riservate • 1-3 anni • Opzioni differenziate Single-AZ/Multi-AZ • Possibile pagamento anticipato (parziale/completo) • Non include il costo dello storage • Storage • Database (SSD generico, SSD «Provisioned IOPS», magnetico) • Backup • Data Transfer • Dettagli • https://aws.amazon.com/rds/sqlserver/pricing
  • 24. Amazon EC2 for SQL Server SQL Server in AWS
  • 25. «Business as usual…» • Ambiente virtuale IaaS classico • Molte guide prescrittive e best practice • Vantaggi • Niente è gestito e vincolato, massima flessibilità • Svantaggi • Niente è gestito e vincolato, bisogna fare tutto ☺
  • 26. Perché SQL Server in Amazon EC2 • Controllo completo • Risorse allocate, installazione e configurazione • Amministrazione (es. backup, patching, sicurezza) • Limiti scalabilità Amazon RDS • Es. storage max IOPS e 16 TiB per istanza • Possibilità di riassegnare le proprie licenze (BYOL) • Compresi diritti SA come 1 passivo per HA e 1 passivo per DR inclusi • Mancanza supporto in Amazon RDS • Versioni/edizioni specifiche (es. 2008R2, Developer, SSAS MD) • Funzioni specifiche (es. accesso al file system/FILESTREAM/Filetable) • Componenti non supportate (es. MDS, DQS, PolyBase) • Opzioni di alta disponibilità/disaster recovery
  • 27. SQL Server HA/DR in Amazon EC2 • Log Shipping • Più repliche secondarie, anche accessibili in sola lettura • Database Mirroring • RDS solo sincrono e solo alcune versioni/edizioni • AlwaysOn Availability Groups • RDS solo una replica secondaria sincrona e solo alcune versioni/edizioni • EC2 disponibilità molteplici AG, Basic AG e Distributed AG • AlwaysOn Failover Cluster Instance • Ancora una delle più semplici ed efficaci soluzioni per alta disponibilità • Necessita di storage condiviso (es. iSCSI, Storage Spaces Direct, Amazon FSx)
  • 28. SQL Server FCI con Amazon FSx in AWS https://www.youtube.com/watch?v=okl1Yl30iW0
  • 30. Container • SQL Server 2017/2019 per Linux • Red Hat Enterprise, SUSE Enterprise, Ubuntu • Docker Engine 1.8+ • Diversi servizi AWS per container • Running highly available Microsoft SQL Server containers in Amazon EKS with Portworx cloud native storage • Diverse funzionalità/Componenti non disponbili • Es. FILESTREAM/Filetable, SSAS, SSRS, DQS, MDS • https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-editions-and- components-2019#Unsupported
  • 31. VMware Cloud on AWS for SQL Server • Gira direttamente su hardware fisico • No «nested virtualization» • Modalità pagamento oraria a richiesta o a sottoscrizione • Scenari specifici • Estensione data center con risorse a richiesta (es. ambienti di test/collaudo) • Disaster Recovery • Migrazione più veloce nel cloud
  • 32. Babelfish for PostgreSQL Image from: https://babelfish-for-postgresql.github.io/babelfish-for-postgresql