SlideShare a Scribd company logo
1 of 34
Download to read offline
Come utilizzare AWS Database Migration
Service per migrare SQL Server ad Amazon RDS
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 RDS
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
«On-premises/IaaS/PaaS»
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
Amazon RDS for SQL Server
Come utilizzare AWS DMS per migrare SQL Server ad Amazon RDS
Perché «RDS for SQL Server»
• Ambiente PaaS completamente gestito
• Licenza SQL Server inclusa nel prezzo
• 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»
• Database Mirroring o AlwaysOn Availability Groups in base a build/edizione
• «Read Replica» (solo Edizione Enterprise, usa AlwaysOn AG)
Altre componenti «managed»
• SQL Server Analysis Services (solo Tabular)
• SQL Server Integration Services
• SQL Server Reporting Services
• Microsoft Distributed Transaction Coordinator
AWS Data Migration Service
Come utilizzare AWS DMS per migrare SQL Server ad Amazon RDS
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)
Configurazione DMS
• Classe istanza EC2 in base al volume dei dati da replicare
• Scegliere stessa VPC dell’istanza RDS per facilitare accessi
• Considerare Multi-AZ con scenari di replica per lungo periodo
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)
DMS Replication Task
Tipo «Replication Task» di migrazione
• «Full Load»
• Copia tutto creando tabelle (se necessario)
• «Full Load + CDC»
• Copia tutto creando tabelle (se necessario)
• Cattura e applica modifiche (replica continua)
• «CDC Only»
• Cattura e applica modifiche (replica continua)
• Inizializzazione tramite altro Task «Full Load» oppure altra modalità
Replica continua con SQL Server
• SQL Server Replication (MS-Replication)
• Richiede chiavi primarie
• Configurazione «distributor» manuale (script o «wizard» SSMS)
• DMS può usare utente non sysadmin (comunque necessario per setup)
• Change Data Capture (MS-CDC)
• Non richiede chiavi primarie (anche se le supporta)
• Unica modalità disponibile per «Amazon RDS for SQL Server» come sorgente
Trattamento tabelle destinazione
• «Do nothing»
• Assume tabelle destinazione già create
• «Drop tables on target»
• Elimina e ricrea tabelle destinazione
• «Truncate»
• Svuota tabelle destinazione esistenti, ricrea mancanti
Creazione tabelle destinazione
• Task DMS
• Crea tabelle in modalità semplificata (es.)
• Regole di selezione e trasformazione
• Espressioni per definizione contenuto colonne
• Gestione manuale scenari specifici
• Es. Task «Full Load» senza indici, creazione indici e poi Task «CDC Only»
• Altri strumenti
• Scripting con SSMS, ADS, strumenti di terze parti
• AWS Schema Conversion Tool
• Import/export
Gestione LOB nei Task
• Non inclusione delle colonne LOB
• Inclusione completa
• Più lento, parametro «Max LOB Size» controlla «chunk»
• Inclusione limitata
• Più veloce, parametro «Max LOB Size» controlla dimensione massima
Comandi DDL Supportati
• Create table
• Drop table
• Rename table
• Truncate table
• Add column
• Drop column
• Rename column
• Change column data type
Sicurezza
• Crittografia
• In transito: SSL/TLS
• A riposo: storage istanza DMS (S3) e target specifici (S3/Redshift)
• Gestione delle chiavi: AWS Key Management Service (AWS KMS)
• Controllo degli accessi
• VPC Security Groups
• Ruoli e policy IAM per controllo fine di tutte le risorse
• Secrets (user e password) per «endpoint»
Preparazione alla migrazione
• AWS DMS «Pre-migration assessment»
• Controlli semplici es. conversione data type
• AWS Schema Conversion Tool
• Scenari «like-to-like» (stesso engine) o «Re-factoring»
• Controlli molto più complessi es. codice, funzionalità usate
• Supporto migrazione intero schema (codice compreso)
• Microsoft Data Migration Assistant
• Analisi statica database e carico di lavoro (trace/extended events)
• Identifica problemi aggiornamento versione/ livello compatibilità database
• Funzionalità deprecate, cambio comportamento e «breaking changes»
Demo
Come utilizzare AWS DMS per migrare SQL Server ad Amazon RDS
Altri Scenari di migrazione
Come utilizzare AWS DMS per migrare SQL Server ad Amazon RDS
Migrazione senza DMS
• Manuale (fattibile solo per database di piccole dimensioni)
• Copia dello schema e export/import dei dati (bulk copy, copy wizard, …)
• «Export Data-tier Application» in SSMS (file .bacpac)
• Backup/restore nativo
• Replica transazionale
• Verso EC2 più semplice
• Database Mirroring
• AlwaysOn Availability Groups
Migrazione con Replica Transazionale
• How to migrate to Amazon RDS for
SQL Server using transactional
replication: Part 1
• Migrating to Amazon RDS for SQL
Server using transactional
replication: Part 2
• Migrating to Amazon RDS for SQL
Server using transactional
replication with native backup and
restore: Part 3
Migrazione con backup/restore nativo
https://aws.amazon.com/blogs/database/migrating-sql-server-to-amazon-rds-using-native-backup-and-restore
Migrazione con AlwaysOn AG verso EC2
https://docs.aws.amazon.com/prescriptive-guidance/latest/patterns/migrate-sql-server-to-aws-using-distributed-availability-groups.html
AWS Snowball Edge
https://docs.aws.amazon.com/dms/latest/userguide/CHAP_LargeDBs.Process.html
Risorse
• Migrating from Microsoft SQL Server to Amazon RDS
• https://www.aws.training/Details/eLearning?id=59021
• Webinar SQL Server in AWS
• https://www.youtube.com/watch?v=3hpPpK-qUM0
• Choosing between Amazon EC2 and Amazon RDS
• https://docs.aws.amazon.com/prescriptive-guidance/latest/migration-sql-
server/comparison.html
Q&A
• Ricordate i prossimi webinar
• AWS DMS per migrare SQL Server ad Amazon Aurora
• Migrare SQL Server a PostgreSQL con Babelfish
Grazie!
AWS Eventi: https://aws.amazon.com/it/events/

More Related Content

What's hot

Mettere in sicurezza ambienti sql server
Mettere in sicurezza ambienti sql serverMettere in sicurezza ambienti sql server
Mettere in sicurezza ambienti sql serverGianluca 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
 
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
 
SQL Server Workload Profiling
SQL Server Workload ProfilingSQL Server Workload Profiling
SQL Server Workload ProfilingGianluca Hotz
 
SQL Server Back to Basics: Sicurezza
SQL Server Back to Basics: SicurezzaSQL Server Back to Basics: Sicurezza
SQL Server Back to Basics: SicurezzaGianluca Hotz
 
Best Practices on SQL Server
Best Practices on SQL ServerBest Practices on SQL Server
Best Practices on SQL ServerGianluca Hotz
 
Azure SQL Database Ledger
Azure SQL Database LedgerAzure SQL Database Ledger
Azure SQL Database LedgerGianluca Hotz
 
SQL Server Modern Query Processing
SQL Server Modern Query ProcessingSQL Server Modern Query Processing
SQL Server Modern Query ProcessingGianluca 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ù
 
Azure PaaS databases
Azure PaaS databasesAzure PaaS databases
Azure PaaS databasesGianluca 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
 
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
 
Db2 11.1: l'evoluzione del Database secondo IBM
Db2 11.1: l'evoluzione del Database secondo IBMDb2 11.1: l'evoluzione del Database secondo IBM
Db2 11.1: l'evoluzione del Database secondo IBMJürgen Ambrosi
 
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
 
Code quality e test automatizzati con JavaScript
Code quality e test automatizzati con JavaScriptCode quality e test automatizzati con JavaScript
Code quality e test automatizzati con JavaScriptRoberto Messora
 
Azure for Game Developers
Azure for Game DevelopersAzure for Game Developers
Azure for Game DevelopersMarco Parenzan
 

What's hot (20)

SQL Server in AWS
SQL Server in AWSSQL Server in AWS
SQL Server in AWS
 
Mettere in sicurezza ambienti sql server
Mettere in sicurezza ambienti sql serverMettere in sicurezza ambienti sql server
Mettere in sicurezza ambienti sql server
 
SQL Server Data Virtualization with polybase
SQL Server Data Virtualization with polybaseSQL Server Data Virtualization with polybase
SQL Server Data Virtualization with polybase
 
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 Workload Profiling
SQL Server Workload ProfilingSQL Server Workload Profiling
SQL Server Workload Profiling
 
SQL Server Back to Basics: Sicurezza
SQL Server Back to Basics: SicurezzaSQL Server Back to Basics: Sicurezza
SQL Server Back to Basics: Sicurezza
 
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
 
SQL Server Modern Query Processing
SQL Server Modern Query ProcessingSQL Server Modern Query Processing
SQL Server Modern Query Processing
 
Data flow
Data flowData flow
Data flow
 
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
 
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
 
Azure sql database
Azure sql databaseAzure sql database
Azure sql database
 
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
 
Db2 11.1: l'evoluzione del Database secondo IBM
Db2 11.1: l'evoluzione del Database secondo IBMDb2 11.1: l'evoluzione del Database secondo IBM
Db2 11.1: l'evoluzione del Database secondo IBM
 
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
 
Code quality e test automatizzati con JavaScript
Code quality e test automatizzati con JavaScriptCode quality e test automatizzati con JavaScript
Code quality e test automatizzati con JavaScript
 
Azure for Game Developers
Azure for Game DevelopersAzure for Game Developers
Azure for Game Developers
 

Similar to Come utilizzare AWS Database Migration Service per migrare SQL Server ad Amazon RDS

Novità di SQL Server 2017
Novità di SQL Server 2017Novità di SQL Server 2017
Novità di SQL Server 2017Gianluca 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
 
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
 
Novità in Visual Studio 2012
Novità in Visual Studio 2012Novità in Visual Studio 2012
Novità in Visual Studio 2012Sinergia Totale
 
SQL Server Benchmarking, Baselining and Workload Analysis
SQL Server Benchmarking, Baselining and Workload AnalysisSQL Server Benchmarking, Baselining and Workload Analysis
SQL Server Benchmarking, Baselining and Workload AnalysisGianluca Sartori
 
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
 
OCP-Architettura e caratteristiche della PaaS
OCP-Architettura e caratteristiche della PaaSOCP-Architettura e caratteristiche della PaaS
OCP-Architettura e caratteristiche della PaaSopencityplatform
 
Metadata Driven Pipeline with Microsoft Fabric
Metadata Driven Pipeline  with Microsoft FabricMetadata Driven Pipeline  with Microsoft Fabric
Metadata Driven Pipeline with Microsoft FabricMarco Pozzan
 
CCI2018 - Exchange 2019 (novità e setup)
CCI2018 - Exchange 2019 (novità e setup)CCI2018 - Exchange 2019 (novità e setup)
CCI2018 - Exchange 2019 (novità e setup)walk2talk srl
 
RDBMS: pregi e difetti
RDBMS: pregi e difettiRDBMS: pregi e difetti
RDBMS: pregi e difettiGianluca Hotz
 
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
 
Infinispan codemotion - Codemotion Rome 2015
Infinispan codemotion - Codemotion Rome 2015Infinispan codemotion - Codemotion Rome 2015
Infinispan codemotion - Codemotion Rome 2015Codemotion
 
Il cielo è sempre più azure
Il cielo è sempre più azureIl cielo è sempre più azure
Il cielo è sempre più azureKlab
 
JBoss Data Grid Tech Lab
JBoss Data Grid Tech LabJBoss Data Grid Tech Lab
JBoss Data Grid Tech LabUgo Landini
 
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
 
Microservices webinar EMEA Aug. 2017
Microservices webinar EMEA Aug. 2017Microservices webinar EMEA Aug. 2017
Microservices webinar EMEA Aug. 2017MongoDB
 
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
 

Similar to Come utilizzare AWS Database Migration Service per migrare SQL Server ad Amazon RDS (20)

Novità di SQL Server 2017
Novità di SQL Server 2017Novità di SQL Server 2017
Novità di SQL Server 2017
 
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
 
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)
 
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
 
Novità in Visual Studio 2012
Novità in Visual Studio 2012Novità in Visual Studio 2012
Novità in Visual Studio 2012
 
SQL Server Benchmarking, Baselining and Workload Analysis
SQL Server Benchmarking, Baselining and Workload AnalysisSQL Server Benchmarking, Baselining and Workload Analysis
SQL Server Benchmarking, Baselining and Workload Analysis
 
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
 
OCP-Architettura e caratteristiche della PaaS
OCP-Architettura e caratteristiche della PaaSOCP-Architettura e caratteristiche della PaaS
OCP-Architettura e caratteristiche della PaaS
 
OCP Paas_ultima
OCP Paas_ultimaOCP Paas_ultima
OCP Paas_ultima
 
Metadata Driven Pipeline with Microsoft Fabric
Metadata Driven Pipeline  with Microsoft FabricMetadata Driven Pipeline  with Microsoft Fabric
Metadata Driven Pipeline with Microsoft Fabric
 
CCI2018 - Exchange 2019 (novità e setup)
CCI2018 - Exchange 2019 (novità e setup)CCI2018 - Exchange 2019 (novità e setup)
CCI2018 - Exchange 2019 (novità e setup)
 
RDBMS: pregi e difetti
RDBMS: pregi e difettiRDBMS: pregi e difetti
RDBMS: pregi e difetti
 
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
 
Dominopoint meet the experts 2015 - XPages
Dominopoint   meet the experts 2015 - XPagesDominopoint   meet the experts 2015 - XPages
Dominopoint meet the experts 2015 - XPages
 
Infinispan codemotion - Codemotion Rome 2015
Infinispan codemotion - Codemotion Rome 2015Infinispan codemotion - Codemotion Rome 2015
Infinispan codemotion - Codemotion Rome 2015
 
Il cielo è sempre più azure
Il cielo è sempre più azureIl cielo è sempre più azure
Il cielo è sempre più azure
 
JBoss Data Grid Tech Lab
JBoss Data Grid Tech LabJBoss Data Grid Tech Lab
JBoss Data Grid Tech Lab
 
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
 
Microservices webinar EMEA Aug. 2017
Microservices webinar EMEA Aug. 2017Microservices webinar EMEA Aug. 2017
Microservices webinar EMEA Aug. 2017
 
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
 

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 Database Migration Service per migrare SQL Server ad Amazon RDS

  • 1. Come utilizzare AWS Database Migration Service per migrare SQL Server ad Amazon RDS 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 RDS
  • 4. 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. 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
  • 7. Amazon RDS for SQL Server Come utilizzare AWS DMS per migrare SQL Server ad Amazon RDS
  • 8. Perché «RDS for SQL Server» • Ambiente PaaS completamente gestito • Licenza SQL Server inclusa nel prezzo • 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» • Database Mirroring o AlwaysOn Availability Groups in base a build/edizione • «Read Replica» (solo Edizione Enterprise, usa AlwaysOn AG)
  • 9. Altre componenti «managed» • SQL Server Analysis Services (solo Tabular) • SQL Server Integration Services • SQL Server Reporting Services • Microsoft Distributed Transaction Coordinator
  • 10. AWS Data Migration Service Come utilizzare AWS DMS per migrare SQL Server ad Amazon RDS
  • 12. «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
  • 13. «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)
  • 14. Configurazione DMS • Classe istanza EC2 in base al volume dei dati da replicare • Scegliere stessa VPC dell’istanza RDS per facilitare accessi • Considerare Multi-AZ con scenari di replica per lungo periodo
  • 15. 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)
  • 17. Tipo «Replication Task» di migrazione • «Full Load» • Copia tutto creando tabelle (se necessario) • «Full Load + CDC» • Copia tutto creando tabelle (se necessario) • Cattura e applica modifiche (replica continua) • «CDC Only» • Cattura e applica modifiche (replica continua) • Inizializzazione tramite altro Task «Full Load» oppure altra modalità
  • 18. Replica continua con SQL Server • SQL Server Replication (MS-Replication) • Richiede chiavi primarie • Configurazione «distributor» manuale (script o «wizard» SSMS) • DMS può usare utente non sysadmin (comunque necessario per setup) • Change Data Capture (MS-CDC) • Non richiede chiavi primarie (anche se le supporta) • Unica modalità disponibile per «Amazon RDS for SQL Server» come sorgente
  • 19. Trattamento tabelle destinazione • «Do nothing» • Assume tabelle destinazione già create • «Drop tables on target» • Elimina e ricrea tabelle destinazione • «Truncate» • Svuota tabelle destinazione esistenti, ricrea mancanti
  • 20. Creazione tabelle destinazione • Task DMS • Crea tabelle in modalità semplificata (es.) • Regole di selezione e trasformazione • Espressioni per definizione contenuto colonne • Gestione manuale scenari specifici • Es. Task «Full Load» senza indici, creazione indici e poi Task «CDC Only» • Altri strumenti • Scripting con SSMS, ADS, strumenti di terze parti • AWS Schema Conversion Tool • Import/export
  • 21. Gestione LOB nei Task • Non inclusione delle colonne LOB • Inclusione completa • Più lento, parametro «Max LOB Size» controlla «chunk» • Inclusione limitata • Più veloce, parametro «Max LOB Size» controlla dimensione massima
  • 22. Comandi DDL Supportati • Create table • Drop table • Rename table • Truncate table • Add column • Drop column • Rename column • Change column data type
  • 23. Sicurezza • Crittografia • In transito: SSL/TLS • A riposo: storage istanza DMS (S3) e target specifici (S3/Redshift) • Gestione delle chiavi: AWS Key Management Service (AWS KMS) • Controllo degli accessi • VPC Security Groups • Ruoli e policy IAM per controllo fine di tutte le risorse • Secrets (user e password) per «endpoint»
  • 24. Preparazione alla migrazione • AWS DMS «Pre-migration assessment» • Controlli semplici es. conversione data type • AWS Schema Conversion Tool • Scenari «like-to-like» (stesso engine) o «Re-factoring» • Controlli molto più complessi es. codice, funzionalità usate • Supporto migrazione intero schema (codice compreso) • Microsoft Data Migration Assistant • Analisi statica database e carico di lavoro (trace/extended events) • Identifica problemi aggiornamento versione/ livello compatibilità database • Funzionalità deprecate, cambio comportamento e «breaking changes»
  • 25. Demo Come utilizzare AWS DMS per migrare SQL Server ad Amazon RDS
  • 26. Altri Scenari di migrazione Come utilizzare AWS DMS per migrare SQL Server ad Amazon RDS
  • 27. Migrazione senza DMS • Manuale (fattibile solo per database di piccole dimensioni) • Copia dello schema e export/import dei dati (bulk copy, copy wizard, …) • «Export Data-tier Application» in SSMS (file .bacpac) • Backup/restore nativo • Replica transazionale • Verso EC2 più semplice • Database Mirroring • AlwaysOn Availability Groups
  • 28. Migrazione con Replica Transazionale • How to migrate to Amazon RDS for SQL Server using transactional replication: Part 1 • Migrating to Amazon RDS for SQL Server using transactional replication: Part 2 • Migrating to Amazon RDS for SQL Server using transactional replication with native backup and restore: Part 3
  • 29. Migrazione con backup/restore nativo https://aws.amazon.com/blogs/database/migrating-sql-server-to-amazon-rds-using-native-backup-and-restore
  • 30. Migrazione con AlwaysOn AG verso EC2 https://docs.aws.amazon.com/prescriptive-guidance/latest/patterns/migrate-sql-server-to-aws-using-distributed-availability-groups.html
  • 32. Risorse • Migrating from Microsoft SQL Server to Amazon RDS • https://www.aws.training/Details/eLearning?id=59021 • Webinar SQL Server in AWS • https://www.youtube.com/watch?v=3hpPpK-qUM0 • Choosing between Amazon EC2 and Amazon RDS • https://docs.aws.amazon.com/prescriptive-guidance/latest/migration-sql- server/comparison.html
  • 33. Q&A • Ricordate i prossimi webinar • AWS DMS per migrare SQL Server ad Amazon Aurora • Migrare SQL Server a PostgreSQL con Babelfish