Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Error to connect Datamart SQL Endpoint

Hi All,

I have created a Datamart on PowerBI Service and want to connect via SQL Enpoint.

 

I tried to connect via PBI, SQL Server Management Studio and Azure but have errors.

 

From below image, you can see that I copied SQL connection string.

 

 

 

I openned PBI Desktop, get data and choose SQL Server

 

 

Paste SQL connection string, clicked ok

I'm receiving below error.

 

 

I think the problem is not on PBI Desktop, somethings might need to done on datamart, as I couldn't manage to connect this SQL endpoint on Azure Data Studio or SSMS.

 

Does anyone has any idea how to fix it? Tried to play with settings(below) but there is nothing to change.

 

 

 

 

 

  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi Anonymous 

     

    The error "The target principal name is incorrect. Cannot generate SSPI context" is typically related to Kerberos authentication issues within a Windows environment. This error can occur when attempting to establish a connection to a SQL Server using Integrated Security. Here are a few steps to help address this issue:

     

    Ensure that the SQL Endpoint for your Datamart is active and properly configured. Sometimes, connection issues can arise if the endpoint is in the process of refreshing or if there are any ongoing maintenance tasks.

    Datamart details page - Power BI | Microsoft Learn
    Connection errors can also occur if there are network restrictions in place. Ensure that TCP port 1433 is open, as it is the standard port used for SQL Server connections. This is crucial for both on-premises and cloud environments.
    Double-check the authentication method you're using and ensure that your user account has the necessary permissions to access the Datamart. For Datamarts in Power BI, using Microsoft Entra ID (formerly Azure Active Directory) authentication is a common requirement.
    On the client side, if you're using a connection string to connect to the SQL Server, ensure that it's correctly formatted and includes the necessary authentication parameters. For Integrated Security, the connection string should include Integrated Security=SSPI.

     

    Best Regards

    Zhengdong Xu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous 

     

    The error "The target principal name is incorrect. Cannot generate SSPI context" is typically related to Kerberos authentication issues within a Windows environment. This error can occur when attempting to establish a connection to a SQL Server using Integrated Security. Here are a few steps to help address this issue:

     

    Ensure that the SQL Endpoint for your Datamart is active and properly configured. Sometimes, connection issues can arise if the endpoint is in the process of refreshing or if there are any ongoing maintenance tasks.

    Datamart details page - Power BI | Microsoft Learn
    Connection errors can also occur if there are network restrictions in place. Ensure that TCP port 1433 is open, as it is the standard port used for SQL Server connections. This is crucial for both on-premises and cloud environments.
    Double-check the authentication method you're using and ensure that your user account has the necessary permissions to access the Datamart. For Datamarts in Power BI, using Microsoft Entra ID (formerly Azure Active Directory) authentication is a common requirement.
    On the client side, if you're using a connection string to connect to the SQL Server, ensure that it's correctly formatted and includes the necessary authentication parameters. For Integrated Security, the connection string should include Integrated Security=SSPI.

     

    Best Regards

    Zhengdong Xu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi v-zhengdxu-msft,

      Thanks for the replay.

       

      Due to restrictions access on computer I couldn't check some of the options, but I managed to connect to SQL Endpoint via Data Flow on PBI service and run SQL code without error. Confirmed that there is no issue Datamart SQL endpoint related.