ORA-22868 table with LOBs contains segments in different tablespacesCause: An attempt was made to drop a tablespace which contains the segment(s) for the LOB columns of a table but does not contain the table segment.Action: Find table(s) with LOB columns which have non-table segments in this tablespace. Drop these tables and reissue drop tablespace

解决方案 »

  1.   

    ora-22868 LOB问题的解决办法   在删除一个表空间AAA时产生ora-22868, 表空间含有LOB对象。  在此之前已经把此表空间对应的用户的所有对象已经删除, 查询select * from dba_tables where tablespace_name='AAA', 返回0行。 后来检查dba_indexes, 表空间AAA含有indexex, 表名为BLOBS:SQL> select index_name from dba_indexes  where tablespace_name='AAA';INDEX_NAME
    ------------------------------
    SYS_IL0000030617C00002$$想移动到system 表空间都不行:SQL> drop index system.SYS_IL0000030617C00002$$;
    drop index system.SYS_IL0000030617C00002$$
                     *
    ERROR 位于第 1 行:
    ORA-22864: 无法 ALTER 或 DROP LOB 索引
    SQL> alter  index system.SYS_IL0000030617C00002$$ rebuild tablespace system;
    alter  index system.SYS_IL0000030617C00002$$ rebuild tablespace system
    *
    ERROR 位于第 1 行:
    ORA-02327: 无法以数据类型LOB的表达式创建索引最后使用alter table BLOBS   modify default attributes tablespace system 解决. 
      

  2.   

    这篇文章是yikaikai的原创帖子,出于以前的ORACLE中文论坛,
     alter table BLOBS   modify default attributes tablespace system 
    这条SQL语句是用来改变表BLOBS的默认表空间。