zoukankan      html  css  js  c++  java
  • SQL 查看锁起来的表,|| 解锁锁起来表

    查看锁的表:
    select object_name(resource_associated_entity_id) as tableName, request_session_id as pid from sys.dm_tran_locks
    where resource_type = 'OBJECT' and object_name(resource_associated_entity_id) is not null


    select object_name(resource_associated_entity_id) as tableName, request_session_id as pid from sys.dm_tran_locks
    where resource_type = 'OBJECT' and object_name(resource_associated_entity_id) is not null


    --要解锁的表ID
    kill 107

    //查询死锁
    select dbid,* from sys.sysprocesses
    where 1=1
    and spid >50
    and blocked <> 0
     
     //查出表名
     
     Select name,dbid from master.sys.sysdatabases 
     
    //输入死锁的语句
     
     dbcc inputbuffer(54)
    kill  杀死死锁
  • 相关阅读:
    内置对象
    js作用域对象与运用技巧
    js流程控制与函数
    JavaScript基础
    CSS3新增属性2
    CSS3新增
    前端实践
    浮动与定位
    页面布局
    表格表单视频音频
  • 原文地址:https://www.cnblogs.com/qqhewei/p/13516985.html
Copyright © 2011-2022 走看看