ORACLE里面LOBINDEX,LOBSEGMENT类型的是什么对象
1个回答
2016-12-27
展开全部
建立含有lob字段的表时,oracle会自动为lob字段建立两个单独的segment,一个用来存放数据,另一个用来存放索引,并且它们都会存储在对应表指定的表空间中。但是当用alter table tb_name move tablespace tbs_name;来对表做空间迁移时只能移动非lob字段以外的数据,而如果要同时移动lob相关字段的数据,就必需用如下的含有特殊参数据的文句来完成,它就是: alter table tb_name move tablespace tbs_name lob (col_lob1,col_lob2) store as(tablesapce tbs_name); 下面来看一个例子吧
SQL>select OWNER,SEGMENT_NAME,SEGMENT_TYPE,TABLESPACE_NAME from dba_segments where owner='TEST6'
OWNER SEGMENT_NAME SEGMENT_TYPE TABLESPACE_NAME
----- ------------------------------ ------------------ ------------------------
TEST6 TEST_LOB TABLE TEST
TEST6 SYS_IL0000015539C00001$$ LOBINDEX TEST
TEST6 SYS_IL0000015539C00002$$ LOBINDEX TEST
TEST6 SYS_LOB0000015539C00001$$ LOBSEGMENT TEST
TEST6 SYS_LOB0000015539C00002$$ LOBSEGMENT TEST
SQL>alter table test6.test_lob move tablespace test1
Table altered.
SQL>select OWNER,SEGMENT_NAME,SEGMENT_TYPE,TABLESPACE_NAME from dba_segments where owner='TEST6'
OWNER SEGMENT_NAME SEGMENT_TYPE TABLESPACE_NAME
----- ------------------------------ ------------------ ------------------------
TEST6 TEST_LOB TABLE TEST1
TEST6 SYS_IL0000015539C00001$$ LOBINDEX TEST
TEST6 SYS_IL0000015539C00002$$ LOBINDEX TEST
TEST6 SYS_LOB0000015539C00001$$ LOBSEGMENT TEST
TEST6 SYS_LOB0000015539C00002$$ LOBSEGMENT TEST
SQL>ALTER TABLE TEST6.TEST_LOB MOVE TABLESPACE TEST1 LOB(A,B) STORE AS(TABLESPACE TEST1);
Table altered.
SQL>select OWNER,SEGMENT_NAME,SEGMENT_TYPE,TABLESPACE_NAME from dba_segments where owner='TEST6';
OWNER SEGMENT_NAME SEGMENT_TYPE TABLESPACE_NAME
----- ------------------------------ ------------------ ------------------------
TEST6 TEST_LOB TABLE TEST1
TEST6 SYS_IL0000015539C00001$$ LOBINDEX TEST1
TEST6 SYS_IL0000015539C00002$$ LOBINDEX TEST1
TEST6 SYS_LOB0000015539C00001$$ LOBSEGMENT TEST1
TEST6 SYS_LOB0000015539C00002$$ LOBSEGMENT TEST1
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询