Business Central Onpremise – Create SQL Missing Indexes from AL

Through the page 9521 Database Missing Indexes it is possible to see the missing indexes suggested by SQL Server for Business Central (in fact, an SQL function is called which returns the missing indexes).

In this case the same function has been recreated on SQL (stored procedure) so that it can be launched both from BC (Onpremise) and from SQL.

Source : Roberto Stefanetti Blog
Read more…

Dynamics 365 Business Central: Get the amount of SQL rows read and the amount of SQL statements executed on the session via AL – SessionInformation Data Type

Today I want to share a mini tip about Business Central. How to get the amount of SQL rows read and the amount of SQL statements executed on the session via AL.

As you might, As of Business Central April 2019, the AL debugger also offers the capability to examine your AL code’s effect on the Business Central database.

Source : Dynamics 365 Lab
Read more…

Export SQL data to CSV or XML File via Powershell

Sometimes it may be useful or necessary to use powershell to read data from SQL Server to export it to other formats This can also be used with older versions of Dynamics NAV which do not have access to the integrated powershell. Using standard powershell commands it is possible for example to read an SQL view and export it to CSV or XML file.

Source : Roberto Stefanetti Blog
Read more…