11/17/2023 0 Comments Sql server deadlock 256![]() The deadlocks are recorded in the Windows Event Log of computer running Business Central Server. I rechecked there are no FK's and no triggers to these tables or any that reference these tables, so i am at a loss as to why they would be deadlocking each other. but looking at the dbcc ind command shows shared PAGEPID. I thought that was my undertstanding as well. Update pckwrk set lodnum = where lodnum = varchar(8000))update pckwrk set lodnum = where lodnum = Select polcod from poldat (UPDLOCK) where polcod = and polvar = and polval = and wh_id_tmpl = and srtseq = int)select polcod from poldat (UPDLOCK) where polcod = and polvar = and polval = and wh_id_tmpl = and srtseq = Update pckwrk set lodnum = 1234 where lodnum = 12345 Select polcod from poldat (UPDLOCK) where polcod = 123 and polvar = 123 and polval = 1234 and wh_id_tmpl = 1234 and srtseq = 12345 How best to handle this? DEADLOCK XML at bottom. This leads me to believe that because of the page lock from the one query it is locking the other table when they reside in the same page. ![]() If I examine the pages using the DBCC IND command, I see the 2 tables share some of the same PAGEPID numbers. What it seems from the deadlock XML is that one is doing a page lock. There are 2 queries in the deadlock that are different unrelated tables. I am thinking setting the indexoption on one table to specify only row locks and not page locks but I am not really sure that is the right answer. ![]() So I am getting these deadlocks and I think I have traced down the root cause but I am not sure of the best way to handle this.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |