I'm trying to execute compression script GET_COMPRESSION_RATIO from here: And this line gives me an error:

comptype => DBMS_COMPRESSION.comp_for_oltp,

PLS-00302: component 'COMP_FOR_OLTP' must be declared

In oracle documentation, they say "The DBMS_COMPRESSSION package is owned by user SYS, and must be created by SYS. The execution privilege is granted to PUBLIC. Subprograms in this package are executed using the privileges of the current user."

I granted PUBLIC role to my user but don't know how to create this package by SYS user. Or the problem lays somewhere else?

2 Answers 2


The terminology changed in 12c. See the constants here.


  • After change you suggested I have following error: PLS-00306: wrong number or types of arguments in call to 'GET_COMPRESSION_RATIO'
    – Bart Ch.
    Commented Mar 29, 2017 at 11:11

I was using wrong scripts for Oracle 11g. Correct ones for 12c can be found here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.