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 and later
Information in this document applies to any platform.


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 version, when checking a table for possbile compression ratio the following statement fails as below.

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

 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);
 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,
 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));


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.