Installing APEX+ORDS on On-Prem Oracle Database

Santhosh Kumar BVSRK
5 min readMay 5, 2022

In this story, I will be walking you through the installation steps for APEX+ORDS on Oracle Database (On-Prem).

The steps would remain same for Oracle Database on a VM or any other cloud.

If you are going with Autonomous Database, then APEX comes Pre-configured & Pre-Installed. You need not worry about Installation or configuration.

APEX is widely used for building web & mobile applications at ease.

APEX comes for free with Database license.

In this story, we will start with the basics of Installing Database and then installing APEX + ORDS on top of it.

Installation Steps of Oracle Database 19c

1. Download Oracle Database from the below link:

https://www.oracle.com/in/database/technologies/oracle-database-software-downloads.html

2. Unzip the downloaded file and run the setup.exe file.

This completes the installation process of Oracle Database.

Now, let us try accessing database from cmd (Command Prompt)

NOTE: No need to provide any password here.

Installation Steps of Oracle APEX

1. Download Oracle APEX from the below link:

https://www.oracle.com/tools/downloads/apex-v191-downloads.html

2. Extract contents from the zip file.

3. Open cmd prompt and navigate to the folder where you’ve extracted APEX installable and connect to Database.

4. Run the apex configuration sql script by providing the tablespace name (sysaux) and the file where it should be loaded.

5. As we did not create an instance admin user. Let us create one by running the apxchpwd.sql script and provide password for ADMIN user

6. Now, let us create APEX_LISTENER and APEX_REST_PUBLIC_USER database users with a password, where APEX_LISTENER is used by ORDS to access schema objects & APEX_REST_PUBLIC_USER is used for execution of APEX Instance or resource templates

7. Now, let us make the password constant across ALL APEX users by running the below commands

8. Allow traffic from your local machine by adding it to Network ACL & set APEX port to 0

This completes APEX configuration.

Installation Steps of ORDS

1. Now let us configure ORDS with APEX, for which you have to download ORDS from the below link:

https://www.oracle.com/database/technologies/appdev/rest-data-services-downloads.html

2. Extract the zip file contents and for starting with ORDS your machine should have Java installed, if not install the jdk. Because ORDS is a java application and to install ORDS you need to have, java installed.

3. Create an empty folder ‘config’ as this is where the configuration data gets stored when you run the ords.war java application installable.

4. Copy the images folder from your apex installed folder to ords extract folder.

5. Run the java installable ords.war

6. Need not enter database server name here as it is local host for us, similarly need not enter port as default is 1521 for us and as we are using a single database we will press 1, database

7. This completes our ORDS installation, now press 1 if you want to run it in standalone mode else if you have tomcat or some application then press 2. Also, give the images location from your ORDS folder when it asks you for APEX static resources location.

8. Now, choose 1 if you want it to run as HTTP service and 2 if as HTTPS.

9. You can choose 1 if you want self-signed certificate and 2 if you wish to provide SSL certificate (in case you have choosen HTTPS mode earlier).

This completes ORDS configuration and it is running.

How to Access APEX

  1. As you have used HTTPS, you have to run https://localhost:8443 on your browser to access APEX. If you haven’t enabled HTTPS then you can access APEX on http://localhost:8080

2. To access APEX, you need to feed in WORKSPACE, Username & Password. For which you have to create APEX WORKSPACE.

3. Login to ADMIN page with USERNAME as ADMIN and Password.

4. To enable REST Access on Schema, go to SQL Workshop à RESTful Services.

5. To call the REST API on table, you need to enable REST API access on table and trigger it

6. Username password to be provided as Basic Auth, while testing as you have enabled authorization above. The username password is nothing but the schema username and password.

7. To trigger this endpoint from OCI API Gateway

8. If you disable Authorization you need not pass them while triggering

--

--

Santhosh Kumar BVSRK

16+ Years in IT/ITES| ML & AI Enthusiast| Oracle Cloud Architect, Integration Specialist — BPEL, OSB, OIC, IICS| Database Scripting-SQL, PL/SQL, MySQL