`
dannyhz
  • 浏览: 367955 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
文章分类
社区版块
存档分类
最新评论

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

分享到:
评论

相关推荐

    file_compress和file_uncompress

    主要介绍了zlib压缩库中函数file_compress和file_uncompress的使用方法,有挺多的测试例子,已验证完毕

    Oracle 10gR2压缩(Compress)技术

    Oracle 10gR2压缩(Compress)技术 1 1、oracle压缩简介 1 2、oracle压缩优点 2 3、压缩分类 2 3.1 表级压缩 2 3.2 表空间级压缩 3 3.3 物化视图压缩 3 3.4 分区表压缩 3 3.5 索引压缩 4 3.6 数据压缩方法 4 4、如何...

    File-Compress-a-Uncompress.rar_c压缩文件夹_uncompress_uncompressfile

    文件夹的压缩与解压(去掉循环体即使单个文佳的压缩与解压)

    Oracle Advanced Compression Option (ACO) 白皮书

    Oracle高级压缩技术介绍白皮书。 Oracle Database 11g Release 1 introduced the Advanced Compression Option to help customers cope with these challenges. Innovations in Oracle compression technologies ...

    实现文件的解压和压缩

    利用ASP.NET 实现文件的的压缩和解压文件 附属代码

    Oracle基本建表语句

    希望这个文档对喜欢学习Oracle的同学有所帮助

    commons-compress包

    apache.commons.compress 第三方开源软件。能解压,压缩文件。里面包括commons-compress-1.9、commons-compress-1.2.1的版本。 当遇到这种错误,应该重点关注Caused by:后面的内容 Caused by:xxx Unsupported major....

    compress简单实例

    compress简单实例

    commons-compress-1.4.1-API文档-中文版.zip

    赠送jar包:commons-compress-1.4.1.jar; 赠送原API文档:commons-compress-1.4.1-javadoc.jar; 赠送源代码:commons-compress-1.4.1-sources.jar; 赠送Maven依赖信息文件:commons-compress-1.4.1.pom; 包含...

    apache-common-compress.rar

    apache-common-compress不提供解压RAR文件的方法,压缩包内还有另一个压缩包,那个包就是压缩/解压缩RAR文件用的,需要依赖一个公共包,需要依赖的包在压缩文件的lib文件夹下。此压缩包内含源码、开发包,但是没找到...

    commons-compress-1.19-API文档-中文版.zip

    赠送jar包:commons-compress-1.19.jar; 赠送原API文档:commons-compress-1.19-javadoc.jar; 赠送源代码:commons-compress-1.19-sources.jar; 赠送Maven依赖信息文件:commons-compress-1.19.pom; 包含翻译后...

    commons-compress-1.20-API文档-中英对照版.zip

    赠送jar包:commons-compress-1.20.jar; 赠送原API文档:commons-compress-1.20-javadoc.jar; 赠送源代码:commons-compress-1.20-sources.jar; 赠送Maven依赖信息文件:commons-compress-1.20.pom; 包含翻译后...

    commons-compress-1.21-API文档-中文版.zip

    赠送jar包:commons-compress-1.21.jar; 赠送原API文档:commons-compress-1.21-javadoc.jar; 赠送源代码:commons-compress-1.21-sources.jar; 赠送Maven依赖信息文件:commons-compress-1.21.pom; 包含翻译后...

    HTML Compress v5.5

    能够缩小网页文件多达20%,而不改变它们在浏览器里的效果。当要编辑时,可再将它们解压缩,支持styles、javascript、VBscript、VRML。 HTML COMPRESS并未将代码精简,不过是把那些仅仅是为了便于编辑而对浏览无用的...

    JSCompress.rar

    JSCompress

    commons-compress.jar包

    commons-compress.jar,包括commons-compress-1.0.jar和commons-compress-1.8.jar两个jar包,等你来拿。

    commons-compress-1.20-API文档-中文版.zip

    赠送jar包:commons-compress-1.20.jar; 赠送原API文档:commons-compress-1.20-javadoc.jar; 赠送源代码:commons-compress-1.20-sources.jar; 赠送Maven依赖信息文件:commons-compress-1.20.pom; 包含翻译后...

    最全的oracle常用命令大全.txt

    dict_column 全部数据字典表里字段名称和解释 如果我们想查询跟索引有关的数据字典时,可以用下面这条SQL语句: SQL>select * from dictionary where instr(comments,'index')>0; 如果我们想知道user_indexes...

    zlib compress code

    从zlib中分离出来的文件, #include "zlib.h" 之后,可以调用 compress()和uncompress()函数。

    compress-1.7-src

    commons-compress-1.7-src

Global site tag (gtag.js) - Google Analytics