ORACLE建库过程中自动生成的跟锁相关的VIEW

之前一直没有注意过,而且都是使用现成的文档来手工建库,今天才发现我们的手册没有执行catblock.sql这个脚本,所以就没有创建这些视图。这些视图不是必须的,但是有了这些视图可能会使用起来方便点。

ORACLE自动创建了如下几个视图:
DBA_KGLLOCK
DBA_LOCK
DBA_LOCK_INTERNAL
DBA_DML_LOCKS
DBA_DDL_LOCKS
DBA_WAITERS
DBA_BLOCKERS

他们各自的含义其实只要看catblock.sql脚本中的注释就可以了,这里只是把注释搬过来,记录一下。

[@more@]

DBA_KGLLOCK:
/* this is an auxiliary view containing the KGL locks and pins */

DBA_LOCK:
/*
* DBA_LOCK has a row for each lock that is being held, and
* one row for each outstanding request for a lock or latch.
* The columns of DBA_LOCK are:
* session_id - session holding or acquiring the lock
* type - type of lock
* mode_held - mode the lock is currently held in by the session
* mode_requested - mode that the lock is being requested in by the process
* lock_id1 - type specific identifier of the lock
* lock_id2 - type specific identifier of the lock
* last_convert - time (in seconds) since last convert completed
* blocking_others - is this lock blocking other locks
*/

DBA_LOCK_INTERNAL:
/*
* DBA_LOCK_INTERNAL has a row for each lock or latch that is being held, and
* one row for each outstanding request for a lock or latch.
* The columns of DBA_LOCK_INTERNAL are:
* session_id - session holding or acquiring the lock
* type - type of lock (DDL, LATCH, etc.)
* mode_held - mode the lock is currently held in by the session
* mode_requested - mode that the lock is being requested in by the process
* lock_id1 - type specific identifier of the lock
* lock_id2 - type specific identifier of the lock
*
* NOTE: this view can be very, very slow depending on the size of your
* shared pool area and database activity.
*/

DBA_DML_LOCKS:
/*
* DBA_DML_LOCKS has a row for each DML lock that is being held, and
* one row for each outstanding request for a DML lock. It is subset
* of DBA_LOCKS
*/

DBA_DDL_LOCKS:
/*
* DBA_DDL_LOCKS has a row for each DDL lock that is being held, and
* one row for each outstanding request for a DDL lock. It is subset
* of DBA_LOCKS
*/

DBA_WAITERS:
/*
* Show all the sessions waiting for locks and the session that holds the
* lock.
*/

DBA_BLOCKERS:
/*
* Show all the sessions that have someone waiting on a lock they hold, but
* that are not themselves waiting on a lock.
*/

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/25016/viewspace-1004706/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/25016/viewspace-1004706/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值