Your SlideShare is downloading. ×
Cloud Power Migration to SQL Azure
Cloud Power Migration to SQL Azure
Cloud Power Migration to SQL Azure
Cloud Power Migration to SQL Azure
Cloud Power Migration to SQL Azure
Cloud Power Migration to SQL Azure
Cloud Power Migration to SQL Azure
Cloud Power Migration to SQL Azure
Cloud Power Migration to SQL Azure
Cloud Power Migration to SQL Azure
Cloud Power Migration to SQL Azure
Cloud Power Migration to SQL Azure
Cloud Power Migration to SQL Azure
Cloud Power Migration to SQL Azure
Cloud Power Migration to SQL Azure
Cloud Power Migration to SQL Azure
Cloud Power Migration to SQL Azure
Cloud Power Migration to SQL Azure
Cloud Power Migration to SQL Azure
Cloud Power Migration to SQL Azure
Cloud Power Migration to SQL Azure
Cloud Power Migration to SQL Azure
Cloud Power Migration to SQL Azure
Cloud Power Migration to SQL Azure
Cloud Power Migration to SQL Azure
Cloud Power Migration to SQL Azure
Cloud Power Migration to SQL Azure
Cloud Power Migration to SQL Azure
Cloud Power Migration to SQL Azure
Cloud Power Migration to SQL Azure
Cloud Power Migration to SQL Azure
Cloud Power Migration to SQL Azure
Cloud Power Migration to SQL Azure
Cloud Power Migration to SQL Azure
Cloud Power Migration to SQL Azure
Upcoming SlideShare
Loading in...5

Thanks for flagging this SlideShare!

Oops! An error has occurred.

Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Cloud Power Migration to SQL Azure


Published on

Deck from Cloud Power webcast May 2011

Deck from Cloud Power webcast May 2011

Published in: Technology
1 Like
  • Be the first to comment

No Downloads
Total Views
On Slideshare
From Embeds
Number of Embeds
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

No notes for slide
  • George
  • Lynn
  • Lynn startsWindows Azure: operating system as an online serviceMicrosoft SQL Azure: fully relational cloud database solutionWindows Azure platform AppFabric: connects cloud services and on-premises applicationsMarketplace: information marketplace for data and web services Windows Azure™ is a cloud services operating system that serves as the development, service hosting and service management environment for the Windows Azure platform. Windows Azure provides developers with on-demand compute and storage to host, scale, and manage web applications on the internet through Microsoft® datacenters.Windows Azure is a flexible platform that supports multiple languages and integrates with your existing on-premises environment. To build applications and services on Windows Azure, developers can use their existing Microsoft Visual Studio expertise. In addition, Windows Azure supports popular standards, protocols and languages including SOAP, REST, XML, Java, PHP and Ruby. Windows Azure is now commercially available in 40 countries. Windows Azure platform AppFabric helps developers connect applications and services in the cloud or on-premises. This includes applications running on Windows Azure, Windows Server and a number of other platforms including Java, Ruby, PHP and others. It provides a Service Bus for connectivity across network and organizational boundaries, and Access Control for federated authorization as a service.Microsoft® Marketplace is a new service allowing developers and information workers to easily discover, purchase, and manage premium data subscriptions in the Windows Azure platform.Microsoft® SQL Azure™ Database is a cloud-based relational database service built on SQL Server® technologies. It provides a highly available, scalable, multi-tenant database service hosted by Microsoft in the cloud.
  • George starts1-slide overview of SQL Azure – should be a refresher for the audienceMicrosoft SQL Azure delivers on Microsoft’s SQL Server® Data platform vision of extending the Data platform capabilities to the cloud. SQL Azure provides data services, including a relational database, reporting; and data synchronization with mobile users, remote offices and business partners.Microsoft SQL Azure™ Database is part of Microsoft SQL Azure. It is a cloud-based relational database service built on SQL Server technologies. It provides a highly available, scalable, multi-tenant database service hosted by Microsoft in the cloud. SQL Azure Database enables easy provisioning and deployment of multiple databases. Developers do not have to install, setup, apply updates, upgrade or manage any software. High Availability and fault tolerance are built-in and no physical administration is required. SQL Azure Database supports Transact-SQL (T-SQL). Customers can leverage existing knowledge in T-SQL development and a familiar relational data model for symmetry with existing on-premises databases. SQL Azure Database provides a strong value proposition through helping to save in the cost of development by working with existing toolset and providing symmetry with on-premises and cloud database. The SQL Azure Database is now commercially available in 21 countries.
  • George
  • GeorgeOleDB is currently not supported by SQL Azure. Note that some functionality works with OleDB while other functionality does not. You will have to test your code to see what works and what does not.Add @servername to your user id. While you don’t need @servername appended to your user id to connect via SQL Server Management Studio, certain data transfer process require @servername appended to the user id. It is best to just make a habit of appending the server name to avoid any errors.Add Encrypt=True to avoid negations with SQL Azure. Just makes things a little faster
  • George
  • GeorgeSteve Hale (Microsoft) authored this article at updated MSDN Dev Guide 'How to connect' library - SQL Server Client APIs with SQL Azure Version 1.0 This post describes some of the issues that the application developer should be aware of when writing ODBC, ADO.NET SQLClient, BCP, and PHP code that connects to SQL Azure. See also SQL Azure documentation on MSDN ( Supported components1. Microsoft SQL Server Native Client 10.0 ODBC Driver or newer. This is a free download.2. Microsoft PHP 1.1 driver or newer. Again a free download.3. SQL Server 2008 BCP.EXE or newer. The caution here is that the queryout option is not fully supported for SQL Server 2008 RTM. Queryout is expected to be fully supported in a future release of SQL Server.4. ADO.NET 3.5 SqlClient or newer.Any other components are NOT currently supported for connecting to SQL Azure. In particular it should be noted that OLEDB connections are not currently supported from any OLEDB provider, even SQL Server 2008 Native Client OLEDB provider. ODBC connections using the on-the-box ODBC driver “SQL Server” are not currently supported.Connecting1. valid server name, user ID, and password for SQL Azure2. On the SQL Azure portal, set the firewall rules to allow your client IP address to connect to SQL Azure. Additionally, in some corporate environments, you might need to install Microsoft Firewall Client for ISA Server on the client machines or connections will not succeed. And in those environments, using IIS might require the default IIS settings for Application Pool Identity to be changed. Here is how that setting is changed: Open IIS Manager in Admin Tools, select Application Pools, Pick the pool, Advanced Setting and under Process Model change Identity from BuiltInAccount\\ApplicationPoolIdentity to Custom account domain account. Restart IIS.SQL Azure supports only TCP/IP connections using port 1433 (default for most SQL Server APIs) if other protocol choices (named pipes or using other ports) Additionally, most client APIs do not send the server name when connecting, thus the server name should be included as part of the user ID. Currently the only exception to this is .NET 4.0 which does send the server name. ODBC, BCP, PHP, and .NET 3.5 all require the server name to be sent as part of the user ID. This may change in a future release. Connection strings are all similar for each API stack and require the server name, user ID, password, and optionally the database. Trusted connections (also known as Integrated Security or Windows Authentication) are not supported. MARS is not yet supported by SQL Azure so make sure MARS is not enabled in the connection string.Creating and Connecting to a DatabaseSQLCmd example: sqlcmd -S -U <MyUserID>@o8uyxb64fe -P <MyPassword>Note the required server name (in yellow) included as part of the user ID.In the above example the database was not specified. In that case the default database “master” is used. You must connect to the master database to create databases or drop databases. Since the “USE database” command is not supported, you must disconnect after creating a database and reconnect directly to the user database. In this example we connect directly to the Northwind database.sqlcmd -S -U <MyUserID>@o8uyxb64fe -P <MyPassword> -d NorthwindCreating tablesTable creation is restricted to user databases; you cannot create tables in the master database. Table creation is substantially the same as on SQL Server, with the exception that certain data types are not supported, for example CLR User Defined Types, Filestream, and row guid types. Also, it should be mentioned that SQL Azure requires a clustered index or primary key (which uses a clustered index by default) before data can be inserted into a table. For this reason a clustered index or primary key must always be created for any table intended to contain data.Example:Create table employees(EmployeeIDint primary key, EmployeeNamevarchar(30))OrCreate table employees(EmployeeIDint, EmployeeNamevarchar(30))Create clustered index empIndex on employees(EmployeeID) Unsupported features· “USE database” is not supported· 3-part names are not supported unless the database being referenced is the current database.· Creating or dropping a database when not in the master database· Insertion of data into a table without a clustered index.· MARS connections· Trusted connections· CLR UDTs· XML schema collections· Distributed transactions (local transactions are supported)· AttachDB· Certain stored procedures, for example sp_who and undocumented stored procedures used to support OLEDB schema rowsets. Deprecated functionalitySome features are deprecated in SQL Server and should not be used in new application development. In most cases SQL Azure does not support deprecated SQL Server features. Some examples of these are:· System tables such as sysobjects, sysusers, or sysdatabases. Use the new system views instead. See for a mapping to the new system views.· Numbered stored procedures· “select into” syntax· “COMPUTE BY” clause· Two-part drop index statements See for more detailed Transact-SQL support.Connection behaviorSQL Azure connections will behave somewhat differently than SQL Server connections. They can be dropped for a number of reasons:· Excessive resource usage· Long-running queries· Long-running single transactions· Idle connections· Failover due to server failuresFor this reason it’s best to avoid caching connections for later use. A better strategy is to open the connection when needed, use it, and then close it. Additionally, it is recommended that applications provide retry/reconnect logic to recover from dropped connections.LatencyLatency may be a concern when using SQL Azure unless the SQL Azure server is located near the application (“code near” scenario), such as with Windows Azure and a co-located SQL Azure. Making many round trips to the server can introduce noticeable delay in an application that previously performed adequately when running against a SQL Server on the intranet. Ensure the application connects to the nearest SQL Azure server and that round trips are minimized. SUMMARYü Use only supported client components to connectü Connect using TCP/IP and port 1433ü Use SQL Authentication only, not Trusted Connections/Integrated Authentication/Windows Authentication.ü Specify the server name in the user ID.ü Ensure the firewall rules in the SQL Azure portal permit your IP address.ü Install Microsoft Firewall Client for ISA Server if needed.ü Change the IIS Application Pool Identity if needed.ü Make sure MARS is not enabled.ü Connect to the master database to create or drop databasesü Create a user database for your application since tables cannot be created in masterü Disconnect and reconnect to change databasesü Create a clustered index or primary key on a table before inserting data.ü Remove any unsupported or deprecated features from the application.ü Avoid caching connections. Open the connection, use it, and then close it.ü Avoid making numerous round trips to the server.
  • Lynn Kalen Delaney’s article on TechNET -
  • Lynn
  • Lynn
  • George, Lynn adds
  • George
  • George
  • George
  • GeorgeSQL Azure Data Sync enables creating and scheduling regular synchronizations between SQL Azure and either SQL Server or other SQL Azure databases. sign up for Data Sync CTP go to
  • LynnThe free Microsoft SQL Server Migration Assistant (SSMA) makes it easy to migrate data from Oracle, Microsoft Access, MySQL, and Sybase to SQL Server. SSMA converts the database objects to SQL Server database objects, loads those objects into SQL Server, migrates data to SQL Server, and then validates the migration of code and data.
  • Lynn
  • George, then Lynn
  • George
  • George
  • George
  • George
  • George
  • Lynn
  • Lynn
  • George
  • George
  • George
  • George
  • George, then Lynn
  • Transcript

    • 1. Data Migrationto the Cloud
      George Huey
      Principal Architect Evangelist
      Lynn Langit
      Senior Developer Evangelist
    • 2. Session Objectives and Takeaways
      Windows Azure Platform
      SQL Azure
      Application Migration
      Data Access Tier Considerations
      Collation Model
      SQL Database Migration
      Migration Scenarios
      One-off migration tools
      Moving Schema and Data into SQL Azure
      Transferring Large Data into SQL Azure
    • 3. Windows Azure PlatformOverview
      Microsoft is offering a Windows Azure platform 30 day pass, so you can try Windows Azure and SQL Azure for free.
      For more information go to and enter SQLAZURE for your promotion code.
    • 4. Windows Azure Platform
      Windows Azure Platform
      App Fabric
      Relational database
      Data Sync
    • 5. SQL Azure DatabaseThe first and only true relational database as a service
      Elastic Scale
      Developer Agility
      • Build cloud-based database solutions on consistent relational model
      • 6. Leverage existing skills through existing ecosystem of developer and management tools
      • 7. Explore new data application patterns
      • 8. Database utility; pay as you grow
      • 9. Business-ready SLAs
      • 10. Enable multi-tenant solutions
      • 11. World-wide presence
      • 12. Easy provisioning and deployment
      • 13. Auto high-availability and fault tolerance
      • 14. Self-maintaining infrastructure; self-healing
      • 15. No need for server or VM administration
    • Data tier AccessApplication Migration
    • 16. Data Access APIs
      Supported APIs
      Connection String
      ADO .NET
      Encrypt=True and add @servername to User ID
      Encrypt=yes and add @servername to Uid
    • 17. Data Access APIs cont.
      Authentication Mode
    • 18. Connectivity
      Robust Connection Management through Retry Logic
      Great Read: Connection Management in SQL Azure
      Flaky network connectivity
      Code-Far topology
      HW Failures or Upgrades
      Resource Management Operations
      Throttling and Load Balancing
      Changes to Database Name or MAXSIZE/EDITION
    • 19. Security Management
      Manage Logins - Authentication - SQL Server (only)
      CREATELOGIN [testlogin] WITHPASSWORD='password'
      Common login names such as ‘sa’, ‘admin’, ‘administrator’, ‘root’, and ‘guest’ are not allowed,
      Manage User
      CREATEUSER testuser FROMLOGIN testlogin;
      Manage Server Roles
      Two new database role (only in master)
      Similar to [dbcreator]
      Similar to [securityadmin]
      sys.sql_logins. sys.databases, sys.database_principal
    • 20. Firewall Management
      Portal Access
      Programmatic Access
      System Views and Stored Procedures –
      View: sys.firewall_rules
      Stored Procedure: sp_set_firewall_rule
      Stored Procedure: sp_delete_firewall_rule
      API Implementation Example –
    • 21. Collations
      Default Collation
      Applies to…
      Metadata, TempDb and Default for User Data
      Object Names (tables, sprocsetc), String variables and Columns when no collation is specified.
      Use column and/or expression level collation when needed
      CREATETABLE [dbo].[ErrorLog](
      [ErrorLogID] [int] IDENTITY(1,1)NOTNULL,
      [ErrorTime] [datetime] NOTNULL,
      [UserName] [nvarchar(4000)] COLLATETurkish_100_CI_AINOTNULL,
      [ErrorNumber] [int] NOTNULL,
      [ErrorMessage] [nvarchar](4000)COLLATEJapanese_CI_ASNOTNULL,
    • 22. Feature Parity
      Administration Surface
      Physical Server Properties does not apply in SQL Azure
      You have a master database but no access to server level constructs such as sp_configure, endpoints, DBCC commands, server level DMVs and System Views
      Programmability Surface
      Certain Features are partially available today
      USE, XML processing, deprecated T-SQL etc.
      List is available here;
      Some features are not available today
      Full-text Search, Remote Data Access and Linked Servers, Distributed Transactions, Change Tracking, Service Broker etc.
      List is available here;
    • 23. Summary – Migrating Applications
    • 24. Moving schema and dataDatabase migration
    • 25. Scenario Overview
      • SQL Azure Migration Wizard
      • 26. SSMS Generate Script
      • 27. SSMS Import & Export
      • 28. BCP
      • 29. SSIS
      • 30. Data-tier Application DAC
      • 31. DAC Logical Import/Export
      • 32. SQL Server Migration Assistant
      • 33. Migration to/from SQL Server
      • 34. Transfer between SQL Azure servers/databases
      • 35. Migration from Oracle, Sybase, MySQL, Access
      • SQL Azure Data Sync
      • 36. Sync Framework
      • 37. SSIS
      • 38. Publish to cloud
      • 39. Share between on-prem and cloud apps
      • 40. Some SQL Azure scale-out cases
      • 41. Geo-locality
      • 42. One-way or two-way
    • SQL Azure Data Sync Scenarios
      SQL Azure Data Sync
      Branch Offices
      SQL Azure Database
      Retail Stores
    • 43. SQL Server Migration Assistant(SSMA)
      Migration of schema and/or data :
      Microsoft Access
      to SQL Server / SQL Azure.
      Map data types
      Migrate objects
      Migrate data
    • 44. SQL Server Migration AssistantMigrating MySQL to SQL Azure
    • 45. Summary – Database MigrationOne-Off Migration Tools for SQL Server
    • 46. SQL Server Management StudioGenerate Script Wizard
      Migration of schema and/or data with fine grain control.
      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.
      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”
      Stops processing on first incompatibility
    • 47. Generate Script WizardMigrating Databases to SQL Azure
    • 48. Data-tier Application (DAC) Packages
      Self contained package for moving schema easily through the development lifecycle
      What is a DAC Pack?
      Single unit for authoring, deploying, and managing the data-tier objects
      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,
    • 49. SQL Server Management StudioImport and Export Wizard
      Simplified wizard for migrating schema and data through SSIS
      Great performance out of the box
      Allows ‘save as package’ for full control
    • 50. demo
      SSMS Data-tier Application & Import / ExportMigrating Databases to SQL Azure
    • 51. DACPAC in Visual StudioMigrating Databases to SQL Azure
    • 52. SQL Server Integration ServicesMigrating Databases to SQL Azure
    • 53. SQL Azure Migration Wizard
      Migration of schema and/or data with fine grain control.
      SQL Azure Compatibility Analysis
      Uses SMO and BCP
      Built in retry and chunking
      Migrate from:
      SQL Server to SQL Azure
      SQL Azure to SQL Azure
      SQL Azure to SQL Server
      First try clustered index creation
      Create package (great for Test & QA)
      Not supported by Microsoft
      Not a full SQL Engine TSQL Parser
    • 54. SQLAzureMWMigrating Databases to SQL Azure
    • 55. SQL Azure Community Technology Preview (CTP) Import and Export
      Command line process that can import and export data from SQL Server and SQL Azure
    • 56. DAC Import / Export CLIMigrating Databases to SQL Azure
    • 57. Summary – Database MigrationOne-Off Migration Tools for SQL Server
    • 58. Additional Resources
      • SQL Azure Labs –
      • 59. SQL Azure Migration Wizard –
      • 60. SQL Azure Team Blog –
      • 61. SQL Azure Videos –
      • 62. SQL Azure Data Sync –
      • 63. SQL Server Migration Assistant –
      • 64. SQL Azure Labs Import / Export –
      • 65. Windows Azure Platform Training Kit –
      • 66. Follow us on Twitter – @azure, @sqlazure, @llangit
      • 67. Lynn’s blog –
      • 68. Microsoft is offering a Windows Azure platform 30 day pass, so you can try Windows Azure and SQL Azure for free.For more information go to Enter SQLAZURE for your promotion code.
    • Q&A
    • 69. © 2011 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.