Modernizing your data platform hybrid it - finalDocument Transcript
Modernizing Your Data Platform with Hybrid ITA Closer Look at SQL Server in the Microsoft Cloud Story
Contents Copyright Information ...................................................................................................... 3 Hybrid IT – Your Database Anywhere ............................................................................. 4 Hybrid IT - A Portfolio View of Database Applications .............................................................................4 Traditional Bare Metal Deployment...................................................................................................................................... 5 Cloud Deployment – Public Cloud, Private Cloud........................................................................................................... 5 The Microsoft Public Cloud and SQL Server ................................................................... 9 Why & When Cloud Deployment Makes Sense ..........................................................................................9 SQL Server in a Windows Azure Virtual Machine ............................................................................................................ 9 Windows Azure SQL Database .............................................................................................................................................12 Delivering on Common Cloud Scenarios ...................................................................... 16 SQL Server in Windows Azure Virtual Machine Scenarios..................................................................... 16 Windows Azure SQL Database Scenarios ................................................................................................... 24 Hybrid Scenarios ................................................................................................................................................ 27 Hybrid IT and SQL Server Delivering Choice ................................................................ 3001
Hybrid IT – Your Database AnywhereTake almost any application scenario, from the largest public web sites to small departmental applicationsand you will find the vast majority rely on a database management system of some description. In somerespects, developers and IT professionals have become desensitized to the ubiquity of the relationaldatabase - it’s simply part of the stack for a modern application. As organizations look to take advantageof cloud computing, the availability of cloud-enabled database systems will be critical to their success.This whitepaper sets out the Microsoft vision of relational database management systems in the contextof cloud computing. It is a hybrid IT vision, one that leverages the industry standard Microsoft SQL Servertechnology set and makes it available across the spectrum of deployment approaches available tocustomers today. Figure 1: Modern IT departments will meet business needs through a combination of on-premises and cloud hosted delivery.Hybrid IT - A Portfolio View of Database ApplicationsThe concept of Hybrid IT recognizes that customers will typically have a portfolio of different applicationsdeployed across their business. Customers have a breadth of environments with unique requirements.Some applications require detailed and complex hardware configurations such that they may never bedeployed into the type of commoditized, ‘one size fits all’, environment offered by cloud computing.Equally there are workloads in many businesses that are extremely compelling for massive scale publicclouds - it can be economically infeasible to provision sufficient levels of hardware for applications withmassive peaks and troughs in demand. Microsoft’s goal with Hybrid IT is to offer customers a breadth ofchoices in how and where they run their applications, while at the same ensuring they can leverage acommon set of server products, tools, and expertise across their portfolio of solutions.
Figure 2: Each approach to database deployment brings unique benefits and challenges. Workloads are moving to the right.Traditional Bare Metal DeploymentDespite massive improvements in virtualization technology in the past 10 years, the fact remains thatthere is still a significant performance penalty to be paid in virtualizing certain workloads. Large, complexand mission critical Online Transactional Processing systems (OLTP) remain the preserve of massivededicated servers with the operating system and database platform installed directly ‘on the metal.’Non-Virtualized, Dedicated HardwareFor most workloads, virtualization is an ideal approach, delivering significant total cost of ownershipbenefits. However, in situations where scale up matters; where customers need to extract the mostperformance possible out of, in many cases, some of the largest server machines money can buy; whereevery little bit of extra performance counts; customers will need to run on the metal.A corollary of this requirement to run in a non-virtualized fashion is that applications will typically havespecific server hardware dedicated to their operation.Physical TuningA key benefit of running significant dedicated hardware resources is that there are many opportunities foradvanced physical tuning. The most significant area for a database deployment such as SQL Server is thephysical configuration of the storage sub-system. The ability to undertake physical tuning is somethingthat is lost when moving to cloud environments.Cloud Deployment – Public Cloud, Private CloudWhile a private cloud may have all the characteristics of a public cloud, that does not necessarily meanthat they must have all of those characteristics. For example, many private clouds do not implement a fullcharge back accounting mechanism. Nevertheless as organizations mature their private cloud strategy,
the service and service levels offered by private clouds will begin to align more closely with those offeredby public cloud providers.Pooled & VirtualizedServer virtualization underpins both private and public cloud environments. However, a cloud-basedapproach to computing requires more than just the mere virtualization of workloads. Many on-premisesvirtualization environments are targeted at specific applications. Though virtualized, applications must runon specific, dedicated server hosts. In some cases this is by technical necessity, in others because aparticular department is the ‘owner’ of that node. A cloud environment is predicated on the pooling ofhardware resources and while virtualization is a key to pooling capacity, in and of itself it’s not enough.Pooling is the mechanism by which resources are aggregated and then made available as a homogenouspool of capacity capable of running any workload. Workloads that run on a pooled cloud environment areagnostic as to the physical hardware on which they are actually deployed.Because of the advanced physical tuning required, the Tier-1 workloads discussed above are a poolinganti-pattern. For example, a SQL Server workload that requires a particular approach to physical tuningand certain hard drive spindle layouts, could be virtualized but does not lend itself to the use of pooledresources because it has unique resource demands that are unlikely to be demanded by otherapplications. Put those specific spindle configurations into a pool and chances are nobody else will wantto use them.ElasticityElasticity refers to the ability of the cloud to respond to peaks and troughs in demand. Many businessprocesses have a seasonal characteristic. Indeed the agrarian analogy of annual hay-making is illustrativehere; most farmers will bring in outside contractors with their associated machinery to make their haybecause it is simply uneconomic to have the large tractors and hay bailers required lying idle for most ofthe year. Information technology workloads are also highly seasonal yet the machinery deployed tosupport them is typically purchased in sufficient capacity to meet the peak load and ‘stored in the shed’for the remaining time.The canonical example of a seasonal workload is the sale of tickets for sporting and cultural events. Whena large event goes on sale the number of customers seeking tickets can, in many cases, outstrip supply.Historically customers would camp all night outside the ticketing office in order to obtain their tickets - inthe online world this natural queuing mechanism breaks down and instead prospective event goersswarm the virtual ticketing office, often overloading it.Because cloud resources are both generic and pooled, it is easy to justify having spare capacity ‘sittingaround.’ A cloud provider, be they public or private, will typically endeavor to have a portion of theircapacity freely available at all times to deal with peaks. Public clouds are at a distinct advantage here.Because public clouds operate at massive scale, with thousands of customers accessing their pooledresources, they are able to maintain significantly more absolute headroom than a smaller private cloud-1% of a 100 server cloud doesn’t permit much of a spike in load whereas 1% of a 10,000 server clouddoes. Elasticity is the hardest cloud characteristic to achieve in a private data center as it requires anorganization to have capacity lying idle, the avoidance of which is usually a key justification for cloudbased deployment in the first place.
Some workloads such as the ticketing example above are simply not feasible in a private cloudenvironment. A good test of the caliber of a cloud is to ask the question “how many times more capacitydoes the cloud have deployed than my expected elastic demand?” It should be measured in orders ofmagnitude and not just mere multiples; if you expect to need 10s of servers on a burst basis then look fora cloud that has at least 1000s of nodes.Self ServiceSelf service in cloud computing serves two complimentary goals. First, it helps to further drive down thecosts of providing the service by reducing or eliminating the labor typically required to provisionresources. Second, if done well, it’s a measure that benefits users too by providing self-service capability.Cloud consumers are empowered to directly access resources; no complicated approval process; no needto wait for the request to become a business priority to IT.A cloud environment will provide users with delegated rights to provision resources on demand from thepool. It will ensure that their workloads can’t interfere with others and that they may only provisionresources up to the capacity level to which they’re entitled, or in the case of a public cloud that their creditlimit extends to. Self service drives business agility. It allows organizations to try new things and reach newmarkets quickly. Whether in a private cloud inside the enterprise or out in Windows Azure, applicationsare able to be taken from development to production much more quickly than other deploymentapproaches.Usage BasedMost shared IT environments suffer from the ‘tragedy of the commons’ 1- if IT capacity is ‘free’ at themargin then there is no incentive for conservation by any one consumer despite this being in the interestof all consumers collectively. Consumers are used to paying on a per unit basis for other resources such aswater, gas and electricity. The pay-per-use model offered by cloud computing provides incentives to turnoff capacity that is not being used.The public cloud vendors obviously need to charge for their services and so those environments willalways be metered and billed. In private clouds the situation varies; implementing a charge-back model iscomplex, particularly if the business does not have existing accounting systems in place to support it, butthere are significant benefits to be had. The goal of pay-per-use in a private cloud environment is to driveuser behavior, ensuring that cloud resources are treated as scarce and conserved where possible. Quotasand other resource allocation mechanisms may be more appropriate for some private cloudenvironments.One challenge for public and private cloud operators alike is “which meter to use.” What should becounted in order to determine charging? The metric needs to be well correlated to the actual cost ofproviding the service but also remain sufficiently simple that cloud consumers can understand it. It makeslittle sense to measure on ‘query hours’ if cloud consumers haven’t the foggiest idea of how the expectednumber of required query hours can be derived for their particular application.1 "The Tragedy of the Commons". Science 162 (3859): 1243–1248. 1968.http://www.sciencemag.org/cgi/reprint/162/3859/1243.pdf
The charging model is the mechanism by which a cloud provider signals efficiency. In a cloudenvironment, where every real resource is obscured by layers of virtualization, customers should architecttheir application to be cost optimized as a primary consideration.ComplianceSome application scenarios require compliance with specific enterprise or industry standard policies.These policies will typically relate to security, systems management, and legal matters. Policies range fromsimple things such as which anti-virus software is to be installed on servers, through to complexInformation Security Management Systems standards such as ISO/IEC 27001.The more control an organization has over the entire systems stack, the more amenable that system is tocompliance with all imaginable policies and requirements. An enterprise policy requiring air-gapdeployment is obviously unsuitable for deployment in a public cloud and, equally, an isolated privatecloud cannot co-exist on pooled hardware with an internet connected private cloud. The more onerousthe compliance requirements the more likely they are to require a dedicated environment running withinthe complete control of the enterprise deploying them.The major public cloud vendors have moved quickly to audit and certify their systems against industrystandard frameworks. For many small and mid-sized organizations the costs of achieving compliance canbe too onerous. For these smaller organizations public cloud computing actually presents newopportunities to deploy applications into a certified environment without the cost of implementing thosestandards within their own data center.Some compliance challenges will remain insurmountable to public cloud computing. Customers whorequire complete jurisdiction over their systems will often need to ensure that data is located only within acertain country and that systems are only accessible by their own staff. For these customers the use ofdedicated systems or private cloud environments will remain the only feasible solution.Up to date details of the Compliance of Windows Azure against various industry standards can be foundat http://www.windowsazure.com/en-us/support/trust-center/compliance/
The Microsoft Public Cloud and SQL ServerWindows Azure provides two broad options to enable the use of SQL Server databases.The first is to run Microsoft SQL Server in a Windows Azure Virtual Machine. This approach is most akin toan on-premises deployment. Customers have complete control over both the operating system and theinstalled applications and as such can achieve almost complete compatability with on-premises SQLServer. Customers purchase Azure VM time at a few cents an hour with the option to either ‘bring-your-own’ SQL Server license or rent the SQL Server license by the hour as well. SQL Server in an Azure VM isideal for customers looking to move existing tier 2 & 3 applications to the cloud.The second offering is called Windows Azure SQL Database. SQL Database is a true platform-as-a-servicein the cloud. Customers purchase this service on a database by database basis and Microsoft manages theservice all the way to the database level meaning that customers do not need to take responsibility for theoperating system or even patching the database server software. It is most suited to customers buildingnew applications and provides additional benefits such as high availability and scale-out that are complexto achieve in either the Virtual Machine approach or on-premises. Figure 3: The Microsoft public cloud offers two distinct approaches to SQL Server.Why & When Cloud Deployment Makes SenseSQL Server in a Windows Azure Virtual MachineWindows Azure Virtual Machines allow customers to create a server in the cloud that they run andmanage. These servers can run Windows Server 2008 R2 or a number of different Linux distributions.Customers have complete control over their server, they can install the applications of their choice and assuch can now run almost any workload in the Windows Azure cloud. Installing and running SQL Serverinto Windows Azure Virtual Machines is a key scenario that Microsoft is delivering and supporting.From a compatibility point of view, running SQL Server in a Windows Azure VM is the same as runningSQL Server hosted in a virtual machine on-premises. For enterprise customers looking to move tier 2 andtier 3 database applications this approach offers an ideal path to the cloud. Applications can typically bemoved to the cloud without making any code changes. As cloud technology matures customers are likelyto begin moving some of their tier 1 workloads as well.Customers will typically create a cloud server using pre-built virtual machine images from the WindowsAzure Image Gallery; Microsoft provides several images configured with SQL Server Web, Standard orEnterprise. Once the server is created and started it’s simply a matter of moving the database itself onto
the server using one of the common SQL Server database migration techniques including backup/restoreand file detach/attach.Alternatively customers can pick up the entire on premise virtual machine and upload this to WindowsAzure. While this approach is not strictly supported by the platform yet, it is a suitable approach fororganizations looking to quickly move servers into the cloud for things such as development and testenvironments. For production environments it is recommended that customers create a virtual machineeither on premises or using a template image and then move just the database itself. Figure 4: SQL Server in a Windows Azure Virtual Machine provides an ideal path to move existing applications to the cloud. SQL Server running in a Windows Azure Virtual Machine offers a low cost, low touch migration path for existing apps. The key driver in the total cost of ownership for tier 2 and tier 3 apps is the cost of developing and maintaining the applicaton itself. In many cases the operational costs, inefficient as they are in many on-premises data centers, are still dwarfed by the costs involved in writing and modifying the application code; any cloud migration approach promising operational savings yetrequiring major code changes will be doomed to failure. Moving databases to Windows Azure VirtualMachines typically requires no code changes.At general availability a Windows Azure Virtual Machine running SQL Server Standard Edition (includinglicenses) will cost from 66.5 cents per hour or about $480 dollars per month. For workloads suitable forSQL Server Web Edition the costs will start at just 16 cents per hour (approx. $115 per month).Customers can achieve even greater cost efficiencies by achieving higher database densities. As for an on-premises SQL Server it’s posible to run 10s or 100s of light load databases on a single virtual machine fora single low monthly cost. Microsoft SQL Server provides a range of capabilities well beyond being a Relational Database Management System. These capabilities include rich reporting technology, ETL tooling and job management and scheduling. Most of these ancialliary features
are not yet available in Windows Azure SQL Database and this has been a blocker for some customerslooking to move their applications to the cloud.Deploying SQL Server in a Windows Azure VM means that customers can take advantage of the full 2feature set of whichever version of SQL Server they have deployed. With a couple of minor exceptionscustomers have access to the complete feature set of the SQL Server boxed product. Features specificallysupported include; • SQL Server Integration Services • SQL Server Analysis Services • SQL Server Reporting Services • SQL Server AgentCustomers using SQL Server in a Windows Azure VM are also freed from some of the physical limitationsinherent in the SQL Database platform based approach. For example, customers are not limited to 150GB of data per database as they are with Windows Azure SQL Database. As Platform as a Service, SQL Database shields customers from having to manage the underlying operating system and configure their database servers. However, many enterprises require advanced management and configuration on the servers that run their applications. By using SQL Server in a Windows Azure VM customers have complete control over their deployment. This means that they can configure bothWindows and SQL Server as they wish. If an application requires the use of third party tools ortechnologies then these can be installed as well. Enterprise customers may have specific policies for SQLServer deployments such as password strength requirements or virus scanners; these can be easilyinstalled and enforced on a Windows Azure VM.Using the Windows Azure Virtual Network customers can domain-join their Windows Azure VMs to on-premises domains. This enables development of hybrid applications spanning both on-premises and off-premises deployment under a single corporate trust boundary. Windows Azure provides management of all of the infrastructure that underlies the Windows Azure Virtual Machine. Customers do not need to manage any of the physical hardware or physical network configuration. However, with the control described above comes a greater degree of responsibility than that required by Windows Azure SQL Database. Customers are responsible forpatching the operating system along with ensuring that SQL Server is updated and so forth. It’s just aWindows Server, so standard management technologies including Microsoft System Center 2012 can beused to help drive this process.The virtual machine VHD’s are stored in Windows Azure Storage and as such benefit from the highavailability storage provided by that service. But, to achieve a true high availability database solution,customers will need to configure the AlwaysOn feature of SQL Server 2012; this capability is not yet2 At General Availability there will be no support for failover clustering. During the Preview period there isno support for SQL Server AlwaysOn; this will be supported at General Availability.
supported by the Windows Azure VM. The fastest path to a highly available database in Windows Azure isthrough the use of Windows Azure SQL Database.At General Availability customers will be provided with a 99.9% uptime Service Level Agreement for theirvirtual machine. Customers will be responsible for the uptime of the applications running on that virtualmachine, including the SQL Server database service itself.Windows Azure SQL DatabaseWindows Azure SQL Database provides a highly available, scalable, multi-tenant relational databaseoperating in the Windows Azure cloud. SQL Database is ideal for new cloud designed applications. Theseapps can take advantage of unique scalablity features available in SQL Database. As SQL Database ishighly compatable with SQL Server it is also possible to migrate many existing apps to SQL Database withminimal database and code changes. For customers with simple databases that can be migrated in thisway, SQL Database offers a very low TCO and benefits that can be hard to achieve on-premises such ashigh availablility and scale-out. It can be a great choice for applications that will be run entirely in thecloud or, in scenarios where some latency can be tolerated, as the data store for on-premises applicatonsconnected remotely to the cloud.SQL Database has a number of features that make it unique in the marketplace; features that are notavailable in any other vendor’s cloud offering. These features provide capabilities that are ideal for thetypes of always-on, massive scale applications demanded today. However, these features also require thatapplication developers specifically support the feature in their code and as such lend themselves mosteasily to customers building new applications rather than migrating existing apps.The first of these is a feature called SQL Federation. Federation allows customers to scale out theirdatabase by providing tooling and T-SQL support for the database sharding pattern. Given anappropriately architected application, SQL Database can achieve almost limitless scale in terms of bothdata volumes and transactional load. To take advantage of this feature requires a specific approach toboth database and application design. At a minimum, Federation will require significant rework of anexisting application; ideally application developers will build their application for the sharding patternfrom the outset.The other unique feature of SQL Database is that it provides very high levels of high availability out of thebox. The platform maintains three transaction consistent copies of the database distributed across faulttolerant regions of an Azure datacenter. Should any one replica fail, SQL Database will automatically re-route traffic to the remaining operational copies, create a new replica and then bring that replica back totransactional consistency. While such sophisticated HA features are available for on-premises and in IaaSdeployments, the complexity of setting them up puts them beyond the reach of most customers. Even thesmallest databases, just a few dollars per month in SQL Database, are configured for high availability. Totake full advantage of this feature developers need to ensure that their code is able to reliably deal withdatabase disconnections; SQL Database will disconnect an application’s connections if the workload needsto be moved to another replica. These disconnection events should be handled by retry logic (a codeblock is available from Microsoft) and this retry logic should be incorporated even into on-premisesapplications that utilize SQL Server 2012 AlwaysOn configurations.
Figure 5: Windows Azure SQL Database provides unique capabilities for building massive scale applications as well as the lowest TCO for new, cloud designed apps. SQL Database allows organizations to deploy their database applications quickly. Because there is no data center to build, hardware to provision or software to install, a new database can be provisioned in minutes. This agility allows organizations to try new things and reach new markets quickly. Given an appropriate application architecture, the effort to deploy an application for hundreds of users vs. hundreds ofthousands of users is the same; just a few minutes.Compared ‘like-for-like’ with both on-premises and SQL Server in Windows Azure VM deployments, SQLDatabase delivers the lowest TCO. SQL Database is broadly equivalent to an on premises SQL Serverrunning with full hot standby servers; not one standby server, but two. Such a solution on premises wouldtypically require thousands of dollars of investment in hardware and setup time whereas SQL Databasestarts at just a few dollars per month. This bears repeating: SQL Database provides a true high availabilityenterprise class relational database starting at US $5 per month. In the completely connected world of the Internet, phenomenal success can be as hard to deal with as abject failure. If a newly launched business application takes off, maybe thanks to good press on one of the heavily trafficked blog sites, it will need to scale fast. Fast in this context means within minutes or hours; if it takes days or weeks to add more capacity then you may have missed the moment.To achieve rapid scale out, a deployment platform needs two key properties; a) An ability to add additional capacity without affecting the operational system and; b) A strong commitment that there will be sufficient resources available regardless of how quickly demand grows.SQL Federation allows developers building applications with SQL Database to shard their data out acrossmultiple databases. This scale out happens quickly, is transparent to users and does not need significantamounts of IT Pro input. Databases can even be scaled out, or ‘SPLIT’, while under load. Split operations(re-sharding) are performed online without application downtime.
Because SQL Database is delivered at massive scale there is always ‘spare capacity’ available in real time.This contrasts with on premises deployment approaches, even private clouds, where a significant newdemand for capacity will typically require new hardware to be deployed into the datacenter first. A verysuccessful new application will outrun an organization’s ability to procure new server hardware throughtheir supply chain - it takes days or even weeks to order and provision new on-premises servers. Figure 6: Federation can be managed using T-SQL, via SQL Server Management Studio, or using the Management Portal as shown here.SQL Federation allows customers to scale out their relational databases; this capability is important fororganizations that value strong transactional consistency and other attributes that are typically sacrificedby ‘NoSQL’ style cloud data stores. Very few businesses differentiate themselves on how well they manage their IT infrastrucutre. They certainly want to do a great job; they’ll want to be as good as or better than their competitors, but, it’s not typically the source of their strategic advantage. SQL Database allows customers to take advantage of not only the economies of scale but also qualities of scale.SQL Database delivers three 9’s (99.9%) SLA backed availability at the database level. This means thatMicrosoft guarantees the uptime of not only the servers that run SQL Database, but also your databaseitself.Because it manages both infrastructure and platform components, SQL Database delivers zero downtimeupdates (hardware upgrades, software patching, and more) with no customer intervention required. By
adopting SQL Database, organizations can deliver their applications with enterprise grade availabilitywithout incurring enterprise levels of cost.By spending less time operating existing systems, IT teams are free up to spend more time innovatingnew systems and improving applications. The IT focus moves from operations to adding strategic value tothe business. SQL Database is protocol-compatible with SQL Server, meaning that Developers and IT Pros can use familiar tools such as the Visual Studio IDE and SQL Server Management Studio. When working with on-premises applications that use SQL Server, customers use client libraries that implement the tabular data stream (TDS) protocol to communicate between client and server. Windows Azure SQL Databaseprovides the same TDS interface as SQL Server meaning that those same libraries can be used byapplications working with data that is stored in Windows Azure SQL Database. Common approaches torelational database programming include ADO.NET, Entity Framework, and ODBC. SQL Database alsosupports other platforms with drivers for JDBC and even PHP and Node.JS. Code developed for on-premises SQL Server applications can usually be moved easily to Windows Azure SQL Database.SQL Database is a true Relational Database Management System (RDBMS). The relational database modeland the transactional properties of RDBMS’s remain the gold standard for enterprise application datastorage. Unlike with many other cloud hosted data stores, developers working with SQL Database do notneed to learn new approaches to data-modelling nor make concessions around things such astransactional consistency. SQL Database supports stored procedures, stored functions and the vastmajority of tried and true SQL Server features.
Delivering on Common Cloud ScenariosSQL Server in Windows Azure Virtual Machine ScenariosIn this section we will address four key scenarios for customers using SQL Server in a Windows AzureVirtual machine. Figure 7: SQL Server in a Windows Azure Virtual Machine is targeted at four key scenarios for the initial release. As it is able to run pretty much any Windows Server based image, the Windows Azure Virtual Machine feature makes it simple to move an existing application to the cloud. Both the database tier and application tier can be moved to Windows Azure Virtual Machines, or, for some workloads such as ASP.NET it may make sense to port to Windows Azure Cloud Services or even Windows Azure Web Sites; this (PaaS)application tier can then connect easily to (IaaS) SQL Server running in a Windows Azure VM.Moving a database from an on-premises SQL Server to SQL Server running in a Windows Azure VirtualMachine will typically take one of the two paths shown in figure 8.
Figure 8: Moving a database to SQL Server in a Windows Azure Virtual Machine will take one of two paths.Moving the Entire Virtual MachineOption 1 involves moving the entire virtual machine from an on premises Hyer-V server to WindowsAzure. Moving the entire VM is suited to development and test scenarios, particularly for situations wherethe on-premises machine has additional and complex configuration. By moving the entire VM customersremove the need to recreate that exact configuraton in another machine. To move the whole VMcustomers will need to ensure that the server operating system is Windows Server 2008 R2 SP1 x64 orabove and that the version of SQL Server is a 64 bit install of SQL Server 2008 SP3 or later. Customers withVMs that don’t meet those specific requirements will need to either upgrade or follow the ‘backup &restore’ approach in option 2.It’s also possible to move virtual machines running in a third party hypervisor such as VMWare or evenphysical bare-metal servers by first migrating these server instalations into Hyper-V. To do this customerswill perform either a Virtual-to-Virtual (V2V) or Physical-to-Virtual (P2V) migration. Microsoft provide toolsin System Center Virtual Machine Manager 2008 R2 or Virtual Machine Manager 2012.Full supportability of Windows Azure Virtual Machines requires that virtual machine images are“sysprep’d” before being uploaded. The sysprep process is incompatible with Microsoft SQL Server. Assuch, customers taking this migration approach should avoid running sysprep prior to upload; this does,however, mean that this migration path is not currently supported for production workloads. Therecommended approach is to move just the database file itself as demonstrated in the next section.Moving Just the DatabaseOption 2 involves transferring just the database to the cloud. This can take the form of a full databasebackup or datafile, or, it may be more appropriate to move the database schema and data separately. Akey benefit of this approach is that customers need only send the database over the wire - it can be atime consuming process to send the entire Virtual Machine on a slow internet connection.Customers will need to start by creating a Windows Azure Virtual Machine using an image from the ImageGallery.
Figure 9: Create a new virtual machine from the Image Gallery.During the Windows Azure Virtual Machines Preview period customers should choose the Microsoft SQLServer 2012 Evaluaton image. Figure 10: Choose the Microsoft SQL Server 2012 Evaluation machine image.Customers need to specify a machine name, provide a strong password for the Windows Administratoraccount and choose a machine size. The machine size can be changed later. For testing purposes it willusually be sufficient to run a Small instance size. Figure 11: Set virtual machine propertiesAt present customers should choose to create a standalone virtual machine. The load balancing setting isnot appropriate for SQL Server virtual machines during the Preview release. The remaining settingsdetermine where the virtual machine is located, how it is resolved for DNS purposes and the subscriptionwhich will be used.
Figure 12: Set Networking, DNS, Storage, Datacenter and Subscription propertiesOnce again, the availability set option will not be relevant for SQL Server in Windows Azure VirtualMachine deployments until General Availability when support for AlwaysOn will arrive. For now theavailability set value should be set to none. Clicking the button will then start the process of creatingthe virtual machine. This is indicated by the green progress indicator at the bottom of the portal. It maytake a few minutes for the Virtual Machine to be created. Figure 13: A progress indicator will appear in the bottom right of the portal.Browsing to the list of Virtual Machines in the portal, customers will need to wait a few minutes more forthe Provisioning process to complete - this is indicated in the Status column. A connection cannot bemade until the machine indicates a Status of Running. Figure 14: Clicking connect will establish an RDP connection to the Virtual Machine.At this point there are a number of possible approaches customers can use to: a) Extract a copy of the on-premises database and; b) Transfer that copy to the Virtual Machine running in the cloudA detailed guide on these approaches can be found in the article Migrating with SQL Server in WindowsAzure Virtual Machines. The steps below demonstrate how this process can be achieved by taking a
backup of the on-premises database, copying this backup file to the server directly over the RDPconnection and then restoring the database file to the SQL Server instance running in the Windows AzureVM. This approach is well suited to small databases. For additional guidance on selecting an approachcustomers should reference the above article. Figure 15: Take a backup of the on-premises database.The Remote Desktop protocol makes it easy to transfer small files by simply using cut & paste in WindowsExplorer. Figure 16: Copy the file from on-premises machine. Paste into Windows Azure VM.Once copied the file can be restored into the SQL Server instance running in the Windows Azure VirtualMachine. If the database depends on metadata not stored in the user-database then additional steps mayneed to be taken. The article Manage Metadata When Making a Database Available on Another ServerInstance provides guidance on this. Figure 17: Copy the file from on-premises machine. Paste into Windows Azure VM.
When building apps many customers use development, test, and staging servers as part of their application lifecycle. Sometimes these are merely a virtual machine hosted in a developer’s desktop but more often such environments are hosted on dedicated virtual servers. In large organizations, particularly large enterprises and systems integrators these dev servers can require something more akin to a privatecloud.Windows Azure Virtual Machines provide a public cloud option to support these workoads. Even where anapplication will eventualy be hosted-on premises the use of Windows Azure to run development andstaging servers can be a very cost effective choice. It provides the flexibility of self service machineprovisioning and cost saving benefits of pay-for-use billing. Windows Azure Storage provides a highly available cloud hosted storage mechanism at a few cents per gigabyte per month. This, coupled with availability of the Windows Azure Virtual Machines service, presents new options for customers needing backup and disaster recovery capabilities. Customers can use Storage to store backups of either their databases or entire virtualmachines. Windows Azure Storage provides highly available, durable and secure offsite storage for thesefiles; 3 consistent copies are stored in the primary datacenter and a fourth replica is copiedasynchronously to a secondary data center.Should disaster strike, customers will have the option of either retrieving the files back out of Storage orusing Windows Azure Virtual Machines, restoring their backed-up machine images and then running themfrom the cloud for a period of time.SQL Server 2012 includes native functionality to enable the use of Storage for database backup andrestore. Figure 18: Customers create a Windows Azure Storage Account using the portal.In order to upload backup data directy to Windows Azure Storage, customers will need to retrieve one ofthe security keys for their storage account.
Figure 19: Storage keys can be retrieved from the portal. The native Windows Azure Storage backup support is accessed from SQL Server Management Studio2012 and leverages the BACPAC file format. It’s accessed from the Export Data-Tier Application menu. Figure 20: Native backup to Azure Storage is provided by the Export Data-tier Application menu.The wizard provides the option to save the BACPAC file directly to Windows Azure. The storage accountname and key are used by SSMS to authenticate against storage to perform the upload. Customers canalso specify a container within the storage account; containers can be thought of as being a little likefolders in a regular file system.
Figure 21: Native backup to Azure Storage is provided by the Export Data-tier Application menuThe Export Wizard will provide detailed progress updates as it completes the reation of the BACPAC fileand uploads it to the specified Azure Storage account.As well as native backup from SQL Server itself, the Windows Azure Online Backup feature allows users ofWindows Server 2012 and System Center 2012 Data protection Manager to backup other data, includingwhole virtual machine images, directly to Windows Azure. In some situations customers may want to move just a portion of an application into the cloud. Sensitive data would remain on premise while those portions of the application requiring additional scale could be moved to into the public cloud. Consider the canonical e-commerce site. The sensitive information such as customer details and credit card information may need to remain on-premises, but, in order tosupport increased load the product catalogue and shopping cart data could be moved into WindowsAzure.We discuss these types of Hybrid applications in more detail below.
Windows Azure SQL Database ScenariosIn this section we will address the two key scenarios for customers looking to work with Windows AzureSQL Database. Figure 22: SQL Database is ideal for developers creating cloud designed apps. To take advantage of many of the unique capabilities of SQL Database, as outlined above, an application must be be specifically architected and developed for those features. For example, to use SQL Federation applications must understand the constraints presented by the sharding scale out pattern and must know how to access shard members via the USE federation T-SQL statements.Building a new cloud-designed application on SQL Database can typically be done by undertaking alldevelopment work connected to a remote database running in Windows Azure SQL Database. Customerswill typically create their server and database(s) from the Windows Azure or SQL Database managementportals. They’ll then connect their existing tools to those remote databases. As noted above, SQLDatabase is highly compatibile with SQL Server and as such supports most SQL Server based toolsincuding Visual Studio and SQL Server Management Studio 2012. Customers will use these tools, workingagainst the remote server, to build out their database schema.The application tier will usually be built out using the Windows Azure Cloud Services or Windows AzureWeb Sites features. These allow application developers to build applications that can be easily scaled outbehind Windows Azure load balancers. Scale out in the application tier closely matches the appproach ofscaling out the data tier and this means that developers are able to build applications that can deliver onthe massive demands of many of today’s cloud workloads. Developers are not restricted to just theMicrosoft .NET framework; Cloud Services work well with Java and SQL Database works well with the JDBCdrivers for SQL Server 2012. Microsoft also supports an open source project that provides Windows Azureadd-in tooling for Eclipse, a popular Java IDE. Other frameworks such as Ruby, PHP and Node.js areequally well supported by SQL Database and Windows Azure.IT Pros will use a combination of the Windows Azure and SQL Database portals and existing SQL Servermanagement tooling to manage the ongoing operation of the database.
Figure 23: SQL Database allows developer to scale out their application in both the app and data tiers.Creating a new SQL Database is done using the Windows Azure management portal. Figure 24: Using the Custom Create option for a new SQL Database.Using the Custom Create option supports creating a new SQL Database server. Figure 25: Specifing a new server on database creation.
It is important to note that a ‘server’ in SQL Database is a logical concept only; the actual databasereplicas that make up any given SQL Database instance will be physically located on a number of differentphysical nodes within a datacenter. Figure 26: Creating a new server including login detailsSQL Database includes a firewall that protects against connections from unknown IP addresses. Firewallrules must be created to explicitly open access for each address or address range that is expected toconnect to the database server. Checking the Allow Windows Azure services to access the server option willset firewall rules permitting other services in Windows Azure such as Windows Azure Compute andWindows Azure Virtual Machines to access the database server. In order to connect using ManagementStudio or other tools from on-premises machines additional rules must be created. Figure 27: Clicking the server hyperlik will open the server properties to add additional firewall rules. Figure 28: A firewal rule specifies a range of permitted addresses.
Once the server is configured the connection strings can be retrieved from the database properties withinthe management portal. Figure 29: The connection string contains the information required to connect Management Studio.The information contained in the connection string can be used to connect SQL Server ManagementStudio to the remote database. Figure 30: The connection string contains the information required to connect Management Studio.From here customers can use the familiar tooling available in Management Studio to create their databaseschema. SSMS 2012 also provides support for creating and managing Federations.Hybrid ScenariosAs well as providing customers with choices as to where they run their app, the concept of hybrid-ITmeans that customers can also choose to distribute their app between both the public cloud and theirprivate data center.Code Far Apps – A simple path to an enterprise class data tierSQL Database delivers many enterpise class database features including high availablity. Manydepartmental applications would benefit from these capabilities but it is often too expensive to deliver
such features on-premises. A code-far hybrid approach involves connecting an on-premises applicationover the internet to a SQL Database instance. Figure 31: A remotely accessed SQL Database can provide an enterprise class database for lightweight apps.An excellent example of this deployment architecture in action is presented by Microsoft Access 2013Preview. This new version of Access provides support for building Access 2013 Preview apps that run ineither Office 365 or on-premises servers but which store their data into a Windows Azure SQL Database.Occasionally Connected Apps with SQL Data SyncSQL Data Sync is a service built upon the Microsoft Sync Framework. It allows customers to bi-directionally synchronize data between on-premises SQL Server and SQL Database instances. Because SQLData Sync is provided as a service within Windows Azure, there is no need for customers to write customcode, they simply configure SQL Data Sync in the Azure portal and then install the SQL Data Sync Agenton the on-premises servers.
Figure 32: Using SQL Database and SQL Data Sync allows applications to easily support occasionally connected deployment.This hybrid architecure allows customers to build applications that support occasionally connected work.While the user is disconnected data is stored in a local SQL Server database and then syncronized with theSQL Database hub once connectivity is restored.SQL Database + SQL Server in Windows Azure Virtual Machines in a single appAs set out above, SQL Database and SQL Server in a Windows Azure VM have respective strengths;another Hybrid approach is to combine both into a single application. As an example a customer maywant to take advantage of the scale out capability of SQL Database for their OLTP web application. Theymay also need to perform muti-dimensional analysis and reporting, a capability that would require the fullfunctionality of SQL Server installed into a VM. Figure 33: Combining both SQL Database and one or more SQL Server instances running within Windows Azure Virtual Machines allows an application to leverage the strengths of each deployment option.
By using SQL Data Sync customers can deploy SQL Database to drive the transaction processing needs ofthe application and use the full power of SQL Server Reporting and Analysis Services on-premises toprovide the analytical processing requirements.Hybrid IT - Delivering ChoiceCloud computing provides new opportunities for customers to deploy applications more cheaply or atmuch greater scale than ever before. But, at the same time, the Microsoft Hybrid IT strategy recognizesthat most customers will typically have a range of different applications, some of which will be deployedto the cloud and some of which will remain on premises. Complex applications that require detailedhardware configurations and optimization, or that house particularly sensitive data, are not well suited tothe types of commodity services delivered by cloud computing; these applications are likely to remain onpremises for some time to come. At the other extreme, some workloads are particularly well suited topublic cloud deployment – applications with highly variable demand for example. Microsoft’s goal withHybrid IT is to offer choice for their customers. Microsoft customers have the ability to leverage the sameindustry leading technology, techniques and expertise across on-premises servers, private clouds andpublic cloud platforms.Hybrid IT delivers the power of SQL Server, an industry leading DBMS, across the full spectrum ofdeployment topologies. It delivers the same familiar SQL Server experience and toolset regardless ofwhether a customer chooses to deploy on-premises or into a public or private cloud.Microsoft SQL Server in a Windows Azure VM allows customers to take advantage of the efficiencies ofcloud computing while also providing almost full feature parity with on-premises SQL Serverdeployments. Customers looking to the cloud to deliver new appications to large scale audiences can useWindows Azure SQL Database to build next generation relational database applications that scale out tomillions of users.Whatever the specific needs of their application scenario, wherever it may be deployed, customers can beconfident that Microsoft is providing the capability, flexiblity and familiarity that they need.