Introduction to SQL AzureLynn LangitMicrosoft – Developer Evangelisthttp://blogs.msdn.com/SoCalDevGal
Windows Azure PlatformCompute:Virtualized compute environment based on Windows ServerStorage: Durable, scalable, & available storageManagement:   Automated, model-driven management of the serviceDatabase:Relational processing for structured/unstructured dataService Bus: General purpose application busAccess Control:  Rules-driven, claims-based access control
Extending SQL Data Platform to CloudReference DataBusiness IntelligenceData SyncReportingSQL Azure DatabaseSymmetric Programming ModelData Hub AggregationInitial ServicesDatabase – Core SQL Server database capabilities Future ServicesData Sync – Enables the sync framework (soon after PDC)Additional SQL Server capabilities available as a service:  Business Intelligence and ReportingNew services:  Reference Data and Secure Data Hub
Microsoft SQL AzureClear Feedback: “I want a database in the Cloud”Familiar SQL Server relational modelUses existing APIs & toolsFriction free provisioning and reduced managementBuilt for the Cloud with availability and scaleAccessible to all from PHP, Ruby, and JavaFocus on combining the best features of SQL Server running at scale with low friction
The Evolution of SQL AzureEvolvesBrowserApplicationApplicationApplicationBrowserApplicationApplicationODBC, OLEDB, ADO.Net PHP, Ruby, …REST ClientSQL Client*REST ClientCloudCloudWindows AzureREST (Astoria)Web AppADO.Net + EFREST ClientHTTP+RESTHTTP+RESTHTTPTDSHTTPWindows AzureWeb AppSQL Client*Data CenterData CenterTDS + TSQL ModelREST/SOAP + ACE ModelSQL AzureOLD SDS* Client access enabled using TDS for ODBC,    ADO.Net, OLEDB, PHP-SQL, Ruby, …
Database ChoicesValue Props:Full h/w control – size/scale100% compatibilityRoll-your-own HA/DR/scaleValue Props:100% of API surface areaRoll-your-own HA/DR/scaleDedicatedOn-premise SQL Server or other s/w on-premise Resource governance @ machine Security @ DB Server/OSValue Props:Auto HA, Fault-ToleranceFriction-free scaleSelf-provisioningHigh compatibilityResourcesHosted Hosted SQL Server or other Resource governance @ VM Security @ DB Server/OSSQL Azure  (RDBMS)Virtual DB serverResource governance @ LDB Security @ LDBSharedLow“Friction”/ControlHighSQL Azure V1 targets scenarios that live in the lower left quadrant
Scenarios for V1Departmental ApplicationsSimple application built by individual or departmentNeed simple deployment, self-management, IT: “Empowerment and Governance”Web ApplicationsSmall business or startup that uses the cloud as their ITSimple deployment, self-management, scale on demandISVISV hosting software on behalf of customerMulti-tenant support for billing and isolationData Hub (Shortly After V1)Sharing and aggregating of data across tiers and across enterprisesCentralized place for data, high scale, sync with existing data sources
V1 Application TopologiesSQL Azure access from outside MS Datacenter (On-premises – ADO.NET)SQL Azure access from within MS Datacenter (Azure compute – ADO.NET)Application/ BrowserApp Code / ToolsADO.NET Data Svcs/REST - EFHTTP/SSOAP/RESTHTTP/SApp Code(ASP.NET)Windows AzureT-SQL (TDS)T-SQL (TDS)SQL Data ServicesSQL Data ServicesMSDatacenterMSDatacenterCode FarCode Near
Service Provisioning ModelEach account has zero or more serversAzure wide, provisioned in a common portalBilling instrumentEach server has one or more databasesContains metadata about the databases and usageUnit of authenticationUnit of Geo-locationGenerated DNS based nameEach database has standard SQL objectsUnit of consistencyUnit of multi-tenancyContains Users, Tables, Views, Indices, etc.Most granular unit of billing     Account     Server       Database
ArchitectureShared infrastructure at SQL database and belowRequest routing, security and isolationScalable HA technology provides the glueAutomatic replication and failoverProvisioning, metering and billing infrastructureMachine 5Machine 6Machine 4SQL InstanceSQL InstanceSQL InstanceSQL DBSQL DBSQL DBUserDB1UserDB2UserDB3UserDB4UserDB1UserDB2UserDB3UserDB4UserDB1UserDB2UserDB3UserDB4SDS Provisioning (databases,  accounts,  roles, …, Metering, and BillingScalability and Availability: Fabric, Failover, Replication, and  Load balancingScalability and Availability: Fabric, Failover, Replication, and  Load balancing
SQL AzureDeploymentWeb Portal(API)DB ScriptSQL AzureTDS
SQL AzureAccessing databasesWeb Portal(API)Your AppSQL AzureTDSChange Connection String
Database ReplicasSingle DatabaseMultiple ReplicasReplica 1Single PrimaryReplica 2DBReplica 3
Hardware BoundaryHardware BoundaryShared EnvironmentCDBDAHardware BoundaryHardware BoundaryCCBAABD
SQL AzureDatabase Monitoring & RecoveryWeb Portal(API)!Your AppSQL AzureTDS
Programming ModelSmall Data SetsUse a single databaseSame model as on premise SQL ServerLarge Data Sets and/or Massive ThroughputPartition data across many databasesUse parallel fan-out queries to fetch the dataApplication  code must be partition aware in v1For v1 will publish best practices for scale outPost-v1 we are looking at building an abstraction to hide some of the complexities of partitioning
Sharding Databases1 x 10GB database1 Instances10 x 1GB databases10 Instances
SQL Tooling & DevelopmentDemo
Managing your account
Viewing database information
Sample screen – requires VS2010
Compatibility GoalsSupport common application patternsLogical/policy based administrationPatterns work from SQL Server to SQL AzureMulti-tenancy considerationsThrottling and load balancingLimits on DB size, transaction duration, …V1: Address the needs of the majority of web and departmental application
Sample of SQL CompatibilityIn Scope for v1Out of Scope for v1Tables, indexes and viewsStored ProceduresTriggersConstraintsTable variables, session temp tables (#t)…Distributed TransactionsDistributed QueryCLRService BrokerSpatial	Physical server or catalog DDL and views
Connection ModelUse existing client librariesADO.NET, ODBC, PHPClient libraries pre-installed in Azure rolesSupport for ASP.NET controlsClients connect directly to a databaseCannot hop across DBs (no USE)
Logical vs. Physical AdministrationSQL Azure focus on logical administrationSchema creation and managementQuery optimizationSecurity management (Logins, Users, Roles)Service handles physical managementAutomatically replicated with HA “out of box”Transparent failover in case of failureLoad balancing of data to ensure SLADBA role places more focus on logical management
DeploymentSupport for basic deployment optionsSQL scripts work (but not attach database)Geo-location of  Windows Azure compute and SQL Azure DatabasesSupport for Application and multi-server management modelSupport for application packagesCloud or on-premise is a deployment time choiceVisibility of data across on-premise and the cloudSupport existing and new forms of deployment
Security ModelUses regular SQL security modelAuthenticate logins, map to users and rolesAuthorize users and roles to SQL objectsLimited to standard SQL Auth loginsUsername + password Future AD Federation, WLID, etc as alternate authentication protocolsSecurity model is 100% compatible with on-premise SQL
PricingWeb Edition1 GB Database$9.99 / monthBandwidth$0.10 /GB inbound$0.15 /GB outboundBusiness Edition10GB Database$99.99 / monthBandwidth$0.10 /GB inbound$0.15 /GB outboundSpecified by MAXSIZE on CREATE DATABASE command or portal (post-CTP1)Can NOT switch betweenen Web and Business EditionsMonthly billing period
Platform Readiness (EHA)Exchange Hosted Archive (EHA) is high scale archival serviceRuns on SQL Azure infrastructureIn production prior to SQL Azure v1Rebuilt to address cost and scale issueshttp://www.microsoft.com/casestudies/Case_Study_Detail.aspx?CaseStudyID=4000003098Reduced COGS with increased customerand business benefit:Larger scale (e.g. larger customers ~20TB+ each)
More self-managing (e.g. fault-tolerance)
Better query performance for fan-out
Faster provisioning of new customersSQL AzureOpportunities and FuturesPartitioned databasesGeo-location and geo-redundancyDistributed querySecurity w/AD, WLID, etcSupport for multiple levels of hardware and software isolation
Release PlanSQL Azure CTP Commercial Availability (V1)InternalAdoptionSQL Azure Early Adopters SQL Azure Early Adopters CTP  – On-board invitation-only early adoptersSQL Azure CTP  - Register for an invitation codeCommercial Availability with Windows Azure in 2009Sign up for our CTP: http://msdn.microsoft.com/en-us/sqlserver/dataservices/default.aspxPDCMIX ‘09WWPCWWPCTechEd May 09Jul 09Sep 09Apr 09Jun 09Aug 09Oct 09Mar 09Nov 09

SQL Azure

  • 1.
    Introduction to SQLAzureLynn LangitMicrosoft – Developer Evangelisthttp://blogs.msdn.com/SoCalDevGal
  • 2.
    Windows Azure PlatformCompute:Virtualizedcompute environment based on Windows ServerStorage: Durable, scalable, & available storageManagement: Automated, model-driven management of the serviceDatabase:Relational processing for structured/unstructured dataService Bus: General purpose application busAccess Control: Rules-driven, claims-based access control
  • 3.
    Extending SQL DataPlatform to CloudReference DataBusiness IntelligenceData SyncReportingSQL Azure DatabaseSymmetric Programming ModelData Hub AggregationInitial ServicesDatabase – Core SQL Server database capabilities Future ServicesData Sync – Enables the sync framework (soon after PDC)Additional SQL Server capabilities available as a service: Business Intelligence and ReportingNew services: Reference Data and Secure Data Hub
  • 4.
    Microsoft SQL AzureClearFeedback: “I want a database in the Cloud”Familiar SQL Server relational modelUses existing APIs & toolsFriction free provisioning and reduced managementBuilt for the Cloud with availability and scaleAccessible to all from PHP, Ruby, and JavaFocus on combining the best features of SQL Server running at scale with low friction
  • 5.
    The Evolution ofSQL AzureEvolvesBrowserApplicationApplicationApplicationBrowserApplicationApplicationODBC, OLEDB, ADO.Net PHP, Ruby, …REST ClientSQL Client*REST ClientCloudCloudWindows AzureREST (Astoria)Web AppADO.Net + EFREST ClientHTTP+RESTHTTP+RESTHTTPTDSHTTPWindows AzureWeb AppSQL Client*Data CenterData CenterTDS + TSQL ModelREST/SOAP + ACE ModelSQL AzureOLD SDS* Client access enabled using TDS for ODBC, ADO.Net, OLEDB, PHP-SQL, Ruby, …
  • 6.
    Database ChoicesValue Props:Fullh/w control – size/scale100% compatibilityRoll-your-own HA/DR/scaleValue Props:100% of API surface areaRoll-your-own HA/DR/scaleDedicatedOn-premise SQL Server or other s/w on-premise Resource governance @ machine Security @ DB Server/OSValue Props:Auto HA, Fault-ToleranceFriction-free scaleSelf-provisioningHigh compatibilityResourcesHosted Hosted SQL Server or other Resource governance @ VM Security @ DB Server/OSSQL Azure (RDBMS)Virtual DB serverResource governance @ LDB Security @ LDBSharedLow“Friction”/ControlHighSQL Azure V1 targets scenarios that live in the lower left quadrant
  • 7.
    Scenarios for V1DepartmentalApplicationsSimple application built by individual or departmentNeed simple deployment, self-management, IT: “Empowerment and Governance”Web ApplicationsSmall business or startup that uses the cloud as their ITSimple deployment, self-management, scale on demandISVISV hosting software on behalf of customerMulti-tenant support for billing and isolationData Hub (Shortly After V1)Sharing and aggregating of data across tiers and across enterprisesCentralized place for data, high scale, sync with existing data sources
  • 8.
    V1 Application TopologiesSQLAzure access from outside MS Datacenter (On-premises – ADO.NET)SQL Azure access from within MS Datacenter (Azure compute – ADO.NET)Application/ BrowserApp Code / ToolsADO.NET Data Svcs/REST - EFHTTP/SSOAP/RESTHTTP/SApp Code(ASP.NET)Windows AzureT-SQL (TDS)T-SQL (TDS)SQL Data ServicesSQL Data ServicesMSDatacenterMSDatacenterCode FarCode Near
  • 9.
    Service Provisioning ModelEachaccount has zero or more serversAzure wide, provisioned in a common portalBilling instrumentEach server has one or more databasesContains metadata about the databases and usageUnit of authenticationUnit of Geo-locationGenerated DNS based nameEach database has standard SQL objectsUnit of consistencyUnit of multi-tenancyContains Users, Tables, Views, Indices, etc.Most granular unit of billing Account Server Database
  • 10.
    ArchitectureShared infrastructure atSQL database and belowRequest routing, security and isolationScalable HA technology provides the glueAutomatic replication and failoverProvisioning, metering and billing infrastructureMachine 5Machine 6Machine 4SQL InstanceSQL InstanceSQL InstanceSQL DBSQL DBSQL DBUserDB1UserDB2UserDB3UserDB4UserDB1UserDB2UserDB3UserDB4UserDB1UserDB2UserDB3UserDB4SDS Provisioning (databases, accounts, roles, …, Metering, and BillingScalability and Availability: Fabric, Failover, Replication, and Load balancingScalability and Availability: Fabric, Failover, Replication, and Load balancing
  • 11.
  • 12.
    SQL AzureAccessing databasesWebPortal(API)Your AppSQL AzureTDSChange Connection String
  • 13.
    Database ReplicasSingle DatabaseMultipleReplicasReplica 1Single PrimaryReplica 2DBReplica 3
  • 14.
    Hardware BoundaryHardware BoundarySharedEnvironmentCDBDAHardware BoundaryHardware BoundaryCCBAABD
  • 15.
    SQL AzureDatabase Monitoring& RecoveryWeb Portal(API)!Your AppSQL AzureTDS
  • 16.
    Programming ModelSmall DataSetsUse a single databaseSame model as on premise SQL ServerLarge Data Sets and/or Massive ThroughputPartition data across many databasesUse parallel fan-out queries to fetch the dataApplication code must be partition aware in v1For v1 will publish best practices for scale outPost-v1 we are looking at building an abstraction to hide some of the complexities of partitioning
  • 17.
    Sharding Databases1 x10GB database1 Instances10 x 1GB databases10 Instances
  • 18.
    SQL Tooling &DevelopmentDemo
  • 19.
  • 20.
  • 22.
    Sample screen –requires VS2010
  • 24.
    Compatibility GoalsSupport commonapplication patternsLogical/policy based administrationPatterns work from SQL Server to SQL AzureMulti-tenancy considerationsThrottling and load balancingLimits on DB size, transaction duration, …V1: Address the needs of the majority of web and departmental application
  • 25.
    Sample of SQLCompatibilityIn Scope for v1Out of Scope for v1Tables, indexes and viewsStored ProceduresTriggersConstraintsTable variables, session temp tables (#t)…Distributed TransactionsDistributed QueryCLRService BrokerSpatial Physical server or catalog DDL and views
  • 26.
    Connection ModelUse existingclient librariesADO.NET, ODBC, PHPClient libraries pre-installed in Azure rolesSupport for ASP.NET controlsClients connect directly to a databaseCannot hop across DBs (no USE)
  • 27.
    Logical vs. PhysicalAdministrationSQL Azure focus on logical administrationSchema creation and managementQuery optimizationSecurity management (Logins, Users, Roles)Service handles physical managementAutomatically replicated with HA “out of box”Transparent failover in case of failureLoad balancing of data to ensure SLADBA role places more focus on logical management
  • 28.
    DeploymentSupport for basicdeployment optionsSQL scripts work (but not attach database)Geo-location of Windows Azure compute and SQL Azure DatabasesSupport for Application and multi-server management modelSupport for application packagesCloud or on-premise is a deployment time choiceVisibility of data across on-premise and the cloudSupport existing and new forms of deployment
  • 29.
    Security ModelUses regularSQL security modelAuthenticate logins, map to users and rolesAuthorize users and roles to SQL objectsLimited to standard SQL Auth loginsUsername + password Future AD Federation, WLID, etc as alternate authentication protocolsSecurity model is 100% compatible with on-premise SQL
  • 30.
    PricingWeb Edition1 GBDatabase$9.99 / monthBandwidth$0.10 /GB inbound$0.15 /GB outboundBusiness Edition10GB Database$99.99 / monthBandwidth$0.10 /GB inbound$0.15 /GB outboundSpecified by MAXSIZE on CREATE DATABASE command or portal (post-CTP1)Can NOT switch betweenen Web and Business EditionsMonthly billing period
  • 31.
    Platform Readiness (EHA)ExchangeHosted Archive (EHA) is high scale archival serviceRuns on SQL Azure infrastructureIn production prior to SQL Azure v1Rebuilt to address cost and scale issueshttp://www.microsoft.com/casestudies/Case_Study_Detail.aspx?CaseStudyID=4000003098Reduced COGS with increased customerand business benefit:Larger scale (e.g. larger customers ~20TB+ each)
  • 32.
    More self-managing (e.g.fault-tolerance)
  • 33.
  • 34.
    Faster provisioning ofnew customersSQL AzureOpportunities and FuturesPartitioned databasesGeo-location and geo-redundancyDistributed querySecurity w/AD, WLID, etcSupport for multiple levels of hardware and software isolation
  • 35.
    Release PlanSQL AzureCTP Commercial Availability (V1)InternalAdoptionSQL Azure Early Adopters SQL Azure Early Adopters CTP – On-board invitation-only early adoptersSQL Azure CTP - Register for an invitation codeCommercial Availability with Windows Azure in 2009Sign up for our CTP: http://msdn.microsoft.com/en-us/sqlserver/dataservices/default.aspxPDCMIX ‘09WWPCWWPCTechEd May 09Jul 09Sep 09Apr 09Jun 09Aug 09Oct 09Mar 09Nov 09
  • 36.
    Key TakeawaysSQL Azureavailable – PDC ’09Integrated part of the SQL Data PlatformLeverage you existing SQL Server knowledge and toolsSQL Azure is the data platform of the Windows Azure Platform
  • 37.
    Want to KnowMore?Windows Azure Platformhttp://www.azure.com/Windows Azure Platform Training Kithttp://www.microsoft.com/downloads/details.aspx?FamilyID=413E88F8-5966-4A83-B309-53B7B77EDF78&displaylang=enMSDN Development Centerhttp://msdn.microsoft.com/en-us/sqlserver/dataservicesTeam Bloghttp://blogs.msdn.com/ssds

Editor's Notes

  • #19 The step-by-step demo script for this demo is included in the Azure Services Training Kit. DEMO SCRIPT: Connecting to SQL AzureDEMO SCRIPT: Creating Objects in SQL Azure