My Oracle Support Banner

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 10, 2020

Applies to:

Oracle Database - Enterprise Edition - Version and later
Information in this document applies to any platform.


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.
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 <table name> 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


create table <tbale name> heap tablespace
<ts name> compress for all operations nologging as select * from
<master object name>


To view full details, sign in with your My Oracle Support account.

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

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.