Step by Step guide to Connect to SQL Azure using SQL Server Management Studio (SSMS)
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!!!
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
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
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.
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.
Click on “Sign in…” and a pop up to login into Azure shows up. Enter your authentication credentials.
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.
Step 5: Confirm that firewall exception is added
Log in into Azure in browser and navigate to SQL Server -> Settings -> Firewall
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 a new table
create table authenticate
Execute the query.
Follow same process to execute all DML commands too.
Hope this helps!!!
Learn and Share