Demo: Azure SQL Server
Perform a hands-on exercise to create an Azure SQL server and import a database through a BACPAC file.
Azure SQL has three deployment models:
-
Single database: It’s a fully managed database used by any business organization.
-
Elastic pool: It’s a group of Azure SQL single databases with a shared set of resources.
-
Managed Instance: It’s a fully managed Microsoft SQL Server Database Engine running in Azure.
Demo: Setting up an SQL server
We’ve already covered the types of databases in the previous lessons. Here, we’ll work on a demo exercise related to Azure SQL Server. We’ll complete this exercise with a combination of both Azure CLI and Azure Portal.
Azure CLI is already set up for you. You can check that by connecting to the terminal. You’ll see CLI commands that are required to be executed in order to create an Azure SQL Server. You can copy these commands and use them in your terminal. You can click the “Show Hint” button if you want to see how to configure Azure CLI.
- If you don’t have a resource group, you need to create one. Here’s the command to do so:
az group create --location westus --name resourceGroupName
- Now that the resource group is up and running, it’s time to create an Azure SQL server. Here’s the command that does that:
az sql server create -l westus -g resourceGroupName -n demoEducativedbserver -u educativeadmin -p educativepassword123+
Note: Let’s understand the above command in detail:
az sql server create
: This creates an Azure SQL server.
n
: This is for the SQL server name. ...