Use SQL Server Management Studio 🌐 To Connect Azure🛢️SQL Database

In my previous article, we learned how to create a SQL database in the Azure portal, in this article we will see how to use SQL Server Management Studio to connect and query the Azure SQL database.
 
Before you start the following are the prerequisites:
  • Azure SQL database.
  • SQL Server Management Studio.
  • A configured server-level firewall rule.
Let's start with the login into Azure Portal from the Dashboard. Click on SQL databases tab from the Azure Services. 
 
Use SQL Server Management Studio To Connect Azure SQL Database
 
From the list select your database, for example here I have selected 'MyDatabase'
 
Use SQL Server Management Studio To Connect Azure SQL Database
Once you select the database, you can see server information along with all other pieces of information. 
 
Copy the server name and then open SQL Server Management Studio. 
 
Use SQL Server Management Studio To Connect Azure SQL Database
 
Use SQL Server Management Studio To Connect Azure SQL Database
 
Enter the server name, select SQL Server Authentication mode, enter Login and Password and click on 'Connect'.
 
Use SQL Server Management Studio To Connect Azure SQL Database
 
If your firewall rule was not set then it will see the below message, so first, we have to set that rule.

Use SQL Server Management Studio To Connect Azure SQL Database
 
For that click on Set server firewall from the Overview tab.
 
Use SQL Server Management Studio To Connect Azure SQL Database
 
Click on Add client IP and save the details.
 
Use SQL Server Management Studio To Connect Azure SQL Database
 
Now from the SSMS enter the credentials and click on 'Connect'.
 
Use SQL Server Management Studio To Connect Azure SQL Database
 
That's it you can now access the database from Azure Database in SSMS.
 
Use SQL Server Management Studio To Connect Azure SQL Database
 
I hope you like these steps, I'm waiting for your feedback or comments in the comment box.


Similar Articles