Forum Discussion

V_Jith's avatar
V_Jith
Frequent Visitor
1 year ago
Solved

Unable to connect to Azure SQL managed Instance from service

My DB is Azure SQL managed Instance. I am able to connect from Power BI desktop. But when configuring the gateway cloud connection from Power BI Service. I am not able to.  Send Help!!!
  • BhavinVyas3003's avatar
    BhavinVyas3003
    1 year ago

    Hi V_Jith ,

     

    • You must use an On-premises Data Gateway (standard mode) to bridge Power BI Service to Azure SQL Managed Instance.
    • Install On-premises Data Gateway on a VM that has network access to the Azure SQL MI.
    • In Power BI Service → Manage Gateways, add a SQL Server data source using the FQDN of the MI.

    Ensure:

    • Gateway VM can access MI on port 1433.
    • Authentication uses SQL auth or OAuth2 with HTTPS.
    • NSG and firewall allow the traffic.
  • burakkaragoz's avatar
    burakkaragoz
    1 year ago

    Hi V_Jith ,

    Great question! Connecting Power BI Service to an Azure SQL Managed Instance often trips people up, even if it works fine in Power BI Desktop. Here’s what you need to check and set up for a successful connection:

    1. Use the On-premises Data Gateway:
      Power BI Service can’t directly connect to an Azure SQL Managed Instance; it needs the On-premises Data Gateway (standard mode). This gateway acts as a bridge between your cloud Power BI reports and the Azure SQL MI.

    2. Gateway Location:
      The gateway must be installed on a VM or server that has network access to your Azure SQL Managed Instance. The VM should be able to reach the MI over port 1433.

    3. Network and Security:

      • Make sure your VM’s firewall and NSG rules allow outbound traffic to the Azure SQL MI.
      • Sometimes, you may need to add the VM’s IP to the allowed list in the Azure SQL MI’s networking settings.
    4. Authentication:

      • Use SQL authentication or Azure AD (OAuth2 with HTTPS).
      • Verify that the credentials you use for the connection have the right permissions on the database.
    5. Gateway Setup in Power BI Service:

      • Register your gateway in Power BI Service under Manage Gateways.
      • Add a new SQL Server data source with the FQDN of your Managed Instance.
      • Test the connection from within Power BI Service to make sure it’s successful.

    If you follow these steps and still run into issues, double-check the firewall and NSG settings, and make sure the gateway service is running properly on the VM.

    Let us know if you need more detailed troubleshooting or run into a specific error message!
    translation and formatting supported by AI