DBMS_COMPRESSION.GET_COMPRESSION_RATIO can fail with ORA-1422/ORA-20000/ORA-942 or ORA-922 (Doc ID 1361314.1)

Last updated on MARCH 27, 2014

Applies to:

Oracle Server - Enterprise Edition - Version: 11.2.0.1 and later   [Release: 11.2 and later ]
Information in this document applies to any platform.

Symptoms

DBMS_COMPRESSION.GET_COMPRESSION_RATIO cannot be invoked at table level
for partitioned tables for DBMS_COMPRESSION.COMPRESS_FOR_OLTP level.
The call fails with either ORA-1422 or
ORA-20000: For OLTP compression, specify partition (or subpartition) name for partitioned tables.
eg:
ORA-01422: exact fetch returns more than requested number of rows
ORA-06512: at "SYS.DBMS_COMPRESSION", line 214

Other errors which can occur while executing DBMS_COMPRESSION.GET_COMPRESSION_RATIO include ORA-942 or ORA-922

Failing SQL statements could be similar to :


drop table "TCCOMPRESS".DBMS_TABCOMP_TEMP_UNCMP purge

----- PL/SQL Stack -----
----- PL/SQL Call Stack -----
object line object
handle number name
0x360f329c 464 package body SYS.PRVT_COMPRESSION
0x360f459c 214 package body SYS.DBMS_COMPRESSION
0x33e3bc84 33 anonymous block

Or


create table "CZ".DBMS_TABCOMP_TEMP_CMP organization heap tablespace
"APPS_TS_TX_DATA" compress for all operations nologging as select * from
"CZ".DBMS_TABCOMP_TEMP_UNCMP mytab]


Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms