sql azure from day of azure ii
DESCRIPTION
Deck from Day of Azure II on SQL Azure in San Deigo on Dec 2010TRANSCRIPT
Lynn Langithttp://blogs.msdn.com/SoCalDevGal
twitter - @llangit
Ike Ellishttp://EllisTeam.blogspot.com
twitter - @EllisTeam1
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
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)
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
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
Database Replicas
Replica 1
Replica 2
Replica 3
DB
Single Logical Database
Multiple Physical Replicas
Single Primary
Logical vs. Physical
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
Customer Evidence
Demo – SQL Azure Portal
Demo - Portal for DB (Houston)
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
SQL Azure Database Access
Web Portal(API)
Your App
Change Connection String
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
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
SSMS 2008 R2 – Cloud vs. On Premise
Query Optimizer and Client Statistics can be used with SQL Azure data
Feature not yet implemented Physical layer – Microsoft handles it
Commodity vs. Business Multi-tenant
We must play nice together
Compatibility Overview
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
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
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
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
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
SQL Migration Wizard
What Could Go Wrong?
Progress!
Success!
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
3 month release cycle Active CTPs at sqlazurelabs.com
Roadmap
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
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
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
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
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
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
What’s Your Idea?
Second Hour = DEMOs
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
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)
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
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
Data Sync - Demo
Table Order in Sync
Tracking Objects Created
• Tracking Tables• On Source / on
Destination• Triggers• Stored Procedures
OData Support (Labs) - Demo
ATOM PUB
JSON HTTP
https://www.sqlazurelabs.co
m
Open Data Protocol
Odata Query & Results
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
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
DACPAC – DEMO in SSMS
In SSMS• Extract• Register• Monitor
w/UCPs
In VS 2010• Import• Create
DACPAC – DEMO in VS
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
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
Local and Cloud-Based
No SDK required – simply change connection string from local to cloud copy of DB
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
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
Windows Azure DataMarket
Office 2010 - DEMO
PowerPivotReport Builder
Preview - SQL Azure Reporting
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
SQL Server 2008 R2 Editions
Windows Azure Platform – here Windows Azure Platform Training Kit – here
MSDN Development Center – here Team Blogs – SSDS and SQLAzure
Want to Know More?
Lynn LangitBlog: http://blogs.msdn.com/SoCalDevGalTwitter: @llangit
Ike EllisBlog: http://EllisTeam.blogspot.comtwitter - @EllisTeam1
Contact Me
TeachingKidsProgramming.org
• Do a Recipe Teach a Kid• Free Courseware (recipes)• Ages 10 ++• Microsoft SmallBasic