Search⌘ K
AI Features

Creating the Microsoft Azure SQL Database

Explore how to create a Microsoft Azure SQL Server and database using Azure CLI commands. Learn to configure firewall rules, copy connection strings, and create tables to store recognized image data in your Azure solution.

We'll cover the following...

Now that we have finished with image recognition and storage, we would like to save the recognized text in a database. For this, we will create an Azure SQL Server and a database using the CLI. Follow the steps below:

  • Type the following command to log in to Microsoft Azure.
Shell
az login --use-device-code
  • Now, we will set the context of Azure CLI to our desired subscription using the following command:
Shell
az account set -s $subscriptionId
  • Then, we must create our Azure SQL Server to host our database. Execute the following command to create the SQL server:
Shell
az sql server create --name $sqlServerName --resource-group $resourceGroup --location $location --admin-user $sqlServerUsername --admin-password $sqlServerPassword

Please allow a few minutes for the server creation process.

...