Oracle APEX (Application Express) clean up in Oracle Database 11.2-12.2 is fairly simple and straight forward. With the upgrade to Oracle Database 22.214.171.124 Oracle APEX does not get upgraded automatically anymore. If necessary you should upgrade Oracle APEX upfront of afterwards. But please do keep an eye on the APEX certification with Oracle Database 126.96.36.199 to avoid any issues:
- Save Upgrade Downtime – Upgrade Oracle APEX upfront
- Upgrade downtime credited to APEX
- Is your APEX version certified with your database release?
Oracle APEX (Application Express) Clean Up in Oracle Database 11.2-12.2
Before you start removing anything from your database please make sure you read my introductory blog post about how to Remove and Clean Up Components from Oracle 11.2 – 12.2 . You’ll find links to monitor proper component removal there as well as in the SQL Scripts Repository on this blog.
This blog post does not recommend to remove APEX from an Oracle Database. I by myself use Oracle APEX quite often, there’s a huge developer community out there – and APEX is one of the coolest things Oracle ever did in addition to the database.
But there may be situations when you have to remove APEX. Maybe it could have been accidentally installed into the CDB$ROOT of a Multitenant database: Why you should remove APEX from CDB$ROOT.
Removing APEX does remove all APEX applications as well. Export existing APEX applications upfront.
Oracle Database 188.8.131.52
In Oracle Database 184.108.40.206 APEX gets installed by default as version 3.2.1.00.12. The removal procedure is documented in MOS Note:558340.1 – How to Uninstall Oracle HTML DB / Application Express from a 10G/11G Database.
SQL> @?/apex/apxremov.sql SQL> drop package HTMLDB_SYSTEM;
That’s very simply and straight forward. And it works. The leftover package
HTMLDB_SYSTEM is an artifact from older versions of APEX and should be removed (see MOS Note:1231863.1).
Oracle Database 220.127.116.11
In Oracle Database 18.104.22.168 the APEX removal instructions are in the Application Express Installation Guide. The script for an APEX removal remains the same, regardless of executed in a non-CDB or CDB. APEX gets installed by default in version 4.2.5.00.08.
$ cd $ORACLE_HOME/apex $ sqlplus / as sysdba SQL> @apxremov.sql SQL> drop PUBLIC SYNONYM APEX_SPATIAL; SQL> drop PUBLIC SYNONYM APEX_PKG_APP_INSTALL_LOG;
Finally there may be two leftover synonyms
APEX_PKG_APP_INSTALL_LOGIN requiring clean up.
Oracle Database 22.214.171.124
The default APEX version in Oracle Database 126.96.36.199 is APEX 5.0.4.00.12. Again, the removal scripts is the same for non-CDBs and CDBs. The documentation describes the process only for CDBs but fortunately there are no leftovers for non-CDBs.
$ cd $ORACLE_HOME/apex $ sqlplus / as sysdba SQL> @apxremov.sql
In this case the script will utilized
catcon.pl. Therefore I’m adding
perl to the
$ cd $ORACLE_HOME/apex $ PATH=$PATH:$ORACLE_HOME/perl/bin/perl $ sqlplus / as sysdba SQL> @apxremov.sql
Unfortunately there are leftovers after this process: the public synonym
APEX_SPATIAL in all containers except
PDB$SEED will exist if Oracle Spatial is present. The removal must be done with
- Create a
drop public synonym APEX_SPATIAL;
$ cd $ORACLE_HOME/rdbms/admin $ $ORACLE_HOME/perl/bin/perl catcon.pl -n 1 -C 'CDB$ROOT' -e -b clean_apex -d /home/oracle clean_apex.sql
Component Clean Up Series
- Remove and Clean Up Components from Oracle 11.2 – 12.2 – General Guidelines and Precautions
- APEX – Oracle Application Express Clean Up
- OWM – Oracle Workspace Manager Clean Up
- DV – Oracle Database Vault Clean Up
- OLS – Oracle Label Security Clean Up
- SDO – Oracle Spatial Data Option Clean Up
- CONTEXT – Oracle Text Clean Up
- ORDIM – Oracle Multi Media Clean Up
- XOQ – Oracle OLAP API Clean Up
- APS – Oracle OLAP Analytical Workspace Clean Up
- AMD – Oracle OLAP Catalog Clean Up
- OWB – Oracle Warehouse Builder Clean Up
- EXF/RUL – Oracle Expression Filters and Rules Manager Clean Up
- EM – Enterprise Manager Database Control Clean Up
- JAVAVM/XML – Oracle Java Virtual Machine and XDK Clean Up
- XDB – Oracle XML Database Clean Up
Finally download a slide deck about the Component Clean Up on this blog: