Provision and Configure relational databases in azure portal: part 1
Provision and Configure relational databases in azure portal: part 1

Introduction

This post is to provision and configure relational databases in the azure portal and is part of develop solutions that use a relational database.

This post is part of the Azure AZ-203 certification path. The topic covered in this post is part of skills measurement, "Develop for Azure storage" and about 15-20 % of skills are measured.

There are four topics under this skill measurement as shown below.

  • Develop solutions use
    1. storage tables
    2. Cosmos DB storage
    3. a relational database
    4. blob storage

Develop solutions that use a relational database

  1. provision and configure relational databases
  2. configure elastic pools for Azure SQL Database
  3. create, read, update, and delete data tables by using code
  4. provision and configure Azure SQL Database serverless instances
  5. provision and configure Azure SQL and Azure PostgreSQL Hyperscale instances

In this post, I will cover point # 1, how to provision and configure relational database using Azure SQL Server.

Before we get started, see take a look at Prerequisite below.

Prerequisite

  1. You need an Azure subscription. If you don't have an account, you may create at "https://azure.microsoft.com/en-us/free/". It is free and includes $200 to explore any Azure service for 30 days.
  2. Basic knowledge of the relational database.
  3. Visual Studio 2019 or 2017

Let's get started..

Provision and configure relational databases

Once you have "Signed In" to the Azure portal, you will be able to see a bunch of links to the left side of the screen, refer below image. If you are yet to sign in, follow this link to sign in http://portal.azure.com.

Choosing SQL Database

Click in SQL Databases to the left side menu.

provision and configure relational databases

Click on "+ Add" to the top center of the screen as shown in the image. I have my SQL instance running so it is showing up in the available list.

add new database

Configuring SQL Server and SQL Database

Now, we need to provide some information to create a SQL Server and SQL database.

  • Choose subscription details from the drop-down, if you ave created your new account then you will see subscription as "Free Trail".
  • Next is to create a resource group. Hey wait wait…, what is the resource group?

According to Microsoft, a resource group is described below.

resource group - A container that holds related resources for an Azure solution. The resource group includes those resources that you want to manage as a group. You decide which resources belong in a resource group based on what makes the most sense for your organization

From Microsoft

For more information, visit https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-group-overview

provision and configure relational databases

Create a new SQL server

We should create a new SQL server and provide a unique name to our database. Click on "Create New", there will be a popup shown to your right side. Fill up the server name, provide username and password, choose a location.

I have created a database name "shopping". I will cover how to configure this database and execute migration scripts using visual studio 2019.

configure SQL Database and choose SQL server

Click on "Review + Create" and you are done. It takes a few seconds to deploy the server.

list of SQL database

To check the connection string of the SQL server and database that we created, go to "SQL Databases" link in the left menu. You can then choose your newly created database and go to the Overview blade (menu).

overview blade of SQL server and database

To your top right side, click on "show database connection string" to copy the connection string.

Note:

Azure database is secured by default, meaning no external connections will be accepted by the firewall. In order to connect to your Azure database from your local, you need to add your IP (client IP) in the SQL Server in the Azure portal.

Read my post on how to SET UP CI PIPELINE FOR ANGULAR APPLICATION USING AZURE DEVOPS BUILD to learn azure DevOps pipeline.

Conclusion

In this post, you learned how to provision and configure relational databases in the Azure portal. In my next post, I will show how to design a database schema for a small application and push the changes to our SQL Database in Azure.

That’s all from this post. If you have any questions or just want to chat with me, feel free to leave a comment below. If you want to get a continuous update about my blog, make sure to follow me on Facebook and Twitter.

Leave a Reply

Your email address will not be published. Required fields are marked *

Verified by MonsterInsights