zoukankan      html  css  js  c++  java
  • Oracle查看被锁的表,并释放

    几个相关的表

    SELECT * FROM v$lock;
    SELECT * FROM v$sqlarea;
    SELECT * FROM v$session;
    SELECT * FROM v$process ;
    SELECT * FROM v$locked_object;
    SELECT * FROM all_objects;
    SELECT * FROM v$session_wait;

    找到被锁定的表

    SELECT object_name, machine, s.sid, s.serial#
      FROM gv$locked_object l, dba_objects o, gv$session s
     WHERE l.object_id  = o.object_id
       AND l.session_id = s.sid;

    释放

    --alter system kill session 'sid, serial#'; 
    ALTER system kill session '23, 1647'; 

    重启数据库

    (1) 切换到oracle用户:su – oracle
    (2) 进入Sqlplus控制台:sqlplus /nolog
    (3) 以系统管理员登录:connect / as sysdba
    (4) 启动数据库:startup
    (5) 如果是关闭数据库:shutdown immediate
    (6) 退出sqlplus控制台:exit
    (7) 进入监听器控制台:lsnrctl
    (8) 启动监听器:start
    (9) 退出监听器控制台:exit

  • 相关阅读:
    FileWatcher
    virtual table(有180个评论)
    this 指针
    docker -ce(社区免费版)
    vue-cli
    CAP理论、BASE理论
    B+树和LSM存储引擎代表树和B-树
    CPU高速缓存
    Python&基础环境搭建
    二叉树
  • 原文地址:https://www.cnblogs.com/jimboi/p/8427364.html
Copyright © 2011-2022 走看看