Hi Readers,
Yes, you read the title correctly it says, Database Locks. There are some pretty cool changes in terms of Identifying Locks that may occur during our code execution in Microsoft Dynamics NAV 2017.
After Release of Microsoft Dynamics NAV 2013, we were unable to identify that from Dynamics NAV it was so hard to figure out the Lock details via SQL Server.
For Already Published Articles about NAV 2017, Click Here.
Below are the details of Enhancements for Monitoring SQL Database Lock in Microsoft Dynamics NAV 2017.
1. Microsoft Dynamics NAV Debugger Shows us the Duration of the Code That is executing.
Put some breakpoint, Run the debugger, start the Code Processing and Navigate to Debugger when system waits for action at a breakpoint.
Now we can see the time duration that code took to execute till the breakpoint.
2. Microsoft Dynamics NAV 2017 can show the Current Locks in Database if there are any.
In an Event of Lock, select Tools - Debugger - Database Lock as shown below.
System will show you details about Lock which will include -
Yes, you read the title correctly it says, Database Locks. There are some pretty cool changes in terms of Identifying Locks that may occur during our code execution in Microsoft Dynamics NAV 2017.
After Release of Microsoft Dynamics NAV 2013, we were unable to identify that from Dynamics NAV it was so hard to figure out the Lock details via SQL Server.
For Already Published Articles about NAV 2017, Click Here.
Below are the details of Enhancements for Monitoring SQL Database Lock in Microsoft Dynamics NAV 2017.
1. Microsoft Dynamics NAV Debugger Shows us the Duration of the Code That is executing.
Put some breakpoint, Run the debugger, start the Code Processing and Navigate to Debugger when system waits for action at a breakpoint.
Now we can see the time duration that code took to execute till the breakpoint.
2. Microsoft Dynamics NAV 2017 can show the Current Locks in Database if there are any.
In an Event of Lock, select Tools - Debugger - Database Lock as shown below.
System will show you details about Lock which will include -
- Table Name - Specifies the name of the Dynamics NAV table affected by the lock.
- SQL Lock Resource Type - Specifies the database resource affected by the lock,such as DATABASE, FILE, OBJECT, PAGE, KEY, and more.
- SQL Lock Request Mode - Specifies the lock mode that determines how concurrent transactions can access the resource.
- SQL Lock Request Status -
- CNVRT - The lock is transitioning from another mode, but the conversion is blocked by another process that holds a lock with a conflicting mode.
- GRANT - The lock is active.
- WAIT - The lock is blocked by another process that holds a lock with a conflicting mode.
- The user who is causing the Lock (not the user who is running Navision Service).
- Object Type.
- Object ID.
- Function Name.
The feature is enabled for the demo database from Microsoft.
In the Next article, we will discuss how we can enable this feature for a customer database.
What do you feel about this new feature? Waiting for your comments.
If you want a demo of the Locking to see how it works, do let me know.
Regards,
Saurav Dhyani
Comments
Post a Comment