Возможно, существует блокировка таблицы Discipline
другим процессом
Вы можете найти блокировки на вашем столе, запустив этот скрипт
declare @lock table (spid int, dbid int, objId int, indId int, Type char(4), resource nchar(32), Mode char(8), status char(6))
declare @who table (spid int, ecid int, status char(30), loginname char(128), hostname char(128), blk char(5), dbname char(128), cmd char(16), request_id INT)
declare @LockSummary table (loginname varchar(28), DB varchar(128), object varchar(30), ToLevel varchar(20), How_Many int, Xclusive_lock_for_command char(16), spid int, hostname char(128))
insert into @lock exec sp_lock
insert into @who exec sp_who
insert into @LockSummary
select loginname,
db_name(dbid) as DB,
object_name(objID) as object,
max(mode) as [ToLevel],
Count(*) as [How Many],
Max(Case When mode= 'X' Then cmd Else null End) as [Xclusive lock for command],
l.spid,
hostname
from @lock l
join @who w on l.spid = w.spid
where dbID != db_id('tempdb')
and l.status = 'GRANT'
group by dbID, objID, l.spid, hostname, loginname
select *
from @LockSummary
where object like '%Discipline%'
order by [ToLevel] Desc, [How_Many] Desc, loginname, DB, object