2
In AL language, I can see SessionInformation.SqlRowsRead and SessionInformation.SqlStatementsExecuted methods.
But none of them provide the facility to turn on/off the SQL Tracing as we could in C/Side. We could use service tier to turn on SQL Tracing, but it is a cumbersome and decentralised method and hence we need the same feature as in C/Side to turn on/off SQL Global tracing using DEBUGGER.ENABLESQLTRACE. Perhaps Microsoft could add it to SessionInformation so that we have SessionInformation.ENABLESQLTRACE method with a boolean parameter and a boolean return type like in C/Side.

This will help a lot in performance troubleshooting especially identifying what NAV user is behind what SQL Connection at a particular time and the NAV code they are executing (Code stack). This will tremendously will help to resolve and understand block and deadlock scenarios in a live production environment.
Category: Development
STATUS DETAILS
Declined
Ideas Administrator

Thank you for your feedback. We are not considering the suggestion at this time due to the following reason: 

For on-prem installations (including local sandboxes), you can do this by setting a low threshold for long running sql queries and get the data in telemetry

Sincerely, 

Kennie Nybo Pontoppidan
PM, Microsoft