Hi All,
I know we have database locks page/table in nav 2017. I was wondering if we can create a SQL view in nav 2016 to achieve the same result. I will then link this view to a table in 2016.
So far i have created this
SELECT
OBJECT_NAME(p.OBJECT_ID) AS TableName,
resource_type, resource_description, request_session_id
FROM sys.dm_tran_locks l
JOIN sys.partitions p ON l.resource_associated_entity_id = p.hobt_id
But NAV is also providing NAV object name , ID etc as well. How would i add those to my view? Goal is to have the exact same result as we get in NAV table in 2017
Answers
Object Name/ID is the NAV thing, and you are pulling your locking data directly from the SQL Server, which has no knowledge of those. You won't be even able to tell who is locking as there is no 1:1 mapping between NAV and SQL sessions.
Dynamics NAV, MS SQL Server, Wherescape RED;
PRINCE2 Practitioner - License GR657010572SG
GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03