Microsoft SQL Server 2022 installed on an Azure virtual machine is an example of PaaS
This article guides you for deploying your first SQL Server on Azure VM using the Azure portal. Show IntroductionThe infrastructure requirement might vary in different organizations, applications. Therefore, planning is an essential aspect for an organization from on-premises to cloud infrastructure. Azure offers two deployment choices for SQL Server.
Suppose you require complete control over the Virtual machine, SQL Server configurations for specific applications or functionalities. In this case, SQL Server on Azure VM gives the benefit of the full version and control of SQL Server with your resources in Azure cloud.
In this section, we deploy an Azure VM for SQL Server using the Azure portal. Azure offers SQL virtual machines as a pre-configured SQL Server for quick deployments. In the Azure portal, go to Marketplace and search for SQL. Here, select the deployment option – SQL virtual machine. Currently, it does not show any description in the image section.
Click on the image and select the appropriate image for your deployment. For example, here, I choose the image – Free SQL Server License: SQL Server 2019 developer on Windows Server 2019.
Click on create for providing input for virtual machine and SQL Server configurations. In the create virtual machines, do the following configurations. Basics
DisksEach Azure VM is equipped with one operating system disk with installed OS and a temporary disk for short-term storage for page or swap files. The number of data disks for SQL Server on Azure VM depends on the VM machine type.
NetworkingIn the networking section, define the virtual network settings with inbound and outbound connectivity.
ManagementIn the management section, you can select the following options for SQL Server on Azure VM.
AdvancedYou can choose to install a custom extension or specify a script using a configuration file in the Advanced configuration.
SQL Server setting for SQL Server on Azure VMThis section is specific to SQL Server configurations.
Review + CreateOn the next page, it performs a validation. You can review the configuration. It also gives hourly cost for running the SQL Server VM. For example, for my lab environment, it shows 0.1260 USD per hour. You can go back and make changes if required.
Click on Create for deploying SQL Server on Azure VM. It starts deploying Azure VM resources such as VM, Disks, network, disk storage.
Once the resource is deployed, you get the following screen.
Click on Go to Resource. It takes you to the VM overview page. As shown below, the SQL VM is running.
Click on the Connect button from the overview page. It shows the public IP address and port number for the connection. Click on the Download RDP File button.
Open the RDP file and provide your VM administrator credentials.
Click on Yes. In the connected Azure VM RDP session. It has already a running SQL Server instance with the configuration we specified in the SQL Server settings page. However, most of the settings are as per the default Azure templates. To view the installed services, go to Start and launch SQL Server Configuration Manager.
Launch SQL Server Management Studio or Azure Data Studio for the database connection. To check the SQL Server version, run the following script: As shown below, we have a running Microsoft SQL Server 2019 ( RTM-CU9) 15.0.4102.2 Developer edition on Windows Server 2019 Datacenter edition.
The VM has the following drives:
Usually, for on-premises SQL Server installation, we choose the appropriate drives for system databases. However, the SQL Server Azure VM preinstalled it for us. Therefore, let’s verify the system databases file paths.
The query returns file paths for all system databases:
As per the best practice, DBA does not store database files in the OS drive. Therefore, you should move these files to data(F), and Log(G) drives. You can refer to How to move SQL database files (MDF and LDF) to another location to learn more about it. Right-click on the connected SQL Server instance in SSMS and view the default configurations for default database locations and backup compressions. The following figure shows that new database files will be created in the F (data file) and G (log file). However, the default path for database backup is pointing to the C drive. You can configure an additional disk for storing database backups. You can also explore Azure Disk Backup or Azure Backup, Azure blob backup, Azure file share backups for backups.
You can run the SQL Server Agent, SQL Server Analysis Services, SQL Server Launchpad from the SQL Server Configuration Manager, depending upon your requirements.
ConclusionThis article explored the deployment of SQL Server on Azure VM using the Azure portal. It installs SQL Server with pre-defined templates. You can customize your SQL Server configuration with complete control over its services, databases, and features in Azure IaaS VM for SQL Server.
Hi! I am Rajendra Gupta, Database Specialist and Architect, helping organizations implement Microsoft SQL Server, Azure, Couchbase, AWS solutions fast and efficiently, fix related issues, and Performance Tuning with over 14 years of experience. I am the author of the book "DP-300 Administering Relational Database on Microsoft Azure". I published more than 650 technical articles on MSSQLTips, SQLShack, Quest, CodingSight, and SeveralNines. I am the creator of one of the biggest free online collections of articles on a single topic, with his 50-part series on SQL Server Always On Availability Groups. Based on my contribution to the SQL Server community, I have been recognized as the prestigious Best Author of the Year continuously in 2019, 2020, and 2021 (2nd Rank) at SQLShack and the MSSQLTIPS champions award in 2020. Personal Blog:
https://www.dbblogger.com View all posts by Rajendra Gupta Is Azure SQL Server SaaS or PaaS?Azure SQL Database is a relational database-as-a-service (DBaaS) hosted in the Azure cloud that falls into the industry categories of Software-as-a-Service (SaaS) and Platform-as-a-Service (PaaS). SQL database is built on standardized hardware and software that is owned, hosted, and maintained by Microsoft.
Is Azure SQL Server IaaS or PaaS?Azure SQL Database is a relational database-as-a-service (DBaaS) hosted in Azure that falls into the industry category of Platform-as-a-Service (PaaS).
Is Azure Virtual Machine PaaS?Azure VM IaaS is a cloud platform that provides a virtual machine (VM) instance that runs the Windows Server operating system. It is a platform-as-a-service (PaaS) offering. Azure VM IaaS is different from Azure PaaS in that Azure VM IaaS includes a VM instance that runs the Windows Server operating system.
What is PaaS SQL Server?Option 2: Platform as a Service (PaaS) – Managed Instance
Azure SQL Managed Instance is much like SQL Server installed on a server that you don't have to maintain. It gives you the ability to scale compute (4-80 vCores with 5GB of memory per) and storage (8TB max) up or down quickly with the click of a button.
|