We are using NAV 2013 R2 and working to improve NAV and database performance. In SQL server we can see the most “expensive” SQL queries that were generated by NAV. But so far we couldn’t figured out how to trace back to NAV to find which NAV sessions and CAL codes generated the queries. Does anyone have any idea how to do that? Is there a way to relate SQL server session ID to NAV session ID?
You can use the SQL Tracing feature in the debugger to determine the SQL queries being created by a session. I usually will turn this on for my session the a test environment and go through the steps of the process I want to tune to capture the SQLĀ that is being generated by NAV and see if it can be improved.
Here is a link to a blog post that explains how to use the SQL Tracing feature and the SQL Server Profiler. I particularly like the queries they have made for analyzing the results:
—————————— Joe Shields Advanced Media Technologies —————————— ——————————————-
Tony Mei
Member
April 13, 2017 at 2:27 PM
Thank you Joe for the reply
—————————— Tony Mei
—————————— ——————————————-
Suresh Kulla
Member
April 14, 2017 at 1:03 AM
Tony,
There is a tool on Codeplex called Application Profiler which you can use to check what is the corresponding SQL query for your NAV C/AL Code and how much time it is taking to execute that query. You can review those results and make the necessary changes to your code.
I have not developed that tool but used it in various scenarios like the one you mentioned and to solve some of locking issues.
Please note:
This action will also remove this member from your connections and send a report to the site admin.
Please allow a few minutes for this process to complete.
Report
You have already reported this .
Welcome to our new site!
Here you will find a wealth of information created for peopleĀ that are on a mission to redefine business models with cloud techinologies, AI, automation, low code / no code applications, data, security & more to compete in the Acceleration Economy!