Uninstallation of APEX from a default Oracle 11gR2 database
April 6, 2012 4 Comments
Environment: Oracle Linux 6.2, Oracle database 11gR2 126.96.36.199, APEX 3.2.1
If you use the graphical dbca utility to create a new Oracle 11gR2 database, you will have noticed that this includes Application Express by default, and there is no way to deselect that option (to my knowledge) during the installation process. Here I will explain how you can remove APEX from the 11g database after the installation.
First, you need to figure out what version of APEX is installed. You can do this by looking at the name of the APEX_xxxxxx schema, or by executing the following query (with user SYS as SYSDBA):
SQL> select version from dba_registry where comp_id=’APEX’;
Next, you need to download the exact same version of the software (in this case: version 3.2.1) from Oracle’s website. The last version of APEX as of writing is 4.1.1, but the uninstallation won’t work with this version.
Version 3.2.1 can be downloaded here: http://www.oracle.com/technetwork/developer-tools/apex/3-098787.html. Copy the zip file to your server and unzip it to a temp folder (for example: /tmp). Make sure the user which runs your Oracle software (by default this is user “oracle”) has access to the software. Note: you need about 750MB of free disk space for the zip file and the unzipped content…
Next, change to the directory “apex” and run the apexremov.sql script with user SYS as SYSDBA:
$ sqlplus /nolog
SQL*Plus: Release 188.8.131.52.0 Production on Fri Apr 6 14:07:26 2012
Copyright (c) 1982, 2011, Oracle. All rights reserved.
SQL> connect / as sysdba
When the script executed without errors, you should see the following message at the end:
PL/SQL procedure successfully completed.
…Application Express Removed
You can now query dba_registry again, and you will notice that APEX is uninstalled!