63
Lynn Langit http://blogs.msdn.com/SoCa lDevGal twitter - @llangit Ike Ellis http://EllisTeam.blogspot. com twitter - @EllisTeam1

SQL Azure from Day of Azure II

Embed Size (px)

DESCRIPTION

Deck from Day of Azure II on SQL Azure in San Deigo on Dec 2010

Citation preview

Page 1: SQL Azure from Day of Azure II

Lynn Langithttp://blogs.msdn.com/SoCalDevGal

twitter - @llangit

Ike Ellishttp://EllisTeam.blogspot.com

twitter - @EllisTeam1

Page 2: SQL Azure from Day of Azure II

Windows Azure Platform

Compute: Virtualized compute environment

Storage: Durable, scalable, & available storage

Management: Automated, model-driven

management

Database: Relational processing for

structured/unstructured data – Data Marketplace

Service Bus: General purpose application bus

Access Control: Rules-driven, claims-based

access control

Page 3: SQL Azure from Day of Azure II

Data Storage ChoicesR

eso

urc

es

Dedicated

Shared

Low High“Friction”/Control

SQL Azure (RDBMS) Virtual DB server

Resource governance @ LDB

Security @ LDBAuto HA, Fault-ToleranceSelf-provisioningHigh RDMS

compatibility

Hosted Hosted SQL Server or

other Roll-your-own HA/DR/scale Security @ DB Server/OS

On-premise SQL Server or other s/w on-

premise Resource governance @ machine Full h/w control – 100%

compatibilityRoll your own HA/DR/scale

Windows Azure Storage

Tables Queues Blobs (also

VMs)

Page 4: SQL Azure from Day of Azure II

Storage Comparison

SQL Azure Tables Fully structured Strongly typed Relational (RDMS) Highly scalable

Windows Azure Tables Semi-structured Loosely typed Non-Relational (Not RDMS) Massively scalable

Page 5: SQL Azure from Day of Azure II

Application Topologies

Application/ Browser

App Code

(ASP.NET)

App Code(ASP.NET)

TS

QL T

DS

SQL Azure

WindowsAzure

Code Near

App code/ Tools

SQL Azure

Code Far

Hybrid D

ata

Syn

c

SQL Azure

SQL Server App code/ Tools

App Code

(ASP.NET)

App Code(ASP.NET)

T-S

QL /

TD

S

TS

QL T

DS

WindowsAzure

Page 6: SQL Azure from Day of Azure II

Database Replicas

Replica 1

Replica 2

Replica 3

DB

Single Logical Database

Multiple Physical Replicas

Single Primary

Page 7: SQL Azure from Day of Azure II

Logical vs. Physical

Page 8: SQL Azure from Day of Azure II

SQL Azure focus on logical administration Schema creation and management Query optimization Security management (Logins, Users, Roles)

Service handles physical management Automatically replicated with HA “out of box” Transparent failover in case of failure Load balancing of data to ensure SLA

Logical vs. Physical Administration

DBA role places more focus on logical management

Page 9: SQL Azure from Day of Azure II

Customer Evidence

Page 10: SQL Azure from Day of Azure II

Demo – SQL Azure Portal

Page 11: SQL Azure from Day of Azure II

Demo - Portal for DB (Houston)

Page 12: SQL Azure from Day of Azure II

Each account has zero or more servers Azure wide, provisioned in a common portal Billing instrument

Each server has one or more databases Contains metadata about the databases and usage Unit of authentication Unit of Geo-location Generated DNS based name

Each database has standard SQL objects Unit of consistency Unit of multi-tenancy Contains Users, Tables, Views, Indices, etc. Most granular unit of billing

Service Provisioning Model

Account

Server

Database

Page 13: SQL Azure from Day of Azure II

SQL Azure Database Access

Web Portal(API)

Your App

Change Connection String

Page 14: SQL Azure from Day of Azure II

Use ADO.NET, ODBC, PHP (NOT OLE DB) Client libraries pre-installed in Azure roles Support for ASP.NET controls

Clients connect directly to a database Cannot hop across DBs (no USE) May need to include <login>@<server> Use familiar tools (sqlcmd, osql, SSMS, etc) Use connection pooling for efficiency

SSMS 2008 R2 can connect http

://blogs.msdn.com/ssds/archive/2009/11/11/9921041.aspx

Connection Model

Page 15: SQL Azure from Day of Azure II

Connecting to SQL Azure with SSMS 2008 R2

Houston Client – Silverlight (Portal)

SQLCMD – can also be used SSIS – can also be used SSRS/SSIS/SSAS – w/SQL

Azure as source data – use R2 versions

Demo – Connect via tools

Page 16: SQL Azure from Day of Azure II

SSMS 2008 R2 – Cloud vs. On Premise

Page 17: SQL Azure from Day of Azure II

Query Optimizer and Client Statistics can be used with SQL Azure data

Page 18: SQL Azure from Day of Azure II

Feature not yet implemented Physical layer – Microsoft handles it

Commodity vs. Business Multi-tenant

We must play nice together

Compatibility Overview

Page 19: SQL Azure from Day of Azure II

Maximum single database size is 50GB Database size calculation

Includes: primary replica data, objects and indexes Does NOT include: logs, master database, system tables,

server catalogs or additional replicas Announced CTP support for auto-partitioning & fan-out

queries (Federation) Currently must handle partitioning logic within the

application Also called Database ‘sharding’ Sharding Utility, using TPL at

http://enzosqlshard.codeplex.com/

Database Size Limits

Page 20: SQL Azure from Day of Azure II

Compatibility

In Scope

• Tables, indexes and views• w/ clustered indices

• Stored Procedures• Triggers• Constraints• Table variables • Session temp tables• Spatial datatype

Out of Scope

• Distributed Transactions• Distributed Query• CLR• Service Broker•Physical server or catalog DDL and views

Page 21: SQL Azure from Day of Azure II

Tables (joins) , Views , Stored Procedures, Triggers

Indices Index Management Statistics Management

Spatial data Local Transactions

Supported T-SQL

T-SQL elements Reserved keywords Create/drop databases Create/alter/drop tables Create/alter/drop users

and logins Constants, Constraints,

Cursors, Local temporary tables

Table Variables

Page 22: SQL Azure from Day of Azure II

CLR Database file

placement Database mirroring Distributed queries Distributed

transactions Filegroup

management Full Text Search

Unsupported T-SQL

Global temporary tables

SQL Server configuration options

SQL Server Service Broker

System tables Profiler / Trace Flags

Page 23: SQL Azure from Day of Azure II

Generating, then modifying, the SQL DDL script

Loading in the data (bcp, SSIS, etc…)-OR- SQL Azure Migration Wizard

http://sqlazuremw.codeplex.com

Demo – SQL Migration Wizard

Page 24: SQL Azure from Day of Azure II

SQL Migration Wizard

Page 25: SQL Azure from Day of Azure II

What Could Go Wrong?

Page 26: SQL Azure from Day of Azure II

Progress!

Page 27: SQL Azure from Day of Azure II

Success!

Page 28: SQL Azure from Day of Azure II

Remove unsupported features, such as…

Migrating By Hand

USE DATABASE ON PRIMARY

(Filegroups) Extended Properties NOT FOR REPLICATION

Various Index options (WITH) Windows logins Unsupported XML features Remove DEFAULT NEWSEQUENTIALID() Encrypted Stored Procedures No Heap tables (all tables must have clustered indices) UDTs

Page 29: SQL Azure from Day of Azure II

3 month release cycle Active CTPs at sqlazurelabs.com

Roadmap

Page 30: SQL Azure from Day of Azure II

Added new Dynamic Management Views (DMVs) Allows return of state information for health monitoring &

performance tuning sys.dm_exec_connections , _requests , _sessions,

_tran_database_transactions, _active_transactions, _partition_stats

Added ability to move between Web or Business edition ALTER DATABASE database_name { MODIFY (MAXSIZE = {1 | 10}

GB) }

Increased idle session conn timeout (from 5 to 30 minutes) Improves experience while using connection pooling and other

interactive tools

Improved long running transaction algorithm Allows import and export of much larger amounts of data without

having to chunk your data

Added - Feb 2010

Page 31: SQL Azure from Day of Azure II

Added availability in 20 more countries (now 41 total) Complete list here Started with 21 countries, now doubled

Added support for MARS Simplifies the design process

Added support for ALTER (rename) Database Adds features found in RDMS to SQL Azure

Included support in Visual Studio 2010 to manage SQL Azure Allows direct management of SQL Azure databases via Server

Explorer Also found in SQL Server Management Studio

Added new labs feature - sandbox https://www.sqlazurelabs.com/

Added - April 2010

Page 32: SQL Azure from Day of Azure II

Added upper size limit of 50 GB Available June 28, 2010 Initial discount on upgrading maximum size

Added support for Spatial Data Types Support for Geography & Geometry data types and queries Support for HierarchyID data types (tree-like database structures)

Added support DataSync Service for SQL Azure Initially available in CTP via sqlazurelabs.com

Announced SQL Server Web Manager Web-based SQL Azure management tool Initially available as CTP in summer 2010

Added Access 10 support for SQL Azure Support from Office 2010 to SQL Azure

Added - June 2010

Page 33: SQL Azure from Day of Azure II

Added Database copy capabilities Same server or cross server CREATE DATABASE DB2A AS COPY OF Server1.DB1A Monitor via sys.dm_database_copies

Increased MSDN documentation for common programming scenarios (with code examples)

Enhanced Project Houston Supported in multiple data centers View and StoredProc designers added

Added - August 2010

Page 34: SQL Azure from Day of Azure II

Improved Portal at sql.azure.com Enhanced Houston (Silverlight) portal

Connected to main Azure portal Announced Betas

SQL Azure Reporting Services SQL Azure Federation SQL Azure Data Sync v 2

Added - Nov 2010

Page 35: SQL Azure from Day of Azure II

SQL Web Management and Administration (SWA) Partitioning Utility in CTP soon (Federation) Profiler-like traces / deadlock graphs Geo-location and geo-redundancy Distributed query Security w/Active Directory, Windows Live ID, etc Support for multiple levels of hardware and software

isolation BI features – SSRS, SSIS, SSAS

Opportunities and Futures

Page 36: SQL Azure from Day of Azure II

What’s Your Idea?

Page 37: SQL Azure from Day of Azure II

Second Hour = DEMOs

Page 38: SQL Azure from Day of Azure II

Pricing

Edition WEB BUSINESS Bandwidth

Max 1 GB $ 9.99 / month n/a 10 cents/GB in 15 cent/GB out *higher in Asia (see notes)

Max 5 GB $ 49.95 / month

n/a same

Max 10 GB n/a $ 99.99 / month same

Max 20 GB n/a $ 199.98 / month same

Max 30 GB n/a $ 299.97 / month same

Max 40 GB n/a $ 399.96 / month same

Max 50 GB n/a $ 499.95 / month same

Page 39: SQL Azure from Day of Azure II

Data Migration Tools Wizards

SQL Azure Migration Wizard (CodePlex) – here Migration Assistant for Access or for MySQL – here or here Import/Export Wizard Generate Script Wizard

Copy Database command CREATE DATABASE DB2A AS COPY OF Server1.DB1A

Other Tools SSIS BCP DataSync (CTP) OData (CTP)

Page 40: SQL Azure from Day of Azure II

COPY Database (same or different servers) CREATE DATABASE destination_database_name

AS COPY OF [source_server_name.]source_database_name

CREATE DATABASE Database2A AS COPY OF Server1.Database1A

Check via DMV Progress sys.dm_database_copies

Database COPY and DEMO

Page 41: SQL Azure from Day of Azure II

SQL Azure Data Sync Service

• Scale-out read or read/write

• Geo replication of data• Edge network data

distribution• Content delivery

networks

Sync Group

SQL Azur

e

SQL Server

SQL Azur

eOn-Premises Applications

Page 42: SQL Azure from Day of Azure II

Data Sync - Demo

Page 43: SQL Azure from Day of Azure II

Table Order in Sync

Page 44: SQL Azure from Day of Azure II

Tracking Objects Created

• Tracking Tables• On Source / on

Destination• Triggers• Stored Procedures

Page 45: SQL Azure from Day of Azure II

OData Support (Labs) - Demo

ATOM PUB

JSON HTTP

https://www.sqlazurelabs.co

m

Open Data Protocol

Page 46: SQL Azure from Day of Azure II

Odata Query & Results

Page 47: SQL Azure from Day of Azure II

Data-tier Application Components

Data-tier Application Component (DAC)

New unit of deployment for T-SQL appsSupports Install, Uninstall, and in the future Upgrade and RepairContains developer intent as policies.

Data-tier Application Component

Schema

LOGICALTables, Views, Constraints,

SProcs, UDFs,

PHYSICALUsers, Logins,

Indexes

Future - DAC Deployment Profile

Deployment Requirements, Management Policies, Failover

Policies

Unit o

f Deplo

ym

ent

Page 48: SQL Azure from Day of Azure II

DAC Pack = Single unit (Package) for authoring, deploying, and managing the data-tier objects through the development lifecycle

Development Lifecycle (VS 2010) - editing DACs Schema and DB Code Development, Code Analyses, Deployment Policy Settings, Schema Comparison and more… Building DACs – the self contained database package

Management Lifecycle (SSMS 2008 R2) – managing DACs Registering existing database as DACs Deploying and Upgrading databases using DACs,

DAC (Data-tier Application) Packages

Page 49: SQL Azure from Day of Azure II

DACPAC – DEMO in SSMS

In SSMS• Extract• Register• Monitor

w/UCPs

In VS 2010• Import• Create

Page 50: SQL Azure from Day of Azure II

DACPAC – DEMO in VS

Page 51: SQL Azure from Day of Azure II

Scenario/Tool SSMA Generate Script Wizard

DACs SSIS BCP

MySql or Access to SQL Azure

√ (Schema

and Data)

√ (Data Only)

Move SQL Server Schema

√ √ √

Move Data √ √ √

Move Large Data √ √

Summary– Database Migration

Page 52: SQL Azure from Day of Azure II

Custom applications Can use Windows Azure – not required Can connect via any client with valid

connection string Microsoft applications

Connectivity into Office applications Excel, Excel PowerPivot, SharePoint, etc…

Connectivity into BI applications SSRS, SSIS, SSAS

Application Integration

Page 53: SQL Azure from Day of Azure II

Local and Cloud-Based

No SDK required – simply change connection string from local to cloud copy of DB

Page 54: SQL Azure from Day of Azure II

Simple – just change the connection string! All compatibility requirements must be met (T-SQL) in

the DDL Create destination DB schema and populate with data Firewall rules set up via SQL Azure portal (test

connectivity) Nothing to install, no SDK required

SQL Azure application

Page 55: SQL Azure from Day of Azure II

Office 2010 Excel Excel Power Pivot SharePoint

SQL Server 2008 SQL Server Reporting Services Report Builder 3.0 SQL Server Integration Services SQL Server Analysis Services

Visual Studio 2010 Server Explorer Entity Framework DACPAC

Windows Azure Marketplace DataMarket

Microsoft Application Integration

Page 56: SQL Azure from Day of Azure II

Windows Azure DataMarket

Page 57: SQL Azure from Day of Azure II

Office 2010 - DEMO

PowerPivotReport Builder

Page 58: SQL Azure from Day of Azure II

Preview - SQL Azure Reporting

Page 59: SQL Azure from Day of Azure II

Database Engine

Relational Data

Management

Replication

Full Text Search

Integration Services

ETL Processing

Data Profiling

StreamInsight*

Complex Event

Processing

Analysis Services

Classic OLAP Data Manageme

nt

Data Mining

PowerPivot* Self Service

Analytics

Reporting Services

Managed Reporting

Self Service

Reporting

Embedded Reporting

Master Data

Services*

Master Data

Management

Page 60: SQL Azure from Day of Azure II

SQL Server 2008 R2 Editions

Page 61: SQL Azure from Day of Azure II

Windows Azure Platform – here Windows Azure Platform Training Kit – here

MSDN Development Center – here Team Blogs – SSDS and SQLAzure

Want to Know More?

Page 62: SQL Azure from Day of Azure II

Lynn LangitBlog: http://blogs.msdn.com/SoCalDevGalTwitter: @llangit

Ike EllisBlog: http://EllisTeam.blogspot.comtwitter - @EllisTeam1

Contact Me

Page 63: SQL Azure from Day of Azure II

TeachingKidsProgramming.org

• Do a Recipe Teach a Kid• Free Courseware (recipes)• Ages 10 ++• Microsoft SmallBasic