Oracle table move tablespace操作总结:

1.非分区表move
    ALTER TABLE IDW_FINA.OS_OA_FAMILY_ORDERITEM move tablespace IDWD_TBS002;

2.分区表move
    分区表move的话,要按照partition逐个进行move,如果有subpartition的话要subpartition逐个进行move
    
    alter table BDHI.FCT_ROAMING_MSG move partition FCT_ROAMING_MSG20160210 tablespace IDWD_TBS002
    
    alter table BDHI.TEST_MOVE_PARTITION_0617 move subpartition P2011_D4 tablespace IDWD_TBS002
    
    move完成后修改partition的default tablespace attributes
    
    ALTER TABLE TEST_MOVE_PARTITION_0617 MODIFY DEFAULT ATTRIBUTES FOR PARTITION  P2011 TABLESPACE IDWD_TBS002;

3.索引move的话,需要rebuild索引
    alter index IDW_WF.IDX_DA_COMPLETE rebuild tablespace IDWD_TBS002

4.如果有lob字段的话  lob字段需要单独move
    alter table BDHI.TEST move lob(A) store as (tablespace IDWD_TBS002)

Oracle 12.1开始,可以对分区和子分区进行online move:
    
    ALTER TABLE t1 MOVE PARTITION part_2015  TABLESPACE users ONLINE UPDATE INDEXES;

ALTER TABLE t1 MOVE SUBPARTITION SYS_SUBP793  TABLESPACE users ONLINE UPDATE INDEXES;

Oracle 12.2以后,可以对常规表进行Online move,会自动重建索引:
    
    ALTER TABLE t1 MOVE  TABLESPACE users ONLINE;
    
    There are some restrictions associated with online moves of tables described here.

It can't be combined with any other clause.
        It can't be used on a partitioned index-organized table or index-organized tables that have a column defined as a LOB, VARRAY, Oracle-supplied type, or user-defined object type.
        It can't be used if there is a domain index on the table.
        Parallel DML and direct path inserts are not supported against an object with an ongoing online move.

关于Online 和 UPDATE INDEXES 的作用:
     Moving a table changes the rowids of the rows in the table. 
     If you move a table and include the ONLINE keyword and the UPDATE INDEXES clause, then the indexes remain usable during the move operation. 
     If you include the UPDATE INDEXES clause but not the ONLINE keyword, then the indexes are usable immediately after the move operation. 
     The UPDATE INDEXES clause can only change the storage properties for the global indexes on the table or storage properties for the index partitions of any global partitioned index on the table. 
     If you do not include the UPDATE INDEXES clause, then the changes to the rowids cause the indexes on the table to be marked UNUSABLE, and DML accessing the table using these indexes receive an ORA-01502 error. 
     In this case, the indexes on the table must be dropped or rebuilt.

Oracle table move tablespace相关推荐

  1. oracle lob move tablespace

    oracle 大对象移动表空间 ALTER INDEX GHSJ_JCSJ.SYS_IL0000129600C00012$$ REBUILD  TABLESPACE GHSJ_JCSJ   ORA-0 ...

  2. oracle 赋予dorp,oracle表空间(tablespace)的增删改查(create/drop/rename,move/select)

    oracle表空间(tablespace)的增删改查(create/drop/rename,move/select) 2013-03-05 oracle维护中经常会对表空间进行操作,整理了一下tabl ...

  3. Oracle表空间(Tablespace)

     tablespace是Oracle空间管理上的逻辑单位,实体上存放数据的是tablespace里面的Data File. 所以tablespace可以看成是Data File的群组. table ...

  4. alter table move与shrink space

    http://www.xifenfei.com/1051.html 都知道alter table move 或shrink space可以收缩段,用来消除部分行迁移,消除空间碎片,使数据更紧密,但mo ...

  5. Oracle database TSPITR(TableSpace Point-In-Time Recovery) 表空间基于时间点的恢复

     主要用于恢复人为的错误 需要有之前的backup. 适用场景 (1)恢复错误的dml语句 (2)恢复错误的ddl语句,比如说更改了表结构,这个时候无法使用flashback table (3)恢复d ...

  6. oracle中对于TableSpace理解

    一.TableSpace表空间的使用规则 1.使用多个TableSpace * 用户数据与数据字典数据分离,减少竞争 * 应用程序之间的数据分离,防止某个TableSpace脱机后对多个程序造成影响 ...

  7. Oracle ORA-01653: 无法扩展表空间 (unable to extend table... in tablespace ...)

    造成问题原因分析: 1.表空间不足. 2.表空间状态未开启自动扩展功能. 检查 1.查看表空间使用情况 SELECT UPPER(F.TABLESPACE_NAME) "表空间名" ...

  8. 给Oracle表空间Tablespace扩展库文件

    版权声明:欢迎评论和转载,转载请注明来源. https://blog.csdn.net/zy332719794/article/details/78496233 一般来讲Oracle的表空间单个库文件 ...

  9. url oracle default schema,oracle @Table中使用schema时insert报错

    第一部分 测试情况如下: maven修改 com.alibaba druid 1.1.10 实体类 @Table(name = "dpcenter.xeuser") public ...

最新文章

  1. POJ 1035, Spell checker
  2. bootstrap-fileinput 使用
  3. linux shell编程学习笔记(9)正则表达式
  4. 【正一专栏】齐达内能熬过2018年的春天吗?
  5. CentOs下搭建GitLab
  6. Spring MVC:表单处理卷。 4 –单选按钮
  7. xml控制html样式,XML与CSS综合设置实例
  8. 使用yum安装Apache+PHP+MySQL
  9. canny算子 轮廓闭合_python实现:prewitt, laplace,sobel,scharr, canny, hed
  10. 亲测源码多多进鱼带VUE源码任务悬赏源码活动营销三级分销返佣积分商城版
  11. java开发冒险岛系统实训报告_樱妖冒险岛079完美源码
  12. 信息学奥赛一本通1011
  13. js把数字金额转换成中文大写数字
  14. 基于Java+SpringBoot+Thymeleaf+Mysql在线电子书阅读系统学习系统设计与实现
  15. 2022年最新配置:Eslint+Prettier+Volar
  16. EVE-NG打开Wireshark提示拒绝访问
  17. SQL:DQL,DCL
  18. 35岁以前要百万年薪
  19. 学ui设计可以从事什么工作
  20. 上海交通大学出版社python教材答案学生信息管理系统_学生信息管理系统(最终版)...

热门文章

  1. Android系统启动流程—— init进程zygote进程SystemServer进程启动流程
  2. 一张图解释什么是遗传算法_通俗易懂地解释遗传算法
  3. Oracle Docker 镜像(制作)
  4. 艺点动画-跟随原理讲解
  5. 高铁盈利地图:东部赚翻 中西部普遍巨亏
  6. mcake蛋糕预订图片
  7. 2022高频面试题之css篇
  8. 学习HTML+CSS知识点
  9. 棋盘覆盖问题 (分治)
  10. web前端常见面试题