Uninstallation of APEX from a default Oracle 11gR2 database

Environment: Oracle Linux 6.2, Oracle database 11gR2 11.2.0.3, 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’;

VERSION
——————————————————————————–
3.2.1.00.12

Now you need to download the installation files for this version of APEX, 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 11.2.0.3.0 Production on Fri Apr 6 14:07:26 2012

Copyright (c) 1982, 2011, Oracle. All rights reserved.

SQL> connect / as sysdba
Connected.
SQL> @apxremov.sql

When the script executed without errors, you should see the following message at the end:

PL/SQL procedure successfully completed.

…Application Express Removed
SQL>

You can now query dba_registry again, and you will notice that APEX has been uninstalled!

Update:

APEX version 3.2.1 is no longer available from the Oracle download archives, but the steps outlined here are the same for later versions of APEX. See for example here for APEX 19.2.

 

Matthias

7 thoughts on “Uninstallation of APEX from a default Oracle 11gR2 database

  1. Using dbca one can, in fact, not install Oracle Application Express by clicking on Standard Database Components, on the Step 8 of 12 Database Content screen. A second window will pop up listing Oracle JVM, ORACLE XML DB, Oracle Multimedia and Oracle Application Express. Just deselect Oracle Application Express and click OK. The Key to being able to do this is to select Custom Database in Step 2 of 12: Database Template.

  2. Pingback: (De)install Apex in 11GR2 challenge | Mathijs Bruggink

  3. Reblogged this on @dba_jay and commented:
    During a database upgrade, the upgrade failed on Phase 104, APEX Upgrade. My solution was to remove the APEX Package prior to upgrade since DBUA will install APEX by default if it isn’t already installed. Thanks for the tip!

  4. Pingback: Oracle APEX 18.x Installation | Windows | Duh! Microsoft did it again

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.