I need to build an Oracle 19c development environment using Docker; however there is no dev version of Oracle 19c with Partitioning available, whereas 23c does have a free version for developers with partitioning.

I have downloaded the free docker image from Oracle, but I recently found that you can't reduce the compatibility level (using ALTER SYSTEM SET COMPATIBLE = '19.0.0' SCOPE=SPFILE;) once the db is created.

Without creating my own custom image, is it possible to set the compatible to 19 for the database, using docker-compose?

docker-compose section:

        image: mydocker/myrepo:oracle23free
        restart: always
                - ORACLE_PWD=securepassword
                - "1521:1521"
                - "5500:5500"
                - ./dbscripts/:/docker-entrypoint-initdb.d/startup

currently I have a script to set the compatibility mode here, but it doesn't work (the database won't start up) - I see the following in the logs after rebooting the database:

ORA-00201: control file version incompatible with ORACLE version

ORA-00202: control file: '/opt/oracle/oradata/FREE/control01.ctl'

(see also https://serverfault.com/questions/1143690/restarting-oracle-23c-within-the-docker-container-causes-blocked-listener, when I didn't know why the db wouldn't start up)

  • Short answer: NO. Sep 14 at 12:30
  • well that was very short, thank you for that!! Sep 14 at 12:36
  • My understanding is that you could set it at the point of installation of the database. Is that true? The docker docker-entrypoint-initdb.d folder has a setup folder as well as a startup one. So couldn't you add a script or something to the setup folder to set the compatibility parameter there? Sep 14 at 12:39

1 Answer 1


OK then, long answer:

compatible is specified when a database is created from scratch. It can be set to a higher value after upgrading the database to a newer version. It can not be lowered.

Oracle 23c Free comes with a pre-built database with compatible set to 23.0.0.

Your Answer

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

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