在 MS SQL Server 2008 R2 中有带有全文索引的表的复制。但是与复制全文索引关联的停止列表不会复制。
是否有可能也复制停止列表?
我有3张桌子。#a是一个主表和两个辅助表,#b并且#c.
create table #a (a int not null, primary key (a asc)) ;
create table #b (b int not null, primary key (b asc)) ;
create table #c (c int not null, primary key (c asc)) ;
insert into #a (a)
select x*10 + y
from (values(0),(1),(2),(3),(4),(5),(6),(7),(8),(9))x(x)
cross join (values(0),(1),(2),(3),(4),(5),(6),(7),(8),(9))y(y) ;
insert into #b (b)
select a from #a where a % 5 > 0 ;
insert into #c (c)
select a from #a …Run Code Online (Sandbox Code Playgroud) 我看到这/process/@lockMode等于/owner/@mode. 但为什么/keylock/@mode不等于/owner/@mode呢?这是什么/keylock/@mode意思?
据我从整个死锁中了解到,processVictim既不应该使用U锁也不应该使用X锁。
整个僵局是这样的:
<deadlock-list>
<deadlock victim="processVictim">
<process-list>
<process id="processVictim" taskpriority="0" logused="0" waitresource="KEY: 10:72057602742812672 (3100aad8604d)" waittime="2982" ownerId="222541347" transactionname="user_transaction" lasttranstarted="2018-04-28T00:17:29.680" XDES="0x7d6dcf990" lockMode="S" schedulerid="13" kpid="14052" status="background" spid="25" sbid="0" ecid="0" priority="0" trancount="1">
<executionStack>
<frame procname="Db1.notify.pRuleActivated" line="71" stmtstart="3296" stmtend="3508" sqlhandle="0x03000e00d9368812ce87f700aaa800000100000000000000">
if exists(select 1 from DbRepl.dbo.vRule where RuleId = @nRuleId_ and CloseDate is not null) </frame>
<frame procname="Db1.notify.pRuleActivatedHandler" line="21" stmtstart="928" sqlhandle="0x03000e000f89bc79375d210165a100000100000000000000">
EXEC notify.pRuleActivated
@xmlMsg = @xmlMsg </frame>
<frame procname="Db1.notify.pQppQueueProcNotificationProcessingQueue" line="105" stmtstart="5906" stmtend="6154" sqlhandle="0x03000e0020de2a3dd505d00096a100000100000000000000">
exec …Run Code Online (Sandbox Code Playgroud)