A Step-by-Step Guide to Setting Up Azure Database and SQL Server in the Azure Portal



Welcome to this comprehensive guide on setting up Azure Database and SQL Server in the Azure Portal. Azure offers a powerful and scalable cloud-based infrastructure that enables organizations to store, manage, and analyze their data efficiently. In this blog, we will explore the step-by-step process to establish Azure Database and SQL Server, empowering you to leverage the full potential of Azure's robust database services.


Step 1: Sign in to the Azure Portal

To get started, navigate to the Azure Portal (https://portal.azure.com) and sign in using your Azure account credentials. If you don't have an Azure account, you can create one for free.


Step 2: Create a new resource group

A resource group is a logical container for resources within Azure. To create a new resource group, follow these steps:

1.     On the Azure Portal dashboard, click on "Create a resource" or navigate to the "Resource groups" section.


2.     Click on "Create" to create a new resource group.


3.     Provide a name for the resource group, choose the desired subscription, and select a region.


4.     Click on "Review + Create" and then "Create" to create the resource group.


Step 3: Create an Azure SQL Server

Azure SQL Server is a fully managed relational database service. Follow these steps to create a new SQL Server:

1.     In the Azure Portal, click on "Create a resource" and search for "SQL Server."


2.     Select "SQL Server (logical server)" from the search results and click on "Create."


3.     Choose the desired Subscription, Resource group (create a new one or select an existing one), Server name (should be unique) and Location.


4.     Set the Azure AD admin. For the testing purpose, I am setting myself as a admin. The admin will be having higher privileges, so make sure to select the ones, whom you want to provide the admin access.


5.     Select the Authentication method and add the server admin login and password.


6.     Configure the additional settings, such as version, performance, and networking.

7.     Click on "Review + Create" and then "Create" to provision the Azure SQL Server. Wait for some time, as the azure will take some time for the deployment of the SQL Server.


Step 4: Configure firewall settings for Azure SQL Server

By default, Azure SQL Server has firewall rules that block all external connections. To allow connections to your SQL Server, follow these steps:

1.     In the Azure Portal, navigate to the resource group containing your SQL Server.

2.     Click on the SQL Server resource to open its overview page.

3.     In the left menu, under "Security," click on "Networking”.


4.     Click on "Add your client IPv4 address" to add your current IP address to the firewall rules.


5.     If you require access from specific IP ranges or Azure services, you can configure additional firewall rules accordingly.

6.     Click on "Save" to apply the changes.


Step 5: Create an Azure Database

Now that we have a SQL Server, let's create a database within it:

1.     In the Azure Portal, navigate to your SQL Server resource.

2.     Click on "Create database" to initiate the database creation process.


3.     Provide a name for the database, select the workload environment, Compute + storage. For the testing, I have selected the Standard-series (Gen5).


4.     Desired source (blank database or sample), and configure additional settings such as collation and security.

5.     Click on "Create" to create the Azure Database. Wait for some time until azure finishes the deployment of the database.


Step 6: Connect to Azure SQL Server using SSMS

To manage your Azure SQL Server and databases, you can use SQL Server Management Studio. Here's how to connect to your Azure SQL Server using SSMS:

1.     Download and install SQL Server Management Studio from the official Microsoft website (https://docs.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms).

2.     Open SSMS and click on "Connect" to open the "Connect to Server" window.

3.     Fill in the necessary details.

·       Server type: Database Engine

·       Server name: Enter the fully qualified server name for your Azure SQL Server (e.g., myserver.database.windows.net). To find the server name. Go to Overview page of the database.

·       Authentication: Select "SQL Server Authentication"

·       Login: Enter the server admin login you provided during SQL Server creation

·       Password: Enter the server admin password

4.     Click on "Connect" to establish a connection with your Azure SQL Server.


Note: Make sure to delete the resource group, if you are creating the above setup only for testing. It’s fine, if you’re in Free Tier. For Pay-as-you-go subscription, you will be charged for the resources.



Congratulations! You have successfully set up Azure Database and SQL Server in the Azure Portal. In this blog, I guided you through the steps of creating an Azure SQL Server, configuring essential settings, and creating a database. Azure provides a reliable and scalable cloud platform to manage your data, and now you have the foundation to leverage its power. As you continue your journey with Azure, explore additional features, such as Azure SQL Database Elastic Pool, to further enhance your database capabilities. Happy cloud data management!

Love my work?

Consider buying me a coffee! Your support helps me continue creating content that you enjoy.

Post a Comment


*Be the first to comment