SlideShare a Scribd company logo
1 of 33
Download to read offline
Come utilizzare AWS DMS per migrare SQL
Server ad Amazon Aurora
Gianluca Hotz
Data Platform MVP | Presidente ugiss.org
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 (ex «PASS Chapter»)
Introduzione
Come utilizzare AWS DMS per migrare SQL Server ad Amazon Aurora
Miniserie sulla modernizzazione
• AWS DMS per migrare SQL Server ad Amazon RDS
• AWS DMS per migrare SQL Server ad Amazon Aurora
• Migrare SQL Server a PostgreSQL con Babelfish
SQL Modernization?
• Aggiornamenti «in-place» o migrazioni «side-by-side»
• Aggiornamenti di versione (es. 2008 R2 -> 2019)
• Upgrade/downgrade edizione (es. Enterprise -> Standard/Developer)
• Virtualizzazione e consolidamento (IaaS)
• «On-premises» o «Cloud» in modalità «Lift and shift»
• Es. Amazon EC2 for SQL Server o servizi AWS per container
• Re-platforming (PaaS)
• Spostamento in «Cloud» con poche modifiche (beneficio: ambiente gestito!)
• Es. SQL Server -> Amazon RDS for SQL Server
• Re-factoring (PaaS)
• Spostamento in «Cloud» con modifiche sostanziali per sfruttarlo meglio
• Es. SQL Server -> Amazon RDS for Aurora/PostgreSQL, Amazon Athena/Redshift
Sfide cambio «database engine»
• Protocollo di comunicazione
• TDS vs. altro «endpoint» (es. PostgreSQL)
• Cambio di driver (ODBC, OLE-DB, JDBC, …)
• Linguaggio di interrogazione/definizione schema
• T-SQL vs. altro dialetto SQL (es. PG/PLSQL)
• Mitigato da utilizzo framework e/o utilizzo ANSI SQL
• Schema
• Tipi dato, indici, partizionamento, tabelle (es. temporal, «ledger»)
• Mitigato da utilizzo framework e/o utilizzo ANSI SQL
Amazon Aurora
Come utilizzare AWS DMS per migrare SQL Server ad Amazon Aurora
Aurora è parte di «Amazon RDS»
• «Relational Database Services»
• Ambiente PaaS completamente gestito
• Backup automatici (point-in-time snapshot)
• «Storage Encryption»
• «Enhanced Monitoring»
• Auto-aggiornamento versioni minori
• Finestra di manutenzione (non solo per auto-aggiornamento)
• Supporto «Multi-AZ»
Architettura di riferimento
«Single-Master Replication»
• «Primary DB Instance»
• Supporta accesso lettura/scrittura
• «Aurora Replica»
• Supporta operazioni di lettura (fino a 15 repliche)
• Failover automatico (possibile specificare priorità)
• «Aurora Cluster Volume»
• Storage virtuale distribuito su più AZ (minimo 3)
• Dati replicati tra AZ (6 copie, 2 per AZ)
«Aurora database engine»
• Basato su altri motori database con cui mantiene compatibilità
• MySQL (versioni community 5.6-5.7)
• PostgreSQL versioni community 9.6-13)
• Versioni principali
• Si riferiscono a una versione principale community
• Fine supporto dipende da engine/versione specifica
• Non tutte le versioni minori sono disponibili
• In genere fine supporto 12 mesi con qualche LTS
• Auto-aggiornamento
• Patch tra versioni minori principalmente per risoluzione problemi
Classi Istanza
• Due gruppi principali
• «Memory Optimized»: db.x2g, db.r6g, db.r5, db.r3)
• «Burstable»: db.t4g, db.t3, db.t2
• Alcune versioni supportate solo da classi specifiche
• Cluster può avere istanze di classi diverse
Connettività
• «Cluster endpoint»
• Connessioni lettura/scrittura
• Failover automatico (attenzione a pooling, «flush» o ridurre TTL)
• «Reader endpoint»
• Connessioni in sola lettura in load balancing (connessione, non query)
• «Custom endpoint»
• Raggruppamento personalizzato (es. reporting ad-hoc vs. produzione)
• Bilanciamento, mantenere gruppi istanze con risorse omogenee
• «Instance endpoint»
Resilienza Storage
• «Cluster Volume»
• indipendente da istanze
• crescita automatica (fino a 128 TiB)
• Replicato sempre su 6 «storage node» su 3 AZ (ogni AZ contiene copia completa)
• Consistenza basata su «Quorum»
• «Storage auto-repair»
• Segmento riparato da altro segmento replicato
• «Survivable cache warming»
• Page cache in processo separato, riscaldamento buffer pool veloce
• «Crash recovery»
• Quasi istantaneo
• Disattivare «binary logging» di MySQL se non serve per altro (Aurora non lo usa)
Alta Disponibilità
• Alta disponibilità dei dati
• Incorporata con meccanismi di replica cross-AZ
• Può sopravvivere alla perdita di una AZ
• Replica asincrona evita colli di bottiglia scritture
• Alta disponibilità delle istanze
• Possibilità di distribuire carico in sola lettura su repliche
• Failover automatico promuovendo istanza di replica (< 60-120 sec.)
• Failover automatico creando una nuova istanza nella stessa AZ (< 10 min.)
«Disaster Recovery»
• Perdita di una AZ senza repliche in sola lettura
• Es. singola istanza o tutte istanze nella stessa AZ
• Failover manuale creando nuova istanza in altra AZ
• «Aurora Global Databases»
• DR «Cross-region»
• Failover manuale pianificato (RPO = 0)
• Failover manuale non pianificato (RPO > 0)
«Aurora Cloning»
• Nuovo Cluster con stessi data dell’originale
• Spazio allocato inizialmente lo stesso
• Meccanismo «copy-on-write»
• Ideale per
• Condurre esperimenti/test impatto modifiche importanti
• Esecuzione carichi di lavoro specifici (es. esportare dati, query analitiche)
• Creare copia per test/sviluppo
Migrazione ad Aurora
• Da istanza «RDS for MySQL/PostgreSQL»
• Tramite Snapshot
• Tramite replica in sola lettura
• Istanze MySQL/PostgreSQL non RDS
• Meccanismi nativi (es. dump, backup, export/import)
• Altri database engine come SQL Server
• AWS Database Migration Service (DMS)
AWS Data Migration Service
Come utilizzare AWS DMS per migrare SQL Server ad Amazon Aurora
Data Migration Service (DMS)
«Endpoint» sorgente
On-premises & EC2
• SQL Server 2005-2019
• No edizioni express/web
• Oracle
• MySQL
• MariaDB
• modalità MySQL
• PostgreSQL
• MongoDB
• SAP ASE
• IMB DB2
Amazon RDS
• SQL Server 2012-2019
• No edizioni express/web
• Oracle
• MySQL
• MariaDB
• modalità MySQL
• PostgreSQL
• Aurora
• modalità MySQL/PostgreSQL
Altri Servizi
• Azure SQL Database
• Amazon S3
• Amazon DocumentDB
• modalità MongoDB
«Endpoint» destinazione
On-premises & EC2
• SQL Server 2005-2019
• No edizioni express/web
• Oracle
• MySQL
• MariaDB
• modalità MySQL
• PostgreSQL
• SAP ASE
• Redis
Amazon RDS
• SQL Server 2012-2019
• No edizioni express/web
• Oracle
• MySQL
• MariaDB
• modalità MySQL
• PostgreSQL
• Aurora
• modalità MySQL/PostgreSQL
• Aurora Serverless
Altri Servizi
• Amazon Redshift
• Amazon S3
• Amazon DynamoDB
• Amazon OpenSearch Service
• Amazon ElastiCache for Redis
• Amazon Kinesis Data Streams
• Amazon Neptune
• Amazon DocumentDB
• modalità MongoDB
• Apache Kafka (Amazon MSK)
Scenari networking DMS
• EC2/DMS/RDS in una singola VPC
• EC2 in una VPC, DMS/RDS in seconda VPC con VPC peering
• On-premises, DMS/RDS in una VPC con VPN/AWS Direct Connect
• On-premises, DMS/RDS in una VPC con Internet Gateway
• (RDS Classic non in VPC, DMS/RDS in VPC con Proxy/Classic Link)
AWS Schema Conversion Tools (SCT)
• Converte schema da un «engine» a un altro «engine»
• Es. lunghezza colonne, tipi dato, sintassi funzioni
• «Assessment Report»
• «Browser» codice per interventi manuali
• Integrato con DMS per creazion, esecuzione, monitoring
Supporto conversione OLTP
Database sorgente Database destinazione
IBM DB2 LUW (versioni 9.2, 9.5, 9.7, 10.5, 11.1, 11.5) • MySQL, PostgreSQL (Aurora, RDS, EC2)
• MariaDB (RDS, EC2)
Microsoft Azure SQL Database • MySQL, PostgreSQL (Aurora, RDS, EC2)
Microsoft SQL Server (versione >= 2008 R2) • MySQL, PostgreSQL (Aurora, RDS, EC2)
• MariaDB (RDS, EC2)
• Microsoft SQL Server (RDS/EC2)
MySQL (versione >= 5.5) • MySQL, PostgreSQL (Aurora, RDS, EC2)
Oracle (versione >= 10.2) • MySQL, PostgreSQL (Aurora, RDS, EC2)
• MariaDB (RDS, EC2)
PostgreSQL (versione >= 9.1+) MySQL, PostgreSQL (Aurora, RDS, EC2)
SAP ASE (versioni 12.5, 15.0, 15.5, 15.7, 16.0) • MySQL, PostgreSQL (Aurora, RDS, EC2)
• MariaDB (RDS, EC2)
SQL Server come sorgente
• Conversione a MySQL
• Conversione a PostgreSQL
• Conversione a RDS SQL Server
Demo
Come utilizzare AWS DMS per migrare SQL Server ad Amazon Aurora
Capire bene ambito
• No bacchetta magica ☺
• Alcune migrazioni molto semplici
• Altre molto (troppo) complesse
• Alcuni esempi di domande da porsi
• Intero database/intera applicazione o sottoinsieme?
• Tipo carico di lavoro? OLTP? OLAP? Scritture/letture preponderanti?
• Framework pubblico o sviluppato internamente?
• Quanto codice ad-hoc viene generato da applicazione?
• Quali funzionalità non standard solo utilizzate? Quali sono critiche?
• Ci sono opportunità per «sharding/multi-tenancy»?
Fasi migrazione
Fase Descrizione Tool
1 Assessment SCT
2 Conversione schema database SCT, DMS
3 Conversione/remediation applicazione SCT
4 Conversione script SCT
5 Integrazione con applicazioni di terze parti
6 Migrazione dati DMS
7 Test funziona dell’intero sistema
8 Performance tuning SCT
9 Integrazione e rilascio
10 Training nuovo sistema
11 Documentazione
12 Supporto post-rilascio
Risorse
• Approfondimenti architetturali
• Amazon Aurora: Design Considerations for High Throughput Cloud-native
Relational Databases (SIGMOD 2017)
• Amazon Aurora: On Avoiding Distributed Consensus for I/Os, Commits, and
Membership Changes (SIGMOD 2018)
• Playbooks
• SQL Server to Aurora MySQL Migration Playbook
• SQL Server to Aurora PostgreSQL Migration Playbook
• Workshops
• Microsoft SQL Server to Amazon Aurora (MySQL)
• Microsoft SQL Server to Amazon Aurora (PostgreSQL)
Risorse
• Amazon Aurora Migration Handbook
• Playbooks
• SQL Server to Aurora MySQL Migration Playbook
• SQL Server to Aurora PostgreSQL Migration Playbook
• Approfondimenti architetturali
• Amazon Aurora: Design Considerations for High Throughput Cloud-native
Relational Databases (SIGMOD 2017)
• Amazon Aurora: On Avoiding Distributed Consensus for I/Os, Commits, and
Membership Changes (SIGMOD 2018)
Q&A
• Ricordate il prossimo webinar
• Migrare SQL Server a PostgreSQL con Babelfish
Grazie!
AWS Eventi: https://aws.amazon.com/it/events/

More Related Content

What's hot

SQL Server Workload Profiling
SQL Server Workload ProfilingSQL Server Workload Profiling
SQL Server Workload ProfilingGianluca 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
 
Azure SQL Database Ledger
Azure SQL Database LedgerAzure SQL Database Ledger
Azure SQL Database LedgerGianluca 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
 
Best Practices on SQL Server
Best Practices on SQL ServerBest Practices on SQL Server
Best Practices on SQL ServerGianluca Hotz
 
Azure PaaS databases
Azure PaaS databasesAzure PaaS databases
Azure PaaS databasesGianluca 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
 
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
 
Novità di SQL Server 2017
Novità di SQL Server 2017Novità di SQL Server 2017
Novità di SQL Server 2017Gianluca Hotz
 
Azure PaaS databases
Azure PaaS databasesAzure PaaS databases
Azure PaaS databasesGianluca 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 ServerAlessandro Alpi
 
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
 
Codemotion fuse presentation
Codemotion fuse presentationCodemotion fuse presentation
Codemotion fuse presentationUgo Landini
 
Azure for Game Developers
Azure for Game DevelopersAzure for Game Developers
Azure for Game DevelopersMarco Parenzan
 
JBoss Data Grid Tech Lab
JBoss Data Grid Tech LabJBoss Data Grid Tech Lab
JBoss Data Grid Tech LabUgo Landini
 

What's hot (20)

SQL Server Workload Profiling
SQL Server Workload ProfilingSQL Server Workload Profiling
SQL Server Workload Profiling
 
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...
 
Azure SQL Database Ledger
Azure SQL Database LedgerAzure SQL Database Ledger
Azure SQL Database Ledger
 
Mettere in sicurezza ambienti sql server
Mettere in sicurezza ambienti sql serverMettere in sicurezza ambienti sql server
Mettere in sicurezza ambienti sql server
 
Best Practices on SQL Server
Best Practices on SQL ServerBest Practices on SQL Server
Best Practices on SQL Server
 
Azure PaaS databases
Azure PaaS databasesAzure PaaS databases
Azure PaaS databases
 
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 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
 
Novità di SQL Server 2017
Novità di SQL Server 2017Novità di SQL Server 2017
Novità di SQL Server 2017
 
Azure PaaS databases
Azure PaaS databasesAzure PaaS databases
Azure PaaS databases
 
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
 
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
 
OCP Paas_ultima
OCP Paas_ultimaOCP Paas_ultima
OCP Paas_ultima
 
Data flow
Data flowData flow
Data flow
 
Codemotion fuse presentation
Codemotion fuse presentationCodemotion fuse presentation
Codemotion fuse presentation
 
Azure for Game Developers
Azure for Game DevelopersAzure for Game Developers
Azure for Game Developers
 
JBoss Data Grid Tech Lab
JBoss Data Grid Tech LabJBoss Data Grid Tech Lab
JBoss Data Grid Tech Lab
 
Azure sql database
Azure sql databaseAzure sql database
Azure sql database
 

Similar to Come utilizzare AWS DMS per migrare SQL Server ad Amazon Aurora

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 DatabaseGianluca 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
 
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
 
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
 
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
 
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
 
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 cloudRiccardo Zamana
 
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
 
20160402_mlraviol_mariadb_TorinoWordCamp
20160402_mlraviol_mariadb_TorinoWordCamp20160402_mlraviol_mariadb_TorinoWordCamp
20160402_mlraviol_mariadb_TorinoWordCampmlraviol
 
Realizzazione di Microservizi con Docker, Kubernetes, Kafka e Mongodb
Realizzazione di Microservizi con Docker, Kubernetes, Kafka e MongodbRealizzazione di Microservizi con Docker, Kubernetes, Kafka e Mongodb
Realizzazione di Microservizi con Docker, Kubernetes, Kafka e MongodbMongoDB
 
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 SolutionsMarco Parenzan
 
Metadata Driven Pipeline with Microsoft Fabric
Metadata Driven Pipeline  with Microsoft FabricMetadata Driven Pipeline  with Microsoft Fabric
Metadata Driven Pipeline with Microsoft FabricMarco 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 SparkAlessio Biasiutti
 
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
 
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
 
Azure No-Sql approach: DocumentDB
Azure No-Sql approach: DocumentDBAzure No-Sql approach: DocumentDB
Azure No-Sql approach: DocumentDBDavide Benvegnù
 
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 ZRoberto Messora
 
Azure Day Rome 2019 Reloaded - Utilizzare Azure Kubernetes Service per i nost...
Azure Day Rome 2019 Reloaded - Utilizzare Azure Kubernetes Service per i nost...Azure Day Rome 2019 Reloaded - Utilizzare Azure Kubernetes Service per i nost...
Azure Day Rome 2019 Reloaded - Utilizzare Azure Kubernetes Service per i nost...azuredayit
 

Similar to Come utilizzare AWS DMS per migrare SQL Server ad Amazon Aurora (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
 
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...
 
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
 
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
 
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
 
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
 
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
 
20160402_mlraviol_mariadb_TorinoWordCamp
20160402_mlraviol_mariadb_TorinoWordCamp20160402_mlraviol_mariadb_TorinoWordCamp
20160402_mlraviol_mariadb_TorinoWordCamp
 
Realizzazione di Microservizi con Docker, Kubernetes, Kafka e Mongodb
Realizzazione di Microservizi con Docker, Kubernetes, Kafka e MongodbRealizzazione di Microservizi con Docker, Kubernetes, Kafka e Mongodb
Realizzazione di Microservizi con Docker, Kubernetes, Kafka e Mongodb
 
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
 
Metadata Driven Pipeline with Microsoft Fabric
Metadata Driven Pipeline  with Microsoft FabricMetadata Driven Pipeline  with Microsoft Fabric
Metadata Driven Pipeline with Microsoft Fabric
 
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
 
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
 
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...
 
Azure No-Sql approach: DocumentDB
Azure No-Sql approach: DocumentDBAzure No-Sql approach: DocumentDB
Azure No-Sql approach: DocumentDB
 
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
 
Azure Day Rome 2019 Reloaded - Utilizzare Azure Kubernetes Service per i nost...
Azure Day Rome 2019 Reloaded - Utilizzare Azure Kubernetes Service per i nost...Azure Day Rome 2019 Reloaded - Utilizzare Azure Kubernetes Service per i nost...
Azure Day Rome 2019 Reloaded - Utilizzare Azure Kubernetes Service per i nost...
 

More from 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
 

More from 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
 

Come utilizzare AWS DMS per migrare SQL Server ad Amazon Aurora

  • 1. Come utilizzare AWS DMS per migrare SQL Server ad Amazon Aurora Gianluca Hotz Data Platform MVP | Presidente ugiss.org
  • 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 (ex «PASS Chapter»)
  • 3. Introduzione Come utilizzare AWS DMS per migrare SQL Server ad Amazon Aurora
  • 4. Miniserie sulla modernizzazione • AWS DMS per migrare SQL Server ad Amazon RDS • AWS DMS per migrare SQL Server ad Amazon Aurora • Migrare SQL Server a PostgreSQL con Babelfish
  • 5. SQL Modernization? • Aggiornamenti «in-place» o migrazioni «side-by-side» • Aggiornamenti di versione (es. 2008 R2 -> 2019) • Upgrade/downgrade edizione (es. Enterprise -> Standard/Developer) • Virtualizzazione e consolidamento (IaaS) • «On-premises» o «Cloud» in modalità «Lift and shift» • Es. Amazon EC2 for SQL Server o servizi AWS per container • Re-platforming (PaaS) • Spostamento in «Cloud» con poche modifiche (beneficio: ambiente gestito!) • Es. SQL Server -> Amazon RDS for SQL Server • Re-factoring (PaaS) • Spostamento in «Cloud» con modifiche sostanziali per sfruttarlo meglio • Es. SQL Server -> Amazon RDS for Aurora/PostgreSQL, Amazon Athena/Redshift
  • 6. Sfide cambio «database engine» • Protocollo di comunicazione • TDS vs. altro «endpoint» (es. PostgreSQL) • Cambio di driver (ODBC, OLE-DB, JDBC, …) • Linguaggio di interrogazione/definizione schema • T-SQL vs. altro dialetto SQL (es. PG/PLSQL) • Mitigato da utilizzo framework e/o utilizzo ANSI SQL • Schema • Tipi dato, indici, partizionamento, tabelle (es. temporal, «ledger») • Mitigato da utilizzo framework e/o utilizzo ANSI SQL
  • 7. Amazon Aurora Come utilizzare AWS DMS per migrare SQL Server ad Amazon Aurora
  • 8. Aurora è parte di «Amazon RDS» • «Relational Database Services» • Ambiente PaaS completamente gestito • Backup automatici (point-in-time snapshot) • «Storage Encryption» • «Enhanced Monitoring» • Auto-aggiornamento versioni minori • Finestra di manutenzione (non solo per auto-aggiornamento) • Supporto «Multi-AZ»
  • 10. «Single-Master Replication» • «Primary DB Instance» • Supporta accesso lettura/scrittura • «Aurora Replica» • Supporta operazioni di lettura (fino a 15 repliche) • Failover automatico (possibile specificare priorità) • «Aurora Cluster Volume» • Storage virtuale distribuito su più AZ (minimo 3) • Dati replicati tra AZ (6 copie, 2 per AZ)
  • 11. «Aurora database engine» • Basato su altri motori database con cui mantiene compatibilità • MySQL (versioni community 5.6-5.7) • PostgreSQL versioni community 9.6-13) • Versioni principali • Si riferiscono a una versione principale community • Fine supporto dipende da engine/versione specifica • Non tutte le versioni minori sono disponibili • In genere fine supporto 12 mesi con qualche LTS • Auto-aggiornamento • Patch tra versioni minori principalmente per risoluzione problemi
  • 12. Classi Istanza • Due gruppi principali • «Memory Optimized»: db.x2g, db.r6g, db.r5, db.r3) • «Burstable»: db.t4g, db.t3, db.t2 • Alcune versioni supportate solo da classi specifiche • Cluster può avere istanze di classi diverse
  • 13. Connettività • «Cluster endpoint» • Connessioni lettura/scrittura • Failover automatico (attenzione a pooling, «flush» o ridurre TTL) • «Reader endpoint» • Connessioni in sola lettura in load balancing (connessione, non query) • «Custom endpoint» • Raggruppamento personalizzato (es. reporting ad-hoc vs. produzione) • Bilanciamento, mantenere gruppi istanze con risorse omogenee • «Instance endpoint»
  • 14. Resilienza Storage • «Cluster Volume» • indipendente da istanze • crescita automatica (fino a 128 TiB) • Replicato sempre su 6 «storage node» su 3 AZ (ogni AZ contiene copia completa) • Consistenza basata su «Quorum» • «Storage auto-repair» • Segmento riparato da altro segmento replicato • «Survivable cache warming» • Page cache in processo separato, riscaldamento buffer pool veloce • «Crash recovery» • Quasi istantaneo • Disattivare «binary logging» di MySQL se non serve per altro (Aurora non lo usa)
  • 15. Alta Disponibilità • Alta disponibilità dei dati • Incorporata con meccanismi di replica cross-AZ • Può sopravvivere alla perdita di una AZ • Replica asincrona evita colli di bottiglia scritture • Alta disponibilità delle istanze • Possibilità di distribuire carico in sola lettura su repliche • Failover automatico promuovendo istanza di replica (< 60-120 sec.) • Failover automatico creando una nuova istanza nella stessa AZ (< 10 min.)
  • 16. «Disaster Recovery» • Perdita di una AZ senza repliche in sola lettura • Es. singola istanza o tutte istanze nella stessa AZ • Failover manuale creando nuova istanza in altra AZ • «Aurora Global Databases» • DR «Cross-region» • Failover manuale pianificato (RPO = 0) • Failover manuale non pianificato (RPO > 0)
  • 17. «Aurora Cloning» • Nuovo Cluster con stessi data dell’originale • Spazio allocato inizialmente lo stesso • Meccanismo «copy-on-write» • Ideale per • Condurre esperimenti/test impatto modifiche importanti • Esecuzione carichi di lavoro specifici (es. esportare dati, query analitiche) • Creare copia per test/sviluppo
  • 18. Migrazione ad Aurora • Da istanza «RDS for MySQL/PostgreSQL» • Tramite Snapshot • Tramite replica in sola lettura • Istanze MySQL/PostgreSQL non RDS • Meccanismi nativi (es. dump, backup, export/import) • Altri database engine come SQL Server • AWS Database Migration Service (DMS)
  • 19. AWS Data Migration Service Come utilizzare AWS DMS per migrare SQL Server ad Amazon Aurora
  • 21. «Endpoint» sorgente On-premises & EC2 • SQL Server 2005-2019 • No edizioni express/web • Oracle • MySQL • MariaDB • modalità MySQL • PostgreSQL • MongoDB • SAP ASE • IMB DB2 Amazon RDS • SQL Server 2012-2019 • No edizioni express/web • Oracle • MySQL • MariaDB • modalità MySQL • PostgreSQL • Aurora • modalità MySQL/PostgreSQL Altri Servizi • Azure SQL Database • Amazon S3 • Amazon DocumentDB • modalità MongoDB
  • 22. «Endpoint» destinazione On-premises & EC2 • SQL Server 2005-2019 • No edizioni express/web • Oracle • MySQL • MariaDB • modalità MySQL • PostgreSQL • SAP ASE • Redis Amazon RDS • SQL Server 2012-2019 • No edizioni express/web • Oracle • MySQL • MariaDB • modalità MySQL • PostgreSQL • Aurora • modalità MySQL/PostgreSQL • Aurora Serverless Altri Servizi • Amazon Redshift • Amazon S3 • Amazon DynamoDB • Amazon OpenSearch Service • Amazon ElastiCache for Redis • Amazon Kinesis Data Streams • Amazon Neptune • Amazon DocumentDB • modalità MongoDB • Apache Kafka (Amazon MSK)
  • 23. Scenari networking DMS • EC2/DMS/RDS in una singola VPC • EC2 in una VPC, DMS/RDS in seconda VPC con VPC peering • On-premises, DMS/RDS in una VPC con VPN/AWS Direct Connect • On-premises, DMS/RDS in una VPC con Internet Gateway • (RDS Classic non in VPC, DMS/RDS in VPC con Proxy/Classic Link)
  • 24. AWS Schema Conversion Tools (SCT) • Converte schema da un «engine» a un altro «engine» • Es. lunghezza colonne, tipi dato, sintassi funzioni • «Assessment Report» • «Browser» codice per interventi manuali • Integrato con DMS per creazion, esecuzione, monitoring
  • 25. Supporto conversione OLTP Database sorgente Database destinazione IBM DB2 LUW (versioni 9.2, 9.5, 9.7, 10.5, 11.1, 11.5) • MySQL, PostgreSQL (Aurora, RDS, EC2) • MariaDB (RDS, EC2) Microsoft Azure SQL Database • MySQL, PostgreSQL (Aurora, RDS, EC2) Microsoft SQL Server (versione >= 2008 R2) • MySQL, PostgreSQL (Aurora, RDS, EC2) • MariaDB (RDS, EC2) • Microsoft SQL Server (RDS/EC2) MySQL (versione >= 5.5) • MySQL, PostgreSQL (Aurora, RDS, EC2) Oracle (versione >= 10.2) • MySQL, PostgreSQL (Aurora, RDS, EC2) • MariaDB (RDS, EC2) PostgreSQL (versione >= 9.1+) MySQL, PostgreSQL (Aurora, RDS, EC2) SAP ASE (versioni 12.5, 15.0, 15.5, 15.7, 16.0) • MySQL, PostgreSQL (Aurora, RDS, EC2) • MariaDB (RDS, EC2)
  • 26. SQL Server come sorgente • Conversione a MySQL • Conversione a PostgreSQL • Conversione a RDS SQL Server
  • 27. Demo Come utilizzare AWS DMS per migrare SQL Server ad Amazon Aurora
  • 28. Capire bene ambito • No bacchetta magica ☺ • Alcune migrazioni molto semplici • Altre molto (troppo) complesse • Alcuni esempi di domande da porsi • Intero database/intera applicazione o sottoinsieme? • Tipo carico di lavoro? OLTP? OLAP? Scritture/letture preponderanti? • Framework pubblico o sviluppato internamente? • Quanto codice ad-hoc viene generato da applicazione? • Quali funzionalità non standard solo utilizzate? Quali sono critiche? • Ci sono opportunità per «sharding/multi-tenancy»?
  • 29. Fasi migrazione Fase Descrizione Tool 1 Assessment SCT 2 Conversione schema database SCT, DMS 3 Conversione/remediation applicazione SCT 4 Conversione script SCT 5 Integrazione con applicazioni di terze parti 6 Migrazione dati DMS 7 Test funziona dell’intero sistema 8 Performance tuning SCT 9 Integrazione e rilascio 10 Training nuovo sistema 11 Documentazione 12 Supporto post-rilascio
  • 30. Risorse • Approfondimenti architetturali • Amazon Aurora: Design Considerations for High Throughput Cloud-native Relational Databases (SIGMOD 2017) • Amazon Aurora: On Avoiding Distributed Consensus for I/Os, Commits, and Membership Changes (SIGMOD 2018) • Playbooks • SQL Server to Aurora MySQL Migration Playbook • SQL Server to Aurora PostgreSQL Migration Playbook • Workshops • Microsoft SQL Server to Amazon Aurora (MySQL) • Microsoft SQL Server to Amazon Aurora (PostgreSQL)
  • 31. Risorse • Amazon Aurora Migration Handbook • Playbooks • SQL Server to Aurora MySQL Migration Playbook • SQL Server to Aurora PostgreSQL Migration Playbook • Approfondimenti architetturali • Amazon Aurora: Design Considerations for High Throughput Cloud-native Relational Databases (SIGMOD 2017) • Amazon Aurora: On Avoiding Distributed Consensus for I/Os, Commits, and Membership Changes (SIGMOD 2018)
  • 32. Q&A • Ricordate il prossimo webinar • Migrare SQL Server a PostgreSQL con Babelfish