How to connect to an Azure SQL DB is a question that comes up for a lot of admins used to administering on-premises SQL Server. Connecting to the cloud managed version of SQL Server is very similar to the local datacenter version and uses the same tools. Both SQL Server Management Studio (SSMS) and SQL Server Data Studio can be used to connect to Azure SQL Database.
SQL Server Management Studio
For this task, I’m using SQL Server Management Studio version 17.8.1. The process requires the user to find the server name as listed in the Microsoft Azure dashboard. Once that DNS name is known, it can be used in the app.
Copy the server name listed and paste it into the SSMS screen describing the connection information. In addition to the server name, the Login and Password must be supplied. If you used the script from the previous blog post in this series, then login id and password are in the script.
Once supplied, SSMS opens as normal the standard feature set is available for use.
Azure Data Studio
Azure Data Studio can also be used to connect to an Azure SQL DB. To do so, use the server name listed in the Azure dashboard, the login id, and the password used when the database was configured.
Select New Connection
Next, supply the required info. Server, User name, and Password are the required fields. The Authentication type can be left as the default “SQL Login” if the database was created using the script in an earlier blog post.
Once connected, the standard set of tools can be used to manage the Azure SQL DB the same as any other SQL Server.
Interestingly, there’s an alternative method of connecting using Azure Data Studio. Selecting the Azure icon on the left toolbar allows the user the walk through all of the databases associated with the user’s account.