Azure SQL DB using SSMS – Things you should know.

Hey folks…In this post let’s see few things which you should be aware of, to avoid any surprises when connecting to your Microsoft Azure SQL DB from your SSMS.

First thing you might notice is there are no msdb,model and tempdb databases under system databases category, No Agent and pretty much nothing what you would see on your On-Premise SQL Server.

. 1

Now, let’s try opening a new query and see how database context works with Azure SQL DB. As you can see I got connected to master database which is my default database.


Nothing strange right? Let’s see what happens when I try to change my database context.


Ahaaaa….so, What if I change my database context from GUI?


Am able to change the database context for the first time. Well, but you can’t switch it back from GUI. It will be greyed out(See below).


So…Basically you have to establish a new connection to desired database as needed. In other words, you are directly connecting to your Database(literally). After all…this is Azure SQL DB, not Azure SQL Server 😀


Getting started with Microsoft Azure – Creating Azure SQL Database(DaaS)

In this blog post, Let’s see how to create a Microsoft Azure SQL database and how to connect to it from your SSMS client tool remotely.

Pre-Req: you need to have an Azure subscription. You can sign up for free (I guess, you will get 30 days for trail).

Once you login to your Azure management portal, it looks similar to this…


As you can see I’ve one Virtual machine and a storage account and “Zero” SQL Databases at this point. So, do you need a virtual machine or a storage account to create Azure SQL DB? The answer is “No”. I created them for exploring Azure IaaS(Infrastructure as a Service). Anyways…let’s start creating Azure SQL DB.

Step1: select SQL Databases and select “create a SQL Database”


Step 2: Give your database a name and choose your tier and DTUs (Data throughput Unit). I will explain what they are in another short blog post. Now…focus on the server in the below screenshot. Remember, I already have a VM but it’s not listed here and I’ve selected “create new SQL database server”. If you are wondering why, here am trying to create a Azure SQL Database as DaaS(Database as a Service), In which I’ve no control over the underlying server and hardware. All I get is to provide DTUs and a location to pick, I can’t use Virtual machines which I’ve created under IaaS for this service.


Step 3: Provide a SQL Server authenticated admin account to connect to this database(Think this as “sa” account on your traditional SQL Server Instance) and pick the server location where you want the server to be created.


Click on the “Check” button and you should have your server and SQL database up and running in matter of few seconds.

You can see I’ve got a new SQL Server database and when I go to servers tab, see the new server as well which got created.



So, how would you connect to this SQL Server from your SSMS?

You should go to servers tab and click on your server and click on dashboard. On the bottom right you will see an URL. That’s your server name which you should be using to connect from SSMS without https://.


Let’s give it a shot and see how it goes from my SSMS.


Oops! The fix? Simple, I have to go to azure management portal and select the server and go to configure and create a rule to allow my IP address where I’m trying to connect from using SSMS as shown below and click save.


Once I did that, I was able to successfully connect to my Azure SQL DB 🙂


I hope this will help setting up your first Azure SQL DB as DaaS. In an upcoming post, I will show few “GOTCHAS and limitations” you should be aware of while connecting to your Azure SQL DB from your SSMS.

Cannot obtain the required Interface from OLE DB Provider “OraOLEDB.Oracle”

Today in the morning I was contacted by my fellow DBA to look into an issue with a linked Server he setup from SQL Server to Oracle. He did setup a linked server from SQL Server 2005 to an Oracle database and tested successfully(From SSMS). Well, everything appeared to be okay, but the app teams are unable to use this Linked server.


The DBA tried expanding catalogs->default and Oops…he is receiving this weird message.


This looks like missing permissions issue at Oracle end, but wait……..he was able to test the linked server successfully! So what did he miss?

The answer is “Allow Inprocess” for OraOLEDB.Oracle provider. Once I asked him to check that box, Voilaaaa….it works 🙂


For more information on the properties of these providers, please see

Happy Friday all!