Menu
Amazon Relational Database Service
User Guide (API Version 2014-10-31)

Oracle Application Express

Amazon RDS supports Oracle Application Express (APEX) through the use of the APEX and APEX-DEV options. APEX is a development and run-time environment for web-based applications. Using APEX, developers can build applications entirely within the web browser. For more information, see Oracle Application Express in the Oracle documentation.

Oracle APEX consists of two main components:

  • A repository that stores the metadata for APEX applications and components. The repository consists of tables, indexes, and other objects that are installed in your Amazon RDS DB instance.

  • A listener that manages HTTP communications with APEX clients. The listener accepts incoming connections from web browsers forwards them to the Amazon RDS DB instance for processing, and then sends results from the repository back to the browsers. The APEX Listener was renamed Oracle Rest Data Services (ORDS) in Oracle 12c.

When you add the APEX options to your DB instance, Amazon RDS installs the APEX repository only. You must install the APEX listener on a separate host such as an Amazon EC2 instance, an on-premises server at your company, or your desktop computer.

Amazon RDS supports the following versions of Oracle APEX for Oracle 12c:

  • Oracle APEX version 4.2.6

  • Oracle Rest Data Services (ORDS), the APEX listener

Amazon RDS supports the following versions of Oracle APEX for Oracle 11g:

  • Oracle APEX version 4.1.1

  • Oracle APEX Listener 1.1.4

Prerequisites for APEX and APEX Listener

The following are prerequisites for using APEX and APEX Listener:

  • You must have SQL*Plus, to perform administrative tasks on your DB instance.

  • You must have the following software installed on the host computer that acts as the APEX Listener:

    • The Java Runtime Environment (JRE).

    • Oracle Net Services, to enable the APEX Listener to connect to your Amazon RDS instance.

Adding the APEX Options

The general process for adding the APEX options to a DB instance is the following:

  1. Create a new option group, or copy or modify an existing option group.

  2. Add the options to the option group.

  3. Associate the option group with the DB instance.

When you add the APEX options, a brief outage occurs while your DB instance is automatically restarted.

To add the APEX options to a DB instance

  1. Determine the option group you want to use. You can create a new option group or use an existing option group. If you want to use an existing option group, skip to the next step. Otherwise, create a custom DB option group with the following settings:

    1. For Engine, choose the Oracle edition that you want to use. The APEX options are supported on all editions.

    2. For Major Engine Version, choose 11.2 or 12.1.

    For more information, see Creating an Option Group.

  2. Add the following options to the option group:

    • For Oracle 12c, add the APEX and APEX-DEV options.

    • For Oracle 11g, add the APEX, APEX-DEV, and XMLDB options.

    Important

    If you add the APEX options to an existing option group that is already attached to one or more DB instances, a brief outage occurs while all the DB instances are automatically restarted.

    For more information about adding options, see Adding an Option to an Option Group.

  3. Apply the option group to a new or existing DB instance:

Note

If you want to deploy the APEX run-time environment only, you can remove the APEX-DEV option later. However, you must include the APEX-DEV option with the APEX option during installation.

Unlocking the Public User Account

After the APEX options are installed, you must change the password for the APEX public user account, and then unlock the account. You can do this by using the Oracle SQL*Plus command line utility. Connect to your DB instance as the master user, and issue the following commands. Replace new_password with a password of your choice.

Copy
alter user APEX_PUBLIC_USER identified by new_password; alter user APEX_PUBLIC_USER account unlock;

Installing and Configuring the APEX Listener

You are now ready to install and configure a listener for use with Oracle APEX. You can use one of these products for this purpose:

  • For Oracle 12c, Oracle Rest Data Services (ORDS)

  • For Oracle 11g, Oracle APEX Listener

  • Oracle HTTP Server and mod_plsql

Note

Amazon RDS doesn't support the Oracle XML DB HTTP server with the embedded PL/SQL gateway; you can't use this as an APEX listener. In general, Oracle recommends against using the embedded PL/SQL gateway for applications that run on the Internet.

You must install the APEX listener on a separate host such as an Amazon EC2 instance, an on-premises server at your company, or your desktop computer.

The following procedure shows you how to install and configure the APEX listener. We assume that the name of your host is myapexhost.example.com, and that your host is running Linux.

To install and configure the APEX listener

  1. Log in to myapexhost.example.com as root.

  2. Create a nonprivileged OS user to own the APEX listener installation. The following command creates a new user named apexuser.

    Copy
    useradd -d /home/apexuser apexuser

    The following command assigns a password to the new user.

    Copy
    passwd apexuser;
  3. Log in to myapexhost.example.com as apexuser, and download the APEX and APEX Listener installation files from Oracle:

  4. Unzip the APEX file:

    • For Oracle 12c, run the following code.

      Copy
      unzip apex_4.2.6.zip
    • For Oracle 11g, run the following code.

      Copy
      unzip apex_4.1.1.zip
  5. Create a new directory and open the APEX Listener file:

    • For Oracle 12c, run the following code.

      Copy
      mkdir /home/apexuser/ORDS cd /home/apexuser/ORDS unzip ../ords.3.0.0.65.09.31.zip
    • For Oracle 11g, run the following code.

      Copy
      mkdir /home/apexuser/apexlistener cd /home/apexuser/apexlistener unzip ../apex_listener.1.1.4.zip
  6. While you are still in the directory from the previous step, run the listener program.

    Oracle Version Instructions

    12c

    Run the following code.

    Copy
    java -jar ords.war setup

    The program prompts you for the following information. The default values are in brackets.

    • The name of the database server [localhost]

    • The database listen port [1521]

    • Database service name or database SID [1]

      1 to specify the database service name, 2 to specify the database SID.

    • Database SID [xe]

    • Database user name [APEX_PUBLIC_USER]

    • Database password

    11g

    Run the following code:

    Copy
    java -Dapex.home=./apex -Dapex.images=/home/apexuser/apex/images -Dapex.erase -jar ./apex.war

    The program prompts you for the following:

    • The APEX Listener Administrator user name. The default is adminlistener.

    • A password for the APEX Listener Administrator.

    • The APEX Listener Manager username. The default is managerlistener.

    • A password for the APEX Listener Administrator.

    The program prints a URL that you need in order to complete the configuration, as follows.

    Copy
    INFO: Please complete configuration at: http://localhost:8080/apex/listenerConfigure Database is not yet configured

    Leave the APEX Listener running. It needs to continue running for you to use Oracle Application Express. When you have finished this configuration procedure, you can run the listener in the background.

    From your web browser, go to the URL provided by the APEX Listener program. The Oracle Application Express Listener administration window appears. Type the following information:

    • UsernameAPEX_PUBLIC_USER

    • Password – the password for APEX_PUBLIC_USER. This password is the one that you specified earlier when you configured the APEX repository. For more information, see Unlocking the Public User Account.

    • Connection Type – Basic

    • Hostname – the endpoint of your Amazon RDS DB instance, such as mydb.f9rbfa893tft.us-east-1.rds.amazonaws.com.

    • Port – 1521

    • SID – the name of the database on your Amazon RDS DB instance, such as mydb.

    Choose Apply. The APEX administration window appears.

  7. You must set a password for the APEX admin user. To do this, use SQL*Plus to connect to your DB instance as the master user, and then issue the following commands.

    Copy
    grant APEX_ADMINISTRATOR_ROLE to master; @/home/apexuser/apex/apxchpwd.sql

    Replace master with your master user name. When the apxchpwd.sql script prompts you, type a new admin password.

  8. For 12c only, start the APEX Listener. Run the following code.

    Copy
    java -jar ords.war

    The first time you start the APEX Listener, you are prompted to provide the location of the APEX Static resources. This images folder is located in the /apex/images directory in the installation directory for APEX.

  9. Return to the APEX administration window in your browser and choose Administration. Next, choose Application Express Internal Administration. When you are prompted for credentials, type the following information:

    • User nameadmin

    • Password – the password you set using the apxchpwd.sql script

    Choose Login, and then set a new password for the admin user.

The APEX listener is now ready for use.

Removing the APEX Option

You can remove the APEX options from a DB instance. To remove the APEX options from a DB instance, do one of the following:

  • To remove the APEX options from multiple DB instances, remove the APEX options from the option group they belong to. This change affects all DB instances that use the option group. When you remove the APEX options from an option group that is attached to multiple DB instances, a brief outage occurs while all the DB instances are restarted.

    For more information, see Removing an Option from an Option Group.

  • To remove the APEX options from a single DB instance, modify the DB instance and specify a different option group that doesn't include the APEX options. You can specify the default (empty) option group, or a different custom option group. When you remove the APEX options, a brief outage occurs while your DB instance is automatically restarted.

    For more information, see Modifying a DB Instance Running the Oracle Database Engine.

Related Topics