After enabling Azure application insights and connecting BC (SaaS) production we can see statistics in the Power BI app from MS. Under long running SQL queries and methods we can see web services that are marked as data access intent read only (under data access intent page). My understanding is when a web service is marked as read Only data access intent it goes to a read-only replica of the production database. Should telemetry show these queries as there is no load on the production database?
Application Insight PBI report long running queries
According to MS Data Access Intent directs query to read only replica. Now the question is if application insights report from primary database or include readonly replica as well?
​​​​​​​\
For reports, API pages, and queries, the Business Central server can use read-only database replicas on Azure SQL Database and SQL Server. If replicas are enabled, use this property to reduce the load on the primary database. Using ReadOnly might also improve performance when viewing objects. ReadOnly works as a hint for the server to route the connection to a secondary (read-only) replica, if one is available. When a workload is executed against the replica, insert/delete/modify operations aren't possible. If any of these operations are executed against the replica, an exception is thrown at runtime.
From the client, the property value can be overwritten by using page 9880 Database Access Intent List page.
Application Insight PBI report long running queries
Hi, if you are referring to Access Intent, this has nothing to do with querying. It is just that when you publish it through an external tool, it can only be read-only. In your example, Power BI can only query data but cannot modify it.
More details:
Dynamics 365 Business Central: Managing Database Access Intent (Managing write access to APIs from the client)
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.