Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

Install APEX into a Pluggable Database (PDB)

With APEX removed from the CDB, we are free to perform full APEX installations in each
PDB. The installation process is almost the same as for previous database versions, but you must
remember to connect to the PDB to perform the installation. The example below is a summary
based on a more detailed APEX installation article here. This example does not cover all APEX
installation options!

Connect to the root container, create a new pluggable database and add a tablespace for the
APEX components.

CONN / AS SYSDBA

CREATE PLUGGABLE DATABASE pdb1 ADMIN USER pdb_adm IDENTIFIED BY Password1;


ALTER PLUGGABLE DATABASE pdb1 OPEN;
ALTER PLUGGABLE DATABASE pdb1 SAVE STATE;

-- Switch to the new PDB.


ALTER SESSION SET CONTAINER=pdb1;

-- For Oracle Managed Files (OMF).


CREATE TABLESPACE apex DATAFILE SIZE 100M AUTOEXTEND ON NEXT 1M;

-- For non-OMF.
CREATE TABLESPACE apex DATAFILE '/path/to/datafiles/apex01.dbf' SIZE 100M
AUTOEXTEND ON NEXT 1M;

Change directory to the directory holding the unzipped APEX software.

$ cd /home/oracle/apex

All actions from this point are performed within the PDB. I've added a new connection for each
command as a reminder, but this is not necessary. All the following actions can be performed in
the same session.

Connect to SQL*Plus as the SYS user and run the "apexins.sql" script, specifying the relevant
tablespace names and image URL. Remember, you must connect to the specific PDB, not the
CDB.

CONN / AS SYSDBA
ALTER SESSION SET CONTAINER=pdb1;

-- @apexins.sql tablespace_apex tablespace_files tablespace_temp images

@apexins.sql APEX APEX TEMP /i/

Once complete, change the admin password by running the "apxchpwd.sql" scripts as the SYS
user.

CONN / AS SYSDBA
ALTER SESSION SET CONTAINER=pdb1;

@apxchpwd.sql

Create the APEX_LISTENER and APEX_REST_PUBLIC_USER users by running the


"apex_rest_config.sql" script.

CONN / AS SYSDBA
ALTER SESSION SET CONTAINER=pdb1;

@apex_rest_config.sql

Make sure the APEX_PUBLIC_USER account is unlocked.

CONN / AS SYSDBA
ALTER SESSION SET CONTAINER=pdb1;

ALTER USER APEX_PUBLIC_USER IDENTIFIED BY Password1 ACCOUNT UNLOCK;

If you are planning to use the Embedded PL/SQL Gateway (EPG), you will have to set it up, as
described here.

For more information see:

You might also like