Book Image

SQL Server on Azure Virtual Machines

By : Joey D'Antoni, Louis Davidson, Allan Hirt, John Martin, Anthony Nocentino, Tim Radney, Randolph West
Book Image

SQL Server on Azure Virtual Machines

By: Joey D'Antoni, Louis Davidson, Allan Hirt, John Martin, Anthony Nocentino, Tim Radney, Randolph West

Overview of this book

Deploying SQL Server on Azure virtual machines allows you to work on full versions of SQL Server in the cloud without having to maintain on-premises hardware. The book begins by introducing you to the SQL portfolio in Azure and takes you through SQL Server IaaS scenarios, before explaining the factors that you need to consider while choosing an OS for SQL Server in Azure VMs. As you progress through the book, you'll explore different VM options and deployment choices for IaaS and understand platform availability, migration tools, and best practices in Azure. In later chapters, you'll learn how to configure storage to achieve optimized performance. Finally, you'll get to grips with the concept of Azure Hybrid Benefit and find out how you can use it to maximize the value of your existing on-premises SQL Server. By the end of this book, you'll be proficient in administering SQL Server on Microsoft Azure and leveraging the tools required for its deployment.
Table of Contents (10 chapters)

SQL Server IaaS scenarios and use cases

With all the choices for how to deploy and implement SQL Server for your organization, both on-premises as well as through the Azure SQL offerings, why choose SQL Server on an Azure VM? While the more managed versions of SQL Server provide a lot of benefits, they have downsides if you are heavily invested in SQL Server on-premises because they can require you to change your infrastructure considerably. (Even the managed instance offering may be too restrictive for many organization's needs.) The IaaS model allows you to use the entire SQL Server 2019 feature set in a way that will work mostly as your on-premises model has for years.

The IaaS model is natural to existing DBAs while reducing (or even eliminating) the need to house and manage server hardware in your organization's premises. There is also licensing value as well, because SQL Server VMs can be adjusted in power and storage relatively easily, as well as licensed to pay as you go, allowing you to start and stop as you desire and incurring far smaller costs when VMs are not running.

In this section, we will look at three use cases for SQL Server 2019 in an Azure VM that will immediately benefit your organization, with the least friction with what your staff already know:

  • Lift and Shift: Keeping your applications pretty much as is, moving to Azure.
  • Extending On-premises Environment to the Cloud: When you need to add a server to your environment and do not wish to add more hardware to your estate.
  • Development and Test Environments: Developing new code and testing it, perhaps in the latest SQL Server version or a different edition (for example, if you are on standard edition and want to see what the effect of using Enterprise Edition would be).

These scenarios are ones that you are likely to use IaaS for. Not for radical change to what you currently do, but rather to make use of the knowledge and skill set of existing database human resources, all while reducing the need to manage and maintain hardware on your premises, either for long-term or short-term utilization.

Lift and Shift

For many organizations, keeping hardware up to date is a daunting task. You purchase a server one year, and it becomes outdated very quickly. Three or four years later, when the hardware is very outdated, you finally have the budget to upgrade the hardware. Then, you can perform the upgrade, including creating servers, moving data around, and so on. All of this is a time-consuming, costly process, even if you are already virtualizing your server resources on-premises. At the same time, moving your environment to a fully managed service, even a managed server, can be complex or even not possible, depending on your requirements. (For example, if you need to use the file system or other executables on the same server, it is not possible in a managed server or SQL Database.)

In a lift-and-shift operation, you get one or more servers that you can configure exactly as your on-premises server were configured. The same drives, directories, services, and so on, even including third-party executables.

What you don't have to worry about is the scalability of your server or how to keep up with the latest hardware. An Azure SQL VM can be sized as needed, to any level of hardware you need, and resized52 if needs change.

Now the burden of managing the hardware lies with the Microsoft Azure management team, leaving your organization with more time to build and test quality software.

Extending your on-premises environment to the cloud

If moving your entire datacenter to Azure is not something your organization is ready for, that doesn't mean that SQL Server on an Azure VM is not useful. There are a few ways you might extend your environment using Azure VMs.

A primary way would be as a disaster recovery site. You can have a reasonably low power server that you copy your data to, perhaps utilizing Always On availability groups53 using a hybrid on-premises and cloud configuration. If the server needs to recover from a disaster, you ramp up the resources, point clients to the Azure VM instead of the local server, and you are ready to go.

Another common use is when you need an extra server to meet a need (possibly even a short-term need), but do not have the inclination to procure and configure a server and permanent SQL Server licenses. Once you have the VPN gateway54 configured, adding a VM-based server in Azure is very much like adding one locally. The main difference is that Microsoft does the heavy lifting of setup for you; you just determine how much power you need (and adjust as necessary). And since SQL Server licensing can be built into charges, if the need is temporary, you do not need to buy a full-price license for SQL Server. Getting rid of a server you no longer need is now simply a matter of clicking delete on the portal (and verifying that you do actually want to delete the server, naturally).

Development and test environments

The last use case we will present is about using Azure SQL VMs for developing and testing new software. Creating a new SQL Server VM can be done in a very short amount of time, and subsequent spin-up time can be further shortened by using templates to configure everything as you need it.

Developers can get a new VM with an SQL Server Developer Edition license, then quickly load executables and test data on it. Once done with testing, they can shut down the server and only pay for storage costs. If you need to start over from scratch, it is easy to delete the server and start the process over with a fresh install.

In the next section, we will look at how we can choose the best OS for your SQL Server VM.