0% found this document useful (0 votes)
30 views62 pages

Step by Step Oracle APEX Installation On Tomcat 1696484581

This document discusses an Oracle Application Express on-premises installation workshop. It covers topics like the Oracle APEX architecture, understanding an Oracle APEX installation which involves the database, web listener, multi-tenancy, environments and roles. It also discusses the Oracle APEX installation requirements and processes checklist.

Uploaded by

Andrzej
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views62 pages

Step by Step Oracle APEX Installation On Tomcat 1696484581

This document discusses an Oracle Application Express on-premises installation workshop. It covers topics like the Oracle APEX architecture, understanding an Oracle APEX installation which involves the database, web listener, multi-tenancy, environments and roles. It also discusses the Oracle APEX installation requirements and processes checklist.

Uploaded by

Andrzej
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 62

2023

Oracle Application Express


ON-PREMISES INSTALLATION WORKSHOP
BY: SHERIF ABDELMONEOM RAMADAN
PMP, OCA, MCP, CIW
Workshop: Oracle Application Express in a on-premises (or local) installation

Topics:

− Overview
− Architecture
− The Oracle RAD Stack
− Understanding Oracle APEX Installation
− Database
− Web Listener
− Multi-Tenancy
− Environments
− Roles and Responsibilities

− Oracle APEX Installation Requirements


− Oracle APEX Installation Processes Checklist
− Step-by-Step: APEX Installation on Tomcat (Windows Server 2016)
− References and Links

by: Sherif Abdelmoneom Ramadan Page 1 of 61


Workshop: Oracle Application Express in a on-premises (or local) installation

Overview
Oracle Application Express (APEX) is a low-code development platform that enables you to build scalable, secure enterprise apps, with
world-class features, that can be deployed anywhere.

Client Browser

Mobile Device

Browser-Based Development Platform

by: Sherif Abdelmoneom Ramadan Page 2 of 61


Workshop: Oracle Application Express in a on-premises (or local) installation

Architecture

Oracle APEX uses a simple 3-tier architecture where requests are


sent from the browser, through a web server, to the database.
All processing, data manipulation and business logic is executed
in the database.
Oracle APEX uses a database encapsulated simple metadata-
driven architecture that guarantees zero latency data access, top
performance, and scalability, out of the box.

The web server, Oracle REST Data Services (ORDS) (formerly


known as Oracle Application Express Listener) is a J2EE
application which communicates with the Oracle Database by
mapping browser requests to the Oracle APEX engine database
over a SQL*Net connection.
Oracle REST Data Services is fully supported against Oracle
WebLogic Server and Apache Tomcat.

by: Sherif Abdelmoneom Ramadan Page 3 of 61


Workshop: Oracle Application Express in a on-premises (or local) installation

The Oracle RAD Stack


The Oracle RAD stack is an inclusive technology stack based on three core
components:

• REST Data Services (ORDS)


• APEX
• Database

This stack provides all the necessary components to develop and deploy
world-class, powerful, beautiful, and scalable apps.

There are no other moving parts of additional components required.


In addition, both Oracle APEX and ORDS are no-cost features of Oracle Database, meaning if you have Oracle Database, you already
have this Oracle RAD stack.

by: Sherif Abdelmoneom Ramadan Page 4 of 61


Workshop: Oracle Application Express in a on-premises (or local) installation

Understanding Oracle APEX Installation


When installing Oracle Application Express there are a number of key architecture and management areas to understand.

1. Database
2. Web Listener
3. Multi-Tenancy
4. Environments
5. Roles and Responsibilities

by: Sherif Abdelmoneom Ramadan Page 5 of 61


Workshop: Oracle Application Express in a on-premises (or local) installation

• Database

The installation of Application Express creates a separate schema (APEX_230100 for APEX 23.1) to house the programs that make
up the Application Express engine and related metadata tables.

Following the install guide, at a certain moment, we have to run the following command, when logged in as SYS with the SYSDBA
role, on the command line:
@apexins tablespace_apex tablespace_files tablespace_temp images

The command is explained as follows:

− tablespace_apex is the name of the tablespace that contains all the objects for the APEX application user.
− tablespace_files is the name of the tablespace that contains all the objects for the APEX files user.
− tablespace_temp is the name of the temporary tablespace of the database.
− images is the virtual directory for APEX images. To support future APEX upgrades, define the virtual image directory
as /i/.

Oracle recommends you create tablespaces specifically for the Application Express engine and Application Express files to enable
better management and monitoring.

For example, Tablespace APEX_TS_230100 would contain the Application Express engine and APEX_TS_FILES for the Application
Express files, but the names are arbitrary.

Your initial installation step, as outlined in the Oracle Application Express Installation Guide, Downloading from Oracle Technology
Network, would then be
@apexins.sql APEX_TS_230100 APEX_TS_FILES TEMP /i/.

by: Sherif Abdelmoneom Ramadan Page 6 of 61


Workshop: Oracle Application Express in a on-premises (or local) installation

As a best practice, install Oracle Application Express into the database(s)


which have the database objects you wish to use in your applications.
You can also utilize Oracle database links and integrate your
applications with Web Services.
The multitenant option represents one of the biggest architectural
changes in the history of the Oracle database.
The option introduced the concepts of the Container Database (CDB)
and Pluggable Database (PDB).

In Multitenant architecture, Oracle has a great option to act as a System as a Service (SaaS), and create different databases for
specific applications such as sales database, hr database.
So installing apex in different PDB is good to maintain and you can install apex in different PDB databases.

This database architecture has a multitenant container database (CDB)


that includes:
1. A root container, CDB$ROOT, holds common objects that are
accessible to every PDB utilizing metadata links or object links.
2. A seed database, PDB$SEED, is used when creating a new PDB to
seed the new database.
3. And multiple pluggable databases (PDBs). Each pluggable
database is equivalent to a separate database instance in Oracle
Database release 11g.

The key benefit of the Oracle Database 12c or later multitenant architecture is that the database resources, such as CPU and
memory, can be shared across all of the PDBs.
This architecture also enables many databases to be treated as one for tasks such as upgrades or patches, and backups.
by: Sherif Abdelmoneom Ramadan Page 7 of 61
Workshop: Oracle Application Express in a on-premises (or local) installation

• Web Listener

Oracle Application Express uses a simple architecture where pages are dynamically generated using metadata stored within the
Oracle Database.

There is no code generation or file based compilation. Once fully installed, a Uniform Resource Locator (URL) is defined for both
developers and end users to access Oracle Application Express.

Users require only a Web browser and the required URL. No additional client software is required.

The Web listener functions as a communications broker between the Web browser and the Oracle Application Express objects in
the Oracle database by mapping browser requests into database stored procedure calls.
You have a choice of three Web listeners.
− Oracle REST Data Services (preferred option - formerly Oracle Application Express Listener).
− Oracle HTTP Server.
− Embedded PL/SQL gateway.

Using Oracle REST Data Services creates an architecture which consists of:
− A web browser
− Oracle REST Data Services
− Oracle Database containing Oracle Application Express

The major advantage of this architecture is the separation of the mid-tier and the database tier.

by: Sherif Abdelmoneom Ramadan Page 8 of 61


Workshop: Oracle Application Express in a on-premises (or local) installation

• Multi-Tenancy

Oracle Application Express enables a single database to


host large numbers of applications and users.

Developers work in a dedicated work area called a workspace to develop


applications against one or more schemas.

This flexible architecture enables a single database instance to act as a


Platform as a Service (PaaS), providing a hosted Intranet capability within
the organization, or hosted Internet service.

It is common for workspaces to be defined for separate departments


within an organization so that each department can develop their own
database objects and applications independently.

by: Sherif Abdelmoneom Ramadan Page 9 of 61


Workshop: Oracle Application Express in a on-premises (or local) installation

• Environments

When you install Oracle APEX, you can install two different environments:
− Runtime environment (Run apxrtins.sql). In a runtime environment users can run applications but cannot modify them.
Select this option for production implementations.
− Full development environment (Run apexins.sql). In a full development environment, users can develop, modify, run, and
delete APEX applications. This option provides complete access to the APEX environment.

Converting runtime into a full development environment and vice versa

It's always possible to switch from a runtime to a production environment and vice versa.

− If you want to convert a runtime to a full development environment log in as SYS with the SYSDBA role and on the
command line type @apxdvins.sql. For converting a full development to a runtime environment, type
@apxdevrm.sql. For more details see the installation guide.

− Another way to restrict user access can be accomplished by logging in to the APEX Administration Services, where we
can (among others) manage the APEX instance settings and all the workspaces.
We can do that in two ways:
http://server:port/ords/apex_admin: Log in with the administrator credentials
http://server:port/ords/: Log in to the workspace internal, with the administrator credentials. After logging in,
perform the following steps:
1. Go to Manage Instance → Select Security.
2. Select the appropriate settings for Disable Administrator Login and Disable Workspace Login. These settings can
also be set manually with the APEX_INSTANCE_ADMIN API. See the reference guide for details.

− Besides the environment of APEX itself, the applications can also be installed in a similar way. When importing or
exporting an application the Run Application Only or Run and Build Application options can be selected.
Build Status - Set the build status of the application. Options include:
1. Run Application Only - Users can only run an application. This option is an effective way to protect an application
from modifications from other developers.
2. Run and Build Application - Developers and users can both run and develop the application.

by: Sherif Abdelmoneom Ramadan Page 10 of 61


Workshop: Oracle Application Express in a on-premises (or local) installation

• Roles and Responsibilities

Users are divided into four primary roles:

1. Instance administrators are superusers that manage an entire hosted instance using a separate application
called APEX Administration Services. Instance administrators manage workspace provisioning, configure features and instance
settings, and manage security.
2. Workspace administrators can perform administrator tasks specific to a workspace such as configuring workspace
preferences, managing user accounts, monitoring workspace activity, and viewing log files.
3. Developers are users who sign in to a workspace and create and edit applications.
4. End users can only run existing applications.

by: Sherif Abdelmoneom Ramadan Page 11 of 61


Workshop: Oracle Application Express in a on-premises (or local) installation

Oracle APEX Installation Requirements


Before installing Oracle APEX in a local self-managed installation you must verify your configuration meets the minimum installation
requirements.

• Oracle Database Requirements

Oracle APEX release 23.1 requires an Oracle Database release 19c or later.

• Browser Requirements

Oracle APEX requires a JavaScript-enabled browser and supports the current and prior major release of Google Chrome,
Mozilla Firefox, Apple Safari, and Microsoft Edge.

• Web Server Requirements

Oracle APEX requires Oracle REST Data Services (ORDS) 20.x or later. ORDS can be deployed on WebLogic, Tomcat or run in
standalone mode. This article describes the installation of ORDS on Tomcat 9.

by: Sherif Abdelmoneom Ramadan Page 12 of 61


Workshop: Oracle Application Express in a on-premises (or local) installation

Oracle APEX Installation Processes Checklist


1. Software Provisioning / Downloads.
2. Setup Java SE Development Kit.
3. Stetup Tomcat:
a. Full install option.
b. Specify the service port.
c. Administrator username and password.
d. Specify Java home directory.
4. Install Oracle Database 19c.
5. Create and Configure a Pluggable Database.
6. Using Oracle Net Configuration Assistant for Configuring [TNSNAMES.ORA].
7. Create a new tablespace to act as a default tablespace for APEX.
8. Install Oracle Application Express:
a. Execute installation script.
b. Run the [apxchpwd.sql] script to create or update your Instance Administrator account.
c. Run the [apex_rest_config.sql].
d. Configuring the accounts of APEX / ORDS services.
9. Unlock the [ANONYMOUS] account.
10. Installing Oracle REST Data Services (ORDS):
a. Setting Up the Configuration Folder Structure.
b. Setting Environment Variables.
c. Copying the Images Directory.
d. Copy the [ords.war] file to the Tomcat [webapps] directory.
e. Execute the ORDS Interactive Command-Line Interface Installation.
11. Log in to the workspace internal, with the administrator credentials.

by: Sherif Abdelmoneom Ramadan Page 13 of 61


Workshop: Oracle Application Express in a on-premises (or local) installation

Step-by-Step: APEX Installation on Tomcat (Windows Server 2016)

What to Do What You Will See


Software Provisioning / Downloads:

Java: jdk-11.0.19_windows-
x64_bin.exe
Tomcat: apache-tomcat-
9.0.80.exe
Database 19c: WINDOWS.X64_193000
_db_home.zip
APEX: apex_23.1.zip
ORDS: ords-latest.zip
Oracle SQL sqldeveloper-
Developer 23.1.0.097.1607-x64.zip
(optional):

by: Sherif Abdelmoneom Ramadan Page 14 of 61


Workshop: Oracle Application Express in a on-premises (or local) installation

What to Do What You Will See

Setup Java SE Development Kit:

We used the Windows x64 MSI Installer.


Install it by double-clicking and accepting
the defaults.

by: Sherif Abdelmoneom Ramadan Page 15 of 61


Workshop: Oracle Application Express in a on-premises (or local) installation

What to Do What You Will See

Stetup Tomcat:
We used the 32-bit/64-bit Windows Service
Installer, so Tomcat would run as a Windows
Service. Install it by double-clicking and
filling in the details when prompted.
Click on Select the type of install dropdown
list and choose the Full install option and
then click Next.

This screen will allow you to set up any


default ports that you want the service to
connect through, and will also allow you to
set an Administrator username and
password.

User Name: admin


Password: admin

(or whatever user name/password you put


into the configuration)

by: Sherif Abdelmoneom Ramadan Page 16 of 61


Workshop: Oracle Application Express in a on-premises (or local) installation

What to Do What You Will See

Select the Java installation as your Java


home.

Once the install is complete, click Next.

Lastly, uncheck the Readme checkbox.

If you prefer to start Apache Tomcat after the


install, leave the checkbox marked. If not,
then you will want to uncheck that checkbox.

by: Sherif Abdelmoneom Ramadan Page 17 of 61


Workshop: Oracle Application Express in a on-premises (or local) installation

What to Do What You Will See

To test the Tomcat installation and verify it is


running on your server, open and point your
browser to localhost:8080 (or whatever
custom port you put into the configuration).

by: Sherif Abdelmoneom Ramadan Page 18 of 61


Workshop: Oracle Application Express in a on-premises (or local) installation

What to Do What You Will See

Install Oracle Database 19c:

Unzip the package


(WINDOWS.X64_193000_db_home.zip)
then rename the folder, choose a shorter
name (eg.
C:\APEX_DEV\DATABASE\db_home).

by: Sherif Abdelmoneom Ramadan Page 19 of 61


Workshop: Oracle Application Express in a on-premises (or local) installation

What to Do What You Will See

Launch the setup.


Right-click on Setup.exe file and Select
Run as Administrator to start the
installation. Note: the installation wizard may
take several minutes to open. So be patient.
Select the Create and configure a
single instance database option and
then click Next.

Select the Desktop class option and then


click Next.

by: Sherif Abdelmoneom Ramadan Page 20 of 61


Workshop: Oracle Application Express in a on-premises (or local) installation

What to Do What You Will See

Select Virtual Account for oracle home


user

by: Sherif Abdelmoneom Ramadan Page 21 of 61


Workshop: Oracle Application Express in a on-premises (or local) installation

What to Do What You Will See

In the Typical Installation screen, you can


provide the values of the following
parameters.
− Oracle base: Default
− Database file location: Default
− Database edition: Enterprise
Edition
− Character set: Specify the character set
that you want to use (Default)
− Global database name: Default
− Password: This will be the password for
your Administrative users (Apex_123)
− Create as Container database: Checked
− Pluggable Database name: (PDB) will
work as a template for those PDBs which
you will create in future (Default)

by: Sherif Abdelmoneom Ramadan Page 22 of 61


Workshop: Oracle Application Express in a on-premises (or local) installation

What to Do What You Will See

On this screen, the installer will show the


summary of the configuration which you just
did for your Oracle Database 19c installation.
Press Install button.
The installation process begins, and the time
to complete the installation depends on the
configuration of the Server/Workstation.
Note: If possible, save this information
somewhere for future use.

Once installation completes, press Close


Note: The setup installs oracle enterprise
manager. See more here.

by: Sherif Abdelmoneom Ramadan Page 23 of 61


Workshop: Oracle Application Express in a on-premises (or local) installation

What to Do What You Will See

Take a quick look at an oracle Enterprise


Manager Database express. In our case, we
can launch it by accessing the
https://localhost:5500/em URL.
Specify the SYS or SYSTEM as username (It is
created during the installation of the oracle)
and master password used on the Typical
Installation screen.

Once authenticated, you can view the status


of the Oracle services and performance and
resource matrix.

by: Sherif Abdelmoneom Ramadan Page 24 of 61


Workshop: Oracle Application Express in a on-premises (or local) installation

What to Do What You Will See

After you have installed Oracle Database, the


database is up and running and you can
begin using it right away.
The Oracle Database service must be
running and the database must be started
and opened prior to use. See more here.
You can start or stop the database using
Windows Services:
− From the Start menu, enter
services.msc in the search field and
press Enter.
− Locate the OracleServiceORCL
service in the Services window.
− Right-click the service name, and from
the menu, select Start or Stop.
− To set its startup properties, right-click
and select Properties, and in the
dialog box, select either Automatic,
Manual, or Disabled from the Startup
type list.

by: Sherif Abdelmoneom Ramadan Page 25 of 61


Workshop: Oracle Application Express in a on-premises (or local) installation

What to Do What You Will See

Create and Configure a Pluggable Database


(APEX_PDB_23) for APEX installation.

Using Database Configuration Assistant


(DBCA).
From the Start menu, click Database
Configuration Assistant

The DBCA includes a new option on the


opening Database Operation screen that
allows you to manage the pluggable
databases of an existing container database.

Select the Manage Pluggable


Databases option and click the Next
button.

by: Sherif Abdelmoneom Ramadan Page 26 of 61


Workshop: Oracle Application Express in a on-premises (or local) installation

What to Do What You Will See

Select Create a Pluggable database

Select the container database to house the


new pluggable database and provide SYS
user as a Database credentials, then click the
Next button.

by: Sherif Abdelmoneom Ramadan Page 27 of 61


Workshop: Oracle Application Express in a on-premises (or local) installation

What to Do What You Will See

Create a PDB in the CDB Root Using the


PDB$SEED Files.
Click the Next button.

by: Sherif Abdelmoneom Ramadan Page 28 of 61


Workshop: Oracle Application Express in a on-premises (or local) installation

What to Do What You Will See

Enter the pluggable database name


(APEX_PDB_23), and admin credentials, then
click the Next button.

Administrator user name: admin


Administrator password: Apex_123

by: Sherif Abdelmoneom Ramadan Page 29 of 61


Workshop: Oracle Application Express in a on-premises (or local) installation

What to Do What You Will See

Select File System as Storage type.


Enter the pluggable database, database
location
(C:\APEX_DEV\DATABASE\oradata\PDB
S\{PDB_NAME}), then click the Next button.

by: Sherif Abdelmoneom Ramadan Page 30 of 61


Workshop: Oracle Application Express in a on-premises (or local) installation

What to Do What You Will See

Summary information, click the Finish


button.

by: Sherif Abdelmoneom Ramadan Page 31 of 61


Workshop: Oracle Application Express in a on-premises (or local) installation

What to Do What You Will See

Once complete, click Close button on the


main screen.

Take a quick look on the database files.

by: Sherif Abdelmoneom Ramadan Page 32 of 61


Workshop: Oracle Application Express in a on-premises (or local) installation

What to Do What You Will See

Using Oracle Net Configuration Assistant for


Configuring TNSNAMES.ORA:
TNSNAMES.ORA is a SQL*Net configuration
file that defines databases addresses for
establishing connections to them.
This file normally resides in
%ORACLE_HOME%\network\admin\tnsna
mes.ora.
From the Start menu, click Net
Configuration Assistant

Select Local Net Service Name


configuration and click Next

by: Sherif Abdelmoneom Ramadan Page 33 of 61


Workshop: Oracle Application Express in a on-premises (or local) installation

What to Do What You Will See

Select Add and click Next

Enter the database service name


(apex_pdb_23) and click Next.

The service name must be the same as the


previously configured global database name
or pluggable database name.

Select transmission protocol TCP and click


Next.

by: Sherif Abdelmoneom Ramadan Page 34 of 61


Workshop: Oracle Application Express in a on-premises (or local) installation

What to Do What You Will See

On the Configure Host and Port Number


page, configure the following parameters:
Enter the IP address of the database server in
the Host Name field.
For a local database, enter the host name
(localhost) or IP address.
Select Use the standard port number of
1521. This option is selected by default.
Click Next.

Select Yes, perform a test, and then


click Next.

If the connection attempt fails, click Change


Login to change the login username and
password.

Enter the correct password of the user


system, and then click OK.
Oracle Net Configuration Assistant performs
a new connection test.

by: Sherif Abdelmoneom Ramadan Page 35 of 61


Workshop: Oracle Application Express in a on-premises (or local) installation

What to Do What You Will See


When you see a successful test result, click
Next

Enter a network service name


(APEX_PDB_23).
The network service name must be different
from the service name orcl.

Click Next.

by: Sherif Abdelmoneom Ramadan Page 36 of 61


Workshop: Oracle Application Express in a on-premises (or local) installation

What to Do What You Will See

To add additional network service names,


select Yes.

If additional network service names are not


needed, select No.

Select No, and then click Next.

The configuration complete page opens.

Click Next.

by: Sherif Abdelmoneom Ramadan Page 37 of 61


Workshop: Oracle Application Express in a on-premises (or local) installation

What to Do What You Will See

Click Finish.

Take a quick look on the TNSNAMES.ORA file.

by: Sherif Abdelmoneom Ramadan Page 38 of 61


Workshop: Oracle Application Express in a on-premises (or local) installation

What to Do What You Will See

Create a new tablespace to act as a default


tablespace for APEX.
Start Windows PowerShell and connect to
the database where APEX will be installed as
SYS specifying the SYSDBA role.
command:
sqlplus sys/sys as sysdba

command: show pdbs;

command:
alter session set container =
apex_pdb_23;

by: Sherif Abdelmoneom Ramadan Page 39 of 61


Workshop: Oracle Application Express in a on-premises (or local) installation

What to Do What You Will See

command: show con_name;

command:
select * from v$tablespace;

command:
CREATE TABLESPACE APEX
DATAFILE
'C:\APEX_DEV\DATABASE\oradata\PDB
S\APEX_PDB_23\apex01.dbf'
SIZE 100M AUTOEXTEND ON NEXT 1M;

by: Sherif Abdelmoneom Ramadan Page 40 of 61


Workshop: Oracle Application Express in a on-premises (or local) installation

What to Do What You Will See

Take a quick look on the database files.

command:
select * from v$tablespace;

Automate Pluggable DB opening during


Container instance startup
command:
alter session
set container = cdb$root;

by: Sherif Abdelmoneom Ramadan Page 41 of 61


Workshop: Oracle Application Express in a on-premises (or local) installation

What to Do What You Will See

command: show con_name;

command:
ALTER PLUGGABLE DATABASE apex_pdb_23
SAVE STATE;

command: show pdbs;

command: exit;

by: Sherif Abdelmoneom Ramadan Page 42 of 61


Workshop: Oracle Application Express in a on-premises (or local) installation

What to Do What You Will See

To install Oracle Application Express:


Unzip downloaded zip file
(apex_23.1.zip), folder path
(C:\APEX_DEV\INS_FILES\apex).

Start Windows PowerShell


Change your working directory to apex.
command:
cd C:\APEX_DEV\INS_FILES\apex\apex

Start SQL*Plus and connect to the


database where APEX will be installed as SYS
specifying the SYSDBA role.

command:
sqlplus sys/sys as sysdba

by: Sherif Abdelmoneom Ramadan Page 43 of 61


Workshop: Oracle Application Express in a on-premises (or local) installation

What to Do What You Will See

Select PDB Database


command:
alter session set container =
APEX_PDB_23;

Run the apexins.sql script, specifying the


relevant tablespace names and image URL.
See more here.
command:
@apexins.sql APEX APEX TEMP /i/

It will create many files and finally shows the


message as shown.

by: Sherif Abdelmoneom Ramadan Page 44 of 61


Workshop: Oracle Application Express in a on-premises (or local) installation

What to Do What You Will See

Run the apxchpwd.sql script to create or


update your Instance Administrator account.
Follow the on-screen instructions.
You will be prompted provide a username,
password, and email address. If the account
username does not exist, it will be created
for you. See more here.
command: @apxchpwd.sql

Configuring Static File Support.


When using Oracle REST Data Services as
your web listener, static files are served using
RESTful service module built into Oracle
Application Express. See more here.
Therefore, you must run
apex_rest_config.sql after a new
installation or upgrade of Oracle Application
Express.
This will ask you to give APEX_LISTENER
and APEX_PUBLIC_USER password to set
which will be used later for the ORDS setup.

command: @apex_rest_config.sql

by: Sherif Abdelmoneom Ramadan Page 45 of 61


Workshop: Oracle Application Express in a on-premises (or local) installation

What to Do What You Will See

Configuring the accounts of APEX / ORDS


services.
Start Windows PowerShell and connect to
the database where APEX will be installed as
SYS specifying the SYSDBA role.
sqlplus sys/sys as sysdba

command:

alter session set container =


APEX_PDB_23;

command:

ALTER user APEX_230100 IDENTIFIED


BY Apex_123 account unlock;

by: Sherif Abdelmoneom Ramadan Page 46 of 61


Workshop: Oracle Application Express in a on-premises (or local) installation

What to Do What You Will See

command:

ALTER user APEX_PUBLIC_USER


IDENTIFIED BY Apex_123 account
unlock;

command:

ALTER user APEX_LISTENER


IDENTIFIED BY Apex_123 account
unlock;

command:

ALTER user APEX_REST_PUBLIC_USER


IDENTIFIED BY Apex_123 account
unlock;

by: Sherif Abdelmoneom Ramadan Page 47 of 61


Workshop: Oracle Application Express in a on-premises (or local) installation

What to Do What You Will See

Unlock the ANONYMOUS account.


Start Windows PowerShell and connect to
the database where APEX will be installed as
SYS specifying the SYSDBA role.
sqlplus sys/sys as sysdba

command: show con_name;

command:
ALTER user ANONYMOUS IDENTIFIED
BY Apex_123 account unlock;

by: Sherif Abdelmoneom Ramadan Page 48 of 61


Workshop: Oracle Application Express in a on-premises (or local) installation

What to Do What You Will See


Installing Oracle REST Data Services (ORDS):

Unzip the downloaded zip (ords-


latest.zip) file into a directory
(C:\APEX_DEV\INS_FILES\ords).

Setting Up the Configuration Folder


Structure:
− New installation has the ORDS
configuration files placed in the
configuration folder.
− The best practice is to have your
configuration files separate from the
application files, Create the configuration
directory (config) in the ORDS folder
(C:\APEX_DEV\INS_FILES\ords\co
nfig)

by: Sherif Abdelmoneom Ramadan Page 49 of 61


Workshop: Oracle Application Express in a on-premises (or local) installation

What to Do What You Will See

Setting Environment Variables:

Adding ORDS bin folder to your Operating


System PATH:

The ORDS product folder contains


a bin folder and other folders and files
required to run ORDS.
Oracle recommends to add the
ORDS bin folder to your operating system
PATH environment variable.
Use a command with administrator
privileges.
command:
SetX PATH "%PATH%;
C:\APEX_DEV\INS_FILES\ords\bin"

by: Sherif Abdelmoneom Ramadan Page 50 of 61


Workshop: Oracle Application Express in a on-premises (or local) installation

What to Do What You Will See

Setting Up the Configuration Folder location:


command:
SetX ORDS_CONFIG
"C:\APEX_DEV\INS_FILES\ords\confi
g" /m
command:
SetX _JAVA_OPTIONS "-
Dconfig.url=C:\APEX_DEV\INS_FILES
\ords\config" /m
command:
SetX JAVA_TOOL_OPTIONS "-
Dconfig.url=C:\APEX_DEV\INS_FILES
\ords\config" /m

by: Sherif Abdelmoneom Ramadan Page 51 of 61


Workshop: Oracle Application Express in a on-premises (or local) installation

What to Do What You Will See


Set JAVA_HOME
command:
SetX JAVA_HOME " C:\Program
Files\Java\jdk-11" /m

by: Sherif Abdelmoneom Ramadan Page 52 of 61


Workshop: Oracle Application Express in a on-premises (or local) installation

What to Do What You Will See


Copying the Images Directory:
Whether you are loading a new installation
or upgrading from a previous release, you
must copy the images directory from the top
level of the apex\images directory to the
Tomcat "webapps\i" directory.
command:
mkdir "C:\Program Files\Apache
Software Foundation\Tomcat
9.0\webapps\i"
command:
xcopy /s /e /i
C:\APEX_DEV\INS_FILES\apex\apex\i
mages "C:\Program Files\Apache
Software Foundation\Tomcat
9.0\webapps\i\"

Copy the "ords.war" file to the Tomcat


"webapps" directory.
command:
copy
C:\APEX_DEV\INS_FILES\ords\ords.w
ar "C:\Program Files\Apache
Software Foundation\Tomcat
9.0\webapps"

by: Sherif Abdelmoneom Ramadan Page 53 of 61


Workshop: Oracle Application Express in a on-premises (or local) installation

What to Do What You Will See


ORDS Interactive Command-Line Interface
Installation:
command:
CD C:\APEX_DEV\INS_FILES\ords

Execute the following setup command with -


-config option to specify your
configuration folder to create the
configuration files:

java -jar ords.war --config


<configuration folder> install
command:
java -jar ords.war --config
C:\APEX_DEV\INS_FILES\ords\config
install

Entering a Number to Select the Type of


Installation:

Choose option [2] Create or update a


database pool and install/upgrade ORDS in
the database.

by: Sherif Abdelmoneom Ramadan Page 54 of 61


Workshop: Oracle Application Express in a on-premises (or local) installation

What to Do What You Will See

Entering a Number to Select the Database


Connection:

− Entering the Database Host Name:


Specify the database host name for basic
connection [localhost].
− Entering the Database Listener Port:
Specify the database port for a basic
connection [1521].
− Entering the Database Service Name:
Specify the service name
[apex_pdb_23].
− Entering the Administrator Username:
Specify a user who has installer privileges
to install or upgrade ORDS in the
database [sys as sysdba].
− Entering the Database Password: Specify
the administrator user password
[Apex_123].
− Entering the Default Tablespace: [APEX].
− Entering the Temporary Tablespace:
[TEMP].

Entering a Number to Select Additional


Feature(s): Select the additional features that
you want to enable.

Choose option [1]

by: Sherif Abdelmoneom Ramadan Page 55 of 61


Workshop: Oracle Application Express in a on-premises (or local) installation

What to Do What You Will See

Entering a Number to Configure and Start


ORDS in Standalone Mode:

You can configure ORDS to run in


standalone mode. In addition, you can start
ORDS in standalone mode after the install or
upgrade is complete. If you do not want to
configure ORDS and start in standalone
mode, choose Option 2 to exit.

Choose option [1]

− Entering a Number to Use HTTP or


HTTPS Protocol: Choose option [1]
− Entering the HTTP Port: Specify the HTTP
port, if you selected option 1 [8080].
− Entering the APEX Static Resources
Location: ORDS detects if APEX is
installed in the database and if the
database user APEX_PUBLIC_USER exists,
if found to be true, then it prompts for
the location of the APEX images
[C:\APEX_DEV\INS_FILES\apex\ap
ex\images].

by: Sherif Abdelmoneom Ramadan Page 56 of 61


Workshop: Oracle Application Express in a on-premises (or local) installation

What to Do What You Will See

It will create many files and finally shows the


message as shown.

Take a quick look on the ORDS configuration


directory.

by: Sherif Abdelmoneom Ramadan Page 57 of 61


Workshop: Oracle Application Express in a on-premises (or local) installation

What to Do What You Will See

Log in to the workspace internal, with the


administrator credentials.

http://server:port/ords/

Congratulations Good Play

by: Sherif Abdelmoneom Ramadan Page 58 of 61


Workshop: Oracle Application Express in a on-premises (or local) installation

What to Do What You Will See

by: Sherif Abdelmoneom Ramadan Page 59 of 61


Workshop: Oracle Application Express in a on-premises (or local) installation

What to Do What You Will See

by: Sherif Abdelmoneom Ramadan Page 60 of 61


Workshop: Oracle Application Express in a on-premises (or local) installation

References and Links:


Here you will be very excited with APEX’s Features and Capabilities

• APEX Features
• Oracle APEX Universal Theme
• Apps and Plug-ins
• APEX Community

Learning links

• Oracle APEX: Some fundamentals, Basics and Tricks – Part 1


• Oracle APEX: Some fundamentals, Basics and Tricks – Part 2

Technical topics

• Oracle Database 19c Technical Architecture


• Multitenant : Overview of Container Databases (CDB) and Pluggable Databases (PDB)
• Multitenant : Option: CDBs and PDBs
• Multitenant : Create and Configure a Pluggable Database (PDB) in Oracle Database (12c).1
• Using Oracle Managed Files
• How Oracle Disk Manager works with Oracle Managed Files
• Understanding the Implications of Creating a New PDB Using CREATE_FILE_DEST
• Utilizing the Multitenant Architecture in Oracle Database 12c or Later
• Oracle Application Express and Multitenant
• Application Express in Oracle Database 12c Multitenant Architecture Presentation
• Building Multi-Tenant APEX Apps
• Oracle REST Data Services 23.2

by: Sherif Abdelmoneom Ramadan Page 61 of 61

You might also like