用户已经断开,锁没释放。
1> sp_lock2> go
The class column will display the cursor name for locks associated with a cursor for the current user and the cursor id for other users.
fid spid loid locktype table_id page row dbname class context
------ ------ ----------- ---------------------------- ----------- ----------- ------ --------------- ------------------------------ ----------------------------
0 603 1206 Ex_table 1422367838 0 0 tempdb Non Cursor Lock
0 618 1236 Ex_table 1084530899 0 0 tempdb Non Cursor Lock
0 1072 2144 Sh_intent 32000114 0 0 master Non Cursor Lock
0 1674 3348 Ex_table 922890061 0 0 tempdb Non Cursor Lock
0 1751 3502 Ex_table 394888180 0 0 tempdb Non Cursor Lock
=====
1> sp_who '603'
2> go
fid spid status loginame origname hostname blk_spid dbname cmd block_xloid
------ ------ ------------ ------------ ------------ ---------- -------- ---------- ---------------- -----------
(0 rows affected)
(return status = 0)
1> kill 603
2> go
Msg 6106, Level 16, State 1:
Server 'mkt39', Line 1:
Process '603' is not an active process number.
1> kill 618
2> go
Msg 6106, Level 16, State 1:
Server 'mkt39', Line 1:
Process '618' is not an active process number.
1> kill 1674
2> go
Msg 6106, Level 16, State 1:
Server 'mkt39', Line 1:
Process '1674' is not an active process number.
1> kill 1751
2> go
Msg 6106, Level 16, State 1:
Server 'mkt39', Line 1:
Process '1751' is not an active process number.
1> sp_who '1751'
2> go
fid spid status loginame origname hostname blk_spid dbname cmd block_xloid
------ ------ ------------ ------------ ------------ ---------- -------- ---------- ---------------- -----------
(0 rows affected)
(return status = 0)
1>
AIX53,ASE12.5。用户已经不存在,但是锁资源没释放??
除了重启,有什么办法可以释放掉锁?? 只能重启 可以試試:dbcc cacheremove dbcc cacheremove ( db_id | db_name, object_id | object_name )
Deallocates the object descriptor (DES) for the specified table.
之前生产上因为存储链路问题,导致这个情况。现在好像没办法模拟出来。 在确定不会产生data integrity issue的时候,可以试试---
dbcc lock_release(spid,level,type,dbid,objid,[,'force']])
一定慎用
页:
[1]