migrating sql workload to azure · •azure webjobs •azure sql elastic job (s0 tier and higher)...

16
Migrating SQL Workload to Azure Marek Chmel Microsoft MVP: Data Platform Microsoft MCSE: Data Management & Analytics Certified Ethical Hacker

Upload: others

Post on 16-Aug-2020

34 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Migrating SQL Workload to Azure · •Azure Webjobs •Azure SQL Elastic Job (S0 tier and higher) •Azure Automation •Azure Functions •On-premise SQL or Azure VM SQL Server with

Migrating SQL Workload to Azure Marek ChmelMicrosoft MVP: Data PlatformMicrosoft MCSE: Data Management & AnalyticsCertified Ethical Hacker

Page 2: Migrating SQL Workload to Azure · •Azure Webjobs •Azure SQL Elastic Job (S0 tier and higher) •Azure Automation •Azure Functions •On-premise SQL or Azure VM SQL Server with

Options to run SQL Server database

Microsoft SQL Server 2017

on-premise

Microsoft SQL Server 2017

Azure VM

Azure SQL Database

Azure DB Elastic PoolManagedInstance

Azure SQL DW

Page 3: Migrating SQL Workload to Azure · •Azure Webjobs •Azure SQL Elastic Job (S0 tier and higher) •Azure Automation •Azure Functions •On-premise SQL or Azure VM SQL Server with

Migration Preparation

Page 4: Migrating SQL Workload to Azure · •Azure Webjobs •Azure SQL Elastic Job (S0 tier and higher) •Azure Automation •Azure Functions •On-premise SQL or Azure VM SQL Server with

Limitations

• Assess current environment – many services and patterns don’t work

• Several common services are missing• SQL Server Agent

• Azure Webjobs• Azure SQL Elastic Job (S0 tier and higher)• Azure Automation• Azure Functions• On-premise SQL or Azure VM SQL Server with Agent

• SSIS• Azure Data Factory

• SSAS• Azure Analysis Services

• SSRS• PowerBI• Iaas SQL VM with SSRS

Page 5: Migrating SQL Workload to Azure · •Azure Webjobs •Azure SQL Elastic Job (S0 tier and higher) •Azure Automation •Azure Functions •On-premise SQL or Azure VM SQL Server with

More limitations

• Azure SQL DB is a PaaS offering, you can‘t manage SQL Server instance• Cross-database queries

• System views

• Server roles

• DB file management

• Common SQL Server backup

Page 6: Migrating SQL Workload to Azure · •Azure Webjobs •Azure SQL Elastic Job (S0 tier and higher) •Azure Automation •Azure Functions •On-premise SQL or Azure VM SQL Server with

Testing for compatibility

SSDT SQLPACKAGE

SSMS DMA

Page 7: Migrating SQL Workload to Azure · •Azure Webjobs •Azure SQL Elastic Job (S0 tier and higher) •Azure Automation •Azure Functions •On-premise SQL or Azure VM SQL Server with

SSDT

• Use most recent compatibility rules to detect SQL Database V12 incompatibilities

• Import database schema, build a project for a SQL Database V12 deployment

• Corrections can be synchronized back to source database

Page 8: Migrating SQL Workload to Azure · •Azure Webjobs •Azure SQL Elastic Job (S0 tier and higher) •Azure Automation •Azure Functions •On-premise SQL or Azure VM SQL Server with

SqlPackage

• Command-line tool

• Generates report of compatibility issues

• Always check to make sure you have latest version!

Page 9: Migrating SQL Workload to Azure · •Azure Webjobs •Azure SQL Elastic Job (S0 tier and higher) •Azure Automation •Azure Functions •On-premise SQL or Azure VM SQL Server with

SQL Server Management Studio (SSMS)

• Export Data Tier Application in SSMS

• Detects and reports errors to screen

• If no errors detected, you can proceed with migration to Azure SQL Database

• Incompatibilities can be corrected using SSMS

Page 10: Migrating SQL Workload to Azure · •Azure Webjobs •Azure SQL Elastic Job (S0 tier and higher) •Azure Automation •Azure Functions •On-premise SQL or Azure VM SQL Server with

Data Migration Assistant (DMA)

• Replaced SQL Server 2016 Upgrade Advisor Preview

• Standalone tool

• Delivers scenarios to help reduce effort to upgrade

• Can recommend performance and reliability improvements

Page 11: Migrating SQL Workload to Azure · •Azure Webjobs •Azure SQL Elastic Job (S0 tier and higher) •Azure Automation •Azure Functions •On-premise SQL or Azure VM SQL Server with

Correcting Compatibility Issues

• Once you have identifiedthe compatibility issues, youcan start fixing thosedirectly in the source database to make the DB compatible for migration to Azure SQL DB.

Page 12: Migrating SQL Workload to Azure · •Azure Webjobs •Azure SQL Elastic Job (S0 tier and higher) •Azure Automation •Azure Functions •On-premise SQL or Azure VM SQL Server with

Migrating Schema and Data

Page 13: Migrating SQL Workload to Azure · •Azure Webjobs •Azure SQL Elastic Job (S0 tier and higher) •Azure Automation •Azure Functions •On-premise SQL or Azure VM SQL Server with

Migration with SSMS

Page 14: Migrating SQL Workload to Azure · •Azure Webjobs •Azure SQL Elastic Job (S0 tier and higher) •Azure Automation •Azure Functions •On-premise SQL or Azure VM SQL Server with

Transactional Replication

• Decreases downtime for migration

• Requries primary keys for each published table

• Complicated setup, distribution database requried, Publisher and Subscriber configuration, jobs on the servers & monitoring

• Supported Publisher : SQL Server 2016+, SQL Server 2014 SP1 CU3, SQL Server 2012 SP2 CU8

Page 15: Migrating SQL Workload to Azure · •Azure Webjobs •Azure SQL Elastic Job (S0 tier and higher) •Azure Automation •Azure Functions •On-premise SQL or Azure VM SQL Server with

Migrating from Azure SQL Database

Page 16: Migrating SQL Workload to Azure · •Azure Webjobs •Azure SQL Elastic Job (S0 tier and higher) •Azure Automation •Azure Functions •On-premise SQL or Azure VM SQL Server with

Summary