Forum Discussion
Dataverse connection error : DataSource.Error: Microsoft SQL: Error code 8657
Hi all,
Hope someone can shed some light on this issue I am having. I inherted a PBIX file which is connected to a dataverse backend using the new connector , CommonDataService.Database
When I perform a refresh I get a DatabaseSource connection error
"DataSource.Error: Microsoft SQL: The service has encountered an error processing your request. Please try again. Error code 8657."
The error is occurring at the Navigation step of a query which is part of the staging process, so there are no major transformations involved. There are only two steps in the query - Source and Navigation
Here is the full error message with the source url hidden
DataSource.Error: Microsoft SQL: The service has encountered an error processing your request. Please try again. Error code 8657.
A severe error occurred on the current command. The results, if any, should be discarded.
RequestId: TDS;bc1c4f65-7a54-45e5-a81e-6a09cd305ea8;4
Time: 2026-08-03T03:26:44.7380879Z
Details:
DataSourceKind=CommonDataService
DataSourcePath=<<hiddenURL.com>>
Message=The service has encountered an error processing your request. Please try again. Error code 8657.
A severe error occurred on the current command. The results, if any, should be discarded.
RequestId: TDS;bc1c4f65-7a54-45e5-a81e-6a09cd305ea8;4
Time: 2026-08-03T03:26:44.7380879Z
ErrorCode=-2146232060
Number=40001
Class=16
State=1
ConnectionId=bc1c4f65-7a54-45e5-a81e-6a09cd305ea8
Here is the m code of the query
let
Source = CommonDataService.Database("<<hiddenURL.com>>", []),
dbo_msdyn_project = Source{[Schema="dbo",Item="msdyn_project"]}[Data]
in
dbo_msdyn_project
My model has other queries which seem to work fine, but they use CDS.Entities as the source which is the legacy connector ( correct me if I am mistaken on this ). Thinking that this could be the cause I tried a new report connected to the dataverse using the same M code above but I still get the error
What could be causing this ? Any help will be much appreciated!
Edit: I also had a look at this similar post here
https://community.fabric.microsoft.com/t5/Desktop/Dataverse-table-failing-to-load-in-Power-BI-and-Excel-with-Error/m-p/5301932
6 Replies
- KNPSuper User
Hi masterelaichi,
Do you get the same error if you connect via SQL endpoint...
... ) as [_] ", Results = Sql.Database( #"SQL Server URL", #"SQL Server Database", [ CommandTimeout = #duration(0, 15, 0, 0), Query = inline_query , CreateNavigationProperties = false ] ) in ResultsI'm wondering if the error is specific to the connector or if it's endpoint related.
Also, I've had more luck with the sql connection.
- masterelaichiFrequent Visitor
thanks for your response, KNP
Do I need to have tds enabled to connect to the SQL endpoint ? If so, I don't have the permissions to do that in Dataverse
I tried using SQL native query which seems to work only for a limited number of columns. The query below seems to worklet Source = CommonDataService.Database("hidden url.com", [CreateNavigationProperties = true]), Custom1 = Value.NativeQuery(Source, "SELECT cr622_col1, cr622_col2, cr622_col3, ... cr622_co30 FROM msdyn_project", null, [EnableFolding=true] ) in Custom1
But when I try to bring in all the columns like in the following code I get the same errorlet Source = CommonDataService.Database("hiddenurl.com", [CreateNavigationProperties = true]), Custom1 = Value.NativeQuery(Source, "SELECT * FROM msdyn_project", null, [EnableFolding=true] ) in Custom1
- v-kathullacCommunity Support
Hi masterelaichi ,
As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided for the issue worked? or Let us know if you need any further assistance?
Regards,
Chaithanya
- masterelaichiFrequent Visitor
Hi,
I am still having issues with this. I tried using an inline query suggested by KNP but that doesn't work when I try bringing in all the columns
Here is the code I attemptedlet inline_query = " SELECT * FROM ( SELECT * FROM systemuser ) as [_] ", Results = Sql.Database( "hiddenURL.dynamics.com", "hiddenURL", [ CommandTimeout = #duration(0, 15, 0, 0), Query = inline_query, CreateNavigationProperties = false ] ) in /* Select Columns systemuserid, fullname, firstname, lastname, internalemailaddress, domainname, isdisabled, businessunitid, title, jobtitle, createdon, modifiedon */ Results
It works when I specify a limited number of columns ( refer to the commented Select columns). But when I try to bring in all the columns it fails, resulting in the same error- KNPSuper User
My suggestion would be, don't bring in all of the columns. SELECT * is lazy and doesn't belong in production.
If you actually want all of the columns, generate the entire column list and then comment out potential problem columns and you'll find the cause of the issue. Possibly a column with an array or other column structure causing issues.
- v-kathullacCommunity Support
Hi @masterelaichi ,
As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided for the issue worked? or Let us know if you need any further assistance?
Regards,
Chaithanya