2
About Me Cloud Solution Architect (Data & AI), Microsoft
Previously, Senior Program Manager (SQL Tiger Team)
10 Years
@talktosavjani
http://www.sqlserverfaq.net
https://blogs.msdn.microsoft.com/sql_server_team/
https://blogs.msdn.microsoft.com/sqlreleaseservices/
https://www.slideshare.net/talktosavjani
Agenda
• Why Azure SQL Database?
• Migration Workflow
• Migration Tools & Services
• Introduction to Azure SQL Database Managed Instance
Digital Disruption - Every company is a software
company
5
The overall database market in 2016 was valued at $33B
with RDBMS accounting for 95%.
RDBMS Market Size
Total RDBMS Revenue: $31.2B
2016 RDBMS Market Size By Revenue
By Region, On-Premises, Cloud Native, & Cloud VM, Billions of USD
On-Premise:
93%
Cloud:
7%
$0.7 $0.2
Americas
$15.3 $4.8$9.0
$0.4
$0.5 $0.3 $0.1
$16.5 $5.1$9.6
On-Premises
Cloud: VM
Cloud: Native
EMEA APAC
What does the future hold?
2017 Cloud Migration Survey Report - Cloudendure
Preliminary IDC Hosted Dedicated Private Cloud Services Forecast (4Q2014)
Dev can focus on the app
Database as a Service Evolution
Intelligent DBaaS capabilitiesAzure SQL Database Service
DBaaS v2.0 - Intelligent Database Service
- Platform manages all aspects of running and tuning the DB
Authentication
Azure Active
Directory
Scheduled
Integration with Azure Ecosystem
Manage
performance
Monitoring and
alerting
Load-balance
databases
Handle fluctuating
aggregate workload
Handle intense isolated
tenant workload
Catalog tenants
and databases
Manage extended
tenant meta dataConnect app to
tenant database
Provision database
and schema
Pre-provision databases to reduce
tenant onboarding latency
Manage
schema change
Scheduled
Reactive
Recover tenant data
after tenant error
BCDR
Restore from geo-
redundant backup
Geo-replicate dbs for
fastest recovery
Tenant self
service
Cross-Tenant
Analytics
Managed recovery of
tenants at scale
Tenant self service
Query across tenant
databases
Extract and analyze
tenant data
SQL DW
SQL DB + ColumnStore
Elastic Jobs
Manage schema
versioning via catalog
Monitor app and
data layer
Reactive
Pro-active
Elastic Pools
Elastic database client library,
Shard Management schema
ARM template,
bacpac
Geo-restore
GeoDR, AutoDR
Auto-provision
databases
PITR
Portal + OMS
Azure Automation +
ARM templates
Geo-distributed
tenant dbs
PowerBI
Elastic
Jobs
Elastic Query
Browse
tenants
Azure SQL
Database
Active/active cross-
replication
Pro-active
Azure Automation
Search
Azure Search
Azure SQL DB
Migration Journey
Data Migration workflow
Application pattern
Legacy - Distributed SOA - Single / Multi-Tenant
Discover Assess Convert
#1 #3 #4 #5
#1 #3 #4 #5
#1 #2 #3 #4 #5
Legacy SQL Server Instance
Assess and Convert
1. Assess and identify issues
2. Fix issues
3. Convert and
deploy schema
Discover Assess Convert
DMA
Data Migration Assessment
• Demo
14
Common Challenges
SQL PaaS Unsupported Data Types : NTEXT and TEXT columns
needed to be converted to nvarchar(max)
SQL Agent Jobs : Need to be converted to elastic Jobs or hosted
in IaaS SQL.
External Tables : Cross database joins are not supported. Create
external tables and remove the 3 part references(e.g.
[dbo].[database].[table]) to make the schema compatible.
UTC Dates : Custom date function using AT TIME ZONE in all table
defaults, Stored Procedures, functions etc.. to report time in
regional format.
NTEXT -> varchar
-- Change TEXT to VARCHAR(MAX)
ALTER TABLE billing_schedule ALTER COLUMN description varchar(max)
NULL
ALTER TABLE billing_schedule ALTER COLUMN notes varchar(max) NULL
ALTER TABLE contract ALTER COLUMN notes varchar(max) NULL
ALTER TABLE contract ALTER COLUMN warnings varchar(max) NULL
Cross database transactions
CREATE MASTER KEY ENCRYPTION BY PASSWORD = 'strongpassword';
GO
CREATE DATABASE SCOPED CREDENTIAL [ebhDataServiceCred] WITH IDENTITY = 'username',
SECRET = 'strongpassword';
GO
CREATE EXTERNAL DATA SOURCE [ebhDataService] WITH
(TYPE = RDBMS,
LOCATION = 'yourserver.database.windows.net',
DATABASE_NAME = 'YourExternalDatabase',
CREDENTIAL = ebhDataServiceCred,
)
GO
EXEC sp_execute_remote @data_source_name = N'ebhDataService', @stmt = @cmd;
GO
Custom date function
CREATE FUNCTION getlocaldate()
returns DATETIME
as
begin
DECLARE @D AS datetimeoffset
SET @D = CONVERT(datetimeoffset, getdate()) AT TIME ZONE 'Eastern
Standard Time';
SELECT CONVERT(datetime, @D);
end
18
Application
Compatibility Scripts
19
Application compatibility
Application downtime
Migration effort
Migration Challenges
Discover, Assess and Refactor App and SQL
4+ Months of Engineering Time
48 Hours…
Introducing
Data Migration Service
+
Azure SQL DB Managed Instance
What is SQL Database Managed Instance?
Unmatched app
compatibility
• Fully-fledged SQL
instance with nearly
100% compat with
on-prem
Unmatched PaaS
capabilities
• Lowest TCO + rich
Azure ecosystem
• Built-in auto
management
Favorable business
model
• Competitive
• Transparent
• Frictionless
A flavor of SQL DB designed to provide
easy migration to fully managed PaaS
SQL Database
(PaaS)
Elastic
Pool
Managed
Instance
Singleton
Full security & isolation
Supports Azure AD authentication (can be
federated with on-premise AD)
SQL Instance #1 SQL Instance #2
IPsec IKE S2S VPN Tunnel Đľn-premisesVPN / Express Route
Gateway
SQL Instance #3
VNet1
VNet-to-VNet
Network isolation
(customer VNET)
Tenant isolation
(compute, storage)
“Virtual data cluster” dedicated to customer
(virtual private cluster, VNET, private IPs)
Web app
(public IP)
Migration Tools & Services
Assess Migrate
datamigrationteam@microsoft.com.
Lift and Shift of on-premises
workload to
Managed Instance
Choosing the right data platform for your workload
One database per app pattern ď‚§ Lift-and-shift rich SQL apps
to PaaS
ď‚§ Cloud born applications ď‚§ Application developed on box
SQL Server
ď‚§ DB-centric programming
model
ď‚§ Tenant isolation / resource
guaranteed at the DB level
• Rich, instance-centric
programming model
• Resource guaranteed/SLA at
Instance-level
ď‚§ Cloud born applications
ď‚§ New multi-tenant SaaS apps
or modernized existing apps
to SaaS
ď‚§ Higher utilization efficiency
with a shared resource model
ď‚§ Resource guaranteed/SLA at
the pool level
Elastic Pool Managed InstanceSingleton

Migrating on premises workload to azure sql database

  • 2.
    2 About Me CloudSolution Architect (Data & AI), Microsoft Previously, Senior Program Manager (SQL Tiger Team) 10 Years @talktosavjani http://www.sqlserverfaq.net https://blogs.msdn.microsoft.com/sql_server_team/ https://blogs.msdn.microsoft.com/sqlreleaseservices/ https://www.slideshare.net/talktosavjani
  • 3.
    Agenda • Why AzureSQL Database? • Migration Workflow • Migration Tools & Services • Introduction to Azure SQL Database Managed Instance
  • 4.
    Digital Disruption -Every company is a software company
  • 5.
    5 The overall databasemarket in 2016 was valued at $33B with RDBMS accounting for 95%. RDBMS Market Size Total RDBMS Revenue: $31.2B 2016 RDBMS Market Size By Revenue By Region, On-Premises, Cloud Native, & Cloud VM, Billions of USD On-Premise: 93% Cloud: 7% $0.7 $0.2 Americas $15.3 $4.8$9.0 $0.4 $0.5 $0.3 $0.1 $16.5 $5.1$9.6 On-Premises Cloud: VM Cloud: Native EMEA APAC
  • 6.
    What does thefuture hold? 2017 Cloud Migration Survey Report - Cloudendure Preliminary IDC Hosted Dedicated Private Cloud Services Forecast (4Q2014)
  • 7.
    Dev can focuson the app Database as a Service Evolution Intelligent DBaaS capabilitiesAzure SQL Database Service DBaaS v2.0 - Intelligent Database Service - Platform manages all aspects of running and tuning the DB
  • 8.
    Authentication Azure Active Directory Scheduled Integration withAzure Ecosystem Manage performance Monitoring and alerting Load-balance databases Handle fluctuating aggregate workload Handle intense isolated tenant workload Catalog tenants and databases Manage extended tenant meta dataConnect app to tenant database Provision database and schema Pre-provision databases to reduce tenant onboarding latency Manage schema change Scheduled Reactive Recover tenant data after tenant error BCDR Restore from geo- redundant backup Geo-replicate dbs for fastest recovery Tenant self service Cross-Tenant Analytics Managed recovery of tenants at scale Tenant self service Query across tenant databases Extract and analyze tenant data SQL DW SQL DB + ColumnStore Elastic Jobs Manage schema versioning via catalog Monitor app and data layer Reactive Pro-active Elastic Pools Elastic database client library, Shard Management schema ARM template, bacpac Geo-restore GeoDR, AutoDR Auto-provision databases PITR Portal + OMS Azure Automation + ARM templates Geo-distributed tenant dbs PowerBI Elastic Jobs Elastic Query Browse tenants Azure SQL Database Active/active cross- replication Pro-active Azure Automation Search Azure Search
  • 9.
  • 10.
  • 11.
    Application pattern Legacy -Distributed SOA - Single / Multi-Tenant Discover Assess Convert #1 #3 #4 #5 #1 #3 #4 #5 #1 #2 #3 #4 #5
  • 12.
    Legacy SQL ServerInstance Assess and Convert 1. Assess and identify issues 2. Fix issues 3. Convert and deploy schema Discover Assess Convert DMA
  • 13.
  • 14.
    14 Common Challenges SQL PaaSUnsupported Data Types : NTEXT and TEXT columns needed to be converted to nvarchar(max) SQL Agent Jobs : Need to be converted to elastic Jobs or hosted in IaaS SQL. External Tables : Cross database joins are not supported. Create external tables and remove the 3 part references(e.g. [dbo].[database].[table]) to make the schema compatible. UTC Dates : Custom date function using AT TIME ZONE in all table defaults, Stored Procedures, functions etc.. to report time in regional format.
  • 15.
    NTEXT -> varchar --Change TEXT to VARCHAR(MAX) ALTER TABLE billing_schedule ALTER COLUMN description varchar(max) NULL ALTER TABLE billing_schedule ALTER COLUMN notes varchar(max) NULL ALTER TABLE contract ALTER COLUMN notes varchar(max) NULL ALTER TABLE contract ALTER COLUMN warnings varchar(max) NULL
  • 16.
    Cross database transactions CREATEMASTER KEY ENCRYPTION BY PASSWORD = 'strongpassword'; GO CREATE DATABASE SCOPED CREDENTIAL [ebhDataServiceCred] WITH IDENTITY = 'username', SECRET = 'strongpassword'; GO CREATE EXTERNAL DATA SOURCE [ebhDataService] WITH (TYPE = RDBMS, LOCATION = 'yourserver.database.windows.net', DATABASE_NAME = 'YourExternalDatabase', CREDENTIAL = ebhDataServiceCred, ) GO EXEC sp_execute_remote @data_source_name = N'ebhDataService', @stmt = @cmd; GO
  • 17.
    Custom date function CREATEFUNCTION getlocaldate() returns DATETIME as begin DECLARE @D AS datetimeoffset SET @D = CONVERT(datetimeoffset, getdate()) AT TIME ZONE 'Eastern Standard Time'; SELECT CONVERT(datetime, @D); end
  • 18.
  • 19.
    19 Application compatibility Application downtime Migrationeffort Migration Challenges Discover, Assess and Refactor App and SQL 4+ Months of Engineering Time 48 Hours…
  • 20.
  • 21.
    What is SQLDatabase Managed Instance? Unmatched app compatibility • Fully-fledged SQL instance with nearly 100% compat with on-prem Unmatched PaaS capabilities • Lowest TCO + rich Azure ecosystem • Built-in auto management Favorable business model • Competitive • Transparent • Frictionless A flavor of SQL DB designed to provide easy migration to fully managed PaaS SQL Database (PaaS) Elastic Pool Managed Instance Singleton
  • 22.
    Full security &isolation Supports Azure AD authentication (can be federated with on-premise AD) SQL Instance #1 SQL Instance #2 IPsec IKE S2S VPN Tunnel оn-premisesVPN / Express Route Gateway SQL Instance #3 VNet1 VNet-to-VNet Network isolation (customer VNET) Tenant isolation (compute, storage) “Virtual data cluster” dedicated to customer (virtual private cluster, VNET, private IPs) Web app (public IP)
  • 23.
    Migration Tools &Services Assess Migrate datamigrationteam@microsoft.com.
  • 24.
    Lift and Shiftof on-premises workload to Managed Instance
  • 25.
    Choosing the rightdata platform for your workload One database per app pattern  Lift-and-shift rich SQL apps to PaaS  Cloud born applications  Application developed on box SQL Server  DB-centric programming model  Tenant isolation / resource guaranteed at the DB level • Rich, instance-centric programming model • Resource guaranteed/SLA at Instance-level  Cloud born applications  New multi-tenant SaaS apps or modernized existing apps to SaaS  Higher utilization efficiency with a shared resource model  Resource guaranteed/SLA at the pool level Elastic Pool Managed InstanceSingleton

Editor's Notes