SQL SERVER – Connecting to Azure SQL DB

Learning new methods of working with SQL Server can always be challenging. I found the new learning coming my way while connecting to Azure SQL DB. I was confronted with an error and I was not sure where to start. So this blog is like a travel log of my learning to connect to an Azure SQL DB which looks almost same as what an onpremise SQL Server looks like. When I was connecting to Azure SQL DB, I was getting an error as shown below:

SQL SERVER - Connecting to Azure SQL DB azure-db-01

But the basic information will be around how did I get the connection string to connect to my database. It can be got from the azure portal. As I goto the server and check on the information, I will be presented with the server details which was being used in our SQL Server Management Studio.

SQL SERVER - Connecting to Azure SQL DB azure-db-02

Now to manage the error message, look at the Dashboard and click on the “Manage allowed IP addresses” from your machine where we are getting this error.

SQL SERVER - Connecting to Azure SQL DB azure-db-03

Once in this page, you will be able to see the current IP address. This is the same address that you are currently using to connect to Azure SQL DB. Click on the next and this must add the same to the grid below. This is an important step because you don’t want any IP address to connect to SQL Server and this has been used by a number of companies when accessing databases on the cloud to control access.

SQL SERVER - Connecting to Azure SQL DB azure-db-04

When I tried to the same using SQL Server 2016 Management Studio, I saw it also gave a different point of entry and a pop-up which can be used to connect to Azure and add the current IP address or the IP address ranges.

SQL SERVER - Connecting to Azure SQL DB azure-db-05

Once this has been done, we will be able to connect to Azure SQL DB via SQL Server Management Studio. As you can see, the icon for the server connected also looks modern and is a great way to work with another form of SQL Server.

SQL SERVER - Connecting to Azure SQL DB azure-db-06

As I sign off now, would like to understand how many of you have had an opportunity to work on Azure? What has been your experience? Do let me know via comments below.

Reference: Pinal Dave (https://blog.sqlauthority.com)

SQL Azure
Previous Post
SQL SERVER – Getting Started with Project Versions in the SSIS Catalog – Notes from the Field #106
Next Post
SQL SERVER – Discussion on understanding NUMA

Related Posts

1 Comment. Leave new

  • We have used SQL Azure for some time now. Initially, there were some compatibility issues, where some SQL statements were unsupported (like SELECT INTO). This has been improved over time. Where higher performance is needed, SQL Azure can become quite costly, easily exceeding the cost of running SQL Server on dedicated hardware. Keep this in mind when planning.

    Reply

Leave a Reply