已超過了鎖請求逾時時段。 (Microsoft SQL Server,錯誤: 1222),sql1222

來源:互聯網
上載者:User

已超過了鎖請求逾時時段。 (Microsoft SQL Server,錯誤: 1222),sql1222

操作SQLServer資料庫時,遇到這樣的問題:已超過了鎖請求逾時時段。 (Microsoft SQL Server,錯誤: 1222)

經過尋找材料瞭解為資源搶佔,照成死結,殺死進程就OK了,具體操作如下:

select spId  from master..SysProcesses where db_Name(dbID) = '資料庫名稱'   and spId <> @@SpId   and dbID <> 0
上面語句是擷取進程ID,下面就是根據ID殺死相應進程
exec ('Kill '+spId(進程ID))

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.