How to Install Oracle APEX?

Table of contents
- 1. Download the Latest Oracle APEX Software
- 2. Unzip the downloaded APEX zipfile
- 3. Create a Dedicated Tablespace for APEX in the Oracle Database
- 4. Run the APEX Installation Script File
- 5. Create the APEX Admin User
- 6. Create the RESTful Service
- 7. Unlock the APEX Schema Accounts
- 8. Access the APEX portal
- 9. Create a New Workspace
- 10. Access the Workspace That You Have Created Now
In this article, I will guide you how to Install Oracle APEX (Application Express) in Oracle Database Server.
1. Download the Latest Oracle APEX Software
The Oracle APEX software can be downloaded via the following link:
https://www.oracle.com/tools/downloads/apex-downloads/
Once you have downloaded the latest APEX version, copy it to your Server. In my scenario, I have copied it to the below location.
2. Unzip the downloaded APEX zipfile
Once the unzip is completed, you will see that two new directories have been created when extracting the zipfile. The directory name is “apex” and “META-INF”. This newly created “apex” directory will contain the APEX installation scripts and other script files.
3. Create a Dedicated Tablespace for APEX in the Oracle Database
Please be noted that if the Oracle Database is running in a Multitenant (CDB) Architecture, then login to the respective PDB container and create the tablespace. Here, I am using the CDB Architecture. Hence, I am creating the tablespace in the PDB container. And, not only that, all the installation scripts will be executed in my PDB container only.
show pdbs
alter session set container=&YOUR_PDB_NAME;
CREATE TABLESPACE &TABLESPACE_NAME DATAFILE '&DATAFILE_NAME' SIZE 2G AUTOEXTEND ON MAXSIZE UNLIMITED;
Screenshot is shown below:
4. Run the APEX Installation Script File
$ cd <Your_Unzipped_APEX_Directory>
$ sqlplus / as sysdba
SQL> alter session set container=&YOUR_PDB_NAME;
SQL> @apexins.sql <Apex_Tablespace_Name> <Apex_Tablespace_Name> <Temp_Tablespace_Name> /i/
$ cd <Your_Unzipped_APEX_Directory>
$ sqlplus / as sysdba
SQL> alter session set container=&YOUR_PDB_NAME;
SQL> @apexins.sql <Apex_Tablespace_Name> <Apex_Tablespace_Name> <Temp_Tablespace_Name> /i/
Note:
If you observe, I am passing the APEX_TABLESPACE_NAME twice. This is how the “apexins.sql” script will expect the arguments to be passed. So, just follow the above syntax. I am also showing the screenshot for your reference. Note that I am running all the scripts as “SYS” database user.
Note 1:
a) If the installation is successful, you will see “0 actions failed” as shown in the above screenshot.
b) Also, if you observe, the installation will create a new Schema in the database called “APEX_240100”. This schema will use the APEX Tablespace which we have created in the above step.
c) And, to access the APEX portal and create a new APEX Workspace and APEX Application, you will need to open the below template links with appropriate values as per your environment.
http://host:port/ords/apex_admin
http://host:port/ords
d) If you observe the above links template, you will see that the ORDS is also required. So, you will need to install the ORDS as well so that the APEX portal can be opened via above links. To install the ORDS, you may follow my ORDS Article. Note that, in one of the ORDS installation step, the ORDS will require the “Apex Static Resources Location” path. So, first complete the installation of Apex till Step 7 from this article and then install the ORDS and then come back to Step 8 in this article.
Note 2:
Actually, the APEX Installation Script will create 4 Schemas in the Database. But, in the above screen log, it will show only the Main Schema Name (APEX_240100). To see the other Schema names, you can login to the PDB container and check the newly created schema names.
5. Create the APEX Admin User
Login to the PDB container as SYS user and execute the following script from the APEX installation location.
$ sqlplus / as sysdba
SQL> show pdbs
SQL> alter session set container=&YOUR_PDB_NAME;
SQL> @apxchpwd.sql
Note:
As you see in the below screenshot, upon running the script, it will ask you to provide the Username that will be used for the APEX Administrator Tasks. By default, the script suggesting a name called “ADMIN”. If you want to accept this username, then simply press “ENTER” button from your keyboard. Or if you want a different username, then you can simply type-in whichever name you want to be created.
Please be noted that if the User is not already exist, then it will create it. If in case the User is already exist, then it will simply reset the password.
Next, it will ask you the email-id . I suggest you to provide a valid email-id.
And, it will ask you the APEX Admin Password. You can type-in the password that you want to set.
6. Create the RESTful Service
Login to the PDB container as SYS user and execute the following script from the APEX installation location.
$ sqlplus / as sysdba
SQL> show pdbs
SQL> alter session set container=&YOUR_PDB_NAME;
SQL> @apex_rest_config.sql
Note:
Upon running the above script, it will ask you the Password for “APEX_LISTENER” and “APEX_REST_PUBLIC_USER” schemas. i.e. This script will create these two Schemas additionally with the password that you supplied. I suggest you to use the same password that you have supplied for APEX Admin user in previous step.
7. Unlock the APEX Schema Accounts
SQL> alter user APEX_240100 account unlock;
SQL> alter user APEX_REST_PUBLIC_USER account unlock;
SQL> alter user APEX_PUBLIC_USER account unlock;
SQL> alter user APEX_PUBLIC_ROUTER account unlock;
SQL> alter user FLOWS_FILES account unlock;
SQL> alter user APEX_LISTENER account unlock;
alter user APEX_240100 account unlock;
alter user APEX_REST_PUBLIC_USER account unlock;
alter user APEX_PUBLIC_USER account unlock;
alter user APEX_PUBLIC_ROUTER account unlock;
alter user FLOWS_FILES account unlock;
alter user APEX_LISTENER account unlock;
Note:
By default, these Schemas will follow the Database “DEFAULT” User Profile which will abide to the Password Parameters that are set in the DEFAULT profile. Based on your Company password policy, you may alter the default values to customized values. Or You may also create a separate User Profile with custom password parameter values for these APEX schemas.
8. Access the APEX portal
Ensure that the ORDS is installed by this time and the ORDS service is up and running.
You can now open the below link:
http://<your_server_ip>:8080/ords
If it is opened successfully, you will see the below similar screenshot.
Click on “GO” button from “Oracle APEX” Tile. It will then open the below screenshot.
In the above screenshot, type the following information:
Workspace Field: INTERNAL
Username: ADMIN
Password: <The_Password_that_you_gave_during_the_APEX_installation>
If it opens successfully, then you will see below similar screenshot.
9. Create a New Workspace
In the above screenshot, click on “Create Workspace” button.
Give any meaningful name to your Workspace and click “Next” button.
In the following screen, you can type a Schema Name and Schema Password and set the Space Quota. This will create a new Schema in the Database for your Apex Workspace which will hold all of your User Objects like Tables, Procedures, Functions, etc..
Suppose, if you want to reuse some of your existing schema, then simply choose “Yes” in “Re-use existing schema?” field. Since I already have a fresh schema in my database, I will use that schema for my APEX Workspace.
Note that when you select the existing DB Schema, you don’t need to type the Password in the “Schema Password” field and you also don’t need to set the “Space Quota”. You can simply click on “Next” button.
In the next screen, just simply give a Username for the Administrator Username and fill the rest of the fields. This will be used in the Apex Login.
10. Access the Workspace That You Have Created Now
You can now logout from the Internal / Admin Workspace and Login to your newly created Workspace with the newly created login credentials.
In the above login page, type the Workspace name that you have created in previous step. Similarly, type the Workspace username which you have created in the previous step.
It may now ask you to change the password.
You can now start creating the Apex Application under this newly created APEX Workspace.
Thanks for taking your time and reading this article. Hope it helped you to progress your work!.
Subscribe to my newsletter
Read articles from Baskar directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
