SlideShare a Scribd company logo
CLOUD
CONFERENCE
ITALIA
2017
Considerations for Migrating
Databases to Azure
Gianluca Sartori
e
#cloudconferenceitalia
SPONSOR
e
#cloudconferenceitalia
Gianluca Sartori
Independent SQL Server consultant
SQL Server MVP, MCTS, MCITP, MCT
Works with SQL Server since version 7
DBA @ Scuderia Ferrari
Blog: spaghettidba.com
Twitter: @spaghettidba
e
#cloudconferenceitalia
• Cloud Options
• Analyze Compatibility
• Migrate Databases
• Optimize and Adjust
Agenda
e
#cloudconferenceitalia
Cloud Options
e
#cloudconferenceitalia
Cloud Paradigms PAAS
e
#cloudconferenceitalia
IaaS – SQL Server on Azure VM
Features
• Infrastructure as a Service
• Hardware and Hypervisor maintained by
Microsoft
• SQL Server license included
• BYOL
• Pay per-minute
• Pay for premium storage (SSD: P10, P20,
P30)
Suitable for:
• Lift and Shift migrations with minimal
changes
• Resources to maintain the VM and SQL
instance
• Admin rights needed
• Customizable HA/DR
e
#cloudconferenceitalia
IaaS – Virtual Machine Sizes
e
#cloudconferenceitalia
PaaS –Azure SQL Database
Features
• Platform as a Service /
Database as a Service
• Hardware, OS and SQL Server maintained
by Microsoft
• Automated backups
• Built-in HA/DR (geo-redundancy)
• Pay per hour, per service tier and
performance level
• Pay for data transfer
Suitable for:
• New applications
• SaaS app providers
• Up to 4TB databases
• Scale-out options
• Single database / non OS dependent
applications
e
#cloudconferenceitalia
PaaS –Azure Managed Instance
Features
• Platform as a Service
• Hardware, OS and SQL Server maintained
by Microsoft
• Automated backups
• Built-in HA/DR (geo-redundancy)
Suitable for:
• Lift and shift migrations
• Applications that need instance-level
features
• Cross-database queries
• SQL Agent
• SQLCLR
• Not yet released – private preview
e
#cloudconferenceitalia
• Represents relative power (resources) assigned to a
database
• CPU
• Memory
• I/O
• Not an absolute unit measure
• Useful for comparison between tiers and
performance levels
• Represents resources, not performance
• DTU Calculator can help estimate the needs
PaaS - DTUs : Database Transaction Units
e
#cloudconferenceitalia
PaaS - Service Tiers
e
#cloudconferenceitalia
Basic Service Tier
PERFORMANCELEVEL BASIC
Max DTUs 5
Max database size 2 GB
Max in-memory OLTPstorage N/A
Max concurrent workers(requests) 30
Max concurrent logins 30
Max concurrent sessions 300
Suitable for:
• Applications that hit the database very
infrequently
• Tiny databases
e
#cloudconferenceitalia
PERFORMANCELEVEL S0 S1 S2 S3
Max DTUs 10 20 50 100
Max database size 250 GB 250 GB 250 GB 250 GB
Max in-memory OLTPstorage N/A N/A N/A N/A
Max concurrent workers(requests) 60 90 120 200
Max concurrent logins 60 90 120 200
Max concurrent sessions 600 900 1200 2400
Standard Service Tier
Suitable for:
• Applications with limited performance requirements
• Mid-sized databases
e
#cloudconferenceitalia
Premium Service Tier
Suitable for:
• Applications with high performance requirements
• Large databases
PERFORMANCELEVEL P1 P2 P4 P6 P11 P15
Max DTUs 125 250 500 1000 1750 4000
Max database size 500 GB 500 GB 500 GB 500 GB 4 TB 4 TB
Max in-memory OLTPstorage 1GB 2 GB 4 GB 8 GB 14 GB 32 GB
Max concurrent workers(requests) 200 400 800 1600 2400 6400
Max concurrent logins 200 400 800 1600 2400 6400
Max concurrent sessions 30000 30000 30000 30000 30000 30000
e
#cloudconferenceitalia
Premium RS Service Tier
Suitable for:
• Applications with high I/O demands, but not the
highest availability guarantees
• ETL, demos, reconstructable data
PERFORMANCELEVEL PRS1 PRS2 PRS4 PRS6
Max DTUs 125 250 500 1000
Max database size 500 GB 500 GB 500 GB 500 GB
Max in-memory OLTPstorage 1GB 2 GB 4 GB 8 GB
Max concurrent workers(requests) 200 400 800 1600
Max concurrent logins 200 400 800 1600
Max concurrent sessions 30000 30000 30000 30000
e
#cloudconferenceitalia
Features in Service Tiers
FEATURE BASIC STANDARD PREMIUM PREMIUM RS
Backup retention 7 days 35 days 35 days 35 days
Active geo-replication Supported Supported Supported Supported
Number of local replicas 3 3 3 2
In-memory OLTP - - From 1to 32 GB From 1to 8 GB
Columnstore Indexes - - Supported Supported
e
#cloudconferenceitalia
• Resource limits are shared on the
whole pool
• Auto-Scale
0
20
40
60
80
100
120
09:00 10:00 11:00 12:00 13:00 14:00 15:00 16:00 17:00 18:00 19:00 20:00 21:00 22:00
4 databases
DB1 DB2 DB3 DB4 Combined eDTUs
0
20
40
60
80
100
120
140
09:00 10:00 11:00 12:00 13:00 14:00 15:00 16:00 17:00 18:00 19:00 20:00 21:00 22:00
16 databases
Combined eDTUs
Elastic Database Pools
0
10
20
30
40
50
60
70
80
90
100
09:00 10:00 11:00 12:00 13:00 14:00 15:00 16:00 17:00 18:00 19:00 20:00 21:00 22:00
DTUs
e
#cloudconferenceitalia
Analyze Compatibility
e
#cloudconferenceitalia
Azure SQL Database limitations
• Connectivity and authentication
• No Windows Authentication (Azure AD is supported, with limitations)
• TCP/IP on port 1433 only
• SQL Server Agent / Jobs
• No SQL Server Agent jobs (on-premises only)
• Elastic jobs can replace SQL Server Agent
• Collation Support
• Fixed Collation (default SQL_Latin1_General_CP1_CI_AS)
• Naming Requirements
• Restricted usernames (admin, administrator, guest, root, sa, ‘’)
• Queries
• No cross-database queries
• No references to system databases or instance-level features
e
#cloudconferenceitalia
• Several methods to check compatibility
• SSDT
• SQLPACKAGE
• SSMS
• DMA
How to check compatibility
e
#cloudconferenceitalia
.
• Create New Project
• Import application-scoped
objects only
• Start the import
• Target Platform to Microsoft
Azure SQL Database V12
• Build
• Error List
Check compatibility with SSDT
e
#cloudconferenceitalia
• Open a command prompt and change a directory containing sqlpackage.exe
• Execute the following SqlPackage command
• Open the output file and review the compatibility errors
Check compatibility with SQLPACKAGE
e
#cloudconferenceitalia
Check Compatibility with SSMS
• Open the latest version of SSMS
and connect to your database
• Export Data-tier Application
• Save to a BACPAC file
• Skip exporting data
• Compatibility issues appear – click
on error
e
#cloudconferenceitalia
Check Compatibility with DMA
.
• Download and open Data Migration
Assistant (DMA)
• Create a new Assessment Project
with Azure SQL Database Target
• Connect to local instance
• Select the source database(s)
• Verify Compatibility Report
e
#cloudconferenceitalia
DEMO
Check Compatibility with DMA
e
#cloudconferenceitalia
• Compatibility issues must be fixed before proceeding with the SQL Server Database
migration.
• A wide variety of compatibility issues
• Use the following resources
• SQL Server database features not supported in Azure SQL Database
• Discontinued Database Engine Functionality in SQL Server 2016
• Discontinued Database Engine Functionality in SQL Server 2014
• Discontinued Database Engine Functionality in SQL Server 2012
• Discontinued Database Engine Functionality in SQL Server 2008 R2
Fix Database Migration Compatibility Issues
e
#cloudconferenceitalia
Migrate Databases
e
#cloudconferenceitalia
• SSMS migration wizard
• Export / Import with BACPAC
• SSMS
• Azure Portal
• Powershell
• SQLPACKAGE
• Export / Import with BACPAC + BCP
• Data Migration Assistant
• Transactional Replication
Migration methods
e
#cloudconferenceitalia
SSMS Migration Wizard
• Deploy Database to Microsoft
Azure SQL Database
• Connect to your Azure SQL
Database Server
• Specify Azure Database Settings
• Complete the Wizard
e
#cloudconferenceitalia
DEMO
SSMS Migration Wizard
e
#cloudconferenceitalia
Export/Import with BACPAC File
• Export Data-Tier Application
• Save to local or Azure Storage
• Connect to your Azure SQL Database
server
• Import Data-tier Application
• Import from local disk or Azure Storage
• Specify Database Settings
e
#cloudconferenceitalia
Export/Import with BACPAC File and BCP
Used for much larger databases to
achieve greater parallelization for
increases performance
Migrate the schema and the data
separately
• Export the schema only to a BACPAC file.
• Import the schema only from the BACPAC
File into SQL Database.
• Use BCP to extract the data into flat files
and then parallel load these files into Azure
SQL Database.
e
#cloudconferenceitalia
DEMO
Export/Import with
BACPAC and BCP
e
#cloudconferenceitalia
Data Migration Assistant
• Create a new migration project
• Select the source server
• Select the target – your Azure Logical
Server
• Select the objects to migrate
• Script & deploy schema
• Specify Database Settings
e
#cloudconferenceitalia
DEMO
Data Migration Assistant
e
#cloudconferenceitalia
Transactional Replication
• Used to have minimal downtime during
migration
• Configure your Azure SQL Database as a
subscriber
• All changes to your data or schema show
up in your Azure SQL Database
• Synchronization is complete – change
connection string of your application
• Remove Replication
e
#cloudconferenceitalia
Optimize and Adjust
e
#cloudconferenceitalia
• Use a high database performance level
• Use SqlPackage
• Disable the indexes and constraints
• Disable auto-statistics
• Drop indexed views, recreate once finished
• Do not migrate unnecessary data
• Fire multiple simultaneous bcp executions
Speed up the import process
e
#cloudconferenceitalia
• If you use BACPACs, create your storage account in the same region as your Azure SQL
Database
• BACPAC files must be saved to standard Azure Blob Storage, not premium storage
• Create an empty database in advance
• Make sure you have enough CPU capacity for BACPAC compression
• Use AZCopy to copy your BACPAC faster
Useful tips!
e
#cloudconferenceitalia
• Performance levels have different TEMPDB capacities
• Most impacting – Read-Committed Snapshot Isolation (RCSI)
• Monitor tempdb usage
Monitor your tempdb space
e
#cloudconferenceitalia
• Performance levels have different Transaction Log capacities
• Recovery model full (it is not possible to change it)
• Avoid long running transactions (use –b option)
• Review the transaction log usage
• Transaction Log Backup are done by Azure SQL Platform every 5 mins
Monitor your Transaction Log
e
#cloudconferenceitalia
Summary
• For smaller databases, web-based applications, and specifically new
development, Azure SQL Database may be appropriate
• SQL Server 2016 on Azure VM may be more appropriate for existing
applications, and more cost-effective for larger databases, even with an
Enterprise license
• Some important on-premises features are not available in Azure SQL
Database
• Tools can help you identify incompatible features
• Tools can help you in the migration process
GRAZIE!GRAZIE!

More Related Content

What's hot (20)

PPTX
Blockchain for the DBA and Data Professional
Karen Lopez
 
PPTX
What is Change Data Capture (CDC) and Why is it Important?
FlyData Inc.
 
PPTX
Spark
fatemehjamalii
 
PPTX
Gs08 modernize your data platform with sql technologies wash dc
Bob Ward
 
PPTX
Big Data Day LA 2015 - Introducing N1QL: SQL for Documents by Jeff Morris of ...
Data Con LA
 
PPTX
What's new in SQL Server 2017
Hasan Savran
 
PDF
Real Time Analytics with Dse
DataStax Academy
 
PDF
Powering Interactive BI Analytics with Presto and Delta Lake
Databricks
 
PDF
Faster Data Integration Pipeline Execution using Spark-Jobserver
Databricks
 
PPTX
How SQL Server 2016 SP1 Changes the Game
PARIKSHIT SAVJANI
 
PDF
Kafka Streams Windows: Behind the Curtain
Neil Buesing
 
PDF
Couchbase Day
Idan Tohami
 
PPTX
Oow2016 review-13th october 2016
Getting value from IoT, Integration and Data Analytics
 
PPTX
Migrating on premises workload to azure sql database
PARIKSHIT SAVJANI
 
PPTX
Discovery Day 2019 Sofia - Big data clusters
Ivan Donev
 
PPTX
Azure data platform overview
James Serra
 
PPTX
Azure data bricks by Eugene Polonichko
Alex Tumanoff
 
PDF
Oracle GoldenGate and Apache Kafka A Deep Dive Into Real-Time Data Streaming
Michael Rainey
 
PPTX
Oow2016 review-db-dev-bigdata-BI
Getting value from IoT, Integration and Data Analytics
 
PPTX
Oow2016 review-iaas-paas-13th-18thoctober
Getting value from IoT, Integration and Data Analytics
 
Blockchain for the DBA and Data Professional
Karen Lopez
 
What is Change Data Capture (CDC) and Why is it Important?
FlyData Inc.
 
Gs08 modernize your data platform with sql technologies wash dc
Bob Ward
 
Big Data Day LA 2015 - Introducing N1QL: SQL for Documents by Jeff Morris of ...
Data Con LA
 
What's new in SQL Server 2017
Hasan Savran
 
Real Time Analytics with Dse
DataStax Academy
 
Powering Interactive BI Analytics with Presto and Delta Lake
Databricks
 
Faster Data Integration Pipeline Execution using Spark-Jobserver
Databricks
 
How SQL Server 2016 SP1 Changes the Game
PARIKSHIT SAVJANI
 
Kafka Streams Windows: Behind the Curtain
Neil Buesing
 
Couchbase Day
Idan Tohami
 
Migrating on premises workload to azure sql database
PARIKSHIT SAVJANI
 
Discovery Day 2019 Sofia - Big data clusters
Ivan Donev
 
Azure data platform overview
James Serra
 
Azure data bricks by Eugene Polonichko
Alex Tumanoff
 
Oracle GoldenGate and Apache Kafka A Deep Dive Into Real-Time Data Streaming
Michael Rainey
 
Oow2016 review-iaas-paas-13th-18thoctober
Getting value from IoT, Integration and Data Analytics
 

Similar to CCI2017 - Considerations for Migrating Databases to Azure - Gianluca Sartori (20)

PPTX
Sql Start! 2020 - SQL Server Lift & Shift su Azure
Marco Obinu
 
PPTX
Should I move my database to the cloud?
James Serra
 
PDF
In-memory ColumnStore Index
SolidQ
 
PPTX
Copy Data Management for the DBA
Kellyn Pot'Vin-Gorman
 
PDF
Exploring sql server 2016
Antonios Chatzipavlis
 
PPTX
Denver SQL Saturday The Next Frontier
Kellyn Pot'Vin-Gorman
 
PPTX
Implement SQL Server on an Azure VM
James Serra
 
PDF
Lessons from Building Large-Scale, Multi-Cloud, SaaS Software at Databricks
Databricks
 
PDF
Lakehouse in Azure
Sergio Zenatti Filho
 
PPTX
Business_Continuity_Planning_with_SQL_Server_HADR_options_TechEd_Bangalore_20...
LarryZaman
 
PPTX
SQL Server Lift & Shift on Azure - SQL Saturday 921
Marco Obinu
 
PPTX
Sergiy Lunyakin "Cloud BI with Azure Analysis Services"
DataConf
 
PPSX
Directions NA Choosing the best possible Azure platform for NAV
Aleksandar Totovic
 
PDF
SQL Analytics Powering Telemetry Analysis at Comcast
Databricks
 
PDF
Modern MySQL Monitoring and Dashboards.
Mydbops
 
PPTX
Accelerate SQL Server Migration to the AWS Cloud
Datavail
 
PPTX
Modern ETL: Azure Data Factory, Data Lake, and SQL Database
Eric Bragas
 
PDF
SQL Server 2019 CTP2.4
Gianluca Hotz
 
PPTX
Innovations of .NET and Azure (Recaps of Build 2017 selected sessions)
Jeff Chu
 
PPTX
2019 - OOW - Database Migration Methods from On-Premise to Cloud
Marcus Vinicius Miguel Pedro
 
Sql Start! 2020 - SQL Server Lift & Shift su Azure
Marco Obinu
 
Should I move my database to the cloud?
James Serra
 
In-memory ColumnStore Index
SolidQ
 
Copy Data Management for the DBA
Kellyn Pot'Vin-Gorman
 
Exploring sql server 2016
Antonios Chatzipavlis
 
Denver SQL Saturday The Next Frontier
Kellyn Pot'Vin-Gorman
 
Implement SQL Server on an Azure VM
James Serra
 
Lessons from Building Large-Scale, Multi-Cloud, SaaS Software at Databricks
Databricks
 
Lakehouse in Azure
Sergio Zenatti Filho
 
Business_Continuity_Planning_with_SQL_Server_HADR_options_TechEd_Bangalore_20...
LarryZaman
 
SQL Server Lift & Shift on Azure - SQL Saturday 921
Marco Obinu
 
Sergiy Lunyakin "Cloud BI with Azure Analysis Services"
DataConf
 
Directions NA Choosing the best possible Azure platform for NAV
Aleksandar Totovic
 
SQL Analytics Powering Telemetry Analysis at Comcast
Databricks
 
Modern MySQL Monitoring and Dashboards.
Mydbops
 
Accelerate SQL Server Migration to the AWS Cloud
Datavail
 
Modern ETL: Azure Data Factory, Data Lake, and SQL Database
Eric Bragas
 
SQL Server 2019 CTP2.4
Gianluca Hotz
 
Innovations of .NET and Azure (Recaps of Build 2017 selected sessions)
Jeff Chu
 
2019 - OOW - Database Migration Methods from On-Premise to Cloud
Marcus Vinicius Miguel Pedro
 
Ad

More from walk2talk srl (20)

PPTX
CCI 2019 - SQL Injection - Black Hat Vs White Hat
walk2talk srl
 
PPTX
CCI 2019 - Exploiting Custom Vision SDK in Python to create an efficient imag...
walk2talk srl
 
PPTX
CCI 2019 - Come ottimizzare i propri workload su Azure
walk2talk srl
 
PPTX
CCI 2019 - Exchange 2019 da 0 ad HA in 1 ora
walk2talk srl
 
PPTX
CCI 2019 - PowerApps for Enterprise Developers
walk2talk srl
 
PPTX
CCI 2019 - Architettare componenti in SPFx, esperienze sul campo
walk2talk srl
 
PPTX
CCI 2019 - Step by step come attivare un servizio voce in MS Teams
walk2talk srl
 
PPTX
CCI 2019 - Strumenti Azure per l'Anomaly Detection in ambito Industria 4.0
walk2talk srl
 
PPTX
CCI2019 - I've got the Power! I've got the Shell!
walk2talk srl
 
PDF
CCI2019 - Sistema di controllo del traffico con architettura Big Data
walk2talk srl
 
PPTX
CCI2019 - Governance di una Conversational AI
walk2talk srl
 
PPTX
CCI2019 - SQL Server ed Azure: Disaster Recovery per tutti
walk2talk srl
 
PPTX
CCI2019 - Reagire agli eventi generati dalla propria infrastruttura con Azure...
walk2talk srl
 
PPTX
CCI2019 - What's new in Remote Desktop Services on Windows Server 2019 and Azure
walk2talk srl
 
PPTX
CCI2019 - Teams Direct Routing e servizi fonia avanzati
walk2talk srl
 
PDF
CCI2019 - Microservizi: Idee per un'architettura con al centro l'utente
walk2talk srl
 
PPTX
CCI2019i - Implementare Azure Multi-Factor Authentication Lettere dal Fronte
walk2talk srl
 
PPTX
CCI2019 - Monitorare SQL Server Senza Andare in Bancarotta
walk2talk srl
 
PPTX
CCI2019 - Architecting and Implementing Azure Networking
walk2talk srl
 
PPTX
CCI2019 - Teams e lo Shadow IT
walk2talk srl
 
CCI 2019 - SQL Injection - Black Hat Vs White Hat
walk2talk srl
 
CCI 2019 - Exploiting Custom Vision SDK in Python to create an efficient imag...
walk2talk srl
 
CCI 2019 - Come ottimizzare i propri workload su Azure
walk2talk srl
 
CCI 2019 - Exchange 2019 da 0 ad HA in 1 ora
walk2talk srl
 
CCI 2019 - PowerApps for Enterprise Developers
walk2talk srl
 
CCI 2019 - Architettare componenti in SPFx, esperienze sul campo
walk2talk srl
 
CCI 2019 - Step by step come attivare un servizio voce in MS Teams
walk2talk srl
 
CCI 2019 - Strumenti Azure per l'Anomaly Detection in ambito Industria 4.0
walk2talk srl
 
CCI2019 - I've got the Power! I've got the Shell!
walk2talk srl
 
CCI2019 - Sistema di controllo del traffico con architettura Big Data
walk2talk srl
 
CCI2019 - Governance di una Conversational AI
walk2talk srl
 
CCI2019 - SQL Server ed Azure: Disaster Recovery per tutti
walk2talk srl
 
CCI2019 - Reagire agli eventi generati dalla propria infrastruttura con Azure...
walk2talk srl
 
CCI2019 - What's new in Remote Desktop Services on Windows Server 2019 and Azure
walk2talk srl
 
CCI2019 - Teams Direct Routing e servizi fonia avanzati
walk2talk srl
 
CCI2019 - Microservizi: Idee per un'architettura con al centro l'utente
walk2talk srl
 
CCI2019i - Implementare Azure Multi-Factor Authentication Lettere dal Fronte
walk2talk srl
 
CCI2019 - Monitorare SQL Server Senza Andare in Bancarotta
walk2talk srl
 
CCI2019 - Architecting and Implementing Azure Networking
walk2talk srl
 
CCI2019 - Teams e lo Shadow IT
walk2talk srl
 
Ad

Recently uploaded (20)

PDF
Python basic programing language for automation
DanialHabibi2
 
PDF
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
PPTX
MSP360 Backup Scheduling and Retention Best Practices.pptx
MSP360
 
PPTX
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
PPTX
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
PDF
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
PDF
SFWelly Summer 25 Release Highlights July 2025
Anna Loughnan Colquhoun
 
PPTX
Top iOS App Development Company in the USA for Innovative Apps
SynapseIndia
 
PDF
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
PDF
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PPTX
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
PPTX
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
PDF
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
PPTX
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
PDF
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
PDF
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
PPT
Interview paper part 3, It is based on Interview Prep
SoumyadeepGhosh39
 
PDF
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
PPTX
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
Python basic programing language for automation
DanialHabibi2
 
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
MSP360 Backup Scheduling and Retention Best Practices.pptx
MSP360
 
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
SFWelly Summer 25 Release Highlights July 2025
Anna Loughnan Colquhoun
 
Top iOS App Development Company in the USA for Innovative Apps
SynapseIndia
 
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
Interview paper part 3, It is based on Interview Prep
SoumyadeepGhosh39
 
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 

CCI2017 - Considerations for Migrating Databases to Azure - Gianluca Sartori

  • 3. e #cloudconferenceitalia Gianluca Sartori Independent SQL Server consultant SQL Server MVP, MCTS, MCITP, MCT Works with SQL Server since version 7 DBA @ Scuderia Ferrari Blog: spaghettidba.com Twitter: @spaghettidba
  • 4. e #cloudconferenceitalia • Cloud Options • Analyze Compatibility • Migrate Databases • Optimize and Adjust Agenda
  • 7. e #cloudconferenceitalia IaaS – SQL Server on Azure VM Features • Infrastructure as a Service • Hardware and Hypervisor maintained by Microsoft • SQL Server license included • BYOL • Pay per-minute • Pay for premium storage (SSD: P10, P20, P30) Suitable for: • Lift and Shift migrations with minimal changes • Resources to maintain the VM and SQL instance • Admin rights needed • Customizable HA/DR
  • 9. e #cloudconferenceitalia PaaS –Azure SQL Database Features • Platform as a Service / Database as a Service • Hardware, OS and SQL Server maintained by Microsoft • Automated backups • Built-in HA/DR (geo-redundancy) • Pay per hour, per service tier and performance level • Pay for data transfer Suitable for: • New applications • SaaS app providers • Up to 4TB databases • Scale-out options • Single database / non OS dependent applications
  • 10. e #cloudconferenceitalia PaaS –Azure Managed Instance Features • Platform as a Service • Hardware, OS and SQL Server maintained by Microsoft • Automated backups • Built-in HA/DR (geo-redundancy) Suitable for: • Lift and shift migrations • Applications that need instance-level features • Cross-database queries • SQL Agent • SQLCLR • Not yet released – private preview
  • 11. e #cloudconferenceitalia • Represents relative power (resources) assigned to a database • CPU • Memory • I/O • Not an absolute unit measure • Useful for comparison between tiers and performance levels • Represents resources, not performance • DTU Calculator can help estimate the needs PaaS - DTUs : Database Transaction Units
  • 13. e #cloudconferenceitalia Basic Service Tier PERFORMANCELEVEL BASIC Max DTUs 5 Max database size 2 GB Max in-memory OLTPstorage N/A Max concurrent workers(requests) 30 Max concurrent logins 30 Max concurrent sessions 300 Suitable for: • Applications that hit the database very infrequently • Tiny databases
  • 14. e #cloudconferenceitalia PERFORMANCELEVEL S0 S1 S2 S3 Max DTUs 10 20 50 100 Max database size 250 GB 250 GB 250 GB 250 GB Max in-memory OLTPstorage N/A N/A N/A N/A Max concurrent workers(requests) 60 90 120 200 Max concurrent logins 60 90 120 200 Max concurrent sessions 600 900 1200 2400 Standard Service Tier Suitable for: • Applications with limited performance requirements • Mid-sized databases
  • 15. e #cloudconferenceitalia Premium Service Tier Suitable for: • Applications with high performance requirements • Large databases PERFORMANCELEVEL P1 P2 P4 P6 P11 P15 Max DTUs 125 250 500 1000 1750 4000 Max database size 500 GB 500 GB 500 GB 500 GB 4 TB 4 TB Max in-memory OLTPstorage 1GB 2 GB 4 GB 8 GB 14 GB 32 GB Max concurrent workers(requests) 200 400 800 1600 2400 6400 Max concurrent logins 200 400 800 1600 2400 6400 Max concurrent sessions 30000 30000 30000 30000 30000 30000
  • 16. e #cloudconferenceitalia Premium RS Service Tier Suitable for: • Applications with high I/O demands, but not the highest availability guarantees • ETL, demos, reconstructable data PERFORMANCELEVEL PRS1 PRS2 PRS4 PRS6 Max DTUs 125 250 500 1000 Max database size 500 GB 500 GB 500 GB 500 GB Max in-memory OLTPstorage 1GB 2 GB 4 GB 8 GB Max concurrent workers(requests) 200 400 800 1600 Max concurrent logins 200 400 800 1600 Max concurrent sessions 30000 30000 30000 30000
  • 17. e #cloudconferenceitalia Features in Service Tiers FEATURE BASIC STANDARD PREMIUM PREMIUM RS Backup retention 7 days 35 days 35 days 35 days Active geo-replication Supported Supported Supported Supported Number of local replicas 3 3 3 2 In-memory OLTP - - From 1to 32 GB From 1to 8 GB Columnstore Indexes - - Supported Supported
  • 18. e #cloudconferenceitalia • Resource limits are shared on the whole pool • Auto-Scale 0 20 40 60 80 100 120 09:00 10:00 11:00 12:00 13:00 14:00 15:00 16:00 17:00 18:00 19:00 20:00 21:00 22:00 4 databases DB1 DB2 DB3 DB4 Combined eDTUs 0 20 40 60 80 100 120 140 09:00 10:00 11:00 12:00 13:00 14:00 15:00 16:00 17:00 18:00 19:00 20:00 21:00 22:00 16 databases Combined eDTUs Elastic Database Pools 0 10 20 30 40 50 60 70 80 90 100 09:00 10:00 11:00 12:00 13:00 14:00 15:00 16:00 17:00 18:00 19:00 20:00 21:00 22:00 DTUs
  • 20. e #cloudconferenceitalia Azure SQL Database limitations • Connectivity and authentication • No Windows Authentication (Azure AD is supported, with limitations) • TCP/IP on port 1433 only • SQL Server Agent / Jobs • No SQL Server Agent jobs (on-premises only) • Elastic jobs can replace SQL Server Agent • Collation Support • Fixed Collation (default SQL_Latin1_General_CP1_CI_AS) • Naming Requirements • Restricted usernames (admin, administrator, guest, root, sa, ‘’) • Queries • No cross-database queries • No references to system databases or instance-level features
  • 21. e #cloudconferenceitalia • Several methods to check compatibility • SSDT • SQLPACKAGE • SSMS • DMA How to check compatibility
  • 22. e #cloudconferenceitalia . • Create New Project • Import application-scoped objects only • Start the import • Target Platform to Microsoft Azure SQL Database V12 • Build • Error List Check compatibility with SSDT
  • 23. e #cloudconferenceitalia • Open a command prompt and change a directory containing sqlpackage.exe • Execute the following SqlPackage command • Open the output file and review the compatibility errors Check compatibility with SQLPACKAGE
  • 24. e #cloudconferenceitalia Check Compatibility with SSMS • Open the latest version of SSMS and connect to your database • Export Data-tier Application • Save to a BACPAC file • Skip exporting data • Compatibility issues appear – click on error
  • 25. e #cloudconferenceitalia Check Compatibility with DMA . • Download and open Data Migration Assistant (DMA) • Create a new Assessment Project with Azure SQL Database Target • Connect to local instance • Select the source database(s) • Verify Compatibility Report
  • 27. e #cloudconferenceitalia • Compatibility issues must be fixed before proceeding with the SQL Server Database migration. • A wide variety of compatibility issues • Use the following resources • SQL Server database features not supported in Azure SQL Database • Discontinued Database Engine Functionality in SQL Server 2016 • Discontinued Database Engine Functionality in SQL Server 2014 • Discontinued Database Engine Functionality in SQL Server 2012 • Discontinued Database Engine Functionality in SQL Server 2008 R2 Fix Database Migration Compatibility Issues
  • 29. e #cloudconferenceitalia • SSMS migration wizard • Export / Import with BACPAC • SSMS • Azure Portal • Powershell • SQLPACKAGE • Export / Import with BACPAC + BCP • Data Migration Assistant • Transactional Replication Migration methods
  • 30. e #cloudconferenceitalia SSMS Migration Wizard • Deploy Database to Microsoft Azure SQL Database • Connect to your Azure SQL Database Server • Specify Azure Database Settings • Complete the Wizard
  • 32. e #cloudconferenceitalia Export/Import with BACPAC File • Export Data-Tier Application • Save to local or Azure Storage • Connect to your Azure SQL Database server • Import Data-tier Application • Import from local disk or Azure Storage • Specify Database Settings
  • 33. e #cloudconferenceitalia Export/Import with BACPAC File and BCP Used for much larger databases to achieve greater parallelization for increases performance Migrate the schema and the data separately • Export the schema only to a BACPAC file. • Import the schema only from the BACPAC File into SQL Database. • Use BCP to extract the data into flat files and then parallel load these files into Azure SQL Database.
  • 35. e #cloudconferenceitalia Data Migration Assistant • Create a new migration project • Select the source server • Select the target – your Azure Logical Server • Select the objects to migrate • Script & deploy schema • Specify Database Settings
  • 37. e #cloudconferenceitalia Transactional Replication • Used to have minimal downtime during migration • Configure your Azure SQL Database as a subscriber • All changes to your data or schema show up in your Azure SQL Database • Synchronization is complete – change connection string of your application • Remove Replication
  • 39. e #cloudconferenceitalia • Use a high database performance level • Use SqlPackage • Disable the indexes and constraints • Disable auto-statistics • Drop indexed views, recreate once finished • Do not migrate unnecessary data • Fire multiple simultaneous bcp executions Speed up the import process
  • 40. e #cloudconferenceitalia • If you use BACPACs, create your storage account in the same region as your Azure SQL Database • BACPAC files must be saved to standard Azure Blob Storage, not premium storage • Create an empty database in advance • Make sure you have enough CPU capacity for BACPAC compression • Use AZCopy to copy your BACPAC faster Useful tips!
  • 41. e #cloudconferenceitalia • Performance levels have different TEMPDB capacities • Most impacting – Read-Committed Snapshot Isolation (RCSI) • Monitor tempdb usage Monitor your tempdb space
  • 42. e #cloudconferenceitalia • Performance levels have different Transaction Log capacities • Recovery model full (it is not possible to change it) • Avoid long running transactions (use –b option) • Review the transaction log usage • Transaction Log Backup are done by Azure SQL Platform every 5 mins Monitor your Transaction Log
  • 43. e #cloudconferenceitalia Summary • For smaller databases, web-based applications, and specifically new development, Azure SQL Database may be appropriate • SQL Server 2016 on Azure VM may be more appropriate for existing applications, and more cost-effective for larger databases, even with an Enterprise license • Some important on-premises features are not available in Azure SQL Database • Tools can help you identify incompatible features • Tools can help you in the migration process