Forum Discussion

JoyceW's avatar
JoyceW
Helper II
3 years ago

Error when autorefreshing sql query in Power BI service

I get this error:

 

Fout in de gegevensbron: {"error":{"code":"DM_GWPipeline_Gateway_InvalidConnectionCredentials","pbi.error":{"code":"DM_GWPipeline_Gateway_InvalidConnectionCredentials","parameters":{},"details":[{"code":"DM_ErrorDetailNameCode_UnderlyingErrorCode","detail":{"type":1,"value":"-2147467259"}},{"code":"DM_ErrorDetailNameCode_UnderlyingErrorMessage","detail":{"type":1,"value":"De referenties die zijn opgegeven voor de bron SQL, zijn ongeldig. (Bron op sql-exact;compliespricetool.)"}},{"code":"DM_ErrorDetailNameCode_UnderlyingHResult","detail":{"type":1,"value":"-2147467259"}},{"code":"Microsoft.Data.Mashup.CredentialError.DataSourceKind","detail":{"type":1,"value":"SQL"}},{"code":"Microsoft.Data.Mashup.CredentialError.DataSourcePath","detail":{"type":1,"value":"sql-exact;compliespricetool"}},{"code":"Microsoft.Data.Mashup.CredentialError.Reason","detail":{"type":1,"value":"AccessUnauthorized"}},{"code":"Microsoft.Data.Mashup.MashupSecurityException.DataSources","detail":{"type":1,"value":"[{\"kind\":\"SQL\",\"path\":\"sql-exact;compliespricetool\"}]"}},{"code":"Microsoft.Data.Mashup.MashupSecurityException.Reason","detail":{"type":1,"value":"AccessUnauthorized"}}],"exceptionCulprit":1}}} Table: Prijslijst.
URI cluster: WABI-WEST-EUROPE-B-PRIMARY-redirect.analysis.windows.net
Activiteits-id: 6b0cae71-6f49-4939-b1a6-9b5f7ac1091b
Aanvraag-id: c2564300-5652-4ede-81b8-74c6b0090d4e
Tijd: 2023-08-10 05:20:21Z

 

This is 

let Source = Sql.Database("sql-exact", "compliespricetool", [Query="DECLARE @now date#(lf)SET @now = GETDATE()#(lf)Execute GetReportOuderdomsVerslagVoorraad @now, 14, 30, 60#(lf)"]),

 

The gateway is online and I have access to the server. What could cause the error?

3 Replies

  • Hi JoyceW ,

    Based on the error message, it seems like the credentials you specified for the SQL data source are invalid. The error message specifically mentions "AccessUnauthorized" and "CredentialError", which suggests that the issue is related to authentication.

    I would recommend double-checking the credentials you specified in the Power BI service to make sure they are correct. You may also want to check the permissions for the user associated with those credentials to ensure they have the necessary access to the SQL server. Or other possible reasons like the gateway is not configured properly or has an outdated version; The SQL server is not accessible or has a firewall blocking the connection.
    Some possible solutions that you can try are:

    • Update the credentials of the SQL source in the Power BI service and make sure they match with the SQL server.
    • Download the latest version of Power BI Desktop and republish to Power BI service.
    • Remove the broken reports from the online service and re-add them.
    • Open the report(s) in PBI Desktop and clear the cache (file…options and settings… options).
    • Refresh the data in the desktop and save.
    • Check the gateway settings and update it if needed.
    • Verify that the SQL server is online and reachable from the gateway machine.
    • Allow inbound and outbound traffic for port 1433 on the SQL server firewall.

    Best Regards,
    Community Support Team _ kalyj

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

  • Hi JoyceW ,

    Has your problem beed solved? If so, please kindly accept the helpful reply as solution, then we'll close the thread, other people who has the similar problem will benefit from here. Thank you!

     

    Best regards,

    Community Support Team_yanjiang

  • mussaenda's avatar
    mussaenda
    Community Champion

    Hi JoyceW ,

     

    Have you tried to re-enter the credentials on your gateway for this source?