migrate to azure sql database - crayon · o query performance insight ... detach and copy to azure...

16
Migrate SQL Server to Azure Thomas Bjørvåg TSP Data Platform [email protected]

Upload: tranthuy

Post on 16-Apr-2018

247 views

Category:

Documents


7 download

TRANSCRIPT

Migrate SQL Server to Azure

Thomas BjørvågTSP Data [email protected]

Data platformHybrid Cloud

On premises

SharedLower cost

Dedicated Higher cost

Higher administration Lower administration

Off premises

Infrastructure as a service (IaaS)

100 % compatibility with SQL Server

Full control

Pay-as you-go

SLA of 99,95 %

SQL Server in Azure VM

SQL Database ServiceA relational database as a service, fully managed by Microsoft.

For cloud-designed apps when near-zero administration and enterprise-grade capabilities are key.

Perfect for cloud architects and developers looking for programmatic DBA-like functionality.

Intelligent capabilities• Built-in performance monitoring

with intelligent advisors helps reduce troubleshooting time

• The Azure management portal exposes real-time metrics

• Azure SQL Database includes Intelligent advisors:

o Index Advisor

o Query Performance Insight

o Threat Detection

o Query Store

Scalable performance, no downtime

• With one mouse click or a single API call, scale up the apps’ resources to accommodate growth periods or peak workload demand

• Rescale the resource needs of your application with no database downtime and no application rewrites

• Pay only for the performance you need, when you need it

• Get guaranteed resources for your databases so that users get a predictable performance experience

• Get up to 30X performance gains with In-Memory OLTP

• Get real time insights and 100x performance gains with In-Memory Analytics

SQL Database service tiers (single DB model)

*The 99.99% availability SLA does not apply to the existing Web and Business editions, which will continue to be supported at 99.9% availability.

Built For

Available SLA

Max Storage

Business Continuity

Security

Performance Objectives

Database Transaction Units (DTUs)

Available Tiers ($/Month) and GA Price

Point-in-time Restore (“oops” Recovery)

BASIC PREMIUMSTANDARD

P1S0

Light transactional workloads Medium transactional workloads Heavy Transactional Workloads

99.99%*

2 GB 250 GB 500 GB

Any point within 7 days Any point within 14 days Any point within 35 days

Geo-restore, Active geo-replication, up to four readable secondary backups

Always Encrypted, Transparent Data Encryption, Azure Active Directory authentication, Auditing, row-level security, dynamic data masking

Transactions per hour Transactions per minute Transactions per second

5

$4.99

S1 S2 S3 P2 P4 P6 P11

10 20 50 100

$15 $30 $75 $150

125 250 500 1,000 1,750

$465 $930 $1,860 $3,720 $7,001

1 TB

Migration from on-premises installationsYou have to test!

Switching between levelsUse userdb.sys.dm_db_resource_stats

Query tuningsys.dm_exec_query_stats

sys.dm_exec_query_sql_text()

sys.dm_exec_query_plan

sys.dm_exec_requests

sys.dm_exec_sessions

Choosing performance levels

Azure SQL Database vs VMs

Eliminates hardware costs

BEST FOR…

TCO BENEFITSEliminates hardware costs Reduces administrative costs

SQL Server in a VM Azure SQL Database

RESOURCES

Extend Active Directory Domain, AlwaysOnAvailability Groups, transactional replication

HYBRID CLOUDExtend Active Directory Domain, StretchDB, transactional replication

You can build high availability and disaster recovery solutions

BUSINESS CONTINUITY Built-in fault tolerance, high availability, and disaster recovery

You need a customized IT environment with full administrative rights

You need built-in high availability, disaster recovery, and upgrade mechanisms

Migration tools

Deploy database wizard in SSMS < 1 TB

Backup to URL and restore from URL

Deploy database to Microsoft Azure SQL database-Small to medium databases

SQL Server Data Tools in Visual Studio

SQL Server in a VM Azure SQL Database

Detach and copy to Azure blob storage and attach to VM

On-premise backup and manually copy files Export/Import Data Tier Application Wizard-Medium to large databases

Transactional replication

AlwaysOn, add replica in Azure

Transactional Replication

SQL Azure Migration Wizard

Migrate an on-premises SQL Server database to Azure SQL Database (v12)

Get near-complete engine compatibility with SQL Server 2014*

Simplify migration:

Straightforward migration for the majority of databases

Requires few or no changes to schema

No re-engineering of applications**

Migrating to Azure SQL Database (v12)

Migration methodologiesMethod 1 Method 2 Method 3

TargetDB

Azure SQL Database

SQL Server

SSMS

2. Import

1. DeployOR

.bacpac

1. Export

Source DB

TargetDB

Azure SQL Database

SQL Server

SQL Azure

Migration

Wizard2. Execute

1. Generate

T-SQL

Source DB

TargetDB

Azure SQL Database

SQL Server

SSMS

6.

Export/

Import

or Deploy

SQL

Azure

Migrati

on

Wizard

4. Copy

CopyDB

Source DB

5. Publish

1. ImportVisual

Studio

Database

Project

2. Transform

3. Edit, Build

& Test

*.sql

4. Publish (schema only)

Migrate a compatible database using SSMS

Migrate a near-compatible database using SAMW

Update the database schema offline using Visual Studio and SAMW, and then deploy it with SSMS

Migrate a compatible database using SSMS

Use SSMS to deploy to Azure SQL Database

Use SSMS to export a BACPAC and then import it to Azure SQL Database

Method 1

TargetDB

Azure SQL Database

SQL Server

SSMS

2. Import

1. DeployOR

.bacpac

1. Export

Source DB

Method 2

TargetDB

Azure SQL Database

SQL Server

SQL Azure

Migration Wizard

2. Execute

1. Generate

T-SQL

Migrate a near-compatible database using SAMW

Provision a new database

Analyze and migrate a database with SAMW

Fix errors reported by SAMW

Deploy database to Azure SQL Database using SAMW

Source DB

Update the database schema offline using Visual Studio and SAMW, and then deploy it with SSMS

Create a new database project using SSDT

Import your database into the project

Select the target database as Azure SQL Database v12 preview

Generate the scripts

Process the scripts using SAMW

Correct any errors reported by SAMW and deploy the scripts to Azure SQL Database

Method 3

TargetDB

Azure SQL Database

SQL Server

SSMS

6.

Export/Import

or Deploy

SQL

Azure

Migration

Wizard

4. Copy

CopyDB

Source DB

5.

Publish

1. ImportVisual

Studio

Database

Project

2. Transform

3. Edit,

Build & Test

*.sql

4. Publish (schema only)

DEMO