Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Unanswered

Long running SQL statement in Event Viewer

Posted on by 6,578

We just did an upgrade to CU66 Dynamics NAV 2016, We have NAS service created separately, we found below event log related to NASService. Also heart beat of Job Queue is not getting update at the first instance when the service starts, in the next try it gets updates.  

Server instance: LiveNAS
Session type: UnknownClient
Session ID: 2
Action completed successfully, but it took longer than the given threshold.
Execution time: 3876 ms
Threshold: 1000 ms
Message: Long running SQL statement
Task ID: 3
Statement: SELECT "User Code" FROM "ABC-live".dbo."Object Metadata" WITH(REPEATABLEREAD) WHERE ("Object Type"=@0 AND "Object ID"=@1)

Session type: Background
Session ID: 4
Action completed successfully, but it took longer than the given threshold.
Execution time: 1733 ms
Threshold: 1000 ms
Message: Long running SQL statement
Task ID: 3
Statement: SELECT TOP (1) "timestamp","Code","Description","Job Queue Category Filter","Server Instance ID","Session ID","Last Heartbeat","Started","Start Automatically From NAS","Start on This NAS Computer","Start on This NAS Instance","Running as User ID","Session Unique ID" FROM "ABC-live".dbo."ABC Go live$Job Queue" WITH(UPDLOCK) WHERE ("Server Instance ID"=@0 AND "Session ID"=@1) ORDER BY "Code" ASC OPTION(OPTIMIZE FOR UNKNOWN)
AppObjectType: CodeUnit
AppObjectId: 448

  • ManishS Profile Picture
    ManishS 6,578 on at
    RE: Long running SQL statement in Event Viewer

    Yes i did a check, it always takes longer time.

    We have Three Tier architecture, DB & APP are on Azure.

    Will check from SQL Profiler.

  • RockwithNav Profile Picture
    RockwithNav 6,562 on at
    RE: Long running SQL statement in Event Viewer

    Is it taking longer then the threshold every time?

    Investigate from SQl Profiler and then check.

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!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans