oracle compress 表需要 move uncompress 在add column

1.普通表(未分区) 1.sql> Alter Table tb_hxl_id Compress; 2. 3.Table altered. 4. 5.sql> Alter Table tb_hxl_id Move Compress; 6. 7.Table altered. 8. 9.sql> Alter Table tb_hxl_id Add c Varchar2(2); 10. 11.Table altered. 12. 13.sql> Alter Table tb_hxl_id Drop Column c; 14.Alter Table tb_hxl_id Drop Column c 15. * 16.ERROR at line 1: 17.ORA-39726: unsupported add/drop column operation on compressed tables 18. 19. 20.sql> Alter Table tb_hxl_id Move Nocompress; -- 需要进行解压缩后才能删除字段 21. 22. 23.Table altered. 24. 25.sql> Alter Table tb_hxl_id Drop Column c; 26. 27.Table altered. 2.分区表 1.sql> Select aa.table_name,aa.partitioning_type 2. 2 From dba_part_tables aa 3. 3 Where aa.table_name = 'TB_HXL_LIST'; 4. 5.TABLE_NAME PARTITION 6.------------------------------ --------- 7. 8.TB_HXL_LIST LIST 9. 10.sql> Select 11. 2 aa.compression,12. 3 aa.partition_name 13. 4 From dba_tab_partitions aa 14. 5 Where aa.table_name = 'TB_HXL_LIST'; 15. 16.COMPRESS PARTITION_NAME 17.-------- ------------------------------ 18. 19.ENABLED P_L1 20.ENABLED P_L2 21.ENABLED P_L3 22.ENABLED P_L4 23. 24.sql> Alter Table tb_hxl_list compress; 25. 26.Table altered. 27. 28.sql> Alter Table TB_HXL_LIST 29. 2 Move Partition P_L1 compress; 30. 31.Table altered. 32. 33.sql> Alter Table TB_HXL_LIST Add b Varchar2(2); 34. 35.Table altered. 36. 37.sql> Alter Table TB_HXL_LIST Drop Column b; 38.Alter Table TB_HXL_LIST Drop Column b 39. * 40.ERROR at line 1: 41.ORA-39726: unsupported add/drop column operation on compressed tables 42. 43. 44.sql> Alter Table TB_HXL_LIST 45. 2 Move Partition P_L1 Nocompress; 46. 47.Table altered. 48. 49.sql> Alter Table TB_HXL_LIST Drop Column b; 50.Alter Table TB_HXL_LIST Drop Column b 51. * 52.ERROR at line 1: 53.ORA-39726: unsupported add/drop column operation on compressed tables 54. 55.sql> alter table TB_HXL_LIST set unused column b; -- 压缩的分区表不能删除字段,只能设置unused 56. 57. 58.Table altered. ORA-39726: unsupported add/drop column operation on compressed tables Cause: An unsupported add/drop column operation for compressed table was attemped. Action: When adding a column,do not specify a default value. DROP column is only supported in the form of SET UNUSED column (Meta-data drop column).

相关文章

数据库版本:11.2.0.4 RAC(1)问题现象从EM里面可以看到,在23号早上8:45~8:55时,数据库等待会话暴增...
(一)问题背景最近在对一个大约200万行数据的表查看执行计划时,发现存在异常,理论上应该返回100多万...
(一)删除备份--DELETE命令用于删除RMAN备份记录及相应的物理文件。当使用RMAN执行备份操作时,会在RM...
(1)DRA介绍 数据恢复顾问(Data Recovery Advise)是一个诊断和修复数据库的工具,DRA能够修复数据文...
RMAN(Recovery Manager)是Oracle恢复管理器的简称,是集数据库备份(backup)、修复(restore)和恢复...
(1)备份对象 可以使用RMAN进行的备份对象如下: --整个数据库:备份所有的数据文件和控制文件; --数...