There are two main options in Azure to handle SQL databases:
- Azure SQL Database.
- SQL Server on Azure VM.
In this chapter, we will talk about the advantages and disadvantages of each option.
The first option is a single Database in the Cloud that can be administered using the Azure Portal or other tools like SQL Server Management Studio (SSMS), PowerShell or third party tools. For more information about installing and connecting to an Azure SQL Database, refer to our article Microsoft Azure, our first steps to migrate data.
The second option is a Virtual Machine (VM) in Azure. It is like a local SQL Server, but it is a Virtual Machine stored in the Cloud and that is usually controlled using the RDP client. This option is very easy to install and Administer is you already have SQL Server Experience. For more information about VM machines refer to our article How to migrate your database to an Azure Virtual Machine.
First, let’s talk about prices. This article was made on February 2016. It is possible that the prices will change over the time, but it is a good start point.
Let’s check a table with some prices (for a complete table of prices review the references).
|SQL Server on Azure VM||Azure SQL Database|
|1 Cores, 24 USD per month, Web Edition||2 GB Database, 5 DTUs, 5 USD per month.|
|16 Cores, 95 USD per month, Web Edition.||250 GB Database, 50 DTUs, 75 USD per month.|
|16 Cores, 1190 USD per month, Standard Edition||500 GB Database, 250 DTUs, 930 USD per month.|
|16 Cores, 4464 USD per month, Enterprise Edition||1 TB Database, 1750 DTUs, 7000 USD per month.|
As you can see, the prices depend on different components.
The cheapest option is a one CORE VM machine with SQL Server web edition. The price is 24 USD per month and 0.032 USD per hour.
By the other hand, the cheapest option for an Azure SQL databases is 5 USD per month.
In SQL Server on Azure VMs, the price depends on the number of Cores and the SQL Edition. The more cores, the more expensive it is. In Azure VM, you can have the SQL Enterprise Edition, SQL Standard Edition and SQL Web Edition. The Enterprise edition is the most expensive and it includes several features not included in the Standard or Web edition. The Web edition is the cheapest option. The Standard edition support maximum 16 cores and the Enterprise version can support any number of cores. The Standard edition is limited to 128 GB of memory and the Web edition 64 GB. The Enterprise edition has no limit.
There are several limitations of each SQL Edition. For a complete list of features supported by each SQL Server Edition, refer the Features Supported by the Editions of SQL Server.
In Azure SQL Database, the prices depend on the Database Size and the DTUs. The DTU is the Data Transaction Unit, which measures the number of transactions supported per second in stress conditions.
For more information about DTUs, read the SQL Azure Database Benchmark Overview.
To summarize the prices, we can say that we can get cheaper prices in SQL Azure Databases. If you just need to store the information of your app in a Database and you do not want to worry about the Database Administration, the SQL Azure Database is the best option.
We cannot forget that there is a new option for SQL Azure Databases named elastic database, which is in Preview version. This is a new feature to handle multiple Azure SQL Databases in a Pool to simplify the administration if several databases are required. We will explain this feature on detail in another article.
Which one is easier to learn?
The SQL Azure Database is easier to use and administer.
The VM Machine in Azure is as difficult as a local machine. You need to work on the OS Administration as well as the traditional DBA tasks.
By the other hand, the SQL Azure Database is a simple database. You do not need to worry about the Administration of the Database. If want to improve the performance, you just need to pay more and that is all.
Which one is more secure?
The VM Machine in Azure is more secure than the SQL Azure Database because you can configure and restrict the IPs that access to the VM Machines. The passwords can be protected using the OS security.
In SQL Azure Database, if you have the credentials you can basically stole all the information from any device by default. When you need to connect with other tools, it is secure and it requires certificates or other secure tools, but the Web Portal can be accessed anytime and anywhere.
Which one can be administered from any device?
What is amazing about Azure SQL Database is that you can create and administer your database from your iPhone, your Android or any other similar device. If you have a browser, you can create, delete or administer your database. The connection is a straightforward process.
The VM Machine in Azure can be accessed from any RDP (Remote Desktop Protocol) Client. It can be a Machine with the Windows OS installed (recommended), a Mac or any OS with RDP installed. However, configuring RDP in non-Window OSs can be an unpleasant experience.
What is the maximum database size supported by each option?
The maximum size supported in Azure SQL Database is 1 TB. In the virtual machines in Azure, the maximum size in VMs can be found in this link: Sizes for Virtual Machines.
In this article, we explained the advantages and disadvantages of each option. To resume, if you already have an infrastructure and a SQL team that can handle the VM machines in Azure, it is a good option the work with Virtual Machines.
The Azure SQL is the best option if you have a new application and you do not have many resources or time to administer a SQL Server Database and you have a low budget, this option is the best
For more information about Azure SQL Databases and SQL Server on Azure VMs:
- Prices for virtual machines
- Prices for Azure SQL Databases
- Features Supported by the Editions of SQL Server
- SQL Azure Database Benchmark Overview
He has worked for the government, oil companies, web sites, magazines and universities around the world. Daniel also regularly speaks at SQL Servers conferences and blogs. He is also a writer for SQL Server training material for certification exams.
View all posts by Daniel Calbimonte
Latest posts by Daniel Calbimonte (see all)
- Functions and stored procedures comparisons in SQL Server - February 20, 2017
- Functions vs stored procedures in SQL Server - February 14, 2017
- How to generate random SQL Server test data using T-SQL - January 26, 2017