Presentation is loading. Please wait.

Presentation is loading. Please wait.

Michael Epprecht IT Pro Evangelist Microsoft

Similar presentations


Presentation on theme: "Michael Epprecht IT Pro Evangelist Microsoft"— Presentation transcript:

1 Michael Epprecht IT Pro Evangelist Microsoft Corporation michael.epprecht@microsoft.commichael.epprecht@microsoft.comtwitter: @fastflame

2 Developer Experience Use existing Skills and Tools Windows Azure Platform Internet

3 Microsoft Azure Data Centers World Wide Regional hosting locations 200ms Latency from 2 regional hosting locations South Central US North Central US North Europe Southeast Asia Central Europe Hosting locations within 100ms of the customer At least one hosting location can be reached within 100ms, but not two No points to test from or greater than 200ms latency Asia Pacific

4 Where to start? SQL Azure Overview http://www.microsoft.com/sqlazure SQL Azure Portal http://sql.azure.com

5 SQL Azure = SQL Server? SELECT @@VERSION Microsoft SQL Azure Microsoft SQL Azure (RTM) - 10.25.9445.0 Sep 16 2010 18:49:35 Copyright (c) 1988-2009 Microsoft Corporation Microsoft SQL Server Microsoft SQL Server 2008 (SP1) - 10.0.2531.0 (X64) Mar 29 2009 10:11:52 Copyright (c) 1988- 2008 Microsoft Corporation Express Edition (64- bit) on Windows NT 6.1 (Build 7601: Service Pack 1, v.178)

6 Application Topologies SQL Azure access from within MS Datacenter (Azure compute) SQL Azure Access from outside MS Datacenter (On-premises) SQL Azure Access from within and outside MS Datacenter (On-premises & Azure Compute) Application/ Browser SOAP/RESTHTTP/S Astoria/REST - EDM HTTP/S App Code (ASP.NET) App Code (ASP.NET) App Code (ASP.NET) App Code (ASP.NET) T-SQL (TDS) SQL Azure WindowsAzure Code Near App code/ Tools T-SQL (TDS) SQL Azure WindowsAzure Code Far Hybrid SQL Azure Data Sync Data Sync WindowsAzure SQL Azure SQL Server App code/ Tools App Code (ASP.NET) App Code (ASP.NET) App Code (ASP.NET) App Code (ASP.NET) T-SQL (TDS)

7 SQL Azure offering Web Edition CHF 10.989 per database up to 1GB per month CHF 54.945 per database up to 5GB per month Business Edition CHF 109.989 per database up to 10GB per month CHF 219.978 per database up to 20GB per month CHF 329.967 per database up to 30GB per month CHF 439.956 per database up to 40GB per month CHF 549.945 per database up to 50GB per month SQL Azure SLA http://go.microsoft.com/fwlink/?LinkId=159706http://go.microsoft.com/fwlink/?LinkId=159706 Source: http://www.microsoft.com/windowsazure/offers/popup/popup.aspx?lang=en&locale=de-CH&offer=COMPARE_PUBLIChttp://www.microsoft.com/windowsazure/offers/popup/popup.aspx?lang=en&locale=de-CH&offer=COMPARE_PUBLIC Data Transfers North America and Europe CHF 0.11 per GB in CHF 0.165 per GB out

8 Lap Around SQL Azure

9 SQL Azure Network Topology Application Load Balancer TDS (tcp:1433) Applications use standard SQL client libraries: ODBC, ADO.Net, … Load balancer forwards ‘sticky’ sessions to TDS protocol tier Data Node Gateway Scalability and Availability: Fabric, Failover, Replication and Load balancing

10 Tools SQL Server Management Studio 2008 R2 (SSMS) DB Design Web/Silverlight Interface - Project Houston https://www.sqlazurelabs.com/houston.aspx https://www.sqlazurelabs.com/houston.aspx SQLCMD 3 rd Party tools Most 3 rd Party tools for SQL Server work with SQL Azure

11 Connection Management Connections may drop due to: Network connectivity blips Idle or long running transactions Idle > 30 minutes Long running transactions > 30 minutes Throttling (taking too many resources) Measured by IO load and CPU utilization Database failover activity Machine failure: automatic recovery Load balancing used to ensure ‘resource fairness’ DOS protection may deny connectivity: If too many failed connection attempts are made The servers running your databases are not impacted by such attacks

12 Limitations (1) Maximum DB Size 50GB Consider Sharding SQL Server Agent Mail Full Text Search Filestream Unsupported T-SQL, DMV, System Objects. See BOL Profiler

13 Limitations (2) Backup/Restore as we know it (CREATE DATABASE … AS COPY OF) Analysis Services Reporting Services

14 Error Messages http://technet.microsoft.com/en- us/library/ff394106.aspx Error Codes 40000-41000 +Reason Codes for Throttling

15 Maintenance DBA is Database Administrator, no longer Server and Installation guy DB Design Index Maintenance DB copies Consultant to the business

16 No Maintenance = ExtraCost DB space allocated is billed for Fragmentation = space allocated Fragmentation = CHF CHF CHF (or $ $ $) Re-Index is important ALTER INDEX ON REBUILD WITH (ONLINE=ON) Example: Before: 32 594MB (31.83GB) After: 26 406MB (25.78GB)

17 Migration to SQL Azure

18 What works just out of the box? Application Data Access TierJust WorksYour Mileage May Vary Data Access APIs Support ADO.Net, ODBC, EF and PHP OleDB Security Model SQL AuthWindows Auth Connection Management Apps with transaction retry logic, 3-tiered, stateless or partially statefull apps Legacy Apps 2 tiered apps with online connections Admin and Programmability Surface Support Tables, Views, Sprocs, Functions, Triggers, built-in data types etc Server level options, FTS, Service Broker, Distributed Transactions Collation Behavior Apps explicit with collation options apps depending on special db/server collation defaults

19 SQL Azure Migration Tool http://sqlazuremw.codeplex.com/ Scenario: Migration of schema and/or data with fine grain control. Pros SQL Azure Compatibility Analysis Uses high performance APIs SMO and BCP Built in retry and chunking First try clustered index creation Create batch scripts (great for Test & QA) Cons BCP data stored on local file system Not a full SQL Engine TSQL Parser NOT Supported by Microsoft

20 Management Studio – Generate Script Wizard Scenario: Migration of schema and/or data with fine grain control Pros Native support for SQL Azure Schema options: “Engine Type = SQL Azure” Ensures correct options and settings are applied for the TSQL script generation Requires explicit action on unsupported objects. Cons Verbose – INSERT Statements instead of raw data Data is scripted with a fixed 100 row batch size. Edit “GO” statements between small batches Round-trip Efficiency Use “SET NOCOUNT ON”

21 DAC (Data-tier Application) Packages Scenario: Self contained package for moving schema easily through the development lifecycle Pros SQL Azure Object compatibility Analysis Deployment via Management Studio Supports DB lifecycle Cons No Data Scripting, only schema

22 Use the right tools for data movement BCP & Bulk Copy APIs Scenario: High speed programmable data import and export Best Practices Optimize Databases for Data Import Disable/Delay creation of Non-Clustered Indexes Order Data on the Clustered Index Disable Triggers and Constraint checking -N Native mode so no data type conversion needed. -c Character mode for interoperability -b batchsize will let you control transaction size -h”TABLOCK, ORDER(…)” optimize writes

23 Use the right tools for data movement SSIS – Best of Breed Data Transformation Utility Scenario: Design Surface – Data Flow Tasks Diverse Source and destinations To/From Flat Files, ADO.Net, OleDB Fully programmable flow Loops, Sorts, Conditional operators, XML/WebServices Processing etc VS Debugging support with data viewers, watches and conditional breakpoints Best Practices Remember; Optimize Databases for Data Import Disable/Delay creation of non-Clustered Indexes Order Data on the Clustered Index Disable Triggers and Constraint checking Batch Size: Adjust the transaction size Buffer and Blob temp storage area; spread over to multiple drives for large data transfers Parallelization – based on execution trees, task will auto parallelize

24 Summary– Database Migration Scenario/ToolSQL Azure MW Generate Script Wizard DACsSSISBCP Move SQL Schema Move Data Move Large Data Check packages before running!

25 SQL Azure Labs SQL Azure Data Sync SQL Azure to SQL Azure data sync Same or other region Project Houston Web/Silverlight based DB Design Tool SQL Azure OData Service Open Data Protocol (OData) emerging standard for querying and updating data over the Web http://sqlazurelabs.com

26 Links Books Online http://technet.microsoft.com/en-us/library/ee336279.aspx http://technet.microsoft.com/en-us/library/ee336279.aspx SQL Azure Connection Retry http://blogs.msdn.com/b/sqlazure/archive/2010/06/21/1002 8184.aspx http://blogs.msdn.com/b/sqlazure/archive/2010/06/21/1002 8184.aspx Best Practices for Building Reliable SQL Azure Database Client Applications http://blogs.msdn.com/b/sqlazure/archive/2010/06/21/1002 8064.aspx http://blogs.msdn.com/b/sqlazure/archive/2010/06/21/1002 8064.aspx

27

28 © 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.


Download ppt "Michael Epprecht IT Pro Evangelist Microsoft"

Similar presentations


Ads by Google