Skip to main content

Notifications

Finance | Project Operations, Human Resources, ...
Suggested answer

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

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.

  • Suggested answer
    CFROTON Profile Picture
    CFROTON 4,710 on at
    RE: Track down what SQL query is causing us to time out.

    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.

  • Erich Strelow F Profile Picture
    Erich Strelow F 1,642 on at
    RE: Track down what SQL query is causing us to time out.

    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.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans