SQL Server 2014 Hybrid Cloud Features

33
SQL Server 2014 Hybrid Cloud Features Guillermo Caicedo [email protected] sqltitan.com @sqltitan

description

 

Transcript of SQL Server 2014 Hybrid Cloud Features

Page 1: SQL Server 2014 Hybrid Cloud Features

SQL Server 2014 Hybrid Cloud FeaturesGuillermo [email protected]@sqltitan

Page 2: SQL Server 2014 Hybrid Cloud Features

Agenda• Microsoft Data Platform Overview• Setting things up

• Cloud Basics and Benefits• Azure

• Azure Storage• SQL Server 2014 Hybrid Cloud Features

Page 3: SQL Server 2014 Hybrid Cloud Features

Off-PremisesOn-Premises Data CenterPrivateCLOUD

TraditionalNON-VIRTUALIZED

SQL Server in a Azure VM

SQL Database service

HDInsightTablesBlobs

SQL Server on Windows Server

APS Appliance

SQL Server in a Windows

Server VMPower BI

SQL Server in a Windows

Server VM

Office 365

Azure Service ProviderCLOUD

Hadoop on Windows Server

Objective: Simplify Cloud Adoption

Page 4: SQL Server 2014 Hybrid Cloud Features

Complete & Consistent Data Platform

Dev Ops Tools Identity VirtualizationManagement Tools

Single-Vendor Support

Off-PremisesOn-Premises Data CenterPrivateCLOUD

TraditionalNON-VIRTUALIZED

Office 365

Azure Service ProviderCLOUD

Page 5: SQL Server 2014 Hybrid Cloud Features

Cloud FundamentalsInfrastructure as a Service (IaaS): basic compute and storage resources

On-demand serversAzure VM, Amazon EC2, VMWare vCloud

Platform as a Service (PaaS): cloud application infrastructure

On-demand application-hosting environmentE.g. Azure SQL Database/Web Sites/Cloud Services, Google AppEngine, Salesforce.com

Software as a Service (SaaS): cloud applicationsOn-demand applicationsE.g. Office 365, GMail consume

build

hosts

Page 6: SQL Server 2014 Hybrid Cloud Features

SQL Server Cloud Continuum

Low Control

Shar

edLo

wer c

ost

Dedi

cate

dHi

gher

cos

t

High Control

Hybrid Cloud

Physical

Virtual

PaaSSaaS

IaaS

On premises

Off premisesSQL ServerPhysical Machines (raw iron)

SQL Server Private CloudVirtualized Machines+ Appliances

SQL Server in WA VMVirtualized Machines

Virtualized DatabasesWA SQL Database

Page 7: SQL Server 2014 Hybrid Cloud Features

The Benefits of the Cloud

= Managed for You StandaloneServers IaaS PaaS SaaS

ApplicationsRuntimesDatabaseOperating SystemVirtualizationServerStorageNetworking

Page 8: SQL Server 2014 Hybrid Cloud Features

SQL Server 2014 Hybrid Cloud• Prerequisites

• Azure Storage Account• Connectivity

• Backup DB to Azure• Backup Encryption• Managed backup DB to Azure• Backup DB to Azure tool• Deploy DB to Azure VM wizard• SQL Server data files in Azure storage

Page 9: SQL Server 2014 Hybrid Cloud Features

Azure StorageThe goal is to allow users and applications to

Access their data efficiently from anywhere at anytime Store data for any length of time Scale to store any amount of data Be confident that the data will not be lost Pay for only what you use/store

Page 10: SQL Server 2014 Hybrid Cloud Features

Azure Storage AccountUser creates a globally unique storage account name

Receive a 256 bit secret key when creating accountProvides security for accessing the store

Use secret key to create a HMAC SHA256 signature for each requestUse signature to authenticate request at serverAccount

Blob Table Queue

Page 11: SQL Server 2014 Hybrid Cloud Features

Blob Storage Concepts

ContainerAccount

prpass

backups

vhds

Blob

DB001.BAK

DB002.BAK

VM001.VHD

Page 12: SQL Server 2014 Hybrid Cloud Features

Blob NamespaceBlob URL

http://<Account>.blob.core.windows.net/<Container>/<BlobName>

Example: Account – prpassContainer – backupsBlobName – client001/sales/DB001.BAK

URL: http://prpass.blob.core.windows.net/backups/client001/sales/DB001.BAK

BlobContainerAccount

prpass

backups

DB001.BAK

DB002.BAK

vhds VM001.VHD

Page 13: SQL Server 2014 Hybrid Cloud Features

Configure Azure Connectivity Storage Access Keys Publishing Profile Settings Management Credentials SQL Server Credential

Prerequisites

Page 14: SQL Server 2014 Hybrid Cloud Features

Azure Publish Settings FileRun Windows PowerShell as an administrator as follows:

1.Choose Start, in the Search box, type Windows Powershell.2.Right-click the Windows PowerShell link, and then choose Run as administrator.

At the Windows PowerShell command prompt, type the following command, and then press Enter.

Get-AzurePublishSettingsFile

A web browser opens at https://windows.azure.com/download/publishprofile.aspx for signing in to Windows Azure.

Sign in to the Windows Azure Management Portal, and then follow the instructions to download your Windows Azure publishing settings. Save the file as a .publishsettings type file to your computer.

Page 15: SQL Server 2014 Hybrid Cloud Features

Management Certificatemakecert -sky exchange -r -n "CN=[CertificateName]" -pe -a sha1 -len 2048 -ss My "[CertificateName].cer"

certmgr.msc

Page 16: SQL Server 2014 Hybrid Cloud Features

SQL Server Credential• Record that contains the authentication information (credentials)

required to connect to a resource outside SQL Server.

--==================================-- Create Credential-- Authenticate with Azure Storage Account--==================================CREATE CREDENTIAL TitanCloudWITH IDENTITY = 'titanazurestorage',SECRET = ‘<storageaccesskey>';

Page 17: SQL Server 2014 Hybrid Cloud Features

CREATE CREDENTIAL mystoragecredWITH IDENTITY = ‘mystorage',SECRET = ‘<your storage access key>  BACKUP DATABASE mydb TO URL ='https://mystorage.blob.core.windows.net/backup-container/mydb-20130411.bak'WITH CREDENTIAL = ‘mystoragecred', FORMAT, COMPRESSION, STATS = 5,MEDIANAME = ‘mydb backup 20130411', MEDIADESCRIPTION = 'Backup of mydb'

SQL Server supports backups to and restores from URL/Azure Blob storage service (UI, T-SQL, PowerShell commandlets) Main benefit: Take advantage of Azure Blob storage

Flexible, reliable (3-copies geo-DR), and limitless off-site storageNo need of backup media managementNo overhead of hardware management

Backup DB to Azure

using Microsoft.SqlServer.Management.Smo;……Backup mybackup = new Backup();

mybackup.CredentialName = strCredential;mybackup.Database = strDatabase;mybackup.CompressionOption = BackupCompressionOptions.On;mybackup.Devices.AddDevice(desturl, DeviceType.Url);mybackup.SqlBackup(myLocalServer);

$url = "https://[storage].blob.core.windows.net/backups/db.bak" $credential = "mycredential" $server = "SQLSERVER:\SQL\[computer]\DEFAULT" CD $server Backup-SqlDatabase -Database AdventureWorks2012

-backupFile $url -SqlCredential $credential -CompressionOption On

Page 18: SQL Server 2014 Hybrid Cloud Features

Increase security of backups stored separate from the instance (another environment such as the Cloud) Encryption keys can be stored on-premises while backup files in the cloud Support non-encrypted databases (don’t need to turn on Transparent Data Encryption anymore) Different policies for databases and their backups

Backup Encryption

Page 19: SQL Server 2014 Hybrid Cloud Features

Demo

Backup DB to Azure

Page 20: SQL Server 2014 Hybrid Cloud Features
Page 21: SQL Server 2014 Hybrid Cloud Features

Managed Backup DB to Azure•An agent that manages and automates SQL Server backup policy

• Main benefit• Large scale management and no need to manage backup

policy• Context-aware – e.g. workload/throttling• Minimal knobs – control retention period• Manage whole instance, or particular DBs

• Leverage Backup to Windows Azure• Inherently off-site• Geo-redundant• Minimal storage costs• Zero hardware management

Example:EXEC smart_admin.sp_set_db_backup @database_name='TestDB', @storage_url=<storage url>, @retention_days=30, @credential_name='MyCredential', @enable_backup=1

Page 22: SQL Server 2014 Hybrid Cloud Features

Demo

Managed Backup DB to Azure

Page 23: SQL Server 2014 Hybrid Cloud Features

Backup DB to Azure Tool Stand-alone Tool that adds backup to Windows Azure capabilities and backup encryption to prior versions of SQL Server

BenefitsOne Cloud Backup strategy across prior versions of SQL Server including 2005, 2008, and 2008 R2Adds backup encryption to prior versions, locally or in the cloudTakes advantage of backup to AzureEasy configurationSSMS reports single backup completion status for local storage and Azure Storage

http://www.microsoft.com/en-us/download/details.aspx?id=40740

Page 24: SQL Server 2014 Hybrid Cloud Features

Demo

Backup DB to Azure Tool

Page 25: SQL Server 2014 Hybrid Cloud Features

SQL Server Backup to Azure Capabilities

Page 26: SQL Server 2014 Hybrid Cloud Features

Deploy DB to Azure VM Wizard• Main benefits

• Easy to use• Perfect for DBAs new to Azure

and for ad hoc scenarios• Complexity hidden

• Detailed Azure knowledge is not needed

• Almost no overhead: the defining factor for time to transfer is DB size

Page 27: SQL Server 2014 Hybrid Cloud Features

Demo

Deploy DB to Azure VM Wizard

Page 28: SQL Server 2014 Hybrid Cloud Features
Page 29: SQL Server 2014 Hybrid Cloud Features

Benefits of the SSMS Wizard• No Windows Azure knowledge required to

use • Multiple retry/recovery points• Not overwriting or updating existing data• Scalable for up to 1TB databases• Performance proportional to network

bandwidth/latency

Page 30: SQL Server 2014 Hybrid Cloud Features

SQL Server Data Files in Azure Storage•Ability to move data & log files in Windows Azure Storage, while keeping the compute node of SQL Server on-premise

•Transparent Data Encryption (TDE) is supported

Main benefits• No application changes required• Centralized copy of data and log files • Enjoy unlimited storage capacity in Azure Storage

(built in HA, SLA, geo-DR)• Secure because TDE encryption key can be stored

on-premise• Restore database is simply an attach operation

Page 31: SQL Server 2014 Hybrid Cloud Features

Demo

SQL Server Data Files in Azure Storage

Page 32: SQL Server 2014 Hybrid Cloud Features

Questions?

Page 33: SQL Server 2014 Hybrid Cloud Features

prpass.orgtwitter.com/prpassfacebook.com/prpass