This Azure SQL tutorial will discuss the quick steps to connect to Azure SQL database from SSMS.
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.
