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.
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
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
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.
George, then Lynn
George, then Lynn
Data Migrationto the Cloud George Huey Principal Architect Evangelist Lynn Langit Senior Developer Evangelist
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
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.
Windows Azure Platform GENERAL PURPOSE PROGRAMMING LANGUAGES Windows Azure Platform App Fabric Compute Management Relational database CDN Storage Data Sync Marketplace
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
Leverage existing skills through existing ecosystem of developer and management tools
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
Data Access APIs cont. Protocols Authentication Mode
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
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
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
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
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
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
SQL Server Migration AssistantMigrating MySQL to SQL Azure demo
Summary – Database MigrationOne-Off Migration Tools for SQL Server
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
Generate Script WizardMigrating Databases to SQL Azure demo
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,
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
DACPAC in Visual StudioMigrating Databases to SQL Azure demo
SQL Server Integration ServicesMigrating Databases to SQL Azure demo
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
SQLAzureMWMigrating Databases to SQL Azure demo
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
Windows Azure Platform Training Kit – http://bit.ly/ikvTHy
Follow us on Twitter – @azure, @sqlazure, @llangit
Lynn’s blog – http://blogs.msdn.com/SoCalDevGal
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.