If you have a long-running process in NAV that is causing excessive blocking of users, you can use a stored procedure to detect blocking, and prevent/minimize it:
It looks like a new blocking implementation in Nav . I think SQL Server do it better.
In my opinion the only way to prevent and minimize blocking is Nav code optimization.
PS. Now I always protect critical code from unexpected COMMIT like this:
IF ProcIsBlocking() THEN BEGIN
COMMIT;
Dialog.UPDATE(3,'Sleeping due to blocking...');
SleepTime := 20; //20 seconds
FOR s := 1 TO SleepTime DO BEGIN
Dialog.UPDATE(4,s / SleepTime * 10000);
SLEEP(1000);
END;
END;
It looks like a new blocking implementation in Nav . I think SQL Server do it better.
In my opinion the only way to prevent and minimize blocking is Nav code optimization.
I'm not sure you understand the purpose of this. How is SQL Server doing this better, when you import let's say 5,000 Sales Orders during the day? Your users will experience heavy blocking and likely many timeouts (i.e. errors). No matter how much you optimize the Sales Order import, you will get lots of blocking.
I'm not sure you understand the purpose of this. How is SQL Server doing this better, when you import let's say 5,000 Sales Orders during the day? Your users will experience heavy blocking and likely many timeouts (i.e. errors). No matter how much you optimize the Sales Order import, you will get lots of blocking.
I see you point. But i'm not sure that all of 5.000 orders will be imported just in time with 20 seconds sleeping timeout and massive users input. On the other hand, this implementation decreases blocking time only if you have more than 1 order in importing queue at the moment.
That's why i prefer configure schedule of import and optimize the code.
Comments
In my opinion the only way to prevent and minimize blocking is Nav code optimization.
PS. Now I always protect critical code from unexpected COMMIT like this:
Nav, T-SQL.
I'm not sure you understand the purpose of this. How is SQL Server doing this better, when you import let's say 5,000 Sales Orders during the day? Your users will experience heavy blocking and likely many timeouts (i.e. errors). No matter how much you optimize the Sales Order import, you will get lots of blocking.
Dynamics-NAV.org
That's why i prefer configure schedule of import and optimize the code.
Nav, T-SQL.
I wrote a comment on the 23rd, and it is still awaiting moderation :?
Any reason you don't accept my comment on your blog?
Peter