Quantcast
Channel: SQL Server Database Engine forum
Viewing all articles
Browse latest Browse all 12963

how to avoid ix and u lock on delete and share lock on select in sql server

$
0
0
Hi

i have sql server 2008 developer edition

i am deleting record 20000. and reading record with no-lock in same table. i got this type of message for delete transaction and select transaction

delete transaction

<process id="processa56bc088" taskpriority="0" logused="652248" waitresource="PAGE: 40:1:1345321" waittime="3423" ownerId="1799"
                transactionname="DELETE" lasttranstarted="2014-09-10T17:44:19.740" XDES="0x86f90c60" lockMode="IX"
                schedulerid="4" kpid="7700" status="suspended" spid="82" sbid="0" ecid="0" priority="0"
                trancount="2" lastbatchstarted="2014-09-10T17:43:55.877" lastbatchcompleted="2014-09-10T17:43:55.850"
                clientapp=".Net SqlClient Data Provider" hostname="xxxxxxxxx" hostpid="3772"
                isolationlevel="read committed (2)" xactid="179994" currentdb="xx" lockTimeout="4294967295" clientoption1="671096864" clientoption2="128056">
                <executionStack>

select transcation

<process id="process824fd288" taskpriority="0" logused="0" waitresource="PAGE: 40:1:1338416" waittime="4109" ownerId="181677"
                transactionname="SELECT" lasttranstarted="2014-09-10T17:44:24.100" XDES="0x9173bad0" lockMode="S" schedulerid="3" kpid="2864"
                status="suspended" spid="79" sbid="0" ecid="2" priority="0" trancount="0" lastbatchstarted="2014-09-10T17:44:23.463"
                lastbatchcompleted="2014-09-10T17:44:23.437" clientapp=".Net SqlClient Data Provider" hostname="xxxx" hostpid="3772"
                isolationlevel="read committed (2)" xactid="181677" currentdb="xx" lockTimeout="4294967295" clientoption1="671096864" clientoption2="128056">

lock mode on delete transaction- ix and u

Regards,

Manish

Viewing all articles
Browse latest Browse all 12963

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>