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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

Microsoft Dynamics 365 LS Central for Retail Scheduler Jobs Database Lock Issues

(1) ShareShare
ReportReport
Posted on by 18

Microsoft Dynamics 365 LS Central for Retail Scheduler Jobs Database Lock Issues

First: Using an SQL Query to Check Locked Tables

This SQL query is useful for identifying locked tables and their status within the database, helping you pinpoint the cause of error messages related to locks.

Query to Check Locked Tables

You can use a Dynamic Management View (DMV) query in SQL Server as follows:

 
sql
SELECT
request_session_id AS SessionID,
resource_type AS ResourceType,
resource_associated_entity_id AS ResourceID,
resource_description AS ResourceDescription,
request_mode AS LockType,
request_status AS Status
FROM
sys.dm_tran_locks
WHERE
resource_database_id = DB_ID('----------------------');

Second: Using SQL Server Activity Monitor

The Activity Monitor is a built-in tool in SQL Server that helps you monitor performance, session statuses, and locked tables.

How to Open Activity Monitor:

  1. Open SQL Server Management Studio (SSMS).
  2. Log in to the server.
  3. Right-click the server name in the left pane, then select Activity Monitor.

How to Use Activity Monitor to Check Locked Tables:

  • Processes: Displays all active processes in the database. Here, you can identify sessions holding locks and monitor their Session ID.
  • Locks by Object: Shows the status and lock type on tables. This lets you see if a specific process is locking a particular table, such as the Scheduler Job Header table.
  • Locks by Process: Provides details on sessions using locks and the lock types in use.

Note: If you find a session locking the table you need, you can terminate the session using the Activity Monitor or the KILL command in SQL (ensure not to end essential sessions).

Video tutorial

https://youtu.be/eAXqznYcoqs?si=EI_CvOEV7L2KrIU4

I have the same question (0)
  • Suggested answer
    YUN ZHU Profile Picture
    96,039 Super User 2025 Season 2 on at
    Not a question.
     
     
  • Suggested answer
    Valentin Castravet Profile Picture
    31,586 Super User 2025 Season 2 on at
    I suggest posting this content as a blog post rather than as a thread here. This is the link to the community blog - https://community.dynamics.com/en-US/Blogs
     

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

News and Announcements

Season of Giving Solutions is Here!

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 > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,651

#2
Khushbu Rajvi. Profile Picture

Khushbu Rajvi. 808 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 718 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans