为什么一个object_id在dba_objects中为什么查不到记录?
SQL> drop table test purge;
SQL> create table test (id int,comments CLOB);
SQL> select INDEX_NAME , INDEX_TYPE,TABLE_OWNER ,TABLE_NAME from user_indexes where table_name='TEST';
INDEX_NAME INDEX_TYPE TABLE_OWNER TABLE_NAME
SYS_IL0000076897C00002$$ OB SYS EST
SQL> select * from dba_objects where object_name='SYS_IL0000076897C00002$$';
未选定行
SQL> select OBJ#,DATAOBJ#,NAME , from obj$ where name='SYS_IL0000076897C00002$$';
OBJ# DATAOBJ# NAME
76899 76899 SYS_IL0000076897C00002$$
已选择 1 行。
SQL> select * from dba_objects where object_id=76899;
未选定行
SQL> select OBJ#,DATAOBJ#,NAME from obj$ where obj#=76899;
OBJ# DATAOBJ# NAME
---------- ---------- ------------------------------------------------------------
76899 76899 SYS_IL0000076897C00002$$
以上的查询表明无论是根据object_id 还是object_name到视图dba_objects里面都查不到lob段的index.
所以以后如果你发现一个OBJECT_ID无法查到对应的object,不妨到obj$里面的去查到对象,让后更具类型,到具体的segments里面找对应的段.
select * from user_segments where segment_name ='SYS_IL0000076897C00002$$'
关于lob的几个视图:
dba_lobs/user_lobs/all_lobs
dba_lob_partitions
dba_lob_sub_partitions
dba_sgements
dba_index 可以看到lobindex