[20131125]Partition, compress and drop column (ORA-39726)之2.txt
[20131125]Partition, compress and drop column (ORA-39726)之2.txt
在12c下測試看看,結果如何?
SCOTT@ztest> @ver
BANNER CON_ID
-------------------------------------------------------------------------------- ----------
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production 0
SCOTT@ztest> select max(object_id),min(data_object_id) from dba_objects;
MAX(OBJECT_ID) MIN(DATA_OBJECT_ID)
-------------- -------------------
92011 0
drop table t1_compression purge;
create table t1_compression (id number, name varchar2(30)) partition by range (id) interval (30000) (partition p1 values less than (30000) ) compress;
insert into t1_compression select object_id,object_name from dba_objects where object_id is not null ;
commit;
col partition_name for a20
select partition_name,compression,compress_for from user_tab_partitions where table_name='T1_COMPRESSION';
PARTITION_NAME COMPRESS COMPRESS_FOR
-------------------- -------- ------------------------------
P1 ENABLED BASIC
SYS_P311 ENABLED BASIC
SYS_P312 ENABLED BASIC
SYS_P313 ENABLED BASIC
SCOTT@ztest> alter table t1_compression drop column name;
alter table t1_compression drop column name
*
ERROR at line 1:
ORA-39726: unsupported add/drop column operation on compressed tables
SCOTT@ztest> alter table t1_compression set unused column name;
Table altered.
SCOTT@ztest> desc t1_compression;
Name Null? Type
----- -------- -----------------
ID NUMBER
SCOTT@ztest> alter table t1_compression drop unused columns;
alter table t1_compression drop unused columns
*
ERROR at line 1:
ORA-39726: unsupported add/drop column operation on compressed tables
SCOTT@ztest> alter table t1_compression move partition p1 nocompress;
Table altered.
SCOTT@ztest> select partition_name,compression,compress_for from user_tab_partitions where table_name='T1_COMPRESSION';
PARTITION_NAME COMPRESS COMPRESS_FOR
-------------------- -------- ------------------------------
P1 DISABLED
SYS_P311 ENABLED BASIC
SYS_P312 ENABLED BASIC
SYS_P313 ENABLED BASIC
SCOTT@ztest> alter table t1_compression move partition SYS_P311 nocompress;
Table altered.
SCOTT@ztest> alter table t1_compression move partition SYS_P312 nocompress;
Table altered.
SCOTT@ztest> alter table t1_compression move partition SYS_P313 nocompress;
Table altered.
SCOTT@ztest> select partition_name,compression,compress_for from user_tab_partitions where table_name='T1_COMPRESSION';
PARTITION_NAME COMPRESS COMPRESS_FOR
-------------------- -------- ------------------------------
P1 DISABLED
SYS_P311 DISABLED
SYS_P312 DISABLED
SYS_P313 DISABLED
SCOTT@ztest> alter table t1_compression drop unused columns;
Table altered.
--看來11G下有bug.
SCOTT@ztest> column column_name format a30
SCOTT@ztest> select column_id, segment_column_id, internal_column_id, column_name, hidden_column, virtual_column from user_tab_cols where table_name = 'T1_COMPRESSION';
COLUMN_ID SEGMENT_COLUMN_ID INTERNAL_COLUMN_ID COLUMN_NAME HID VIR
---------- ----------------- ------------------ ------------------------------ --- ---
1 1 1 ID NO NO
在12c下測試看看,結果如何?
SCOTT@ztest> @ver
BANNER CON_ID
-------------------------------------------------------------------------------- ----------
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production 0
SCOTT@ztest> select max(object_id),min(data_object_id) from dba_objects;
MAX(OBJECT_ID) MIN(DATA_OBJECT_ID)
-------------- -------------------
92011 0
drop table t1_compression purge;
create table t1_compression (id number, name varchar2(30)) partition by range (id) interval (30000) (partition p1 values less than (30000) ) compress;
insert into t1_compression select object_id,object_name from dba_objects where object_id is not null ;
commit;
col partition_name for a20
select partition_name,compression,compress_for from user_tab_partitions where table_name='T1_COMPRESSION';
PARTITION_NAME COMPRESS COMPRESS_FOR
-------------------- -------- ------------------------------
P1 ENABLED BASIC
SYS_P311 ENABLED BASIC
SYS_P312 ENABLED BASIC
SYS_P313 ENABLED BASIC
SCOTT@ztest> alter table t1_compression drop column name;
alter table t1_compression drop column name
*
ERROR at line 1:
ORA-39726: unsupported add/drop column operation on compressed tables
SCOTT@ztest> alter table t1_compression set unused column name;
Table altered.
SCOTT@ztest> desc t1_compression;
Name Null? Type
----- -------- -----------------
ID NUMBER
SCOTT@ztest> alter table t1_compression drop unused columns;
alter table t1_compression drop unused columns
*
ERROR at line 1:
ORA-39726: unsupported add/drop column operation on compressed tables
SCOTT@ztest> alter table t1_compression move partition p1 nocompress;
Table altered.
SCOTT@ztest> select partition_name,compression,compress_for from user_tab_partitions where table_name='T1_COMPRESSION';
PARTITION_NAME COMPRESS COMPRESS_FOR
-------------------- -------- ------------------------------
P1 DISABLED
SYS_P311 ENABLED BASIC
SYS_P312 ENABLED BASIC
SYS_P313 ENABLED BASIC
SCOTT@ztest> alter table t1_compression move partition SYS_P311 nocompress;
Table altered.
SCOTT@ztest> alter table t1_compression move partition SYS_P312 nocompress;
Table altered.
SCOTT@ztest> alter table t1_compression move partition SYS_P313 nocompress;
Table altered.
SCOTT@ztest> select partition_name,compression,compress_for from user_tab_partitions where table_name='T1_COMPRESSION';
PARTITION_NAME COMPRESS COMPRESS_FOR
-------------------- -------- ------------------------------
P1 DISABLED
SYS_P311 DISABLED
SYS_P312 DISABLED
SYS_P313 DISABLED
SCOTT@ztest> alter table t1_compression drop unused columns;
Table altered.
--看來11G下有bug.
SCOTT@ztest> column column_name format a30
SCOTT@ztest> select column_id, segment_column_id, internal_column_id, column_name, hidden_column, virtual_column from user_tab_cols where table_name = 'T1_COMPRESSION';
COLUMN_ID SEGMENT_COLUMN_ID INTERNAL_COLUMN_ID COLUMN_NAME HID VIR
---------- ----------------- ------------------ ------------------------------ --- ---
1 1 1 ID NO NO
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/267265/viewspace-1061111/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- [20131125]Partition, compress and drop column (ORA-39726).txt
- v$lock之alter table drop column與alter table set unused column區別系列五
- oracle下,drop column 的語句Oracle
- PostgreSQL DBA(164) - pgAdmin(Drop column)SQL
- Oracle drop,truncate partition 索引失效 實驗Oracle索引
- [20160414]分析drop column.txt
- DROP PARTITION為什麼不進回收站
- Flutter 之 Row、Column詳解Flutter
- flashback技術之---flashback drop
- oracle compressOracle
- Flutter之Row/Column用法詳解Flutter
- count(*) 和count(column)之區別
- Export Parameter : CompressExport
- partition table and partition indexIndex
- PARTITION partition01
- PARTITION partition02
- PARTITION partition04
- flashback總結三之Flashback_DROP
- Oracle Table and tablespace CompressOracle
- tar compress gzip 操作
- 017 Rust死靈書之Drop標誌Rust
- MySQL資料災難挽救之drop tableMySql
- Pruning、Reference Partition、Exchange Partition
- partition timestamp(0) not use partition
- oracle全文索引之FILTER_3_FORMAT_COLUMNOracle索引FilterORM
- sqlplus選項之column print_noprintSQL
- web前端之HTML5壓縮圖片compress image with canvasWeb前端HTMLCanvas
- Error: no such columnError
- 029 Rust死靈書之Vec實現DropRust
- 010 Rust死靈書之Drop檢查Rust
- 11g分割槽新特性之interval partition
- 【Mysql】MySQL 5.7新特性之Generated Column(函式索引)MySql函式索引
- oracle全文索引之datastore_2_MULTI_COLUMN_DATASTOREOracle索引AST
- drop asm disk、撤銷drop asm diskASM
- Drop DatabaseDatabase
- Heap Block Compress現象分析BloC
- oracle 壓縮技術(compress)Oracle
- oracle compress壓縮小記Oracle