Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
JoyceW
Helper II
Helper II

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 3
mussaenda
Super User
Super User

Hi @JoyceW ,

 

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

v-yanjiang-msft
Community Support
Community Support

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

v-yanjiang-msft
Community Support
Community Support

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.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors