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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Power BI report Server issue with Direct Query to SQL Server database

Hi everyone I have Power BI Report server, and power bi desktop for RS (May 2024) installed. I tried to create very first report using Direct Query to a SQL Server database. It works normally in Power BI Desktop, but when I open it from Power BI Report Server, it returned error related to Analysis Services

We couldn't connect to the Analysis Services server. Make sure you've entered the connection string correctly.

Request ID 46c3c998-4e49-568a-9440-538cddde9124

TimeTue Jun 25 2024 09:22:20 GMT-0400 (Eastern Daylight Time)

Service version/powerbi/libs

 

The detail log here:

2024-06-25 09:22:19.8493|INFO|21|Received request POST /api/explore/reports/3642b2a5-d385-4d38-a5af-415dcb07f16b/conceptualschema| RequestID = 46c3c998-4e49-568a-9440-538cddde9124 ClientSessionID = 3ac90abb-67c9-437b-4029-8875fd901c7e
2024-06-25 09:22:19.9074|INFO|21|Received request GET /libs/images/fluentui-icons.svg| RequestID = s_70ed60ee-bfe0-4b1a-94cc-e2fab7ae4f62
2024-06-25 09:22:19.9526|ERROR|47|PBI.Win.DataExtensionException|ExceptionType:Microsoft.PowerBI.DataExtension.Contracts.DataExtensionException;DataExtensionErrorDetails:Details: ErrorCode=QuerySystemError, ProviderErrorCode=0xC112001B, ErrorSource=PowerBI, Message=Failed to get CSDL., HResult=0x80004005, Language=en-US, ProviderErrorMessage=[<ccon>[content removed]</ccon>], ProviderGenericMessage=[Errors in the high-level relational engine. . The exception was raised by the IDbConnection interface.], 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, TranslationsBehavior translationsBehavior)
at Microsoft.PowerBI.ReportingServicesHost.ModelMetadataProvider.<>c__DisplayClass10_0.<GetModelMetadata>b__0(IDbSchemaCommand command)
at Microsoft.PowerBI.ReportingServicesHost.ModelMetadataProvider.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 = 46c3c998-4e49-568a-9440-538cddde9124 ClientSessionID = 3ac90abb-67c9-437b-4029-8875fd901c7e
2024-06-25 09:22:19.9526|ERROR|80|Failure in conceptualschema catalogObjectId=3642b2a5-d385-4d38-a5af-415dcb07f16b| RequestID = 46c3c998-4e49-568a-9440-538cddde9124 ClientSessionID = 3ac90abb-67c9-437b-4029-8875fd901c7e Microsoft.PowerBI.ReportingServicesHost.CannotRetrieveModelException: An error occurred while loading the model. 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, TranslationsBehavior translationsBehavior)
--- End of inner exception stack trace ---
at Microsoft.PowerBI.DataExtension.Msolap.SchemaCommand.GetModelMetadata(String catalogName, String perspectiveName, String supportedVersion, TranslationsBehavior translationsBehavior)
at Microsoft.PowerBI.ReportingServicesHost.ModelMetadataProvider.<>c__DisplayClass10_0.<GetModelMetadata>b__0(IDbSchemaCommand command)
at Microsoft.PowerBI.ReportingServicesHost.ModelMetadataProvider.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 ---
at Microsoft.PowerBI.ReportingServicesHost.ModelMetadataProvider.ExecuteSchemaCommand[T](ExploreHostDataSourceInfo dataSourceInfo, IDbConnectionPool connectionPool, IConnectionFactory connectionFactory, IConnectionUserImpersonator connectionUserImpersonator, QueryExecutionOptionsBase queryExecutionOptions, ITelemetryService telemetryService, Func`2 action, String failTelemetryMessage, ServiceErrorStatusCode statusCode, ExploreBaseEvent exploreEvent)
at Microsoft.PowerBI.ReportingServicesHost.ModelMetadataProvider.<>c__DisplayClass10_1.<GetModelMetadata>b__1(ExploreBaseEvent timedEvent)
at Microsoft.PowerBI.ReportingServicesHost.ExploreTelemetryService.<>c__DisplayClass4_0`1.<RunInActivity>b__0(ExploreBaseEvent activity)
at Microsoft.PowerBI.ReportingServicesHost.ExploreTelemetryService.RunInActivity(String activityName, Action`1 action)
at Microsoft.PowerBI.ReportingServicesHost.ExploreTelemetryService.RunInActivity[T](String activityName, Func`2 action)
at Microsoft.PowerBI.ReportingServicesHost.ModelMetadataProvider.GetModelMetadata(ModelMetadataRequest request)
at Microsoft.PowerBI.ReportServer.ExploreHost.RSPowerViewHandler.GetModelCSDL(String id, String maxModelMetadataVersion, IASConnectionInfo& asConnectionInfo)
at Microsoft.PowerBI.ReportServer.ExploreHost.RSPowerViewHandler.<>c__DisplayClass41_0.<GetOrAddModel>b__0()
at System.Lazy`1.CreateValue()
at System.Lazy`1.LazyInitValue()
at Microsoft.PowerBI.ReportServer.ExploreHost.RSModelCache.GetOrAddModel(ModelKey key, Func`1 modelInfoFunc)
at Microsoft.PowerBI.ReportServer.ExploreHost.RSPowerViewHandler.EnsureSession(String modelId)
at Microsoft.PowerBI.ExploreHost.ExploreClientHandlerBaseFlow.<RunAsync>b__9_0()
at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.PowerBI.ExploreHost.ExploreClientHandlerBaseFlow.<RunAsync>d__9.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.PowerBI.ExploreHost.ExploreClient.<GetClientConceptualSchemaAsync>d__13.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.PowerBI.ReportServer.ExploreHost.RSExploreHost.<GetConceptualSchemaAsync>d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.PowerBI.ReportServer.WebApi.PbiApi.PbiApiController.<GetConceptualSchemaAsync>d__25.MoveNext()
2024-06-25 09:22:19.9526|INFO|41|Sending response. Response code AMERICAS\Loc_Nguyen 200, Elapsed time 0:00:00.1049723| RequestID = 46c3c998-4e49-568a-9440-538cddde9124 ClientSessionID = 3ac90abb-67c9-437b-4029-8875fd901c7e

 

 

I tried to search the whole day, but found nothing. Please help.

1 ACCEPTED SOLUTION
fabienChery
Frequent Visitor

Subject already covered in the following post.. Solved: Re: Issues regarding power bi report server - Microsoft Fabric Community

I think it will help you ! 

Fabien 

View solution in original post

12 REPLIES 12
Daisygirl-21
New Member

Good afternoon,

I am still having issues trying to get access to the website. I log on and asked for access.                            http://colo-sql-rpt01/Reports/powerbi/Business_User_Group/Clinical_Analytics/UM/Provider%20Search/Pr...s logging on to Power BI Provider Search.  

Daisygirl21_0-1753992869475.png

 

wangc
New Member

ๆˆ‘ๅœจPower BI Server ๆœๅŠกๅ™จ็š„็Žฏๅขƒๅ˜้‡ไธญ่ฎพ็ฝฎ PBI_SQL_TRUSTED_SERVERS  *   ๏ผŒๆˆๅŠŸ่ฟ่กŒ

liyongfeng0606
Regular Visitor

20240812 ๆ›ดๆ–ฐ๏ผš
1.ๅฆ‚ๆžœSql server ๆœๅŠกๅ™จๅฏ็”จไบ†ๅŠ ๅฏ†้“พๆŽฅ๏ผŒๅœจPQ้“พๆŽฅๆ•ฐๆฎๆบ้…็ฝฎไธบๅŠ ๅฏ†๏ผ›
2.ๅฆ‚ๆžœSql serverๆœๅŠกๅ™จๆฒกๆœ‰ๅฏ็”จๅŠ ๅฏ†้“พๆŽฅ๏ผŒ้‚ฃไนˆๆŒ‰็…งๅคงไฝฌ็š„ๅปบ่ฎฎไธคๆก่ทฏ๏ผš
 a.ไฟฎๆ”น้“พๆŽฅๅญ—็ฌฆไธฒ๏ผŒๆทปๅŠ โ€œEncrypt=True;TrustServerCertificate=Trueโ€ ๏ผŒไฝ†ๆ˜ฏ่ฟ™ไธชๆˆ‘ๅฐ่ฏ•ไบ†ๅพˆๅคšๆ–นๆณ•๏ผŒๆฏ”ๅฆ‚ๆ•ฐๆฎๅบ“ๅบ•ๅฑ‚็›ดๆŽฅไฟฎๆ”นๆ•ฐๆฎๆบ๏ผŒPowerShell๏ผŒๅ‰็ซฏpostๅผบๅˆถไฟฎๆ”น๏ผŒ้ƒฝๆ— ๆณ•ๅฎŒๆˆ๏ผ›ๅ› ๆญค่ฟ™ๆก่ทฏ่ตฐไธ้€š๏ผ›
--ๆˆ‘ไธชไบบ็Œœๆต‹๏ผŒ่ฟ™ไธชๅญ—็ฌฆไธฒๅฟ…้กป้’ˆๅฏน sql serverๅฏ็”จไบ†ๅŠ ๅฏ†้“พๆŽฅ็š„๏ผŒๆŒ‰็…งๆ–นๆกˆ1่ตฐ๏ผŒๅฏไปฅ่‡ชๅŠจๆบๅธฆๆญคๅ‚ๆ•ฐ๏ผ›ๅฆๅˆ™ๆ‰‹ๅทฅๆ— ๆณ•ไฟฎๆ”น๏ผ›

b. ๆทปๅŠ ็Žฏๅขƒๅ˜้‡็š„ๆ–นๆกˆ๏ผˆ็ปˆไบŽ่ตฐ้€šไบ†๏ผ‰๏ผš
้œ€่ฆๅœจ็”จๆˆทๅ’Œ็ณป็ปŸไธคไธช็บงๅˆซๆทปๅŠ ็Žฏๅขƒๅ˜้‡๏ผšPBI_SQL_TRUSTED_SERVERS๏ผ›
--็”จๆˆท๏ผˆไธๆ˜ฏ็ฎก็†ๅ‘˜่ดฆๅท๏ผŒ่ฟ™ไธช็”จๆˆทๆœ‰็‰นๆฎŠๆ„ไน‰๏ผ‰๏ผŒๅบ”่ฏฅไธบ่ฟ™ไธช็•Œ้ขไธ‹ๅฏนๅบ”็š„่ดฆๅท๏ผŒๆ‰€ไปฅไฝ ้œ€่ฆ็”จ่ฟ™ไธช่ดฆๅท็™ปๅฝ•Power BI Report server ๆœๅŠกๅ™จ๏ผŒ็„ถๅŽๅœจ่ฟ™ไธช็”จๆˆท่ดฆๅทไธ‹้…็ฝฎ็Žฏๅขƒๅ˜้‡(ๆˆ‘่ฟ™้‡Œๆ˜ฏ:*****e\co_bi)ๅ…ณ้”ฎไฟกๆฏ้š่—ไบ†๏ผŒ่ฟ™ๆ˜ฏไธ€ไธชๅŸŸ่ดฆๅท๏ผ›ๅฆ‚ๆžœไฝ ็”จ็š„ๆ˜ฏ็ฎก็†ๅ‘˜๏ผŒ้‚ฃๅฐฑ็”จ็ฎก็†ๅ‘˜่ดฆๅท๏ผŒๆ นๆฎ็œŸๅฎžๆƒ…ๅ†ตๅฎš๏ผ›

liyongfeng0606_0-1723437720589.png

 

--็ณป็ปŸ็”จๆˆท็Žฏๅขƒๅ˜้‡็”จๅ…ทๆœ‰็ฎก็†ๆƒ้™็š„่ดฆๅท้…็ฝฎๅณๅฏ๏ผ›

้…็ฝฎๅฆ‚ไธ‹๏ผˆๅ›พไป…ไพ›ๅ‚่€ƒ๏ผŒๆˆ‘่ฟ™้‡Œ็”จ็š„ๆ˜ฏ็ฎก็†ๅ‘˜่ดฆๅท๏ผŒไฝ†ๆ˜ฏ็œŸๅฎž็Žฏๅขƒ่ฏท็”จไธŠไธ€ๆญฅ็š„็”จๆˆท่ดฆๅท็™ปๅฝ•่ฟ›่กŒ้…็ฝฎ็”จๆˆทๅ˜้‡)

liyongfeng0606_1-1723437951036.png

-- ็Žฏๅขƒๅ˜้‡็š„ๅ€ผ๏ผšๅฏนๅบ”็š„sql server ๆ•ฐๆฎๅบ“็š„hostname๏ผ›ๅปบ่ฎฎไธ่ฆ็”จIP๏ผ›้œ€่ฆๅ’Œไฝ ็š„ๆŠฅๅ‘Š็š„ๆ•ฐๆฎๆบ้…็ฝฎไฟๆŒไธ€่‡ดๅง๏ผ›
ไธ่ฆ่ฟ™้‡Œ็”จhostname๏ผŒๆŠฅๅ‘Šๆบ้…็ฝฎไธบip๏ผ›

liyongfeng0606_2-1723438252025.png

 

ๅฅฝไบ†๏ผŒ่ฟ™ๅฐฑๆ˜ฏ้…็ฝฎ็š„ๅ…ณ้”ฎ็‚น๏ผš

้…็ฝฎๅฎŒๅŽ๏ผŒ่ฎฐๅพ—้‡ๅฏ็”ต่„‘๏ผˆๆœๅŠกๅ™จ๏ผ‰๏ผ›

็„ถๅŽๅ†ๅฐ่ฏ•่ฎฟ้—ฎๆŠฅๅ‘Š๏ผ›ๆญๅ–œไฝ ๏ผŒๅบ”่ฏฅๆ˜ฏ้€šไบ†ใ€‚

ๅฆ‚ๆžœๆœ‰้—ฎ้ข˜๏ผš
ไธญๅ›ฝๆœ‹ๅ‹่ฏทๅŠ ๅพฎไฟก๏ผš93636319๏ผŒ่”็ณปๆˆ‘ใ€‚


liyongfeng0606
Regular Visitor

ๅ…ถๅฎžไฝ ไปฌไธ€็›ด้ƒฝๆฒกๆœ‰ๅฃฐๆ˜Žไธ€ไธชๅ‰ๆ๏ผŒไฝ ไปฌ็š„SQL SERVER ๆ˜ฏๅฆ้…็ฝฎไบ†ๅŠ ๅฏ†้“พๆŽฅ๏ผŸ
ๆˆ‘ๆƒณๅคง้ƒจๅˆ†ๅ‡บ้—ฎ้ข˜็š„็”จๆˆท๏ผŒSql serverๆ˜ฏๆฒกๆœ‰ๅฏ็”จๅŠ ๅฏ†้“พๆŽฅ็š„;

Mariamasood
New Member

Hey All,

 

I'm using PBIRS (on premise). I've used the direct query method; data is refreshing at the backend, but visuals are not refreshing automatically; all I have to do is click the refresh button to refresh visuals manually; is this a PBIRS bug in the Jan 2023 version, or do I need to adjust my query to refresh visuals automatically?

Mariamasood_0-1723109803534.png

 

 

Do you have any update on how to solve this one? 
thanks 

fabienChery
Frequent Visitor

Subject already covered in the following post.. Solved: Re: Issues regarding power bi report server - Microsoft Fabric Community

I think it will help you ! 

Fabien 

Anonymous
Not applicable

I just created a new system variable named PBI_SQL_TRUSTED_SERVERS and put the server as its value. I can do direct query to that SQL Server now.

I can't find where specifically i can perfom this , thanks in advance...

Anonymous
Not applicable

First find "Edit the system environment variables" from start menu

npvinhloc_0-1721302351747.png

 

 

Then following steps below:

- Click on Environment Variables

- If there is nothing named PBI_SQL_TRUSTED_SERVERS , Click New and then put the name and servers

- If the variable is there, you can select it and hit click Edit...

 

npvinhloc_1-1721302526820.png

 

Hope this help

You are right
and if you have multiable server seprate the names with COMMA (,)

azaki_0-1735557091949.png

 

Thanks a lot for sharing how to solve the problem. 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.