5.13 Performing Post Installation Tasks for Upgrade Installations

Remove schemas from prior Oracle Application Express installations.

Once you have verified that your upgrade installation was successful and all upgraded applications function properly, you should remove schemas from prior Oracle Application Express installations.

Topics:

5.13.1 About Removing Prior Oracle Application Express Installations

Verifying if a prior installation exists and removing the schema.

The database users associated with schemas from prior installations are privileged users and should be removed when they are no longer necessary. Removing schemas from a prior installation is a two step process. First you verify if a prior installation exists and then you remove the schemas.

5.13.2 Verifying if a Prior Installation Exists

Start SQL*Plus and connect to the database where Oracle Application Express is installed as SYS and run the query.

To verify if a prior installation exists:

  1. Start SQL*Plus and connect to the database where Oracle Application Express is installed as SYS. For example:
    • On Windows:

      SYSTEM_DRIVE:\ sqlplus /nolog
      SQL> CONNECT SYS as SYSDBA
      Enter password: SYS_password
      
    • On UNIX and Linux:

      $ sqlplus /nolog
      SQL> CONNECT SYS as SYSDBA
      Enter password: SYS_password 
      
  2. Run the following query:
    SELECT username  FROM dba_users  WHERE (  username LIKE 'FLOWS\_______' ESCAPE '\'       OR username LIKE 'APEX\_______' ESCAPE '\' )   AND username NOT IN ( SELECT schema                           FROM dba_registry                          WHERE comp_id = 'APEX' );
    

If the results contain entries in the form FLOWS_XXXXXX or APEX_XXXXXX where XXXXXX represents six numbers, those entries are candidates for removal.

5.13.3 Removing Schemas from Prior Installations

Start SQL*Plus and connect to database and execute a statement to remove schemas from prior installations.

To remove schemas from prior installations:

  1. Start SQL*Plus and connect to the database where Oracle Application Express is installed as SYS specifying the SYSDBA role. For example:
    • On Windows:

      SYSTEM_DRIVE:\ sqlplus /nolog
      SQL> CONNECT SYS as SYSDBA
      Enter password: SYS_password
      
    • On UNIX and Linux:

      $ sqlplus /nolog
      SQL> CONNECT SYS as SYSDBA
      Enter password: SYS_password
      
  2. Execute a statement similar to the following example:
    DROP USER APEX_040200 CASCADE;
    

5.13.4 Fixing Invalid ACL in Oracle Database 11g or Later

Learn how to fix an invalid ACL if you are running Oracle Database 11g or later.

After following the instructions in"About Removing Prior Oracle Application Express Installations," you may need to fix an invalid ACL if you are running Oracle Database 11g or later and you enabled network services for the prior Oracle Application Express schema.

To fix an invalid ACL:

  1. Change your working directory to the apex directory where you unzipped the installation software.
  2. Start SQL*Plus and connect to the database where Oracle Application Express is installed as SYS specifying the SYSDBA role. For example:
    • On Windows:

      SYSTEM_DRIVE:\ sqlplus /nolog
      SQL> CONNECT SYS as SYSDBA
      Enter password: SYS_password
      
    • On UNIX and Linux:

      $ sqlplus /nolog
      SQL> CONNECT SYS as SYSDBA
      Enter password: SYS_password
      
  3. Execute a statement similar to the following:
    EXEC DBMS_NETWORK_ACL_ADMIN.DELETE_PRIVILEGE('power_users.xml', 'APEX_040200');