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).

相关文章

Java Oracle 结果集是Java语言中处理数据库查询结果的一种方...
Java AES和Oracle AES是现代加密技术中最常使用的两种AES加密...
Java是一种广泛应用的编程语言,具备可靠性、安全性、跨平台...
随着移动互联网的发展,抽奖活动成为了营销活动中不可或缺的...
Java和Oracle都是在计算机领域应用非常广泛的技术,他们经常...
Java 是一门非常流行的编程语言,它可以运行于各种操作系统上...