Lock after swith to Sql Server Option

ovicashovicash Member Posts: 141
Hy,

Searching some other things I found something strange in Upgrade Toolkit.
5 Test the newly migrated database to ensure that you do not encounter
control conflicts.
If you receive error messages informing you that a record has been
another user, even though you are the only user currently using
version control conflicts. These problems occur because the SQL
Navision 4.0 has stricter version control than previous versions of
Any attempt to modify or delete a record will fail if the timestamp
record that you have read is different from the timestamp on the
in the database.
The following tables contain examples of the old incorrect code and
code that must be inserted to avoid version control conflicts
Rec.GET;
NewRec.GET;
NewRec.<Data Field>
NewRec.MODIFY;

[b]Rec.GET;[/b]

Rec..<Data Field>
Rec.MODIFY;

I have tried to simulate this on Nav 4.0 sp2, nav 4.0 sp1 and Nav 4.0, but I couldn't. I've tried running multiple clients but the same. One of our clients have this kind of problem after switching to Sql version and a lot of locks appear.

Does anyone have any ideea upon the code above?

Thank you
ovidiu

Best Regards

Comments

  • krikikriki Member, Moderator Posts: 9,118
    I am afraid there is not a lot you can do.
    The problem is because of page-locks in SQL. This locks also records that shouldn't be locked.
    How to fix it (or avoid some lock errors):
    -boost the performance by playing with the indexes and SIFT-tables.
    -In File=>Database=>Alter=>Tab Advanced Put "Always Rowlock" to TRUE. This will downgrade performance but should diminish locking problems.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • ovicashovicash Member Posts: 141
    Thx kriki,

    As far as I know a record in sql has max 8k and could be spread across many pages. If for example someone reads a record that is located on a certain page, sql will lock the hole page? It means that other records that have information on that page are also being blocked?
    Will Index Defrag help?

    Are my supositions correct?
    ovidiu

    Best Regards
  • krikikriki Member, Moderator Posts: 9,118
    ovicash wrote:
    Thx kriki,

    As far as I know a record in sql has max 8k and could be spread across many pages. If for example someone reads a record that is located on a certain page, sql will lock the hole page? It means that other records that have information on that page are also being blocked?
    Will Index Defrag help?

    Are my supositions correct?
    It is rather that many records (max 4KB in Navision) can be put in 1 page (6KB in SQL2000 and 8KB in SQL2005).
    But your assumption about locking is correct.
    I don't think that Index Defrag will help. It may help in the way that performance will be better. Better performance help to avoid locking problems, because the locking takes less time.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


Sign In or Register to comment.