Installing Apex5Before installing apex 5 you should determine which Web listener you would like to use. Available options include the followings -
- Oracle REST Data Services
- Embedded PL/SQL Gateway
- Oracle HTTP Server and mod_plsql
- Oracle Database 11gR2 (11.2.0) 64-bit
- Oracle apex 5.0
- Toad 12.8 64-bit
- Windows 7 64-bit
- Tomcat 9.0
Remember I’ll not discus about installing database. I assume that you have a database already installed and you have the administrative privileges on the database. Also assume that you have downloaded apex. If not so, you may get a copy of Oracle Apex 5.0 on OTN
Steps to install Oracle Apex 5Step 1: Login to database and create a table space (e.g.TS_APEX). Table space creating command is as below
CREATE TABLESPACE ts_apex DATAFILE 'C:\APP\ADMINISTRATOR\ORADATA\CANOPAS\TS_APEX01.DBF' SIZE 2048M AUTOEXTEND ON NEXT 100M MAXSIZE UNLIMITED LOGGING ONLINE PERMANENT EXTENT MANAGEMENT LOCAL AUTOALLOCATE BLOCKSIZE 8K FLASHBACK ON;
Step 2: Unzip the apex folder. (Right click on apex_5.0.zip folder then choose extract here) you will find a folder named apex. Copy this folder anywhere on your hard drive you wish. In my case I’ve put it in H:\SoftWare\Apex\apex.
Step 3: Open Command Prompt (cmd). Change your working directory to apex where you put the unzipped apex folder (in my case it is H:\SoftWare\Apex\apex). Below images showing the command
Step 4: Now open SQL*Plus with nolog option by executing the command
H:\SoftWare\Apex\apex> sqlplus /nolog
SQL> conn sys as sysdba
(To connect to database with sysdba privileges) When password require enter sys user’s password.
Step 5: Now you need to run apex installation file named apexins.sql. in command prompt enter the command like below
SQL> @apexins.sql ts_apex ts_apex temp /i/
APEXINS.SQL is the apex main installation file.
TS_APEX is the table space name which we creates at first step for apex user,
temp is also a table space for apex temporary file.
/i/ is a virtual drive for images.
It may take 20/30 minutes and may be disconnect from database. Remember whenever you disconnect from database every time you must follow the step (3, 4) to connect again. When Oracle Application Express installed, it creates three new database accounts:
- APEX_05000 - The account that owns the Oracle Application Express schema and metadata
- FLOWS_FILES - The account that owns the Oracle Application Express uploaded files
- APEX_PUBLIC_USER - The minimally privileged account used for Oracle
When prompted enter a password for the ADMIN account. It should be complex password like abcd#1234 Also you need to unlock APEX_PUBLIC_USER. To unlock account execute the following command
ALTER USER APEX_PUBLIC_USER ACCOUNT UNLOCK; ALTER USER APEX_PUBLIC_USER IDENTIFIED BY new_password;
Configuring Restful ServicesTo configure oracle restful service connect to the database as sysdba and enter the following command
Enter a password for the APEX_LISTENER user  Enter a password for the APEX_REST_PUBLIC_USER user 
Installing and Configuring Oracle Rest Data ServicesA. Download the file ” ords.version.number.zip” from the Oracle REST Data Services download page
B. Unzip the downloaded zip file into a directory (folder) of your choice. I put it in E:\ords.184.108.40.2061.13.24. Actually there is nothing to install, that means your installation is done. Now you need to configure the Rest Data Service.
B.I. By default, the context roots for accessing Oracle Application Express through Oracle REST Data Services is …/ords. If you wish to have a context root of … /apex for accessing Oracle Application Express, rename the file ords.war (E:\ords.220.127.116.111.13.24\ords.war) to apex.war before installing Oracle Rest Data Service. If you change the ords.war to apex.war then change the file ords_params.properties. Open the ords_params.properties file (location E:\ords.18.104.22.1681.13.24\params) enter the line as it is here: rest.services.apex.add=true
B.II. Create a folder named config in the rest data service folder (E:\ords.22.214.171.1241.13.24\config) to store rest data service configuration data. Later this location will be needed during configuration. Remember you can provide any location in your hard drive. To keep it in one place I've create this folder in ords.126.96.36.1991.13.24 folder
C. following are the Installation/configuration options-
- Simple Installation/configuration Using a Parameter File
- Advanced Installation/configuration Using Command-Line Prompts
- Manual Installation/configuration (If You Do Not Have SYSDBA Privileges)
Now open cmd and change your working directory to the directory or folder containing the ords.war file (in my case it is E:\ords.188.8.131.521.13.24). If you don't have rename ords.war to apex.war then enter the following command
N.B. Before executing following command you need to install java.
E:\ords.184.108.40.2061.13.24> java -jar ords.war install advanced
if you have rename ords.war to apex.war then enter the following command
E:\ords.220.127.116.111.13.24> java -jar apex.war install advanced
It will prompt you for some configuration information. Here I’ve showed the full prompt and what I selected.
This Oracle REST Data Services instance has not yet been configured. Please complete the following prompts
Enter the location to store configuration data:D:\Oracle\RestDataService\ords.18.104.22.1681.13.24\config
Enter the name of the database server [localhost]:bh
Enter the database listen port :
Enter 1 to specify the database service name, or 2 to specify the database SID :2
Enter the database SID [xe]:erp
Enter 1 if you want to verify/install Oracle REST Data Services schema or 2 to skip this step :
Enter the database password for ORDS_PUBLIC_USER:
Please login with SYSDBA privileges to verify Oracle REST Data Services schema. Installation may be required.
Enter the username with SYSDBA privileges to verify the installation [SYS]:
Enter the database password for SYS:
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 :
Enter the PL/SQL Gateway database user name [APEX_PUBLIC_USER]:
Enter the database password for APEX_PUBLIC_USER:
Enter 1 to specify passwords for Application Express RESTful Services database users (APEX_LISTENER, APEX_REST_PUBLIC_USER) or 2 to skip this step :
Enter the database password for APEX_LISTENER:
Enter the database password for APEX_REST_PUBLIC_USER:
---Installer upgradeORDS INFO: Completed upgrade for Oracle REST Data Services version 22.214.171.1241.13.24. Elapsed time: 00:00:08.175
Enter 1 if you wish to start in standalone mode or 2 to exit :2
Installing Apache Tomcat Application ServerTo download tomcat go to tomcat site. From left side click on your desired version number. On the next page click on 32-bit/64-bit windows service installer it will download the tomcat .exe for windows. Now install tomcat by running downloaded (.exe) file
1. Deploying to Apache TomcatTo configure Oracle Application Express Images on Apache Tomcat: Create a folder into
Installing the Apache Tomcat DeploymentMove the ords.war or apex.war file from rest data service into tomcat’s webapps folder (
Removing Oracle Application Express from the Database
- Change your working directory to the
apexdirectory where you unzipped the Oracle Application Express software.
- Start SQL*Plus and connect to the database where Oracle Application Express is installed as
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password
- Execute the following command:
- After successfully removing Application Express using
apxremov.sql, you must exit your current SQL*Plus session and reconnect before attempting another install using