SQL sometimes encounters
The lock request time-out period has been exceeded. (Microsoft SQL Server, error: 1222)
This error, after refreshing, right-click on a table or library, found that the table is all disappeared or not query.
This is because the SQL process deadlock, the resource is preempted, to solve this problem, to kill the process of closing the deadlock, the following describes the solution:
The premise of the killing process is to find the deadlock process,
SELECT‘阻塞进程的ID‘‘等待时间(毫秒)‘‘(会话ID)‘FROM sys.dm_os_waiting_tasks
This SQL can query the ID of the current blocking process
So just kill these processes.
Kill SPID (process ID) or exec (' kill ' spid ')
So you can re-refresh the library, everything's fine.
By the way, there are two additional SQL related content:
--query information for the currently active lock manager resource select resource_type ' resource type ' , Request_mode ' request mode ' , request_type , Request_status "request Status" , request_session_id Session ID ' from sys.dm_tran_locks
--查询数据库进程(where 筛选库)select spId from master..SysProcesseswhere db_Name(dbID) = ‘text‘ and spId <> @@SpId and dbID <> 0
SQL Server ' has exceeded the lock request timeout period ' problem resolution