My Oracle Support Banner

dbms_compression.get_compression_ratio fails with ORA-01422 (Doc ID 1944907.1)

Last updated on MARCH 10, 2020

Applies to:

Oracle Database - Enterprise Edition - Version 11.2.0.4 and later
Oracle Database Cloud Schema Service - Version N/A and later
Oracle Database Exadata Cloud Machine - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Oracle Database Exadata Express Cloud Service - Version N/A and later
Information in this document applies to any platform.

Symptoms

While running dbms_compression.get_compression_ratio you may get this error: ORA-01422

When you enable errorstack on ORA-01422,the below statement is seen as problematic one:

ORA-01422: exact fetch returns more than requested number of rows
----- Current SQL Statement for this session (sql_id=cc01vsm45maab) -----

SELECT OBJECT_ID FROM ALL_OBJECTS WHERE OWNER = :B2 AND OBJECT_NAME = :B1 AND SUBOBJECT_NAME IS NULL

If bind values are put in the above query, two objects with the same name can be seen as:

SQL> SELECT OBJECT_ID FROM ALL_OBJECTS WHERE OWNER = 'A'AND OBJECT_NAME = 'B' AND SUBOBJECT_NAME IS NULL;


OBJECT_ID
----------
16902
89791

 

SQL> SELECT object_name,OBJECT_ID,object_type FROM ALL_OBJECTS WHERE OWNER = 'A'AND OBJECT_NAME = 'B' AND SUBOBJECT_NAME IS NULL;

OBJECT_NAME OBJECT_ID OBJECT_TYPE
------------------------------ ---------- -------------------
<table name > TABLE
<index name> INDEX

 

Cause

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
Symptoms
Cause
Solution


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