使用 AAD 凭据将 Power BI 与 Azure SQL 数据库服务器连接

我正在尝试将 Power BI 连接到 Azure SQL 数据库服务器.我能够使用 SSMS 连接到数据库,并将我的 IP 添加到服务器的防火墙设置中.但是,每次我尝试将 Power BI 连接到我的 SQL Server 时,都会收到以下错误:

在建立与 SQL Server 的连接时发生与网络相关或特定于实例的错误.找不到服务器或无法访问该服务器.验证实例名称是否正确以及 SQL Server 是否配置为允许远程连接.(provider: TCP Provider, error: 0 - 连接尝试失败,因为连接方在一段时间后没有正确响应,或者连接失败,因为连接的主机没有响应.)"

我正在使用我的 Microsoft 帐户对 SQL Server 进行身份验证,但错误仍然存​​在.

解决方案

我不确定您是否有任何与网络相关的问题.但是,根据我的测试,我这边一切正常.

这是我的步骤:

1.

2.

b).输入您的服务器名称和数据库名称

c).使用 Azure AD 凭据登录并连接

该帐户应在步骤 1 中设置为 Azure SQL Server 的 Active Directory 管理员.

d).获取数据

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.

解决方案

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.

2. Add firewall rule for your Azure SQL

3. Connect to Azure SQL in Power BI

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

b). Input your server name and database name

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.

d). Get data

相关文章