Forum Discussion
Oct 2020 - Direct Query SQL problem
Some additional info.
There is info written in the log-file ASManagaged*.log when we get this error. In May version where it works nothing is written in ASManagedRoot.
ASManagedRoot looks like below (I´ve masked and changed some sensitive stuff). There are two things that I´m a bit currious about.
1. Provider Type: ProviderTypeCloudSQLAzureManaged. We are using on-preem SQL Server.
2. Username: ???????????????????????o???????? . Can this be the problem?
2020-11-24 15:25:16.8938|INFO|153|Getting data sources in the model for datasourceId = 123 and databaseName = 456
2020-11-24 15:25:16.8938|INFO|153|DetermineProviderAndConnectionString - Connection Type: DQNative; User: [email protected]; Root activity ID: 789.
2020-11-24 15:25:16.8938|INFO|153|BuildNativeConnectionString - Auth type: Windows
2020-11-24 15:25:16.8938|INFO|153|GetV3ConnectionString - Engine connection string: Data Source=server1.domain.com;Initial Catalog=db1; User principal name: [email protected]; Provider type: ProviderTypeCloudSQLAzureManaged; Root activity ID: 789.
2020-11-24 15:25:16.8938|INFO|153|Getting data sources in the model for datasourceId = 123 and databaseName = 456
2020-11-24 15:25:16.8938|INFO|153|GetV3ImpersonationInfo - Datasource: Microsoft.PowerBI.ReportServer.PbixLib.Parsing.PbixDataSource; Auth Type: Windows; Username: ???????????????????????o????????; Needs Impersonation: True; Root activity ID: 789.
In the log file RSPowerBI*.log we get below error (also a bit masked):
2020-11-24 15:25:16.9407|ERROR|54|PBI.Win.DataExtensionException|ExceptionType:Microsoft.PowerBI.DataExtension.Contracts.DataExtensionException;DataExtensionErrorDetails:Details: Message=Failed to get CSDL., HResult=0x80004005, ErrorCode=QuerySystemError, Language=en-US, ProviderErrorCode=0xC1010000, ProviderErrorMessage=[58EBD76BCF5D11E62632F81F91552FC4B4D7DAFC062F8213FCC33F3E84F463A5], ProviderGenericMessage=[The following system error occurred: ], ErrorSource=PowerBI, ErrorSourceOrigin=MsolapWrapper, OnPremErrorCode=, InnerErrorDetails=[Type=MsolapWrapper.MsolapWrapperException, Message=Failure encountered while getting schema];stackTrace: at Microsoft.PowerBI.DataExtension.Msolap.SchemaCommand.GetModelMetadata(String catalogName, String perspectiveName, String supportedVersion)
at Microsoft.PowerBI.ReportingServicesHost.LocalReportProcessingHost.ExecuteSchemaCommand[T](ExploreHostDataSourceInfo dataSourceInfo, IDbConnectionPool connectionPool, IConnectionFactory connectionFactory, IConnectionUserImpersonator connectionUserImpersonator, QueryExecutionOptionsBase queryExecutionOptions, ITelemetryService telemetryService, Func`2 action, String failTelemetryMessage, ServiceErrorStatusCode statusCode, ExploreBaseEvent exploreEvent);message:GetModelMetadata;| RequestID = 999 ClientSessionID = 888
2020-11-24 15:25:16.9407|ERROR|54|PBI.Win.ReportingServicesHostTrace|type:Error;message:library:Throwing Microsoft.ReportingServices.Diagnostics.Utilities.CannotRetrieveModelException: , Microsoft.ReportingServices.Diagnostics.Utilities.CannotRetrieveModelException: An error occurred while loading the model for the item or data source 456. Verify that the connection information is correct and that you have permissions to access the data source. ---> Microsoft.PowerBI.DataExtension.Contracts.DataExtensionException: Failed to get CSDL. ---> MsolapWrapper.MsolapWrapperException: Failure encountered while getting schema
at MsolapWrapper.Utils.ThrowErrorIfHrFailed(Int32 hr, String message)
at MsolapWrapper.CDbSchemaRowsetWrapper.ExecuteSchemaRowset(Guid schema, Object[] restrictions, PropertySetCollection propSets)
at MsolapWrapper.SchemaCommand.ExecuteReader(Guid schema, Object[] restrictions)
at MsolapWrapper.SchemaCommand.GetModelMetadata(Object[] restrictions)
at Microsoft.PowerBI.DataExtension.Msolap.SchemaCommand.GetModelMetadata(String catalogName, String perspectiveName, String supportedVersion)
--- End of inner exception stack trace ---
at Microsoft.PowerBI.DataExtension.Msolap.SchemaCommand.GetModelMetadata(String catalogName, String perspectiveName, String supportedVersion)
at Microsoft.PowerBI.ReportingServicesHost.LocalReportProcessingHost.ExecuteSchemaCommand[T](ExploreHostDataSourceInfo dataSourceInfo, IDbConnectionPool connectionPool, IConnectionFactory connectionFactory, IConnectionUserImpersonator connectionUserImpersonator, QueryExecutionOptionsBase queryExecutionOptions, ITelemetryService telemetryService, Func`2 action, String failTelemetryMessage, ServiceErrorStatusCode statusCode, ExploreBaseEvent exploreEvent)
--- End of inner exception stack trace ---;;| RequestID = 999 ClientSessionID = 888
2020-11-24 15:25:16.9407|ERROR|68|Failure in conceptualschema| RequestID = 999 ClientSessionID = 888 Microsoft.ReportingServices.Diagnostics.Utilities.CannotRetrieveModelException: An error occurred while loading the model for the item or data source '71b5c356-58bd-46d1-be92-23f75d65edf8_-463211041'. Verify that the connection information is correct and that you have permissions to access the data source. ---> Microsoft.PowerBI.DataExtension.Contracts.DataExtensionException: Failed to get CSDL. ---> MsolapWrapper.MsolapWrapperException: Failure encountered while getting schema