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
Transcript of "Cloud Power Migration to SQL Azure"
Data Migrationto the Cloud<br />George Huey<br />Principal Architect Evangelist<br />Lynn Langit <br />Senior Developer Evangelist<br />
Session Objectives and Takeaways<br />Overview<br />Windows Azure Platform<br />SQL Azure<br />Application Migration<br />Data Access Tier Considerations<br />Security<br />Connectivity<br />Collation Model<br />SQL Database Migration<br />Migration Scenarios<br />One-off migration tools<br />Moving Schema and Data into SQL Azure<br />Transferring Large Data into SQL Azure<br />
Windows Azure PlatformOverview<br />Microsoft is offering a Windows Azure platform 30 day pass, so you can try Windows Azure and SQL Azure for free.<br />For more information go to http://bit.ly/eAnP8C and enter SQLAZURE for your promotion code.<br />
SQL Azure DatabaseThe first and only true relational database as a service<br />Elastic Scale<br />Self-managed<br />Developer Agility<br /><ul><li>Build cloud-based database solutions on consistent relational model
Leverage existing skills through existing ecosystem of developer and management tools
No need for server or VM administration</li></li></ul><li>Data tier AccessApplication Migration<br />
Data Access APIs<br />Supported APIs<br />Connection String<br />ADO .NET<br />Encrypt=True and add @servername to User ID<br />ODBC<br />Encrypt=yes and add @servername to Uid<br />
Data Access APIs cont.<br />Protocols<br />Authentication Mode<br />
Connectivity<br />Robust Connection Management through Retry Logic<br />Great Read: Connection Management in SQL Azure http://bit.ly/kWHfIJ<br />Flaky network connectivity<br />Code-Far topology<br />Failover<br />HW Failures or Upgrades<br />Resource Management Operations<br />Throttling and Load Balancing<br />ALTER DATABASE (T-SQL)<br />Changes to Database Name or MAXSIZE/EDITION<br />ALTERDATABASE [TestDb] MODIFY (MAXSIZE=50GB, EDITION='business')<br />GO<br />
Security Management<br />Manage Logins - Authentication - SQL Server (only)<br />CREATELOGIN [testlogin] WITHPASSWORD='password'<br />Common login names such as ‘sa’, ‘admin’, ‘administrator’, ‘root’, and ‘guest’ are not allowed, <br />Manage User<br />CREATEUSER testuser FROMLOGIN testlogin;<br />Manage Server Roles<br />Two new database role (only in master)<br />EXECsp_addrolemember'dbmanager','testuser';<br />Similar to [dbcreator]<br />EXECsp_addrolemember'loginmanager','testuser';<br />Similar to [securityadmin]<br />Views<br />sys.sql_logins. sys.databases, sys.database_principal<br />
Collations<br />Default Collation<br />Set to SQL_LATIN1_GENERAL_CP1_CI_AS<br />Applies to…<br />Metadata, TempDb and Default for User Data <br />Object Names (tables, sprocsetc), String variables and Columns when no collation is specified. <br />Use column and/or expression level collation when needed<br />CREATETABLE [dbo].[ErrorLog](<br /> [ErrorLogID] [int] IDENTITY(1,1)NOTNULL,<br /> [ErrorTime] [datetime] NOTNULL,<br /> [UserName] [nvarchar(4000)] COLLATETurkish_100_CI_AINOTNULL,<br /> [ErrorNumber] [int] NOTNULL,<br /> [ErrorMessage] [nvarchar](4000)COLLATEJapanese_CI_ASNOTNULL,<br />CONSTRAINT [PK_ErrorLog_ErrorLogID] PRIMARYKEYCLUSTERED ([ErrorLogID] ASC)<br />)<br />DECLARE@strnvarchar(128)COLLATEGreek_CS_AI<br />
Feature Parity<br />Administration Surface<br />Physical Server Properties does not apply in SQL Azure<br />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<br />Programmability Surface<br />Certain Features are partially available today<br />USE, XML processing, deprecated T-SQL etc.<br />List is available here; http://msdn.microsoft.com/en-us/library/ee336267.aspx<br />Some features are not available today<br />Full-text Search, Remote Data Access and Linked Servers, Distributed Transactions, Change Tracking, Service Broker etc.<br />List is available here; http://msdn.microsoft.com/en-us/library/ee336253.asp<br />
SQL Server Management StudioGenerate Script Wizard<br />Scenario<br />Migration of schema and/or data with fine grain control.<br />Pros<br />Native support for SQL Azure Schema options: “Engine Type = SQL Azure”<br />Ensures correct options and settings are applied for the TSQL script generation.<br />Requires explicit action on unsupported objects. <br />Cons<br />Verbose – INSERT Statements instead of raw data<br />Data is scripted with a fixed 100 row batch size.<br />Edit “GO” statements between small batches<br />Round-trip Efficiency<br />Use “SET NOCOUNT ON”<br />Stops processing on first incompatibility<br />
Data-tier Application (DAC) Packages<br />Scenarios<br />Self contained package for moving schema easily through the development lifecycle<br />What is a DAC Pack?<br />Single unit for authoring, deploying, and managing the data-tier objects<br />Development Lifecycle (VS 2010)<br />Editing DACs<br />Schema and DB Code Development, <br />Code Analyses, Deployment Policy Settings, <br />Schema Comparison and more…<br />Building DACs – the self contained database package <br />Management Lifecycle (SSMS 2008 R2)<br />Managing DACs <br />Registering existing database as DACs<br />Deploying and Upgrading databases using DACs, <br />
SQL Server Management StudioImport and Export Wizard<br />Scenario<br />Simplified wizard for migrating schema and data through SSIS<br />Pros<br />Great performance out of the box<br />Allows ‘save as package’ for full control<br />
DACPAC in Visual StudioMigrating Databases to SQL Azure<br />demo <br />
SQL Server Integration ServicesMigrating Databases to SQL Azure<br />demo <br />
SQL Azure Migration Wizard<br />Scenario<br />Migration of schema and/or data with fine grain control.<br />Pros<br />SQL Azure Compatibility Analysis<br />Uses SMO and BCP<br />Built in retry and chunking<br />Migrate from:<br />SQL Server to SQL Azure<br />SQL Azure to SQL Azure<br />SQL Azure to SQL Server<br />First try clustered index creation<br />Create package (great for Test & QA)<br />SQLAzureMWBatchBackup<br />SQLAzureMWBatchUpload<br />Cons<br />Not supported by Microsoft<br />Not a full SQL Engine TSQL Parser<br />
SQLAzureMWMigrating Databases to SQL Azure<br />demo <br />
SQL Azure Community Technology Preview (CTP) Import and Export<br />Scenarios<br />Command line process that can import and export data from SQL Server and SQL Azure<br />
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.</li></li></ul><li>Q&A<br />