This post explains the steps to be followed to connect to Azure SQL Server from Microsoft SQL Server Management Studio (SSMS).

Step 1: Download SQL Server Management Studio (SSMS)

Click Here to download SQL Server Management Studio. Here you need to select a version that supports your Operating System. Once it downloads, install it.

Note: Make sure there is atleast 500MB of free space before this process is started. The install might take good 15-30 minutes based on your PC configuration. Be Patient!!!

SQL Server Management Studio

Microsoft SQL Server Management Studio Install 2

Step 2: Create database and add user in Azure

If there is no database created then create one in Azure.

Click on New (Plus Sign) -> Data+Storage -> SQL Database
New-SQL-Sever-Microsoft Azure

You can add an user or use the admin username password that was setup while Azure database server was initialized (not covered on this post).
A new user can be added by selecting SQL Server -> Settings -> Users -> Add
Users-Microsoft-Azure

Step 3: Configure Azure database connection in SSMS

Open the Microsoft SQL Server Management Studio and click on “Connect Object Explorer” (File -> Connect Object Explorer). Here servername (<databaseName>.database.windows.net), username and password need to be entered.
Microsoft SQL Server Management Studio Login

Step 4: Add Firewall Exception to Azure Server

When we try to login for the first time, SSMS detects that we are trying to login to Azure database based on the Server name and gives us an option to add our ip or subnet range as exception to Azure.
SQL Server Management Studio New Firewall Rule

Click on “Sign in…” and a pop up to login into Azure shows up. Enter your authentication credentials.
Microsoft SQL Server Management Studio Azure SignIn

Once you log in, you can now add a Firewall exception to Azure.
If you have multiple devices/programs through which you are planning to connect to Azure, I would recommend adding a range of your subnet.
SQL Server Management Studio New Firewall Rule 2

Step 5: Confirm that firewall exception is added

Log in into Azure in browser and navigate to SQL Server -> Settings -> Firewall
Firewall settings - Microsoft Azure

Step 6: Create DDLs using SSMS

After successfully logging in into SSMS, you can create table and run queries.
Right click on database -> New Query
create-query-azure

create a new table

Execute the query.
execute-query-azure

Follow same process to execute all DML commands too.

Hope this helps!!!

Learn and Share