ITPub博客

首页 > Linux操作系统 > Linux操作系统 > V$LOCKED_OBJECT中的object_Id

V$LOCKED_OBJECT中的object_Id

原创 Linux操作系统 作者:v_fantasy 时间:2009-04-22 18:46:59 0 删除 编辑

dba_objects中有object_id和dba_object_id,那V$LOCKED_OBJECT中的object_Id到底应该和哪个对应呢?做个实验来验证下

SQL> show user
USER is "SYS"
SQL> create table test as select * from tab where 1=2;

Table created.

select object_id,object_type,OWNER,DATA_OBJECT_ID from dba_objects where object_name='TEST'

83966|TABLE|SYS|83966

SQL> ALTER TABLE TEST MOVE TABLESPACE USERTEMP;

Table altered.

select object_id,object_type,OWNER,DATA_OBJECT_ID from dba_objects where object_name='TEST'

83966|TABLE|SYS|83967

SQL> LOCK TABLE TEST IN EXCLUSIVE MODE;

Table(s) Locked.

select * from v$locked_object where object_id=83966;

0|0|0|83966|768|SYS|oracle|3190950|6


select * from v$locked_object where object_id=83967

结果为空

 

可见V$LOCKED_OBJECT中的object_Id和dba_objects中的object_id对应,其实想想也是,lock只是在逻辑上的概念当然不会在物理上对应

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

上一篇: 语句优化一例
下一篇: rac parameter
请登录后发表评论 登录
全部评论

注册时间:2008-10-07

  • 博文量
    98
  • 访问量
    181970