Unable to connect Excel 2016 to Azure SQL Database even though SSMS connects without issue

Viewed 2058

I have an Azure SQL Server (native, not inside a VM) that I connect to every day via SSMS on my local machine - Windows 10 Pro.

For the first time, I am trying to connect Excel 2016 via Data-> Get Data-> From Database -> From SQL Server Database.

From there I am asked for the Server name, followed by login credentials, which I use the exact username and password I'm using for SSMS. I get an error message that says We couldn't authenticate with the credentials provided. Please try again.

This doesn't make any sense to me. My SSMS work perfectly, and Excel is under the same IP address as SSMS which is whitelisted. Is there something else inside Excel's settings which I'm missing?

FYI, I tried the server name both with and without 1433 after it just to be sure. Same result.

Screenshots below.

#1

#2

2 Answers

I tried using the data, get data, sql server option. It does not understand azure sql database.

If I use the data, new query, azure sql database option, I have the same screens that you have. I am using Excel 2016.

Here is your issue!

There are two tabs on the second screen. You are filling in the window tab. Therefore, it is trying to log into the database with windows (active directory) authentication. Choose the second option on the left pane, database. Use database credentials.

This should work with no issues.

I tested it out on my local machine.

for azure sql you always need to provide the database name, as you do not have rights to list databases on azure. (so this optional is not that optional for azure :)

I could list tables on azure sql from office 2016 on mac, nevertheless the excel query app shows only the tables but does not show any views. Once i made a table the import was hanging while trying to get the data. making a smaller table (just 60K rows) did not help. The SQL server connectivity seems to be broken/very slow on mac excel 2016.

Related