3.2 Installing Application Express into Different PDBs

You can install different versions of Oracle Application Express into different PDBs.

Providing Application Express is not installed in the container database, you can install a local Application Express within each PDB as required. When Application Express is installed locally there are no Application Express metadata linked objects and all packages, views, and tables are created within the APEX_180100 schema, within each PDB where Application Express is installed.

3.2.1 Uninstalling Application Express 18.1 from a CDB

Learn how to uninstall Application Express from a CDB.

To uninstall Application Express from a CDB:

Note:

 Installing or removing Application Express from a CDB requires a local connection to the database.

This section describes removing Application Express 18.1 from a CDB. If you wish to remove Oracle Application Express from the CDB that shipped with Oracle Database 12.1, you should use apxremov_con.sqlfrom either $ORACLE_HOME/apex , or from a 4.2.6 APEX distribution.

  1. Change to the apex directory in the location where you unzipped the distribution.
  2. Start SQL*Plus and connect to the database where 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. Run apxremov.sql.

    For example:

    @apxremov.sql
    

    Note:

    If you run apexremov.sql after PDBs have been added to the CDB, then Application Express uninstalls from all of the PDBs. Therefore, any applications defined in any of the PDBs will be removed.

3.2.2 Installing Application Express Locally in a PDB

Learn how to install Application Express locally in a PDB.

Once you have removed Application Express from the container database by following the instructions in "Uninstalling Application Express 18.1 from a CDB," you can install Application Express locally in a PDB.

To install Application Express locally in a PDB:

  1. Change the apex directory in the location where you unzipped the distribution.
  2. Start SQL*Plus and connect to the database where 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. Set the container to the PDB you want to install Application Express locally:
    ALTER SESSION SET CONTAINER = <PDB_name>;
    
  4. Select the appropriate installation option.

    Full development environment provides complete access to the App Builder environment to develop applications. A Runtime environment enables users to run applications that cannot be modified.

    Available installation options include:

    • Full development environment - Run apexins.sql passing the following four arguments in the order shown:

      @apexins.sql tablespace_apex tablespace_files tablespace_temp images
      

      Where:

      • tablespace_apex is the name of the tablespace for the Application Express application user.

      • tablespace_files is the name of the tablespace for the Application Express files user.

      • tablespace_temp is the name of the temporary tablespace or tablespace group.

      • images is the virtual directory for Application Express images. To support future Application Express upgrades, define the virtual image directory as /i/.

      For example:

      @apexins.sql SYSAUX SYSAUX TEMP /i/
      
    • Runtime environment - Run apxrtins.sql passing the following four arguments in the order shown:

      @apxrtins.sql tablespace_apex tablespace_files tablespace_temp images
      

      Where:

      • tablespace_apex is the name of the tablespace for the Application Express application user.

      • tablespace_files is the name of the tablespace for the Application Express files user.

      • tablespace_temp is the name of the temporary tablespace or tablespace group.

      • images is the virtual directory for Application Express images. To support future Application Express upgrades, define the virtual image directory as /i/.

      For example:

      @apxrtins.sql SYSAUX SYSAUX TEMP /i/
      
  5. If you are using Oracle REST Data Services, complete the appropriate steps in Installing Application Express and Configuring Oracle REST Data Services.
  6. If you are using Oracle HTTP Server, complete the appropriate steps in Installing Application Express and Configuring Embedded PL/SQL Gateway.
  7. If you are using Embedded PL/SQL Gateway, run apex_epg_config.sql passing the path to the Oracle home and then complete the appropriate steps in Installing Application Express and Configuring Oracle HTTP Server.

Note:

Oracle Database SQL Language Reference for more information about SQL*Plus

When Application Express installs, it creates three new database accounts:

  • APEX_180100 - The account that owns the Application Express schema and metadata.

  • FLOWS_FILES - The account that owns the Application Express uploaded files.

  • APEX_PUBLIC_USER - The minimally privileged account is used for Application Express configuration with Oracle REST Data Services or Oracle HTTP Server and mod_plsql.

If you configured RESTful Web services, then these additional accounts are created:

  • APEX_REST_PUBLIC_USER - The account used when invoking RESTful Services definitions stored in Application Express.

  • APEX_LISTENER - The account used to query RESTful Services definitions stored in Application Express.

3.2.3 Installing Application Express 18.1 into a CDB

To install :

Note:

 Installing or removing Application Express from a CDB requires a local connection to the database.

  1. Change your working directory to the apex directory in the location where you unzipped the distribution.
  2. Start SQL*Plus and connect to CDB$ROOT of the database where 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. Select the appropriate installation option.

    Full development environment provides complete access to the App Builder environment to develop applications. A Runtime environment enables users to run applications that cannot be modified.

    Available installation options include:

    • Full development environment. Run apexins.sql passing the following four arguments in the order shown:

      @apexins.sql tablespace_apex tablespace_files tablespace_temp images
      

      Where:

      • tablespace_apex is the name of the tablespace for the Oracle Application Express application user.

      • tablespace_files is the name of the tablespace for the Application Express files user.

      • tablespace_temp is the name of the temporary tablespace or tablespace group.

      • images is the virtual directory for Application Express images. To support future Application Express upgrades, define the virtual image directory as /i/.

      Example:

      @apexins.sql SYSAUX SYSAUX TEMP /i/
      
    • Runtime environment. Run apxrtins.sql passing the following arguments in the order shown:

      @apxrtins.sql tablespace_apex tablespace_files tablespace_temp images
      

      Where:

      • tablespace_apex is the name of the tablespace for the Application Express application user.

      • tablespace_files is the name of the tablespace for the Application Express files user.

      • tablespace_temp is the name of the temporary tablespace or tablespace group.

      • images is the virtual directory for Application Express images. To support future Application Express upgrades, define the virtual image directory as /i/.

      Example:

      @apxrtins.sql SYSAUX SYSAUX TEMP /i/
      
  4. If using Oracle REST Data Services, complete appropriate steps in Installing Application Express and Configuring Oracle REST Data Services.
  5. If using the Embedded PL/SQL Gateway, complete appropriate steps in Installing Application Express and Configuring Embedded PL/SQL Gateway.
  6. If using the Oracle HTTP Server, complete appropriate steps in Installing Application Express and Configuring Oracle HTTP Server.

When Application Express installs, it creates three new database accounts:

  • APEX_180100 - The account that owns the Application Express schema and metadata.

  • FLOWS_FILES - The account that owns the Application Express uploaded files.

  • APEX_PUBLIC_USER - The minimally privileged account is used for Application Express configuration with Oracle REST Data Services or Oracle HTTP Server and mod_plsql.

If you configured RESTful Web services, then these additional accounts are created:

  • APEX_REST_PUBLIC_USER - The account used when invoking RESTful Services definitions stored in Application Express.

  • APEX_LISTENER - The account used to query RESTful Services definitions stored in Application Express.