web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Track down what SQL query is causing us to time out.

(0) ShareShare
ReportReport
Posted on by 5

We're currently running Microsoft Dynamics SL.  After going through weeks of very sluggish (to the point of crashing) performance it was determined that some SQL query is taking up to 17 seconds and when called is called thousands of times in a row.  I'm told that there is no way to determine what module is calling that code.  Is that true?  Anything I can look at?  Thanks.

I have the same question (0)
  • Erich Strelow F Profile Picture
    16 on at

    The bread and butter for any SQL guru is the SQL Server Profiler. Since you already know about the offending query, it's likely you already have some output of the SQL Profiler. If the offending query is from the SL application, the same Profiler provides information about the user involved, the SQL query itself, and the connection information (workstation, network addressing, etc).

    The bad scenario might happen if the offending SQL is somehow triggered by the SQL database itself. In that case, the link to the user-module-workstation is blurred. This can happen if there is some add-on in the SQL server itself, as in a replication engine, an auditing tool, a migration engine, a data synchronization engine. You might try to find out additional info on the Profiler results.

  • Suggested answer
    CFROTON Profile Picture
    4,710 on at

    Hello,

    Sql server profiler found under SSMS tools menu will help you identify long running queries and errors, Support has several templates you can use and we frequently send them to partners for support cases of this nature. Unfortunately there is not a way to attach our profiler templates to the forums. You would need to create a support case to get the templates directly from support.

Under review

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.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 663 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 540 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 348 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans