Home > Database > Mysql Tutorial > body text

Oracle 查看对象持有锁的情况

WBOY
Release: 2016-06-07 17:05:29
Original
981 people have browsed it

Oracle 查看对象持有锁的情况,同事在测试库上对一个表加字段,提示 ORA-00054, 资源忙。 应该是表对象的锁没有释放。用如下SQL

同事在测试库上对一个表加字段,提示 ORA-00054, 资源忙。 应该是表对象的锁没有释放。

用如下SQL 查看一下系统中相关对象上锁的情况:


该SQL 显示所有对象上的锁,,如果要查某个具体的对象,可以根据OBJECT_NAME 字段进行一下过滤,找到对应的SID 之后去查V$SESSION 视图。  

该视图会显示session 对应的信息,包括终端的信息,如果找到了终端,可以让它提交或者回滚一下就OK了。 我这里是测试环境,直接把session kill 掉了。然后修改表就ok了。

  • linux

  • Related labels:
    source:php.cn
    Statement of this Website
    The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
    Popular Tutorials
    More>
    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!