A. Pre-requisites / tools to install (Windows 10)
- Oracle Database installed locally (Enterprise, Standard, or XE 18c/21c/23c). If you don’t have it, download Oracle Database XE (or full DB) and install first. (APEX is installed into a specific container/PDB if using multitenant).
- SQL*Plus (comes with DB) or SQLcl (recommended for modern installs). You need a client to run scripts as
SYS/SYSDBA. - Java JDK / JRE: ORDS 24.x requires Java 17 or Java 21 (use Oracle JDK or GraalVM Enterprise where required). Install JDK 17+ and set
JAVA_HOME. - Oracle APEX zip — download from Oracle APEX Downloads. Unzip somewhere like
C:\apex. - Oracle REST Data Services (ORDS) (zip) — download the matching ORDS release. ORDS is the recommended web listener.
- (Optional) Apache Tomcat (if you will deploy
ords.warto Tomcat). For local dev you can also use ORDS standalone mode (no Tomcat). Many guides use Tomcat as a Windows service. - Sufficient disk and memory — APEX install can take some minutes and needs space for datafiles and the APEX images.
Step-by-step (commands & examples)
Assumptions in examples below
- APEX unzipped to
C:\apex- Oracle DB service running and listener listening on default port 1521
- PDB name
ORCLPDB(adjust to your PDB or use non-CDB instance)- You have an OS user with rights to run SQL*Plus / SQLcl.
- Paths and sizes are examples — change to match your environment.
1. Prepare DB & tablespaces (example)
Open a Command Prompt as Administrator (if needed), then start SQL*Plus or SQLcl.
Example: create a dedicated tablespace for APEX (recommended but for dev you may reuse SYSAUX):
-- start a sql session as SYSDBA
sqlplus /nolog
CONNECT SYS AS SYSDBA
<enter SYS password>
-- if multitenant, switch to your PDB:
ALTER SESSION SET CONTAINER = ORCLPDB;
-- create tablespace (example)
CREATE TABLESPACE APEX_TS
DATAFILE 'C:\oracle\oradata\ORCLPDB\apex01.dbf'
SIZE 200M AUTOEXTEND ON NEXT 50M;
If you prefer a quick dev install you can use
SYSAUX SYSAUX TEMPwhen runningapexins.sql— that usesSYSAUXfor APEX objects (common in quick tutorials). But production should use a dedicated tablespace. Documentation explains both choices. Oracle Docs
2. Unzip APEX and run install script
- Unzip
apex-<version>.zip→C:\apex - Change to the apex folder and run the install script as
SYS AS SYSDBA.
Example (Full development environment — recommended for dev):
On Windows command prompt:
cd C:\apex
sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: <SYS_password>
-- If DB is multitenant, set container to your PDB:
SQL> ALTER SESSION SET CONTAINER = ORCLPDB;
-- Run the full install. Four arguments:
-- @apexins.sql tablespace_apex tablespace_files tablespace_temp images
-- Example using dedicated tablespace APEX_TS, files in APEX_TS, temp = TEMP, images virtual dir = /i/
SQL> @apexins.sql APEX_TS APEX_TS TEMP /i/
- For a runtime (non-dev) installation use
@apxrtins.sqlinstead (similar arguments). See docs. Oracle Docs - This runs for a while — the script creates users, packages, objects and jobs. Watch the output; successful end shows completion messages.
When Oracle APEX installs, it creates the following database accounts:
APEX_220100– This account owns the Oracle APEX schema and metadata.FLOWS_FILES– This account owns the Oracle APEX uploaded files.APEX_PUBLIC_USER– This minimally privileged account is used for Oracle APEX configuration with Oracle REST Data Services or Oracle HTTP Server andmod_plsql.
If you configured RESTful Web services, then these additional accounts will be created:
APEX_REST_PUBLIC_USER– The account used when invoking RESTful Services definitions stored in Oracle APEX.APEX_LISTENER– The account used to query RESTful Services definitions stored in Oracle APEXs.
If you are upgrading from a previous release, then FLOWS_FILES already exists and APEX_PUBLIC_USER is created if it does not already exist.
3. Configure images (Embedded PL/SQL Gateway) — only if using EPG
If you choose Embedded PL/SQL Gateway (EPG) instead of ORDS:
-- from apex directory:
SQL> @apex_epg_config.sql C:\apex
-- then unlock ANONYMOUS (if required)
SQL> ALTER USER ANONYMOUS ACCOUNT UNLOCK;
Docs: apex_epg_config.sql copies image files into the DB EPG area. For modern installs ORDS is recommended instead. Oracle Docs
4. Set APEX Instance Admin password
What Is an Instance Administrator?
Instance administrators are superusers that are responsible for managing an entire Oracle APEX instance, including managing workspace provisioning, configuring features and instance settings, and managing security.
To perform these tasks, an Instance administrator signs in to the Oracle APEX Administration Services application.
Running the apxchpwd.sql script enables you to create or update your Instance Administrator account.
You must run the apxchpwd.sql script in the following scenarios:
- New Oracle APEX installations – Run
apxchpwd.sqlto create an Instance Administrator account and password. - Converting of a runtime environment to a development environment – Run
apxchpwd.sqlto change the Instance Administrator account password. - Changing Your Instance Administrator Password -Run
apxchpwd.sqlto change the password for an existing Instance Administrator account. - Unlocking Your Instance Administrator Account – Run
apxchpwd.sqlto unlock an existing Instance Administrator account.
Run apxchpwd.sql to set the APEX internal admin (the Instance Administrator used to manage workspaces):
-- From C:\apex in SQL*Plus:
SQL> @apxchpwd.sql
-- follow prompts to set username (admin) and a password
This creates/changes the admin instance user for internal APEX administration. Oracle Docs
Configuring the APEX_PUBLIC_USER Account
It is important to correctly configure the APEX_PUBLIC_USER account to enable proper operation of Oracle APEX.
About the APEX_PUBLIC_USER Account
The APEX_PUBLIC_USER account is created with a random password in a new installation of Oracle APEX.
You must change the password for this account before configuring the database access descriptor (DAD) in a new installation
Unlocking the APEX_PUBLIC_USER Account
Unlock the APEX_PUBLIC_USER account by running a SQL statement.
If you are upgrading from a prior release of Oracle APEX, this step is unnecessary.
To unlock the APEX_PUBLIC_USER account:
- Start SQL*Plus and connect to the database where Oracle APEX is installed as
SYSspecifying theSYSDBArole. If Oracle APEX is installed in the CDB, ensure you connect toCDB$ROOT. For example:- On Windows:CopySYSTEM_DRIVE:\ sqlplus /nolog SQL> CONNECT SYS as SYSDBA Enter password: SYS_password
- On UNIX and Linux:Copy$ sqlplus /nolog SQL> CONNECT SYS as SYSDBA Enter password: SYS_password
- Run the following statement: ALTER USER APEX_PUBLIC_USER ACCOUNT UNLOCK
Changing the Password for the APEX_PUBLIC_USER Account
Change the password for the APEX_PUBLIC_USER account by running a SQL statement.
If you are upgrading from a prior release of Oracle APEX, this step is unnecessary.
To change the password for the APEX_PUBLIC_USER account:
Run the following statement:
ALTER USER APEX_PUBLIC_USER IDENTIFIED BY new_password
Where new_password is the new password you are setting for APEX_PUBLIC_USER. You will use this password when creating the DAD in the sections that follow.
Execute the below code
BEGIN
DBMS_NETWORK_ACL_ADMIN.APPEND_HOST_ACE(host => '*',ace =>
xs$ace_type(privilege_list => xs$name_list('connect'),principal_name => 'APEX_240200',principal_type => xs_acl.ptype_db));
END;
/
BEGIN
DBMS_NETWORK_ACL_ADMIN.APPEND_HOST_ACE(host => 'localhost',ace => xs$ace_type(privilege_list => xs$name_list('connect'),principal_name => 'APEX_240200',principal_type => xs_acl.ptype_db));
END;
/
Note: 'APEX_240200' Need to be updated as per version, check it by below query
SELECT USERNAME
FROM DBA_USERS
WHERE USERNAME LIKE 'APEX_%'
ORDER BY USERNAME;
Oracle PL/SQL code uses DBMS_NETWORK_ACL_ADMIN to manage Network Access Control Lists (ACLs), granting the APEX_240200 database user permission to establish network connections (CONNECT privilege) to any host (*) and specifically to localhost, enabling network services like UTL_HTTP, UTL_SMTP, etc., for Oracle APEX applications, which often require external connectivity.
5. Configure ORDS (recommended) and deploy to Tomcat (or use standalone)
ORDS is the modern, recommended APEX listener. Steps are: unzip ORDS, run the ORDS installer (interactive or silent) which will create ORDS metadata objects in the DB and create the ORDS config directory. Then deploy to Tomcat or run ords in standalone mode.
Pre-req for ORDS: Java 17 or 21 installed and JAVA_HOME set. Oracle
Example (Windows, interactive install, central config directory C:\ords_config):
- Unzip ORDS to
C:\ords(you’ll haveords.warorordsbinaries depending on version). - Create config folder:
C:\ords_config - set system environment variable, in PATH add ords bin : example : C:\ords\ords-25.3.1.289.1312\bin
- Open command prompt:
cd C:\ords
ords --config C:\ords_config install --log-folder C:\ords_logs --interactive
During interactive prompts:
- Choose Database connection method (Basic/TNS)
- Supply DB host, port, service name (e.g.
localhost 1521 ORCLPDB) - Provide a REST user (follow prompts) — ORDS will create metadata/users (it runs SQL scripts as SYS / ORDS install script may request the
SYSpassword or you run some preinstall scripts). The installer guides you.
- Deploy to Tomcat: copy
ords.warintoC:\path\to\tomcat\webapps\ords.war(or follow Tomcat service install). Start Tomcat service. You should reachhttp://localhost:8080/ords/(orhttp://localhost:8080/ords/apexdepending on mapping). Many tutorials show Tomcat 9/10 install details. oracle-base.com+1
Or run ORDS in standalone mode:
ords --config C:\ords_configserve and it will start an internal Jetty server.
Test APEX
Open browser:
- For ORDS/Tomcat:
http://localhost:8080/ords/→ APEX login at/ords/apexorhttp://localhost:8080/ords/ - Login as the workspace admin you created (Instance admin
adminor a workspace admin).
If APEX home loads, good.
So, at this first screen:
- Workspace: INTERNAL
- Username: ADMIN
- Password: (the password you created in
apxchpwd.sql)
Then click Sign In.
Create your first workspace
Once you’re in APEX Administration Services:
- Go to Manage Workspaces → Create Workspace.
- Fill in:
- Workspace Name: e.g.
MYWORKSPACE - Database User: you can either:
- choose “New Schema” (APEX will create one), or
- choose “Existing Schema” (if you already have a schema like HR, etc.)
- Administrator Username: e.g.
ABC_ADMIN - Set a password for that workspace admin.
- Workspace Name: e.g.
- Click Create Workspace.
Now log in to your workspace
After creation, go back to the main APEX login page (the one that says “Sign In to Your Workspace”).
Enter:
- Workspace: the workspace name you just created (e.g.
MYWORKSPACE) - Username: the workspace admin username you created (e.g.
ABC_ADMIN) - Password: that password.
You’ll then reach APEX App Builder, where you can create applications, forms, reports, etc.
How to start apex in Standalone mode after restart or reboot
ords –config C:\ords\config serve
How to check existing APEX configuration in your DB
- Check whether APEX is installed (search APEX user schemas):
-- connect as SYS as SYSDBA, set container if needed
ALTER SESSION SET CONTAINER = ORCLPDB;
SELECT username FROM dba_users
WHERE REGEXP_LIKE(username,'(FLOWS|APEX)_\d{6}')
AND username <> (SELECT table_owner FROM all_synonyms
WHERE synonym_name='WWV_FLOW' AND owner='PUBLIC');
-- if rows returned, old APEX schemas exist.
Oracle doc shows a query for verifying previous release installations. Oracle Docs
- Check APEX version (from inside DB):
-- this returns installed APEX release version
SELECT VERSION_NO FROM APEX_RELEASE;
-- or
SELECT version FROM dba_registry WHERE COMP_NAME = 'Oracle APEX';
APEX_RELEASE view is a public view present inside APEX schema(s). Use DBA_REGISTRY as an alternative. Matthias Hoys+1
- Check ORDS configuration / running service
- If ORDS deployed to Tomcat, check Tomcat services or
services.mscforApache Tomcatand ensure it’s running. - If ORDS standalone, check the console where you ran
ords serveor check the logs inC:\ords_logs(if you set one). - You can also query for ORDS metadata in DB (if ORDS installed DB objects) e.g.
SELECT username FROM dba_users WHERE username LIKE 'ORDS%';and check ORDS version with theords_metadatatables (answers vary by ORDS version). See ORDS docs for queries to validate. Oracle Docs
Deconfiguration / Removing APEX (if you need to uninstall / re-install cleanly)
Warning: Removing APEX deletes APEX applications and workspaces installed in the DB. Export anything you need first.
- Stop the web listener (Tomcat/ORDS) before removing APEX:
- Stop Tomcat service in
services.msc, or stop ORDS standalone process.
- Stop Tomcat service in
- Remove APEX from the database using Oracle script
apxremov.sql(official method):
-- from apex directory, connected as SYS AS SYSDBA
cd C:\apex
sqlplus /nolog
SQL> CONNECT SYS AS SYSDBA
SQL> ALTER SESSION SET CONTAINER = ORCLPDB; -- if multitenant
SQL> @apxremov.sql
- If APEX was installed into the CDB root, there are separate
apxremov_con.sqlsteps for CDB root removal — check docs. Oracle docs describe removing from PDB vs CDB root. Oracle Docs+1
- After
apxremov.sqlfinishes: exit SQL*Plus and reconnect (docs require this) before attempting a new install. Oracle Docs - Optional cleanup (if you want to remove ORDS metadata and ORDS users):
- Drop ORDS schemas/users if present (e.g.,
ORDS_PUBLIC_USER,ORDS_METADATA— exact names depend on ORDS version). Only do this if you want to fully remove ORDS DB artifacts. Checkdba_usersfor ORDS users first. - Delete ORDS config folder (e.g.,
C:\ords_config) and logs. - Remove Tomcat
ords.warfromwebappsor the Tomcat app if you deployed there. - Remove any public synonyms left (some scripts may handle this). See cleanup blog posts/docs for specifics. Upgrade your Database – NOW!+1
- Drop ORDS schemas/users if present (e.g.,
- Drop APEX users (if any remain) — after
apxremov.sqlyou can checkdba_usersfor usernames likeAPEX_240200and drop them withDROP USER <username> CASCADE;only if safe and after backup/exports. Several community guides show dropping leftover APEX_xxxxxx users if necessary. doyensys.com+1
Re-start / fresh re-install after deconfiguration
- Make sure DB is healthy and PDB is open.
- Remove or rename any leftover APEX directories or leftover
APEXschema owners, if you want a clean re-install (verify with queries in section D). - Re-run
@apexins.sqlas shown in section C (or follow updated APEX docs for your APEX version). If you removed APEX usingapxremov.sql, the docs explicitly say to exit and reconnect before a new install. Oracle Docs+1 - Reconfigure ORDS: either re-run
ords install --interactivepointing at a new config directory or point the ORDS installer at your existing config if you want to reuse it. If you removed ORDS config folder, create a new one and run theords installagain. Scribd+1
Useful verification queries
Is APEX present?
SELECT username FROM dba_users WHERE regexp_like(username,'(FLOWS|APEX)_\d{6}');
APEX version
SELECT version_no FROM apex_release;
-- or
SELECT version FROM dba_registry WHERE comp_name = 'Oracle APEX';
List APEX-related users
SELECT username FROM dba_users WHERE username LIKE 'APEX%';
SELECT username FROM dba_users WHERE username LIKE 'FLOWS_%';
Check ORDS DB users
SELECT username FROM dba_users WHERE username LIKE 'ORDS%';
Identify which login page you are seeing
When you first open APEX (for example,http://localhost:8080/ords/ or http://localhost:8080/ords/apex)
you can land on one of two different login screens:
| Login Screen | Description | Example Title |
|---|---|---|
| APEX Administration Services (Internal / Instance Admin) | Used by the Instance Administrator (the one who installs APEX) to manage and create workspaces. | Page title says something like “APEX Administration Services” |
| Workspace Login Page | Used by developers and users to log into a specific workspace (for building or running apps). | Page title says “Sign In to Your Workspace” |
If you just installed APEX and haven’t created a workspace yet, you are probably on the Administration Services page.
Credentials for the first login (Internal Admin)
Use the Instance Administrator account you created when you ran the script:
@apxchpwd.sql
During that script, you set:
- Username:
ADMIN(default; you can’t change this in that script) - Password: whatever password you entered there
👉 So, at this first screen:
- Workspace: INTERNAL
- Username: ADMIN
- Password: (the password you created in
apxchpwd.sql)
Then click Sign In.
Create your first workspace
Once you’re in APEX Administration Services:
- Go to Manage Workspaces → Create Workspace.
- Fill in:
- Workspace Name: e.g.
MYWORKSPACE - Database User: you can either:
- choose “New Schema” (APEX will create one), or
- choose “Existing Schema” (if you already have a schema like HR, etc.)
- Administrator Username: e.g.
ABC_ADMIN - Set a password for that workspace admin.
- Workspace Name: e.g.
- Click Create Workspace.
Now log in to your workspace
After creation, go back to the main APEX login page (the one that says “Sign In to Your Workspace”).
Enter:
- Workspace: the workspace name you just created (e.g.
MYWORKSPACE) - Username: the workspace admin username you created (e.g.
ABC_ADMIN) - Password: that password.
You’ll then reach APEX App Builder, where you can create applications, forms, reports, etc.
Summary of Login Types
| Purpose | Workspace | Username | Password |
|---|---|---|---|
| Manage APEX instance | INTERNAL | ADMIN | Password set via @apxchpwd.sql |
| Develop or use APEX apps | <your workspace name> | <workspace user> | Password set during workspace creation |
If you forgot the ADMIN password
You can reset it:
-- connect as SYS AS SYSDBA
sqlplus /nolog
CONNECT SYS AS SYSDBA
ALTER SESSION SET CONTAINER = <your PDB name>;
@apxchpwd.sql
Then re-enter a new password.
Deploy ORDS on Apache Tomcat 9
0) Pre-checks (do these first)
- Java version: ORDS 25 requires Java 17 or 21. In a cmd prompt run:
java -versionecho %JAVA_HOME%- If Java is older, install Java 17/21 and set
JAVA_HOMEand add%JAVA_HOME%\bintoPATH. (ORDS will fail if Java <17).
- Stop standalone ORDS you started with
ords --config ... serve. If that cmd is running in a window, close it (Ctrl+C). If it’s running in background, find the Java process withords.warin the command line and stop it (Task Manager or):tasklist /v | findstr ordsthen use Task Manager ortaskkill /PID <pid> /F.
1) Generate the ORDS war file from your ORDS distribution
- Open a cmd prompt as the user that will manage Tomcat (if Tomcat runs as a Windows service under a different account, ensure that account has access to the ORDS config folder).
- Change to your ORDS installation
binfolder:cd C:\ords\ords-25.3.1.289.1312\bin
- Generate the WAR file (this writes a war file you will deploy to Tomcat). Use the
ords warcommand and point to your config folder so the war knows the config path (new CLI supports--config):ords --config C:\ords\config war C:\ords\ords.war- Explanation: this creates
C:\ords\ords.warusing the configuration inC:\ords\config. (You can also runords war C:\ords\ords.warand use environment variables instead).
2) Prepare Tomcat
- Stop Tomcat (if running). From
TOMCAT_HOME\bin:C:\apache-tomcat-9\bin\shutdown.bat
- (Optional but recommended) create a dedicated ORDS config copy for Tomcat access — generally you can reuse
C:\ords\config, but be sure Tomcat service user has read/write. If you prefer a Tomcat-local config, copy it:xcopy /E /I C:\ords\config C:\apache-tomcat-9\ords_config- — adjust permissions so the Windows account that runs Tomcat (e.g.,
LocalSystemor a service account) can read/write the config and log folders.
3) Tell Tomcat where ORDS config directory is (setenv.bat)
:: setenv.bat for Tomcat to run ORDS with the correct config folder and JVM options
@echo off
REM Ensure JAVA_HOME is set or Tomcat will use its configured java
set "JAVA_HOME=C:\Program Files\Java\jdk-17"
REM Point ORDS to your existing config folder (option 1: ORDS_CONFIG env var)
set "ORDS_CONFIG=C:\ords\config"
REM JVM options: heap sizes are examples; tune for your server
set "JAVA_OPTS=-Xms512m -Xmx1024m -Dconfig.url=C:\ords\config %JAVA_OPTS%"
On Windows create (or edit) setenv.bat in Tomcat’s bin folder. This is the canonical way to add JVM options for Tomcat.
- Create
C:\apache-tomcat-9\bin\setenv.batwith content like this (modify paths as needed): - Notes on options:
- You can use
ORDS_CONFIGenvironment variable, or pass a JVM property such as-Dconfig.url=...(or-Dconfig.dir=...) — ORDS accepts the config location via CLI--config,ORDS_CONFIG, or JVM property. Usingsetenv.batkeeps Tomcat aware of the config on Tomcat startup.
- You can use
- Save
setenv.bat.
4) Deploy the WAR to Tomcat
- Copy the WAR you generated into Tomcat’s
webapps:copy C:\ords\ords.war C:\apache-tomcat-9\webapps\ords.war- If you want APEX to be available at
/apex(older behaviour) rename toapex.warinstead ofords.war:copy C:\ords\ords.war C:\apache-tomcat-9\webapps\apex.war
webapps\ords(orwebapps\apex) on startup. (Tomcat determines context root from the WAR filename).- If you want APEX to be available at
- Copy the image folder from Apex directory to Apache Tomcat Web-apps location and rename the folder to ‘i’.
- Start Tomcat:
C:\apache-tomcat-9\bin\startup.bat
5) Verify ORDS is deployed and APEX works
- Wait for Tomcat to finish expansion. Check Tomcat logs:
C:\apache-tomcat-9\logs\catalina.out(orcatalina*.log) andlocalhost.*.logfor errors.
- Open browser:
- If you deployed
ords.war:http://localhost:8080/ords/ - If you deployed
apex.war:http://localhost:8080/apex/
- If you deployed
- If you see the ORDS landing page / APEX login, success.
