Oracle APEX has now reached version 20.2. It is a great tool low code tool to create web applications swiftly. Setup Oracle APEX and ORDS on Windows 10 is easy and it can be up and running within 40 minutes, more or less.
Being able to setup Oracle APEX 20.2 on your Windows 10 machine is good as it enables you to develop your web applications locally before copying it to the server. It makes a good staging ground as well to test updates before applying it on your production server later on.
But before installing Oracle APEX we need to have an Oracle database installed first. I am going to use the free Oracle Express Edition (Oracle XE) version 18c. Head over to Oracle’s product page and download your copy of Oracle XE 18c if you haven’t got one yet. You will need to have an Oracle account to download which is free to register as well.
Setup Oracle APEX and ORDS on Windows 10: Database installation
First and foremost we need to install the Oracle XE database. Installation is very straightforward. Launch the installer and follow the prompts.
Enter the password for the Oracle XE 18c database instance, the password will be used to login with the SYS, SYSTEM and PDBADMIN accounts. Do jot down or make the password memorable as it is needed during Oracle 20.2 installation on the database.
Continue with the setup and wait until it finishes. It took me around 15 minutes for the installation to finish.
Once the installation has finished, take a screenshot of the window below and save it. You might need it later as a reference to manage your Oracle XE 18c database.
Setup Oracle APEX and ORDS on Windows 10: Oracle Apex 20.2 installation
The next step is to install Oracle APEX. I’ve chosen the latest version which is 20.2 which has been updated with more features and improvements. Head over to their blog to know more about the Oracle APEX 20.2 updates.
To continue with the setup, download a copy of Oracle APEX 20.2.
There are two versions of Oracle APEX 20.2 which supports multiple languages or English only. You can setup using either versions, the steps are the same but I will be using the version which supports multiple languages to cater to the user’s needs in my organization.
Unzip Oracle APEX and copy it to the C:\temp folder. After that launch Windows PowerShell and navigate to the directory where you placed your Oracle APEX installation folder. In my case, it would be the C:\temp\apex folder.
Command used: 1. cd C:\temp\apex
Login into your database. The password used is the one you set when installing the Oracle XE 18c database. You can use the image below as reference.
Commands used: 1. sqlplus 2. sys as sysdba 3. show pdbs 4. ALTER SESSION SET CONTAINER = XEPDB1;
You can install Oracle APEX with the provided container or you can create a new container. Oracle XE allows up to 3 pluggable databases. In this guide, I am going to use the default XEPDB1 pluggable container.
The next step to setup Oracle APEX and ORDS on Windows 10 is to run the apexins.sql script.
Command used: 1. @apexins.sql SYSAUX SYSAUX TEMP /i/
It takes around 15 minutes for the Oracle APEX 20.2 installation to finish and you’ll see the status as below. Just enough time to brew a cup of good coffee and enjoy those precious sips.
Don’t forget to make a copy of the results, you might want to refer it later on.
Next on our to do list of setup Oracle APEX and ORDS on Windows 10 is to create the administrator account. To achieve this, use the apxchpwd.sql script as below.
Command used: 1. @apxchpwd.sql
Enter your preferred administrator username, e-mail address and password that you want to use to log into our fresh Oracle APEX instance later on.
The next step in setup Oracle APEX and ORDS on Windows 10 is to enable the REST services. Run the apex_rest_config.sql script and you will need to provide passwords for the APEX_LISTENER and APEX_REST_PUBLIC_USER.
Command used: 1. @apex_rest_config.sql
Then unlock the APEX_LISTENER, APEX_PUBLIC_USER and APEX_REST_PUBLIC_USER accounts and update their passwords with your preferred ones:
Commands used: 1. ALTER USER APEX_LISTENER IDENTIFIED BY **Password** ACCOUNT UNLOCK; 2. ALTER USER APEX_PUBLIC_USER IDENTIFIED BY **Password** ACCOUNT UNLOCK; 3. ALTER USER APEX_REST_PUBLIC_USER IDENTIFIED BY **Password** ACCOUNT UNLOCK;
Setup Oracle APEX and ORDS on Windows 10: Hosting ORDS on Apache Tomcat 9
So now, lets move on to set Oracle REST Database Services (ORDS). We are going to install ORDS on Apache Tomcat 9. Oracles recommends using ORDS as the web listener and it allows the creation of web services in Oracle APEX.
Previously installations of Oracle APEX permits the use PL/SQL gateway, but going forwards, ORDS is the number one choice.
As a prerequisite to this step please download and install Java 8 or later JRE in your Windows 10 machine. JRE is needed to run Java based programs.
During the Apache Tomcat 9 pre-installation, at the configuration options window you can set which HTTP 1.1 connector port you’d want to use. If you have other applications running on port 8080, you can use port 8181 for example. I will be using the default port 8080. Please set the Tomcat Administrator Login credentials as well so that you’ll be able to manage it later on.
To check whether your Tomcat 9 runs as intended, launch up your web browser and type in the address below and it will load the Tomcat management page.
http://localhost:8080/ *Replace port:8080 with your chosen port if it differs from mine.
Unzip ORDS and copy it to the C:\temp folder. Create a new folder inside the ORDS folder and name it as ‘config‘. This folder is used to hold the ORDS configurations.
FYI, the ORDS version that I am using is: 18.104.22.168.0350.
Launch another PowerShell window and navigate to the directory where ORDS is located. In my case, that would be C:\temp\ords.
Run the command as in number 2 below to start configuring ORDS. It will then inquire for information which you can refer with my configurations below, submitted info for the prompts are in bold and italic.
Commands used: 1. cd C:\temp\ords 2. java -jar ords.war
Windows PowerShell Copyright (C) Microsoft Corporation. All rights reserved. Try the new cross-platform PowerShell https://aka.ms/pscore6 PS C:\WINDOWS\system32> cd C:\temp\ords PS C:\temp\ords> java -jar ords.war This Oracle REST Data Services instance has not yet been configured. Please complete the following prompts Enter the location to store configuration data: C:\temp\ords\config Enter the name of the database server [localhost]: Press 'Enter' Enter the database listen port : Press 'Enter' Enter 1 to specify the database service name, or 2 to specify the database SID : Press 'Enter' Enter the database service name:XEPDB1 Enter the database password for ORDS_PUBLIC_USER: Confirm password: Enter your preferred password Requires to login with administrator privileges to verify Oracle REST Data Services schema. Enter the administrator username:sys as sysdba Enter the database password for sys as sysdba: Enter password set for Oracle XE Confirm password: Enter password set for Oracle XE Connecting to database user: sys as sysdba url: jdbc:oracle:thin:@//localhost:1521/XEPDB1 Retrieving information. Enter 1 if you want to use PL/SQL Gateway or 2 to skip this step. If using Oracle Application Express or migrating from mod_plsql then you must enter 1 : Press 'Enter' Enter the database password for APEX_PUBLIC_USER: Enter password set for APEX_PUBLIC_USER during Oracle APEX 20.2 installation Confirm password: Enter password set for APEX_PUBLIC_USER during Oracle APEX 20.2 installation Enter 1 to specify passwords for Application Express RESTful Services database users (APEX_LISTENER, APEX_REST_PUBLIC_USER) or 2 to skip this step : Press 'Enter' Enter the database password for APEX_LISTENER: Enter password set for APEX_LISTENER during Oracle APEX 20.2 installation Confirm password: Enter password set for APEX_LISTENER during Oracle APEX 20.2 installation Enter the database password for APEX_REST_PUBLIC_USER: Enter password set for APEX_REST_PUBLIC_USER during Oracle APEX 20.2 installation Confirm password: Enter password set for APEX_REST_PUBLIC_USER during Oracle APEX 20.2 installation Enter a number to select a feature to enable:  SQL Developer Web (Enables all features)  REST Enabled SQL  Database API  REST Enabled SQL and Database API  None Choose : 1 2021-02-19T05:35:19.047Z INFO reloaded pools:  Installing Oracle REST Data Services version 20.2.1.r2270350 ... Log file written to C:\Users\Tech201\ords_install_core_2021-02-19_133519_00284.log ... Verified database prerequisites ... Created Oracle REST Data Services proxy user ... Created Oracle REST Data Services schema ... Granted privileges to Oracle REST Data Services ... Created Oracle REST Data Services database objects ... Log file written to C:\Users\Tech201\ords_install_datamodel_2021-02-19_133540_00347.log ... Log file written to C:\Users\Tech201\ords_install_apex_2021-02-19_133541_00983.log Completed installation for Oracle REST Data Services version 20.2.1.r2270350. Elapsed time: 00:00:24.655 Enter 1 if you wish to start in standalone mode or 2 to exit : 2 PS C:\temp\ords>
The following step in this guide’s to setup Oracle APEX and ORDS on Windows 10 is to copy the ords.war file located at C:\temp\ords to the Apache Tomcat webapps folder which during my Tomcat installation is set to the following path, C:\Program Files (x86)\Apache Software Foundation\Tomcat 9.0\webapps.
If you look carefully, it will then generate an ords folder a few seconds later after you have copied over the ords.war file to that location.
Next, create a new folder and rename it as ‘i‘ at C:\Program Files (x86)\Apache Software Foundation\Tomcat 9.0\webapps. Then copy over all the files and folders from C:\temp\apex\images to the ‘i‘ folder.
Last but not least, you can either go the Windows 10 system tray, locate the Tomcat 9 icon and stop and then start again the service or go to Windows 10 start and then type services.msc, locate the Apache Tomcat 9.0 service name and then restart it.
Now for the moment of truth, if all the configurations are correct you should now be able to load Oracle APEX in your browser by typing the below address:
http://localhost:8080/ords/ *Replace port:8080 with your chosen port if it differs from mine.
Enter the credentials that you set when you ran the apxchpwd.sql script to login into your Oracle APEX instance. For the Workspace field type in INTERNAL.
You are now ready to create your own distributed Workspaces and web applications.
Conclusion about how to setup Oracle APEX and ORDS on Windows 10
Setup Oracle APEX and ORDS on Windows 10 enables administrators to build web applications swiftly. It can as well be used as a staging ground prior to pushing updates to production servers. This is very useful to avoid disruptions on currently running web apps.
Setup requires a little bit of technical knowledge but it is possible for the layman who are interested in Oracle APEX to install on their Windows 10 powered computers.
If you are using a machine that is attached to a domain, you may need to run Microsoft PowerShell and install the related programs with administrator priviledge.
Furthermore, to makes things easier, I only used two passwords during the installation. One is for the Oracle XE and the other for everything else that was prompted.
One last tip, if you restart your Windows 10 machine and Oracle Apex does not load, launch ‘services.msc‘ and restart the ‘Apache Tomcat 9.0‘ service.
To recap the steps in the guide to setup Oracle APEX and ORDS on Windows 10:
Recap steps: 1. Install Oracle XE 18c database. 2. Install Oracle APEX 20.2. 3. Install Apache Tomcat 9. 4. Configure ORDS. 5. Test installation by loading up Oracle APEX 20.2 in your preferred browser.
After you’ve successfully run Oracle APEX, the next step is to learn about APEX workspaces and how to create them.