This Azure SQL tutorial will discuss the quick steps to connect to Azure SQL database from SSMS.
Table of Contents
How to connect to Azure SQL database from SSMS
Let’s discuss how to use SQL Server Management Studio to connect and query the Azure SQL database.
Before we start, Below are a few things we need as prerequisites
- An Azure SQL Database, if you don’t have created one yet, create an Azure SQL Database now.
- SQL Server Management Studio needs to be installed on your machine.
Follow the below steps to connect and access the Azure SQL Database
1. Log in to Azure Portal (https://portal.azure.com/)
2. Search for the SQL databases and click on the same search result.

3. You will find the list of databases you created. Click on the one you want to connect to the SQL Server Management Studio.

4. Once you click on the database you want to connect, you will find all the information like status, Resource group, Location, Subscription, server name, etc. related to that database.

Now copy the Server name from the above page and keep it in a notepad that we need to connect from the SQL Server Management Studio.
Now, the next step is to Open the SQL Server Management Studio.

Now, enter the server name that you copied following the above steps and kept in a notepad, select SQL Server Authentication mode, enter the credentials, and click on ‘Connect’.

You need to set your firewall rule in Azure Portal. If you have not done it, it will show you the below message, so we need to set the firewall rule.

Now, to set the firewall rule, navigate to your Azure SQL Database again, and click the Set server firewall button from the top of the Overview tab.

On the Firewall settings, set the Allow Azure services and resources to access this server option to Yes and then click on the + Add client IP button and next click on the Save button to save the changes.

Now you can see below I successfully updated the server firewall rules.

Now, from the SQL Server Management Studio, enter the credentials and click the ‘Connect‘ button to connect to the Azure SQL database from the local SQL Server Management Studio.

Now you can see below we have connected to the Azure SQL Database successfully from the local SQL server management studio without any issues.

Query data
Now we are connected to the Azure SQL Database, let’s try to query the data
Let’s create a table in the database first using the below SQL Script
CREATE TABLE MYINFO
(
LastName varchar(255),
FirstName varchar(255),
);

Now you can see below the table has been created successfully without any issue

Video Tutorial
You may also like following the articles below
Conclusion
This Azure SQL tutorial discussed the quick steps to connect to Azure SQL from SSMS. Thanks for reading this article !!!

I am Rajkishore, and I am a Microsoft Certified IT Consultant. I have over 14 years of experience in Microsoft Azure and AWS, with good experience in Azure Functions, Storage, Virtual Machines, Logic Apps, PowerShell Commands, CLI Commands, Machine Learning, AI, Azure Cognitive Services, DevOps, etc. Not only that, I do have good real-time experience in designing and developing cloud-native data integrations on Azure or AWS, etc. I hope you will learn from these practical Azure tutorials. Read more.
