Your SlideShare is downloading. ×
0
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

1,490

Published on

Deck from Cloud Power webcast May 2011

Deck from Cloud Power webcast May 2011

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,490
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
50
Comments
0
Likes
1
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
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 http://blogs.msdn.com/sqlnativeclient/archive/2010/02/12/using-sql-server-client-apis-with-sql-azure-vversion-1-0.aspxAlso updated MSDN Dev Guide 'How to connect' http://msdn.microsoft.com/en-us/library/ee621787.aspxHelper library - http://social.technet.microsoft.com/wiki/contents/articles/sql-azure-connection-management-in-sql-azure.aspxUsing 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 (http://msdn.microsoft.com/en-us/library/ee336279.aspx). 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 o8uyxb64fe.ctp.database.windows.net -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 o8uyxb64fe.ctp.database.windows.net -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 http://msdn.microsoft.com/en-us/library/ms187997.aspx for a mapping to the new system views.· Numbered stored procedures· “select into” syntax· “COMPUTE BY” clause· Two-part drop index statements See http://msdn.microsoft.com/en-us/library/ee336281.aspx 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 - http://social.technet.microsoft.com/wiki/contents/articles/inside-sql-azure.aspx
  • Lynnhttp://msdn.microsoft.com/en-us/library/ee621782.aspxhttp://msdn.microsoft.com/en-us/wazplatformtrainingcourse_sqlazuretipsandtricksvs2010_topic2.aspx
  • 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.http://social.technet.microsoft.com/wiki/contents/articles/sql-azure-data-sync-overview.aspxTo sign up for Data Sync CTP go to https://www.sqlazurelabs.com/
  • 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
      Overview
      Windows Azure Platform
      SQL Azure
      Application Migration
      Data Access Tier Considerations
      Security
      Connectivity
      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 http://bit.ly/eAnP8C and enter SQLAZURE for your promotion code.
    • 4. Windows Azure Platform
      GENERAL PURPOSE PROGRAMMING LANGUAGES
      Windows Azure Platform
      App Fabric
      Compute
      Management
      Relational database
      CDN
      Storage
      Data Sync
      Marketplace
    • 5. SQL Azure DatabaseThe first and only true relational database as a service
      Elastic Scale
      Self-managed
      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
      ODBC
      Encrypt=yes and add @servername to Uid
    • 17. Data Access APIs cont.
      Protocols
      Authentication Mode
    • 18. Connectivity
      Robust Connection Management through Retry Logic
      Great Read: Connection Management in SQL Azure http://bit.ly/kWHfIJ
      Flaky network connectivity
      Code-Far topology
      Failover
      HW Failures or Upgrades
      Resource Management Operations
      Throttling and Load Balancing
      ALTER DATABASE (T-SQL)
      Changes to Database Name or MAXSIZE/EDITION
      ALTERDATABASE [TestDb] MODIFY (MAXSIZE=50GB, EDITION='business')
      GO
    • 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)
      EXECsp_addrolemember'dbmanager','testuser';
      Similar to [dbcreator]
      EXECsp_addrolemember'loginmanager','testuser';
      Similar to [securityadmin]
      Views
      sys.sql_logins. sys.databases, sys.database_principal
    • 20. Firewall Management
      Portal Access
      Programmatic Access
      System Views and Stored Procedures – http://bit.ly/mzhBjw
      View: sys.firewall_rules
      Stored Procedure: sp_set_firewall_rule
      Stored Procedure: sp_delete_firewall_rule
      API Implementation Example – http://bit.ly/mCKzqV
    • 21. Collations
      Default Collation
      Set to SQL_LATIN1_GENERAL_CP1_CI_AS
      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,
      CONSTRAINT [PK_ErrorLog_ErrorLogID] PRIMARYKEYCLUSTERED ([ErrorLogID] ASC)
      )
      DECLARE@strnvarchar(128)COLLATEGreek_CS_AI
    • 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; http://msdn.microsoft.com/en-us/library/ee336267.aspx
      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; http://msdn.microsoft.com/en-us/library/ee336253.asp
    • 23. Summary – Migrating Applications
    • 24. Moving schema and dataDatabase migration
    • 25. Scenario Overview
      One-Off
      Scenarios
      Tools
      • 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
      On-Going
      • 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
      On-Premises
      Cloud
      HQ
      Sync
      Sync
      SQL Azure Data Sync
      Sync
      Branch Offices
      Sync
      SQL Azure Database
      Sync
      Sync
      Sync
      Sync
      Sync
      Retail Stores
    • 43. SQL Server Migration Assistant(SSMA)
      Scenario
      Migration of schema and/or data :
      Oracle
      Microsoft Access
      MySQL
      Sybase
      to SQL Server / SQL Azure.
      SSMA
      Map data types
      Migrate objects
      Migrate data
    • 44. SQL Server Migration AssistantMigrating MySQL to SQL Azure
      demo
    • 45. Summary – Database MigrationOne-Off Migration Tools for SQL Server
    • 46. SQL Server Management StudioGenerate 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”
      Stops processing on first incompatibility
    • 47. Generate Script WizardMigrating Databases to SQL Azure
      demo
    • 48. Data-tier Application (DAC) Packages
      Scenarios
      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
      Scenario
      Simplified wizard for migrating schema and data through SSIS
      Pros
      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
      demo
    • 52. SQL Server Integration ServicesMigrating Databases to SQL Azure
      demo
    • 53. SQL Azure Migration Wizard
      Scenario
      Migration of schema and/or data with fine grain control.
      Pros
      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)
      SQLAzureMWBatchBackup
      SQLAzureMWBatchUpload
      Cons
      Not supported by Microsoft
      Not a full SQL Engine TSQL Parser
    • 54. SQLAzureMWMigrating Databases to SQL Azure
      demo
    • 55. SQL Azure Community Technology Preview (CTP) Import and Export
      Scenarios
      Command line process that can import and export data from SQL Server and SQL Azure
    • 56. DAC Import / Export CLIMigrating Databases to SQL Azure
      demo
    • 57. Summary – Database MigrationOne-Off Migration Tools for SQL Server
    • 58. Additional Resources
      • SQL Azure Labs – http://www.sqlazurelabs.com
      • 59. SQL Azure Migration Wizard – http://sqlazuremw.codeplex.com
      • 60. SQL Azure Team Blog – http://blogs.msdn.com/sqlazure
      • 61. SQL Azure Videos – http://bit.ly/fbqcwF
      • 62. SQL Azure Data Sync –http://bit.ly/lfyuqR
      • 63. SQL Server Migration Assistant – http://bit.ly/SQLServer_SSMA
      • 64. SQL Azure Labs Import / Export – http://bit.ly/hToaWf
      • 65. Windows Azure Platform Training Kit – http://bit.ly/ikvTHy
      • 66. Follow us on Twitter – @azure, @sqlazure, @llangit
      • 67. Lynn’s blog – http://blogs.msdn.com/SoCalDevGal
      • 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 http://bit.ly/eAnP8C. 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.

    ×