As an Enterprise Edition is needed for key compression as of version 12c, the "compress" instruction is now removed from create-db.sql script. It cannot be used for new databases.


Disable indexes with compression='ENABLED'

To disable indexes with compression='ENABLED' for already existing databases use the following statement:

DECLARE
BEGIN
FOR index_entry IN (select INDEX_NAME from user_indexes where compression='ENABLED')
LOOP
dbms_output.put_line('INFO: working on ' || index_entry.INDEX_NAME);
EXECUTE IMMEDIATE 'ALTER INDEX ' || index_entry.INDEX_NAME || ' REBUILD NOCOMPRESS';
END LOOP;
END;
CODE

To switch on 'compression' back to 'ENABLED' the script 'create-db-enterprise-edition.sql' must be executed. This requires that an Enterprise Edition has been purchased by the customer.