lob移表空间 oracle_Oracle10g跨表空间数据迁移

alter table Your_Table_Name move tablespace Your_New_TableSpace_Name;

其中前面带“Your”的地方是需要分别更换为实际表名和表空间名的。

2、可能用到的其他SQL语句

查找数据库文件对应的File_ID

select * from dba_data_files;

查询当前表空间中的所有表

select distinct segment_name from dba_extents where segment_type='TABLE' and file_id=14;

查询当前表空间中的所有索引

select distinct segment_name from dba_extents where segment_type='INDEX' and file_id=14;

如果有分区表,则查询当前表空间中的所有的分区表

select distinct segment_name from dba_extents where segment_type='TABLE PARTITION' and file_id=14;

查询当前表空间中的所有分区表的索引

select distinct segment_name from dba_extents where segment_type='INDEX PARTITION' and file_id=14;

移动表到指定表空间

alter table Tbl_Name move tablespace New_TableSpaceName;

重建表的索引

alter index Index_Name rebuild tablespace New_TableSpaceName;

移动BLOB、CLOB的字段到指定表空间

alter table Tbl_Name move lob(BLOB1,BLOB2,BLOB3,......) store as (tablespace New_TableSpaceName);

移动BLOB、CLOB的字段语法

alter table table_name move [tablespace tbs_name] lob(lob_field1,lob_field2) store as (tablespace new_tbs_name);

如果LOB字段在分区表中,则增加partition关键字,如

alter table table_name move [partition partname] [tablespace tbs_name] lob(field) store as (tablespace new_tbs_name);

当然还有其他的执行操作,我们没有用到所以在这也不贴了

分享到:

2010-12-22 14:38

浏览 2835

分类:数据库

评论

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

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值