0

I am trying to connect Power BI to an Azure SQL Database Server. I am able to connect to the database using SSMS and have added my IP to the firewall settings of the server. However, every time I try to connect Power BI to my SQL Server, I get the following error:

"A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 0 - A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.)"

I am authenticating to the SQL Server using my Microsoft account, but the error still persists.

1
  • Could you please share more steps you take to connect from PowerBI?
    – Jack Jia
    Commented Oct 24, 2019 at 4:34

2 Answers 2

1

I am not sure if you have any network related issues. But, based on my test, everything works fine at my side.

Here are my steps:

1. Set Active Directory Admin for your Azure SQL

And my suggestion here is to add a security group as AD Admin. Then you can add uses to that groups, and all the added users will be administrators.

enter image description here

2. Add firewall rule for your Azure SQL

3. Connect to Azure SQL in Power BI

a). Get Data from Azure -> Azure SQL Database

enter image description here

b). Input your server name and database name

enter image description here

c). Sign in with Azure AD credentials and connect

The account should be set as Active Directory Admin for your Azure SQL Server in step 1.

enter image description here

d). Get data

enter image description here

1
  • Great answer Jack. 2c is the one most people miss assuming Active Directory is correct Commented Oct 24, 2019 at 10:30
0

Recently went through this and was able to connect to a SQL Server with AAD through PBI using the ODBC connection:

Get Data -> Other -> ODBC

Data source name dropdown: (None) Advanced Options: enter the following connection string:

Driver={ODBC Driver 17 for SQL Server};Server=<SERVER NAME>;Database=<DB NAME>;Authentication=AticeDirectoryPassword

You will then be prompted for your username and password.

Not the answer you're looking for? Browse other questions tagged or ask your own question.