My Oracle Support Banner

DBMS_COMPRESSION.GET_COMPRESSION_RATIO Fails With ORA-00933 - ORA-06512 (Doc ID 1493289.1)

Last updated on OCTOBER 17, 2019

Applies to:

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

Symptoms

NOTE: In the images and/or the document content below, the user information and data used represents fictitious data from the Oracle sample schema(s) or Public Documentation delivered with an Oracle database product. Any similarity to actual persons, living or dead, is purely coincidental and not intended in any manner. 

 On production database 11.2.0.3 version, when checking a table for possbile compression ratio the following statement fails as below.


ERROR
-----------------------
ORA-00933: SQL-Befehl wurde nicht korrekt beendet
ORA-06512: in "SYS.PRVT_COMPRESSION", Zeile 776
ORA-06512: in "SYS.DBMS_COMPRESSION", Zeile 214
ORA-06512: in Zeile 10

declare
 v_blkcnt_cmp pls_integer;
 v_blkcnt_uncmp pls_integer;
 v_row_cmp pls_integer;
 v_row_uncmp pls_integer;
 v_cmp_ratio number;
 V_COMPTYPE_STR varchar2(60);
 
begin
 DBMS_COMPRESSION.GET_COMPRESSION_RATIO(
 scratchtbsname => '<TABLESPACE_NAME>',
 ownname => '<SCHEMA_NAME>',
 tabname => '<TABLE_NAME>',
 partname => NULL,
 comptype => 2,
 blkcnt_cmp => v_blkcnt_cmp,
 blkcnt_uncmp => v_blkcnt_uncmp,
 row_cmp => v_row_cmp,
 row_uncmp => v_row_uncmp,
 cmp_ratio => v_cmp_ratio,
 COMPTYPE_STR => V_COMPTYPE_STR
 );
 
 dbms_output.put_line('Estimated Compression Ratio: '||to_char(v_cmp_ratio));
 dbms_output.put_line('Blocks used by compressed sample: '||to_char(v_blkcnt_cmp));
 dbms_output.put_line('Blocks used by uncompressed sample: '||to_char(v_blkcnt_uncmp));
end;
/

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.