Oracle Apex Installation Guide
Oracle Apex Installation Guide
Oracle Apex Installation Guide
Installation Guide
Release 22.1
F51983-03
June 2022
Oracle APEX Installation Guide, Release 22.1
F51983-03
Contributors: David Bliss, Christina Cho, Hilary Farrell , Salim Hlayel, Christian Neumueller, Marc Sewtz,
Jason Straub, Vlad Uvarov, Patrick Wolf
This software and related documentation are provided under a license agreement containing restrictions on
use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your
license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license,
transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse
engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is
prohibited.
The information contained herein is subject to change without notice and is not warranted to be error-free. If
you find any errors, please report them to us in writing.
If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on
behalf of the U.S. Government, then the following notice is applicable:
U.S. GOVERNMENT END USERS: Oracle programs (including any operating system, integrated software,
any programs embedded, installed or activated on delivered hardware, and modifications of such programs)
and Oracle computer documentation or other Oracle data delivered to or accessed by U.S. Government end
users are "commercial computer software" or "commercial computer software documentation" pursuant to the
applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, the use,
reproduction, duplication, release, display, disclosure, modification, preparation of derivative works, and/or
adaptation of i) Oracle programs (including any operating system, integrated software, any programs
embedded, installed or activated on delivered hardware, and modifications of such programs), ii) Oracle
computer documentation and/or iii) other Oracle data, is subject to the rights and limitations specified in the
license contained in the applicable contract. The terms governing the U.S. Government’s use of Oracle cloud
services are defined by the applicable contract for such services. No other rights are granted to the U.S.
Government.
This software or hardware is developed for general use in a variety of information management applications.
It is not developed or intended for use in any inherently dangerous applications, including applications that
may create a risk of personal injury. If you use this software or hardware in dangerous applications, then you
shall be responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure its
safe use. Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this
software or hardware in dangerous applications.
Oracle, Java, and MySQL are registered trademarks of Oracle and/or its affiliates. Other names may be
trademarks of their respective owners.
Intel and Intel Inside are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are
used under license and are trademarks or registered trademarks of SPARC International, Inc. AMD, Epyc,
and the AMD logo are trademarks or registered trademarks of Advanced Micro Devices. UNIX is a registered
trademark of The Open Group.
This software or hardware and documentation may provide access to or information about content, products,
and services from third parties. Oracle Corporation and its affiliates are not responsible for and expressly
disclaim all warranties of any kind with respect to third-party content, products, and services unless otherwise
set forth in an applicable agreement between you and Oracle. Oracle Corporation and its affiliates will not be
responsible for any loss, costs, or damages incurred due to your access to or use of third-party content,
products, or services, except as set forth in an applicable agreement between you and Oracle.
Contents
Preface
Audience viii
Documentation Accessibility viii
Diversity and Inclusion viii
Related Documents ix
Conventions ix
Third-Party License Information ix
iii
3.4 About the Oracle APEX Runtime Environment 3-9
iv
5.5.4 Scenario 4: Plug-in a Non-CDB or PDB with No Oracle APEX 5-18
6 Installing and Configuring Oracle APEX and Oracle REST Data Services
6.1 Performing Pre-installation Tasks for Oracle APEX 6-2
6.2 About SQLcl Support 6-3
6.3 Downloading and Installing Oracle APEX 6-3
6.3.1 Installing Oracle APEX 6-4
6.3.2 Creating or Updating Your Instance Administration Account 6-6
6.3.2.1 What Is an Instance Administrator? 6-7
6.3.2.2 About apxchpwd.sql 6-7
6.3.2.3 Running apxchpwd.sql 6-8
6.3.3 Restarting Processes 6-9
6.3.4 Configuring the APEX_PUBLIC_USER Account 6-9
6.3.4.1 About the APEX_PUBLIC_USER Account 6-9
6.3.4.2 Unlocking the APEX_PUBLIC_USER Account 6-9
6.3.4.3 Changing the Password for the APEX_PUBLIC_USER Account 6-10
6.3.4.4 About Password Expiration in Oracle Database 11g and Later 6-10
6.3.5 Configuring RESTful Services 6-11
6.4 Downloading and Installing Oracle REST Data Services 6-12
6.4.1 Downloading Oracle REST Data Services 6-12
6.4.2 About Configuring Oracle REST Data Services Behind a Reverse Proxy or
Load Balancer 6-13
6.4.3 Web Server HTTP POST Request Limits 6-13
6.5 Configuring Oracle REST Data Services 6-14
6.5.1 Copying the Images Directory 6-14
6.5.2 Validating the Oracle REST Data Services Installation 6-15
6.5.3 Configuring Static File Support 6-15
6.5.4 Securing Oracle REST Data Service 6-15
6.6 Enabling Network Services in Oracle Database 6-15
6.6.1 When and Why Network Services Must be Enabled 6-16
6.6.2 Granting Connect Privileges in Oracle Database 12c or Later 6-17
6.6.3 Troubleshooting an Invalid ACL Error 6-17
6.7 Performing Security Tasks 6-18
6.8 Controlling the Number of Concurrent Jobs 6-19
6.8.1 About Managing the Number of Concurrent Jobs 6-19
6.8.2 Viewing the Number of JOB_QUEUE_PROCESSES 6-19
6.8.2.1 Viewing JOB_QUEUE_PROCESSES in the Installation Log File 6-19
6.8.2.2 Viewing JOB_QUEUE_PROCESSES in Oracle APEX 6-20
6.8.2.3 Viewing JOB_QUEUE_PROCESSES from SQL*Plus 6-20
6.8.3 Changing the Number of JOB_QUEUE_PROCESSES 6-20
6.9 About Running Oracle APEX in Other Languages 6-21
v
6.10 Installing Translated Versions of Oracle APEX 6-22
6.10.1 About Installing Translated Versions of Oracle APEX 6-22
6.10.2 Installing a Translated Version of Oracle APEX 6-23
6.11 Creating a Workspace and Adding Oracle APEX Users 6-24
6.11.1 About Workspaces and Users 6-24
6.11.2 Signing In To Administration Services 6-25
6.11.3 Creating a Workspace Manually 6-26
6.11.4 Creating Oracle APEX Users 6-27
6.11.5 Signing In to Your Workspace 6-29
6.12 Performing Post Installation Tasks for Upgrade Installations 6-30
6.12.1 About Removing Prior Oracle APEX Installations 6-30
6.12.2 Verifying if a Prior Installation Exists 6-30
6.12.3 Removing Schemas and SYS Objects from Prior Installations 6-31
6.12.4 Removing Schemas from Prior Installations in a CDB 6-32
6.12.5 Fixing Invalid ACL 6-32
6.13 About Performance Optimization Tasks 6-32
6.14 Converting Between Runtime and Full Development Environments 6-33
6.14.1 About Runtime and Full Development Environments 6-33
6.14.2 Converting a Runtime Environment to a Full Development Environment 6-34
6.14.3 Converting a Full Development Environment to a Runtime Environment 6-34
vi
C.5 About Page Protection Violation C-48
Index
vii
Preface
Preface
This guide explains how to install and configure Oracle APEX.
• Audience
• Documentation Accessibility
• Diversity and Inclusion
• Related Documents
• Conventions
• Third-Party License Information
Audience
Oracle APEX Installation Guide is intended for anyone responsible for installing Oracle
APEX.
To use this manual, you must have administrative privileges on the computer where
you installed your Oracle database and familiarity with object-relational database
management concepts.
Documentation Accessibility
For information about Oracle's commitment to accessibility, visit the Oracle
Accessibility Program website at http://www.oracle.com/pls/topic/lookup?
ctx=acc&id=docacc.
viii
Preface
these technical constraints, our effort to remove insensitive terms is ongoing and will take
time and external cooperation.
Related Documents
For more information, see these Oracle resources:
• Oracle APEX Release Notes
• Oracle APEX App Builder User’s Guide
• Oracle APEX End User’s Guide
• Oracle APEX Administration Guide
• Oracle APEX SQL Workshop Guide
• Oracle APEX API Reference
• Oracle Database Concepts
• Oracle Database Administrator’s Guide
• Oracle Database SQL Language Reference
• SQL*Plus User's Guide and Reference
Conventions
The following text conventions are used in this document:
Convention Meaning
boldface Boldface type indicates graphical user interface elements associated with an
action, or terms defined in text or the glossary.
italic Italic type indicates book titles, emphasis, or placeholder variables for which
you supply particular values.
monospace Monospace type indicates commands within a paragraph, URLs, code in
examples, text that appears on the screen, or text that you enter.
ix
1
Changes in Release 22.1 for Oracle APEX
Installation Guide
All content in Oracle APEX Installation Guide has been updated to reflect release 22.1
functionality.
1-1
2
Oracle APEX Installation Requirements
Before installing Oracle APEX in a on-premises (or local) installation you must verify your
configuration meets the minimum installation requirements.
2-1
Chapter 2
Oracle Database Requirements
1. Start SQL*Plus and connect to the database as SYS specifying the SYSDBA role. For
example:
• On Windows:
SYSTEM_DRIVE:\ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password
3. If necessary, enter the following command to determine whether the system uses
an initialization parameter file (initsid.ora) or a server parameter file
(spfiledbname.ora):
SQL> SHOW PARAMETER PFILE;
This command displays the name and location of the server parameter file or the
initialization parameter file.
4. Determine the current values of the MEMORY_TARGET parameter:
SQL> SHOW PARAMETER MEMORY_TARGET
5. If the value is 0, your database is using manual memory management. Consult the
Oracle Database Administrator’s Guide to learn how to configure an equivalent
memory size using manual memory management, instead of continuing with the
steps that follow.
If the system is using a server parameter file, set the value of the MEMORY_TARGET
initialization parameter to at least 300 MB:
SQL> ALTER SYSTEM SET MEMORY_TARGET='300M' SCOPE=spfile;
6. If the system uses an initialization parameter file, change the value of the
MEMORY_TARGET parameter to at least 300 MB in the initialization parameter file
(initsid.ora).
7. Shut down the database:
SQL> SHUTDOWN
2-2
Chapter 2
Oracle Database Requirements
See Also:
Using Automatic Memory Management in Oracle Database Administrator’s Guide
1. Start SQL*Plus and connect to the database as SYS specifying the SYSDBA role. For
example:
• On Windows:
SYSTEM_DRIVE:\ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password
3. If the value of the parameter is MANUAL, change it to AUTO for the current database
session. For example:
SQL> ALTER SESSION SET WORKAREA_SIZE_POLICY = AUTO;
4. Within the same database session, perform the installation or upgrade of Oracle APEX.
Note:
If you are installing Oracle APEX in a CDB, WORKAREA_SIZE_POLICY must be set
system-wide. For example:
SQL> ALTER SYSTEM SET WORKAREA_SIZE_POLICY=AUTO SCOPE=BOTH;
2-3
Chapter 2
Browser Requirements
See Also:
WORKAREA_SIZE_POLICY in Oracle Database Reference
Tip:
APEX-based REST Services were desupported in Oracle APEX release
22.1. Oracle REST Data Services (ORDS) release 21.4.2 now ships with
migration scripts that enable you to upgrade any remaining APEX-based
REST Services to ORDS-based Services. To learn more, see "Migration of
Oracle APEX Restful Service Modules" in Oracle REST Data Services
Release Notes.
2-4
Chapter 2
Oracle XML DB Requirement
Tip:
The installer does a prerequisite check for Oracle XML DB and will exit if it is not
installed.
Tip:
The installation of Oracle XML DB creates the user ANONYMOUS. In order for
APEX workspace provisioning to work properly, the ANONYMOUS user must not
be dropped from the database.
Tip:
For more information about manually adding Oracle XML DB to an existing
database, see Administration of Oracle XML DB in Oracle XML DB Developer’s
Guide
2-5
3
Oracle APEX Installation Overview
Oracle APEX Installation Guide describes how to install Oracle APEX in a on-premises (or
local) installation.
How you sign in and access Oracle APEX depends upon your user role and where Oracle
APEX resides. Oracle APEX may reside in a local on-premises Oracle Database or in an
Oracle Cloud Service.
See Also:
Upgrading from a Previous Oracle APEX Release
3-1
Chapter 3
About Oracle APEX Architecture
The web server, Oracle REST Data Services, functions as a communications broker
between the web browser and the Oracle APEX objects in the Oracle database by
mapping browser requests into database stored procedure calls.
Once fully installed, a Uniform Resource Locator (URL) is defined for both developers
and end users to access Oracle APEX. Users require only a web browser and the
required URL. No additional client software is required.
Note:
There are licensing costs associated with Oracle WebLogic Server.
See Also:
3-2
Chapter 3
About Accessing Oracle APEX in Oracle Cloud
See Also:
• Get an Environment
• Welcome to Oracle APEX Application Development Service in Getting Started
with Oracle APEX Application Development
• Creating Applications with Oracle Application Express on Autonomous
Database in Using Oracle Autonomous Database on Shared Exadata
Infrastructure
3-3
Chapter 3
Understanding the Installation Process
See Also:
Upgrading from a Previous Oracle APEX Release
See Also:
Upgrading from a Previous Oracle APEX Release
3-4
Chapter 3
Understanding the Installation Process
In between major product releases, Oracle may offer a point release. A point release (for
example Oracle APEX release 5.0.3) includes bug fixes and incorporates all current patch
sets. Typically, point releases do not introduce new functionality.
See Also:
Upgrading from a Previous Oracle APEX Release
3-5
Chapter 3
Understanding the Installation Process
See Also:
About Specifying How Workspaces Are Created and Selecting a Workspace
Provisioning Mode in Oracle APEX Administration Guide
See Also:
Note:
This topic does not apply to Oracle APEX instances running in Oracle Cloud.
See the documentation for your Oracle Cloud service.
3-6
Chapter 3
Understanding the Installation Process
Your administrator determines how you request a new workspace. If your administrator has
set Provisioning Method to either Request or Automatic and has configured email, you can
request a workspace on the Sign In dialog.
To request a workspace from the Sign In dialog:
1. Navigate to the Oracle APEX Sign in dialog.
2. Under Sign In, click Request a Workspace.
The Request a Workspace Wizard appears.
3. For Identification:
a. First Name - Enter your first name.
b. Last Name - Enter your last name.
c. Email - Enter the email address. A link to activate your workspace will be sent to this
email address.
d. Workspace - Enter a workspace name that name uniquely identifies your
development environment.
e. Click Next.
4. If defined, review and accept the service agreement and click Next.
5. Verify your request and click Submit Request.
Once you complete the Identification form, the following events occur:
a. You will receive an email containing a verification link.
b. When you click the verification link, the workspace is created.
c. You will receive another email containing Sign In credentials (that is, the workspace
name, username, and password).
Once you complete the Identification form, the following events occur:
1. You will receive an email containing a verification link.
2. When you click the verification link, the workspace is created.
3. You will then receive another email containing Sign In credentials (that is, the workspace
name, username, and password).
See Also:
About Specifying How Workspaces Are Created in Oracle APEX Administration
Guide
3-7
Chapter 3
Understanding the Installation Process
Tip:
To reset your password from the Sign In page, you must provide your email
address and the workspace name.
Tip:
Passwords are case sensitive.
Tip:
You can also reset your password within Oracle APEX. See Changing Your
Profile or Password in Oracle APEX App Builder User’s Guide
3-8
Chapter 3
About the Oracle APEX Runtime Environment
See Also:
About the Advantages of the Oracle APEX Runtime Environment in Oracle APEX
App Builder User’s Guide
Scripts are provided to remove or add the developer interface from an existing instance. To
learn more, see one of the following for the corresponding type of installation:
See also:
Converting Between Runtime and Full Development Environments
3-9
4
Upgrading from a Previous Oracle APEX
Release
Upgrading Oracle APEX creates new database objects in a new schema and migrates the
application metadata to the new release.
If you have Oracle APEX release 20.x or earlier, following any of the installation scenarios in
this guide upgrades your APEX instance to the current release, creates Oracle APEX 22.1
database objects in a new schema, and migrates the application metadata to the new
release.
See Also:
4-1
Chapter 4
About Release Numbering Conventions
See Also:
Downloading and Installing Oracle APEX
4-2
Chapter 4
Viewing the Oracle REST Data Services Release Number
Note:
If upgrading Oracle APEX from a release that ships with the database, do not alter
any APEX files in the Oracle home directory (for example, /u01/app/oracle/
product/18.0.0/dbhome_1/apex) .
4-3
Chapter 4
About Upgrading Existing Applications
4-4
Chapter 4
About Reverting to a Previous Release
See Also:
Reverting to a Previous Release After a Failed Upgrade Installation
4-5
5
Utilizing the Multitenant Architecture in Oracle
Database 12c or Later
Learn about installation choices and different scenarios associated with copying and moving
pluggable databases introduced by the Oracle Database 12c or later multitenant architecture
with respect to Oracle APEX.
• Understanding the Installation Choices
Learn about the installation choices in Oracle APEX.
• Installing Oracle APEX into an Application Container
Learn about the application container that stores data and metadata for application back
ends.
• Installing Oracle APEX into Different PDBs
You can install different versions of Oracle APEX into different PDBs.
• Plugging in a PDB When Oracle APEX Is Installed in the Root Container
Learn about scenarios in which the target database has Oracle APEX installed into the
root container, CDB$ROOT - the default installation option.
• Plugging in a PDB When Oracle APEX Is Not in the Root Container of the Target CDB
The scenarios in this section describe when Oracle APEX is not installed in the root
container, CDB$ROOT, by explicitly removing it as described in "Uninstalling Oracle APEX
from a CDB."
5-1
Chapter 5
Installing Oracle APEX into an Application Container
packages, functions, procedures and views. Each PDB will have the APEX_220100
schema and have its own copy of the Oracle APEX engine's tables so that it can hold
the metadata for the APEX applications defined within that PDB.
Tip:
Oracle recommends removing Oracle APEX from the root container
database for the majority of use cases, except for hosting companies or
installations where all pluggable databases (PDBs) utilize Oracle APEX and
they all need to run the exact same release and patch set of Oracle APEX.
See Also:
Installing Oracle APEX into Different PDBs
5-2
Chapter 5
Installing Oracle APEX into an Application Container
defined and one or more PDBs that share data and metadata about the application from the
application root. You can have multiple application containers within a CDB and each
container can have a different version of Oracle APEX.
Patching or upgrading Oracle APEX in an application container is simplified, because these
actions are done against the application root. When an application PDB wishes to uptake the
patch or upgraded version, it simply syncs with the application root. Oracle APEX continues
to run in the application PDB at the existing version until the application PDB syncs with the
application root.
Note:
apex_approot1 and the admin user in the previous example can be any valid
ORACLE identifier.
5-3
Chapter 5
Installing Oracle APEX into an Application Container
For example:
begin
sys.dbms_utility.compile_schema( 'APEX_220100', false );
sys.dbms_utility.compile_schema( 'FLOWS_FILES', false );
end;
/
APP_NAME APP_VERSION
APP_STATUS
------------------------------ ------------------------------
------------
no rows selected
5-4
Chapter 5
Installing Oracle APEX into an Application Container
begin
sys.dbms_utility.compile_schema( 'APEX_220100', false );
sys.dbms_utility.compile_schema( 'FLOWS_FILES', false );
end;
/
Note:
apex_approot1 and the admin user in the previous example can be any valid
ORACLE identifier.
5-5
Chapter 5
Installing Oracle APEX into Different PDBs
For example:
APP_NAME APP_VERSION
APP_STATUS
------------------------------ ------------------------------
------------
Note:
apex_approot1 and the admin user in the previous example can be any
valid ORACLE identifier.
5-6
Chapter 5
Installing Oracle APEX into Different PDBs
Note:
Installing or removing Oracle APEX from a CDB requires a local connection to the
database.
This section describes removing Oracle APEX from a CDB. If you wish to remove
Oracle APEX from the CDB that shipped with Oracle Database 12.1, you should
use apxremov_con.sqlfrom either $ORACLE_HOME/apex , or from a 4.2.6 APEX
distribution.
1. Change to the apex directory in the location where you unzipped the distribution.
2. Start SQL*Plus and connect to the database where Oracle APEX is installed as SYS
specifying the SYSDBA role. For example:
• On Windows:
SYSTEM_DRIVE:\ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password
3. Run apxremov.sql.
For example:
@apxremov.sql
Note:
If you run apexremov.sql after PDBs have been added to the CDB, then Oracle
APEX uninstalls from all of the PDBs, as well as CDB$ROOT and PDB$SEED.
Therefore, any applications defined in any of the PDBs will be removed.
5-7
Chapter 5
Installing Oracle APEX into Different PDBs
1. Change the apex directory in the location where you unzipped the distribution.
2. Start SQL*Plus and connect to the database where APEX is installed as SYS
specifying the SYSDBA role. For example:
• On Windows:
SYSTEM_DRIVE:\ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password
3. Set the container to the PDB you want to install APEX locally:
ALTER SESSION SET CONTAINER = <PDB_name>;
Where:
– tablespace_apex is the name of the tablespace for the APEX application
user.
– tablespace_files is the name of the tablespace for the APEX files user.
– tablespace_temp is the name of the temporary tablespace or tablespace
group.
– images is the virtual directory for APEX images. To support future APEX
upgrades, define the virtual image directory as /i/.
For example:
@apexins.sql SYSAUX SYSAUX TEMP /i/
Where:
– tablespace_apex is the name of the tablespace for the APEX application
user.
– tablespace_files is the name of the tablespace for the APEX files user.
5-8
Chapter 5
Installing Oracle APEX into Different PDBs
See Also:
• Installing and Configuring Oracle APEX and Oracle REST Data Services
• Oracle Database SQL Language Reference for more information about
SQL*Plus
Note:
Installing or removing Oracle APEX from a CDB requires a local connection to the
database.
1. Change your working directory to the apex directory in the location where you unzipped
the distribution.
2. Start SQL*Plus and connect to CDB$ROOT of the database where APEX is installed as SYS
specifying the SYSDBA role.For example:
5-9
Chapter 5
Installing Oracle APEX into Different PDBs
• On Windows:
$ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password
Where:
– tablespace_apex is the name of the tablespace for the APEX application
user.
– tablespace_files is the name of the tablespace for the APEX files user.
– tablespace_temp is the name of the temporary tablespace or tablespace
group.
– images is the virtual directory for APEX images. To support future APEX
upgrades, define the virtual image directory as /i/.
Example:
Where:
– tablespace_apex is the name of the tablespace for the APEX application
user.
– tablespace_files is the name of the tablespace for the APEX files user.
– tablespace_temp is the name of the temporary tablespace or tablespace
group.
5-10
Chapter 5
Plugging in a PDB When Oracle APEX Is Installed in the Root Container
– images is the virtual directory for APEX images. To support future APEX
upgrades, define the virtual image directory as /i/.
Example:
See Also:
This section describes scenarios in which the target database has Oracle APEX installed into
the root container, CDB$ROOT - the default installation option. Note there are multiple scenarios
related to where the database being plugged in originated from and how Oracle APEX was
configured in the originating database.
• Scenario 1: Plug-in Non-CDB with Oracle APEX
Plug-in Non-CDB with Oracle APEX.
• Scenario 2: Plug-in PDB with a Common APEX from Another CDB
Plug-in a PDB with APEX from another CDB.
• Scenario 3: Plug-in PDB with a Local Oracle APEX from Another CDB
Plug-in a PDB with a local Oracle APEX from another CDB.
5-11
Chapter 5
Plugging in a PDB When Oracle APEX Is Installed in the Root Container
See Also:
• Installing and Configuring Oracle APEX and Oracle REST Data Services
• Working with Incompatible Oracle APEX Versions
5-12
Chapter 5
Plugging in a PDB When Oracle APEX Is Installed in the Root Container
See Also:
• Installing and Configuring Oracle APEX and Oracle REST Data Services
• Working with Incompatible Oracle APEX Versions
5.4.3 Scenario 3: Plug-in PDB with a Local Oracle APEX from Another
CDB
Plug-in a PDB with a local Oracle APEX from another CDB.
If you are copying or moving a PDB from an existing Oracle Database 12c or later where
APEX was not installed in the root container but is installed locally, then you need to perform
additional steps before the PDB can be opened without errors.
This scenario assumes APEX release 22.1 is installed and the APEX_220100 schema within
the PDB being plugged in contains all of the APEX database objects and has no metadata
linked objects. Therefore, you need to run $ORACLE_HOME/rdbms/admin/apex_to_common.sql
to remove the common objects and create the metadata links for the packages, views and so
forth.
To replace local objects with metadata links in the PDB:
1. Change your working directory to $ORACLE_HOME/rdbms/admin.
2. Start SQL*Plus and connect to the database where APEX is installed as SYS specifying
the SYSDBA role. For example:
• On Windows:
SYSTEM_DRIVE:\ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password
If the version of Oracle APEX installed in the originating database is different from what is
installed in the root container of the target an error is raised when trying to open the PDB.
See Also:
Working with Incompatible Oracle APEX Versions
5-13
Chapter 5
Plugging in a PDB When Oracle APEX Is Installed in the Root Container
5-14
Chapter 5
Plugging in a PDB When Oracle APEX Is Installed in the Root Container
$ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password
6. Follow the instructions outlined in the Patch Set Notes for updating the images directory.
See Also:
Installing Oracle APEX into a CDB
5-15
Chapter 5
Plugging in a PDB When Oracle APEX Is Installed in the Root Container
host &OH_HOME/perl/bin/perl -I
Where:
• &OH_HOME represents the full path to the Oracle home
• <PDB_name> is the name of the PDB you are patching
6. Follow the instructions outlined in the patch set notes for updating the images
directory.
Where:
• &OH_HOME represents the full path to the Oracle home
• <PDB_name> is the name of the PDB you are patching
5. Follow the instructions outlined in the patch set notes for updating the images
directory.
5-16
Chapter 5
Plugging in a PDB When Oracle APEX Is Not in the Root Container of the Target CDB
See Also:
Uninstalling Oracle APEX from a CDB
5-17
Chapter 5
Plugging in a PDB When Oracle APEX Is Not in the Root Container of the Target CDB
See Also:
Installing and Configuring Oracle APEX and Oracle REST Data Services
5.5.3 Scenario 3: Plug-in PDB with a Local Oracle APEX from Another
CDB
Plug-in a PDB with local Oracle APEX from another CDB.
If you are copying or moving a PDB from an existing Oracle Database 12c or later
where the originating PDB had a local Oracle APEX installed (not in the CDB) then
you do not need to perform any additional steps, other than configuring the web server
in the PDB.
This scenario assumes Oracle APEX release 22.1 is installed and the 22.1 schema
within the PDB being plugged in, already has all of the Oracle APEX objects defined
locally and no metadata links.
See Also:
Installing and Configuring Oracle APEX and Oracle REST Data Services
5-18
6
Installing and Configuring Oracle APEX and
Oracle REST Data Services
Install or upgrade Oracle APEX by downloading a ZIP file from the Oracle APEX download
page and then downloading and installing Oracle REST Data Services (ORDS). These
instructions apply to both new and upgrade installations.
6-1
Chapter 6
Performing Pre-installation Tasks for Oracle APEX
See Also:
Web Server Requirements
Note:
If you are connecting to a remote database, then start the web server.
6-2
Chapter 6
About SQLcl Support
See Also:
See Also:
Working with SQLcl in Oracle SQLcl User’s Guide
6-3
Chapter 6
Downloading and Installing Oracle APEX
See Also:
Tip:
Oracle APEX must be installed from a writable directory on the file system.
See Reviewing a Log of an Installation Session.
Note:
You should keep the directory tree where you unzip the files short and
not under directories that contain spaces. For example, within Windows
unzip to C:\TEMP.
6-4
Chapter 6
Downloading and Installing Oracle APEX
5. Disable any existing password complexity rules for the default profile.
6. Select the appropriate installation option.
Full development environment provides complete access to the App Builder
environment to develop applications. A Runtime environment enables users to run
applications that cannot be modified.
Available installation options include:
• Full development environment. Run apexins.sql passing the following four
arguments in the order shown:
@apexins.sql tablespace_apex tablespace_files tablespace_temp images
Where:
– tablespace_apex is the name of the tablespace for the Oracle APEX application
user.
– tablespace_files is the name of the tablespace for the Oracle APEX files user.
– tablespace_temp is the name of the temporary tablespace or tablespace group.
– images is the virtual directory for Oracle APEX images. For installations using
EPG, /i/ is the required value for the images argument. To support future Oracle
APEX upgrades, define the virtual image directory as /i/.
Example:
@apexins.sql SYSAUX SYSAUX TEMP /i/
Note:
If you receive the following error, exit SQL*Plus and change your working
directory to where you unzipped the installation file, for example C:\TEMP in
Windows, before starting SQL*Plus:
SP2-0310: unable to open file "apexins.sql"
6-5
Chapter 6
Downloading and Installing Oracle APEX
Where:
– tablespace_apex is the name of the tablespace for the Oracle APEX
application user.
– tablespace_files is the name of the tablespace for the Oracle APEX files
user.
– tablespace_temp is the name of the temporary tablespace or tablespace
group.
– images is the virtual directory for Oracle APEX images. To support future
Oracle APEX upgrades, define the virtual image directory as /i/.
Example:
@apxrtins.sql SYSAUX SYSAUX TEMP /i/
See Also:
6-6
Chapter 6
Downloading and Installing Oracle APEX
Tip:
Skip this section if you are upgrading from a previous release of Oracle APEX. In an
upgrade scenario, the Instance Administrator account and password is preserved
and carried over from the prior release.
See Also:
Oracle APEX Administration Services in Oracle APEX Administration Guide
Note:
The apxchpwd.sql script is not supported on Oracle Autonomous Database on
Shared Exadata Infrastructure and Oracle APEX Application Development (APEX
Service).
6-7
Chapter 6
Downloading and Installing Oracle APEX
Tip:
You do not need to run apxchpwd.sql when upgrading from a previous
release of Oracle APEX. In an upgrade scenario, the Instance Administrator
account password is preserved and carried over from the prior release.
See Also:
SQL*Plus User's Guide and Reference for more information about SQL*Plus
6-8
Chapter 6
Downloading and Installing Oracle APEX
Tip:
If you are upgrading from a prior release of Oracle APEX, this step is unnecessary.
1. Start SQL*Plus and connect to the database where Oracle APEX is installed as SYS
specifying the SYSDBA role. If Oracle APEX is installed in the CDB, ensure you connect to
CDB$ROOT. For example:
• On Windows:
6-9
Chapter 6
Downloading and Installing Oracle APEX
Tip:
If you are upgrading from a prior release of Oracle APEX, this step is
unnecessary.
1. Start SQL*Plus and connect to the database where Oracle APEX is installed as
SYS specifying the SYSDBA role. If Oracle APEX is installed in the CDB, ensure you
connect to CDB$ROOT. For example:
• On Windows:
SYSTEM_DRIVE:\ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_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.
6-10
Chapter 6
Downloading and Installing Oracle APEX
As a result, your Oracle APEX instance will become unusable until you change the password.
See Also:
Oracle Database Security Guide for information on creating profiles and assigning
them to database users
Once configured, the instance administrator can control the availability of the feature. If the
instance administrator has disabled RESTful Services for this Oracle APEX instance,
RESTful Services are not available for this instance and the RESTful Services icon does not
display.
To configure RESTful Services in Oracle APEX:
1. Change your working directory to the apex directory where you unzipped the installation
software.
2. Start SQL*Plus and connect to the database where Oracle APEX is installed as SYS
specifying the SYSDBA role. For example:
• On Windows:
SYSTEM_DRIVE:\ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password
6-11
Chapter 6
Downloading and Installing Oracle REST Data Services
See Also:
Enabling RESTful Services for an Instance in Oracle APEX Administration
Guide
See Also:
Tip:
By default, the context root for accessing Oracle APEX through Oracle REST
Data Services is /ords. If you wish to have a context root of /apex for
accessing Oracle APEX, rename the ords.war file to apex.war before
installing Oracle REST Data Services. See Deploying and Monitoring Oracle
REST Data Services in Oracle REST Data Services Installation and
Configuration Guide.
6-12
Chapter 6
Downloading and Installing Oracle REST Data Services
6-13
Chapter 6
Configuring Oracle REST Data Services
See Also:
http://tomcat.apache.org/ for more information.
See Also:
Oracle REST Data Services Installation, Configuration, and Development
Guide
6-14
Chapter 6
Enabling Network Services in Oracle Database
See Also:
Repairing the Oracle REST Data Services Installation in Oracle REST Data
Services Installation and Configuration Guide
See Also:
About Configuring Oracle REST Data Services with Oracle APEX in Oracle APEX
App Builder User’s Guide
6-15
Chapter 6
Enabling Network Services in Oracle Database
Note:
When upgrading APEX on a database 12c or newer, based on the
configuration of the old APEX version the upgrade automatically configures
Network Services.
Tip:
To run the examples described in this section, the compatible initialization
parameter of the database must be set to at least 11.1.0.0.0. By default an
11g or 12c database will already have the parameter set properly, but a
database upgraded to 11g or 12c from a prior version may not. For
information about changing database initialization parameters, see
Specifying the Database Compatibility Level in Oracle Multitenant
Administrator's Guide.
See Also:
About Report Printing in Oracle APEX App Builder User’s Guide.
6-16
Chapter 6
Enabling Network Services in Oracle Database
The following example demonstrates how to grant connect privileges to any host for the
APEX_220100 database user. This example assumes you connected to the database where
Oracle APEX is installed as SYS specifying the SYSDBA role.
BEGIN
DBMS_NETWORK_ACL_ADMIN.APPEND_HOST_ACE(
host => '*',
ace => xs$ace_type(privilege_list => xs$name_list('connect'),
principal_name => 'APEX_220100',
principal_type => xs_acl.ptype_db));
END;
/
The following example demonstrates how to provide less privileged access to local network
resources. This example enables access to servers on the local host only, such as email and
report servers.
BEGIN
DBMS_NETWORK_ACL_ADMIN.APPEND_HOST_ACE(
host => 'localhost',
ace => xs$ace_type(privilege_list => xs$name_list('connect'),
principal_name => 'APEX_220100',
principal_type => xs_acl.ptype_db));
END;
/
REM Show the dangling references to dropped users in the ACL that is assigned
REM to '*'.
6-17
Chapter 6
Performing Security Tasks
DECLARE
ACL_ID RAW(16);
CNT NUMBER;
BEGIN
-- Look for the object ID of the ACL currently assigned to '*'
SELECT ACLID INTO ACL_ID FROM DBA_NETWORK_ACLS
WHERE HOST = '*' AND LOWER_PORT IS NULL AND UPPER_PORT IS NULL;
-- If just some users referenced in the ACL are invalid, remove just
those
-- users in the ACL. Otherwise, drop the ACL completely.
SELECT COUNT(PRINCIPAL) INTO CNT FROM XDS_ACE
WHERE ACLID = ACL_ID AND
EXISTS (SELECT NULL FROM ALL_USERS WHERE USERNAME =
PRINCIPAL);
ELSE
DELETE FROM XDB.XDB$ACL WHERE OBJECT_ID = ACL_ID;
END IF;
END;
/
COMMIT;
Once the ACL has been fixed, you must run the first script in this section to apply the
ACL to the APEX_220100 user.
6-18
Chapter 6
Controlling the Number of Concurrent Jobs
SSL is an industry standard protocol that uses RSA public key cryptography in conjunction
with symmetric key cryptography to provide authentication, encryption, and data integrity.
See Also:
Configuring HTTP Protocol Attributes in Oracle APEX Administration Guide
See Also:
Reviewing a Log of an Installation Session
6-19
Chapter 6
Controlling the Number of Concurrent Jobs
See Also:
Signing In to Your Workspace
$ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password
6-20
Chapter 6
About Running Oracle APEX in Other Languages
1. Start SQL*Plus and connect to the database where Oracle APEX is installed as SYS
specifying the SYSDBA role:
• On Windows:
$ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password
For example, running the statement ALTER SYSTEM SET JOB_QUEUE_PROCESSES = 20 sets
JOB_QUEUE_PROCESSES to 20.
The translated version of Oracle APEX should be loaded into a database that has a character
set that supports the specific language. If you attempt to install a translated version of Oracle
APEX into a database that does not support the character encoding of the language, the
installation may fail or the translated Oracle APEX instance may appear corrupt when run.
The database character set AL32UTF8 supports all the translated versions of Oracle APEX.
6-21
Chapter 6
Installing Translated Versions of Oracle APEX
You can manually install translated versions of Oracle APEX using SQL*Plus. The
installation files are encoded in AL32UTF8.
Note:
Regardless of the target database character set, to install a translated
version of Oracle APEX, you must set the character set value of the
NLS_LANG environment variable to AL32UTF8 before starting SQL*Plus.
The following examples illustrate valid NLS_LANG settings for loading Oracle APEX
translations:
American_America.AL32UTF8
Japanese_Japan.AL32UTF8
See Also:
Managing Application Globalization in Oracle APEX App Builder User’s
Guide
The Oracle APEX developer and admin interface is translated into the 9 standard
languages: French, German, Italian, Japanese, Korean, Portuguese (Brazil), Simplified
Chinese, Spanish, and Traditional Chinese. Developers can choose to run the Oracle
APEX development environment in any of the installed languages by simply selecting
the language from the Sign In page or home page.
The Oracle APEX runtime engine which is used by developers to create applications is
available in the following languages: Arabic, Brazilian Portuguese, Croatian, Czech,
Danish, Dutch, Finnish, French, French - Canada, German, Greek, Hebrew,
Hungarian, Italian, Japanese, Korean, Norwegian, Polish, Portuguese (Portugal) (pt),
Romanian, Russian, Serbian - Cyrillic, Serbian - Latin, Simplified Chinese, Slovak,
Slovenian, Spanish, Swedish, Thai, Traditional Chinese, and Turkish.
6-22
Chapter 6
Installing Translated Versions of Oracle APEX
To support additional languages not covered in the above list, developers must provide their
own translations. For example, if you develop a Bulgarian application and want to include
report messages, such as pagination, in Bulgarian, you must translate the strings used in
messages displayed in reports.
See Also:
Translating Messages Used Internally by APEX in Oracle APEX App Builder User’s
Guide
Note:
If you have applied a Patch Set and then install translations, you must re-execute
the Patch Set to apply all fixes to the translations.
NLS_LANG=American_America.AL32UTF8
export NLS_LANG
• C shell:
set NLS_LANG=American_America.AL32UTF8
2. Navigate to the directory under apex/builder based on the language you need to install.
For example for German, navigate to apex/builder/de. Start SQL*Plus and connect to
the database where Oracle APEX is installed as SYS specifying the SYSDBA role. For
example:
6-23
Chapter 6
Creating a Workspace and Adding Oracle APEX Users
• On Windows:
$ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password
@load_lang.sql
Where lang is the specific language (for example, load_de.sql for German or
load_ja.sql for Japanese).
6-24
Chapter 6
Creating a Workspace and Adding Oracle APEX Users
Tip:
By default, the context root for accessing Oracle APEX through Oracle REST
Data Services is /ords. If you wish to have a context root of /apex for
accessing Oracle APEX, rename the ords.war file to apex.war before installing
Oracle REST Data Services. See Deploying and Monitoring Oracle REST Data
Services in Oracle REST Data Services Installation and Configuration Guide.
http://hostname:port/ords/apex_admin
Where:
• hostname is the name of the system where Oracle REST Data Services is installed.
• port is the port number assigned when configuring Oracle REST Data Services. In a
default installation, this number is 8080. To learn more, see Installing and Configuring
Oracle REST Data Services in Oracle REST Data Services Installation and
Configuration Guide.
• ords is the service name defined when configuring Oracle REST Data Services.
2. On the Sign In page:
a. Username - Enter the Instance administrator account username specified in Creating
or Updating Your Instance Administration Account.
b. Password - Enter your Instance administrator account password.
c. Click Sign In to Administration.
Oracle APEX Administration Services appears.
Note that, depending on your setup, you might be required to change your password
when you log in for the first time.
See Also:
Oracle APEX Administration Services in Oracle APEX Administration Guide
6-25
Chapter 6
Creating a Workspace and Adding Oracle APEX Users
6-26
Chapter 6
Creating a Workspace and Adding Oracle APEX Users
See Also:
Tip:
Most attributes in Oracle APEX include field-level Help. Attributes with field-
level Help, have light gray icon that resembles a question mark (?). To view
field-level Help, click the Help icon.
6-27
Chapter 6
Creating a Workspace and Adding Oracle APEX Users
6-28
Chapter 6
Creating a Workspace and Adding Oracle APEX Users
See Also:
Managing Users Across an Oracle APEX Instance in Oracle APEX Administration
Guide
http://hostname:port/apex/
Where:
• hostname is the name of the system where Oracle REST Data Services is installed.
• port is the port number assigned when configuring Oracle REST Data Services. In a
default installation, this number is 8080. To learn more, see Installing and Configuring
Oracle REST Data Services in Oracle REST Data Services Installation and
Configuration Guide.
• apex is the service name defined when configuring Oracle REST Data Services.
The Sign In page appears.
2. On the Sign In page, enter:
• Workspace - Enter the name of your workspace.
• Username - Enter your user name.
• Password - Enter your case-sensitive password.
3. Click Sign In.
Note that, depending on your setup, you might be required to change your password
when you log in for the first time.
See Also:
6-29
Chapter 6
Performing Post Installation Tasks for Upgrade Installations
See Also:
Upgrading from a Previous Oracle APEX Release
6-30
Chapter 6
Performing Post Installation Tasks for Upgrade Installations
• On Windows:
$ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password
SELECT username
FROM dba_users
WHERE ( username LIKE 'FLOWS\_______' ESCAPE '\'
OR username LIKE 'APEX\_______' ESCAPE '\' )
AND username NOT IN ( SELECT schema
FROM dba_registry
WHERE comp_id = 'APEX' );
If the results contain entries in the form FLOWS_XXXXXX or APEX_XXXXXX where XXXXXX
represents six numbers, those entries are candidates for removal.
1. Start SQL*Plus and connect to the database where Oracle APEX is installed as SYS
specifying the SYSDBA role. For example:
• On Windows:
$ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password
6-31
Chapter 6
About Performance Optimization Tasks
To remove schemas and SYS objects from prior installations, run commands using the
following example:
$ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password
EXEC DBMS_NETWORK_ACL_ADMIN.DELETE_PRIVILEGE('power_users.xml',
'APEX_220100');
6-32
Chapter 6
Converting Between Runtime and Full Development Environments
improve performance, most web servers support on-the-fly HTTP response compression and
provide settings that enable you to configure on how long browsers can cache a file before
requesting it again. The HTTP response compression is usually implemented using gzip
encoding, while browser file caching is enabled by issuing Cache-Control HTTP response
header.
Please see your web server documentation to learn how to enable response compression
and browser file caching. For optimal performance of the Oracle APEX development
environment and APEX applications, Oracle recommends enabling gzip compression of files
in the virtual images directory (for example, /i/) and responses from the database access
descriptor as well as allowing browsers to cache files from the virtual images directory for at
least 12 hours.
See Also:
6-33
Chapter 6
Converting Between Runtime and Full Development Environments
$ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password
@apxdvins.sql
See Also:
SQL*Plus User's Guide and Reference for more information about SQL*Plus
6-34
Chapter 6
Converting Between Runtime and Full Development Environments
• On Windows:
$ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password
@apxdevrm.sql
See Also:
SQL*Plus User's Guide and Reference for more information about SQL*Plus
6-35
A
Automating the Oracle APEX Installation
Process
Automate the process of installing and configuring an Oracle APEX instance.
• About apxsilentins.sql
Run the apxsilentins.sql script to automate the installation and configuration of an
Oracle APEX instance.
• Running apxsilentins.sql
Run the apxsilentins.sql script.
To run apxsilentins.sql:
1. Change your working directory to apex.
2. Start SQL*Plus and connect as user SYS to the database where Oracle APEX is installed.
You will need to specify the SYSDBA role. For example:
• On Windows:
A-1
Appendix A
Running apxsilentins.sql
3. Disable any existing password complexity rules for the default profile.
4. Run apxsilentins.sql passing the following eight arguments in the order shown:
@apxsilentins.sql tablespace_apex tablespace_files tablespace_temp images
password_apex_pub_user password_apex_listener
password_apex_rest_pub_user
password_internal_admin
Where:
• tablespace_apex is the name of the tablespace for the Oracle APEX
application user.
• tablespace_files is the name of the tablespace for the Oracle APEX files
user.
• tablespace_temp is the name of the temporary tablespace or tablespace
group.
• images is the virtual directory for Oracle APEX images. For installations using
EPG, /i/ is the required value for the images argument. To support future
Oracle APEX upgrades, define the virtual image directory as /i/.
• password_apex_pub_user is the password for the APEX_PUBLIC_USER database
account.
• password_apex_listener is the password for the APEX_LISTENER database
account.
• password_apex_rest_pub_user is the password for the
APEX_REST_PUBLIC_USER database account.
• password_internal_admin is the password for the Instance Administration
ADMIN Oracle APEX account. This password must meet the following
requirements:
– Contain at least 6 characters.
– Contain at least one numeric character (0123456789).
– Contain at least one punctuation character (!"#$%&()``*+,-/:;?_).
– Contain at least one uppercase alphabetic character.
For example:
@apxsilentins.sql SYSAUX SYSAUX TEMP /i/ Passw0rd!1 Passw0rd!2 Passw0rd!3
Passw0rd!4
Once apxsilentins.sql completes, you follow the steps in Downloading and Installing
Oracle REST Data Services and Configuring Oracle REST Data Services (except for
"Configuring Static File Support").
A-2
Appendix A
Running apxsilentins.sql
Use the passwords you supplied to apxsilentins.sql when completing these steps. Then,
move on to Creating a Workspace and Adding Oracle APEX Users.
A-3
B
Maximizing Uptime During an Oracle APEX
Upgrade
Learn how to maximize uptime during an Oracle APEX upgrade.
Previously, Oracle APEX could only be upgraded by completely disabling application usage
for an extended length of time. The following is an overview of the additional steps you can
take to keep your applications usable for end users during most portions of an Oracle APEX
upgrade.
This advanced procedure is an alternative to the following the topics in Downloading and
Installing Oracle APEX.
To upgrade the instance, administrators typically run these phases in one step by executing
one of the following:
• For full development environment:
@apexins.sql tablespace_apex tablespace_files tablespace_temp images
• For runtime-only environment:
@apxrtins.sql tablespace_apex tablespace_files tablespace_temp images
Where:
• tablespace_apex is the name of the tablespace for the Oracle APEX application user.
• tablespace_files is the name of the tablespace for the Oracle APEX files user.
• tablespace_temp is the name of the temporary tablespace or tablespace group.
• images is the virtual directory for Oracle APEX images.
The upgrade of an Oracle APEX instance runs in four phases:
1. Create database schemas and database objects (tables, packages).
2. Migrate application metadata.
3. Migrate data that runtime applications modify and switch to the new version.
4. Migrate additional log and summary data.
Phases 1 and 4 do not disable end users using the instance. Phase 2 only affects developers
who modify applications. Phase 3 affects all access to Oracle APEX.
Oracle now also provides alternative upgrade scripts to run the phases independently.
Administrators can use these scripts instead of apexins.sql and apxrtins.sql, to reduce
the effective downtime of an Oracle APEX instance from potentially hours to just a few
minutes (depending on hardware performance).
Note:
This feature is not supported when Oracle APEX is installed in CDB$ROOT.
B-1
Appendix B
Administrators must sequentially execute the following scripts to start phases 1, 2 and
3, respectively. At the end of phase 3, a scheduler job automatically starts to execute
phase 4.
To reduce downtime during an Oracle APEX upgrade:
1. Execute phase 1 script: Development and runtime usage is not affected.
• For full development environment:
@apexins1.sql tablespace_apex tablespace_files tablespace_temp
images
• For runtime-only environment:
@apxrtins1.sql tablespace_apex tablespace_files tablespace_temp
images
Example: @apexins1.sql sysaux sysaux temp /i/
2. Execute phase 2 script: Development is disabled, but runtime usage is not
affected.
• For full development environment:
@apexins2.sql tablespace_apex tablespace_files tablespace_temp
images
• For runtime-only environment:
@apxrtins2.sql tablespace_apex tablespace_files tablespace_temp
images
Example: @apexins2.sql sysaux sysaux temp /i/
3. Disable web access for the web server, Oracle REST Data Services.
4. Execute phase 3 script: Oracle APEX can not be used.
• For full development environment:
@apexins3.sql tablespace_apex tablespace_files tablespace_temp
images
• For runtime-only environment:
@apxrtins3.sql tablespace_apex tablespace_files tablespace_temp
images
Example: @apexins3.sql sysaux sysaux temp /i/
5. Install images of the new Oracle APEX version in your web server. Administrators
can do this while phase 3 is running or even earlier, if the new version's images
directory is different to the previous Oracle APEX version's ( for example: /i212/ for
the new version vs. /i211/ for the old version).
For details refer to the installation instructions for Oracle REST Data Services.
6. Re-enable web access for the web server and restart Oracle REST Data Services.
After web access is restarted, developers and users can access the instance again,
while phase 4 finishes in the background.
B-2
Appendix B
See Also:
Installing and Configuring Oracle APEX and Oracle REST Data Services
B-3
C
Oracle APEX Installation Troubleshooting
Learn about troubleshooting Oracle APEX Installation.
This section contains information on troubleshooting.
See Also:
Upgrading from a Previous Oracle APEX Release
If the log file contains a few errors, it does not mean that your installation failed. Note that
acceptable errors are noted as such in the log file.
C-1
Appendix C
Cleaning Up After a Failed Installation
If the result is VALID, you can assume the installation was successful.
To reinstall, you must either drop the Oracle APEX database schemas, or run a script
to completely remove Oracle APEX from the database, depending upon the
installation type.
• Reverting to a Previous Release After a Failed Upgrade Installation
Learn about reverting to Oracle APEX to a previous release in the case of a failed
upgrade installation.
• Removing Oracle APEX from the Database
Start SQL*Plus and connect to the database where Oracle APEX is installed as
SYS specifying the SYSDBA role and execute the SQL> @apxremov.sql command.
C-2
Appendix C
Cleaning Up After a Failed Installation
If the query above returns any rows, the database contains a previous release of Oracle
APEX.
See Also:
Copying the Images Directory
C-3
Appendix C
Cleaning Up After a Failed Installation
4. Remove the Oracle APEX release schema. See Removing the Oracle APEX
Release Schema.
C-4
Appendix C
Cleaning Up After a Failed Installation
See Also:
Reverting the Images Directory
4. Depending upon the release you are reverting to, execute the appropriate command in
SQL*Plus.
5. Remove the Oracle APEX release schema. See Removing the Oracle APEX Release
Schema.
See Also:
Reverting the Images Directory
C-5
Appendix C
Cleaning Up After a Failed Installation
$ sqlplus /nolog
SQL> SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password
4. Remove the Oracle APEX release schema. See Removing the Oracle APEX
Release Schema.
See Also:
Reverting the Images Directory
4. Remove the Oracle APEX release schema. See Removing the Oracle APEX
Release Schema.
See Also:
Removing the Oracle APEX Release Schema
C-6
Appendix C
Cleaning Up After a Failed Installation
1. If you altered your images directory, revert it back to the release you want to revert to.
2. Change your working directory to apex in the 3.0 source.
3. Start SQL*Plus and connect to the database where Oracle APEX is installed as SYS
specifying the SYSDBA role:
On Windows:
SYSTEM_DRIVE:\ sqlplus /nolog
SQL> SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password
@apexvalidate x x FLOWS_030000
ALTER SESSION SET CURRENT_SCHEMA = FLOWS_030000;
exec
flows_030000.wwv_flow_upgrade.switch_schemas('APEX_220100','FLOWS_030000')
;
ALTER SESSION SET CURRENT_SCHEMA = SYS;
declare
l_apex_version varchar2(30);
begin
sys.dbms_registry.set_session_namespace (namespace => 'DBTOOLS');
l_apex_version := flows_030000.wwv_flows_release;
dbms_registry.downgrading('APEX','Oracle Application
Express','validate_apex','FLOWS_030000');
dbms_registry.downgraded('APEX',l_apex_version);
validate_apex;
end;
/
5. Remove the Oracle APEX release schema. See Removing the Oracle APEX Release
Schema.
See Also:
Reverting the Images Directory
C-7
Appendix C
Cleaning Up After a Failed Installation
3. Start SQL*Plus and connect to the database where Oracle APEX is installed as
SYS specifying the SYSDBA role:
On Windows:
SYSTEM_DRIVE:\ sqlplus /nolog
SQL> SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password
@apexvalidate x x FLOWS_030100
ALTER SESSION SET CURRENT_SCHEMA = FLOWS_030100;
exec
flows_030100.wwv_flow_upgrade.switch_schemas('APEX_220100','FLOWS_03
0100');
ALTER SESSION SET CURRENT_SCHEMA = SYS;
declare
l_apex_version varchar2(30);
begin
sys.dbms_registry.set_session_namespace (namespace =>
'DBTOOLS');
l_apex_version := flows_030100.wwv_flows_release;
dbms_registry.downgrading('APEX','Oracle Application
Express','validate_apex','FLOWS_030100');
dbms_registry.downgraded('APEX',l_apex_version);
validate_apex;
end;
/
C-8
Appendix C
Cleaning Up After a Failed Installation
8. Remove the Oracle APEX release schema. See Removing the Oracle APEX Release
Schema.
See Also:
Reverting the Images Directory
5. Start SQL*Plus and connect to the database where Oracle APEX is installed as SYS
specifying the SYSDBA role:
On Windows:
SYSTEM_DRIVE:\ sqlplus /nolog
SQL> SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password
@apexvalidate x x APEX_030200
ALTER SESSION SET CURRENT_SCHEMA = APEX_030200;
exec
apex_030200.wwv_flow_upgrade.switch_schemas('APEX_220100','APEX_030200');
ALTER SESSION SET CURRENT_SCHEMA = SYS;
C-9
Appendix C
Cleaning Up After a Failed Installation
declare
l_apex_version varchar2(30);
begin
sys.dbms_registry.set_session_namespace (namespace =>
'DBTOOLS');
l_apex_version := apex_030200.wwv_flows_release;
dbms_registry.downgrading('APEX','Oracle Application
Express','validate_apex','APEX_030200')
dbms_registry.downgraded('APEX',l_apex_version);
validate_apex;
end;
/
7. Remove the Oracle APEX release schema. See Removing the Oracle APEX
Release Schema.
See Also:
Reverting the Images Directory
C-10
Appendix C
Cleaning Up After a Failed Installation
@apexvalidate x x APEX_040000
ALTER SESSION SET CURRENT_SCHEMA = APEX_040000;
exec
apex_040000.wwv_flow_upgrade.switch_schemas('APEX_220100','APEX_040000');
ALTER SESSION SET CURRENT_SCHEMA = SYS;
declare
l_apex_version varchar2(30);
begin
sys.dbms_registry.set_session_namespace (namespace => 'DBTOOLS');
l_apex_version := apex_040000.wwv_flows_release;
dbms_registry.downgrading('APEX','Oracle Application
Express','validate_apex','APEX_040000');
dbms_registry.downgraded('APEX',l_apex_version);
validate_apex;
end;
/
7. Remove the Oracle APEX release schema. See Removing the Oracle APEX Release
Schema.
See Also:
Reverting the Images Directory
C-11
Appendix C
Cleaning Up After a Failed Installation
@apexvalidate x x APEX_040100
ALTER SESSION SET CURRENT_SCHEMA = APEX_040100;
exec
apex_040100.wwv_flow_upgrade.switch_schemas('APEX_220100','APEX_0401
00');
ALTER SESSION SET CURRENT_SCHEMA = SYS;
declare
l_apex_version varchar2(30);
begin
sys.dbms_registry.set_session_namespace (namespace =>
'DBTOOLS');
l_apex_version := apex_040100.wwv_flows_release;
dbms_registry.downgrading('APEX','Oracle Application
Express','validate_apex','APEX_040100');
dbms_registry.downgraded('APEX',l_apex_version);
validate_apex;
end;
/
8. Remove the Oracle APEX release schema. See Removing the Oracle APEX
Release Schema.
See Also:
Reverting the Images Directory
C-12
Appendix C
Cleaning Up After a Failed Installation
@core_sys_views.sql
@wwv_flow_val.sql
@wwv_flow_val.plb
@wwv_dbms_sql.sql
grant execute on wwv_dbms_sql to APEX_040200;
@wwv_dbms_sql.plb
begin
dbms_utility.compile_schema('APEX_040200');
end;
/
C-13
Appendix C
Cleaning Up After a Failed Installation
@apexvalidate x x APEX_040200
ALTER SESSION SET CURRENT_SCHEMA = APEX_040200;
exec
apex_040200.wwv_flow_upgrade.switch_schemas('APEX_220100','APEX_0402
00');
ALTER SESSION SET CURRENT_SCHEMA = SYS;
declare
l_apex_version varchar2(30);
begin
sys.dbms_registry.set_session_namespace (namespace =>
'DBTOOLS');
l_apex_version := apex_040200.wwv_flows_release;
dbms_registry.downgrading('APEX','Oracle Application
Express','validate_apex','APEX_040200');
dbms_registry.downgraded('APEX',l_apex_version);
validate_apex;
end;
/
8. Remove the Oracle APEX release schema. See Removing the Oracle APEX
Release Schema.
See Also:
Reverting the Images Directory
@core_sys_views.sql
@wwv_flow_val.sql
@wwv_flow_val.plb
@wwv_dbms_sql.sql
grant execute on wwv_dbms_sql to APEX_040200;
@wwv_dbms_sql.plb
begin
dbms_utility.compile_schema('APEX_040200');
end;
/
C-14
Appendix C
Cleaning Up After a Failed Installation
4. Create a second new text file in that directory named apx42dgrd.sql consisting of the
following:
set define '^'
set serverout on
begin
-- get oracle_home
sys.dbms_system.get_env('ORACLE_HOME',:xe_home);
if length(:xe_home) = 0 then
sys.dbms_output.put_line(lpad('-',80,'-'));
raise_application_error (
-20001,
'Oracle Home environment variable not set' );
end if;
end;
/
whenever sqlerror continue
5. Start SQL*Plus and connect to CDB$ROOT of the database where Oracle APEX is installed
as SYS specifying the SYSDBA role:
On Windows:
SYSTEM_DRIVE:\ sqlplus /nolog
SQL> SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password
@apexvalidate x x APEX_040200
C-15
Appendix C
Cleaning Up After a Failed Installation
apex_040200.wwv_flow_upgrade.switch_schemas('APEX_220100','APEX_0402
00');
ALTER SESSION SET CURRENT_SCHEMA = SYS;
declare
l_apex_version varchar2(30);
begin
sys.dbms_registry.set_session_namespace (namespace =>
'DBTOOLS');
l_apex_version := apex_040200.wwv_flows_release;
dbms_registry.downgrading('APEX','Oracle Application
Express','validate_apex','APEX_040200');
dbms_registry.downgraded('APEX',l_apex_version);
validate_apex;
end;
/
9. Create a second new text file in that directory named apx42dgrd.sql consisting of
the following:
set define '^'
set serverout on
begin
-- get oracle_home
sys.dbms_system.get_env('ORACLE_HOME',:xe_home);
if length(:xe_home) = 0 then
sys.dbms_output.put_line(lpad('-',80,'-'));
raise_application_error (
-20001,
'Oracle Home environment variable not set' );
end if;
end;
/
whenever sqlerror continue
10. Start SQL*Plus and connect to CDB$ROOT of the database where Oracle APEX is
installed as SYS specifying the SYSDBA role:
On Windows:
SYSTEM_DRIVE:\ sqlplus /nolog
SQL> SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password
C-16
Appendix C
Cleaning Up After a Failed Installation
$ sqlplus /nolog
SQL> SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password
12. Remove the Oracle APEX release schema. See Removing the Oracle APEX Release
Schema.
See Also:
Reverting the Images Directory
@wwv_flow_val.sql
@wwv_flow_val.plb
begin
dbms_utility.compile_schema('APEX_050000');
end;
/
begin
for i in ( select owner, trigger_name
from sys.dba_triggers
where owner = 'APEX_050000'
C-17
Appendix C
Cleaning Up After a Failed Installation
5. Remove the Oracle APEX release schema. See Removing the Oracle APEX
Release Schema.
See Also:
Reverting the Images Directory
C-18
Appendix C
Cleaning Up After a Failed Installation
@wwv_flow_val.sql
@wwv_flow_val.plb
begin
dbms_utility.compile_schema('APEX_050000');
end;
/
begin
for i in ( select owner, trigger_name
from sys.dba_triggers
where owner = 'APEX_050000'
and trigger_name like 'WWV_FLOW_UPGRADE_%'
order by 1 )
loop
sys.dbms_output.put_line('Dropping trigger '||i.owner||'.'||
i.trigger_name);
execute immediate 'drop trigger '||i.owner||'.'||i.trigger_name;
end loop;
end;
/
C-19
Appendix C
Cleaning Up After a Failed Installation
validate_apex;
end;
/
4. Create a second new text file in that directory named apx50dgrd.sql consisting of
the following:
set define '^'
whenever sqlerror exit
column :xe_home new_value OH_HOME NOPRINT
variable xe_home varchar2(255)
set serverout on
begin
-- get oracle_home
sys.dbms_system.get_env('ORACLE_HOME',:xe_home);
if length(:xe_home) = 0 then
sys.dbms_output.put_line(lpad('-',80,'-'));
raise_application_error (-20001,'Oracle Home environment variable not
set' );
end if;
end;
/
whenever sqlerror continue
set termout off
select :xe_home from sys.dual;
set termout on
host ^OH_HOME/perl/bin/perl -I ^OH_HOME/rdbms/admin ^OH_HOME/rdbms/admin/
catcon.pl -b apx50dgrd apx50dgrd1.sql
5. Start SQL*Plus and connect to CDB$ROOT of the database where Oracle APEX is
installed as SYS specifying the SYSDBA role:
On Windows:
SYSTEM_DRIVE:\ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password
7. Remove the Oracle APEX release schema. See Removing the Oracle APEX
Release Schema.
See Also:
Reverting the Images Directory
C-20
Appendix C
Cleaning Up After a Failed Installation
1. If you altered your images directory, revert it back to the release you want to revert to.
2. Change your working directory to apex/core in the 5.1 source.
3. Start SQL*Plus and connect to the database where Oracle APEX is installed as SYS
specifying the SYSDBA role:
On Windows:
SYSTEM_DRIVE:\ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password
@wwv_flow_val.sql
@wwv_flow_val.plb
begin
dbms_utility.compile_schema('APEX_050100');
end;
/
begin
for i in ( select owner, trigger_name
from sys.dba_triggers
where owner = 'APEX_050100'
and trigger_name like 'WWV_FLOW_UPGRADE_%'
order by 1 )
loop
sys.dbms_output.put_line('Dropping trigger '||i.owner||'.'||
i.trigger_name);
execute immediate 'drop trigger '||i.owner||'.'||i.trigger_name;
end loop;
end;
/
C-21
Appendix C
Cleaning Up After a Failed Installation
begin
sys.dbms_registry.set_session_namespace (namespace =>
'DBTOOLS');
l_apex_version := apex_050100.wwv_flows_release;
dbms_registry.downgrading('APEX','Oracle Application
Express','validate_apex','APEX_050100');
dbms_registry.downgraded('APEX',l_apex_version);
select username
bulk collect into l_schemas
from all_users
where username in
('FLOWS_FILES','APEX_PUBLIC_USER','APEX_LISTENER','APEX_REST_PUBLIC_
USER','APEX_INSTANCE_ADMIN_USER')
order by 1;
sys.dbms_registry.update_schema_list('APEX', l_schemas);
validate_apex;
end;
/
5. Remove the Oracle APEX release schema. See Removing the Oracle APEX
Release Schema.
See Also:
Reverting the Images Directory
@wwv_flow_val.sql
@wwv_flow_val.plb
begin
dbms_utility.compile_schema('APEX_050100');
end;
/
begin
for i in ( select owner, trigger_name
C-22
Appendix C
Cleaning Up After a Failed Installation
from sys.dba_triggers
where owner = 'APEX_050100'
and trigger_name like 'WWV_FLOW_UPGRADE_%'
order by 1 )
loop
sys.dbms_output.put_line('Dropping trigger '||i.owner||'.'||
i.trigger_name);
execute immediate 'drop trigger '||i.owner||'.'||i.trigger_name;
end loop;
end;
/
4. Create a second new text file in that directory named apx51dgrd.sql consisting of the
following:
set define '^'
whenever sqlerror exit
column :xe_home new_value OH_HOME NOPRINT
variable xe_home varchar2(255)
set serverout on
begin
-- get oracle_home
sys.dbms_system.get_env('ORACLE_HOME',:xe_home);
if length(:xe_home) = 0 then
sys.dbms_output.put_line(lpad('-',80,'-'));
raise_application_error (-20001,'Oracle Home environment variable not set' );
end if;
end;
/
whenever sqlerror continue
C-23
Appendix C
Cleaning Up After a Failed Installation
5. Start SQL*Plus and connect to CDB$ROOT of the database where Oracle APEX is
installed as SYS specifying the SYSDBA role:
On Windows:
SYSTEM_DRIVE:\ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password
7. Remove the Oracle APEX release schema. See Removing the Oracle APEX
Release Schema.
See Also:
Reverting the Images Directory
C-24
Appendix C
Cleaning Up After a Failed Installation
@@core/scripts/set_appun.sql
declare
l_cnt number := 0;
begin
select count(*) into l_cnt from sys.dba_users where username =
'^APPUN';
if l_cnt = 0 then
dbms_output.put_line('^APPUN not found in this database.');
raise program_error;
end if;
end;
/
whenever sqlerror continue
@@core/sys_core_views.sql
@@core/wwv_flow_val.sql
grant execute on sys.wwv_flow_val to ^APPUN.;
@@core/wwv_flow_val.plb
exec sys.dbms_session.modify_package_state(sys.dbms_session.reinitialize);
begin
^APPUN..wwv_flow_upgrade.remove_jobs();
^APPUN..wwv_flow_upgrade.create_jobs('^APPUN');
^APPUN..wwv_flow_upgrade.create_public_synonyms('^APPUN');
^APPUN..wwv_flow_upgrade.grant_public_synonyms('^APPUN');
^APPUN..wwv_flow_upgrade.flows_files_objects_remove('^APPUN');
^APPUN..wwv_flow_upgrade.flows_files_objects_create('^APPUN');
end;
/
C-25
Appendix C
Cleaning Up After a Failed Installation
exec
sys.dbms_session.modify_package_state(sys.dbms_session.reinitialize)
;
declare
l_apex_version varchar2(30);
l_schemas sys.dbms_registry.schema_list_t;
begin
sys.dbms_registry.set_session_namespace (namespace =>
'DBTOOLS');
execute immediate 'drop package ^APPUN..WWV_FLOW_DB_VERSION';
l_apex_version := ^APPUN..wwv_flows_release;
sys.dbms_registry.loading('APEX','Oracle Application
Express','validate_apex', '^APPUN');
select username
bulk collect into l_schemas
from sys.all_users
where username in
('FLOWS_FILES','APEX_PUBLIC_USER','APEX_LISTENER','APEX_REST_PUBLIC_
USER','APEX_INSTANCE_ADMIN_USER')
order by 1;
sys.dbms_registry.update_schema_list('APEX', l_schemas);
sys.dbms_registry.loaded('APEX',l_apex_version);
commit;
sys.validate_apex;
end;
/
4. Start SQL*Plus and connect to the database where Oracle APEX is installed as
SYS specifying the SYSDBA role:
On Windows:
SYSTEM_DRIVE:\ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password
SQL> @apxdwngrd.sql
6. Remove the Oracle APEX release schema. See Removing the Oracle APEX
Release Schema.
C-26
Appendix C
Cleaning Up After a Failed Installation
See Also:
Reverting the Images Directory
@@core/scripts/set_appun.sql
declare
l_cnt number := 0;
begin
select count(*) into l_cnt from sys.dba_users where username =
'^APPUN';
if l_cnt = 0 then
dbms_output.put_line('^APPUN not found in this database.');
raise program_error;
end if;
end;
/
whenever sqlerror continue
C-27
Appendix C
Cleaning Up After a Failed Installation
@@core/sys_core_views.sql
@@core/wwv_flow_val.sql
grant execute on sys.wwv_flow_val to ^APPUN.;
@@core/wwv_flow_val.plb
exec
sys.dbms_session.modify_package_state(sys.dbms_session.reinitialize)
;
begin
^APPUN..wwv_flow_upgrade.remove_jobs();
^APPUN..wwv_flow_upgrade.create_jobs('^APPUN');
^APPUN..wwv_flow_upgrade.create_public_synonyms('^APPUN');
^APPUN..wwv_flow_upgrade.grant_public_synonyms('^APPUN');
^APPUN..wwv_flow_upgrade.flows_files_objects_remove('^APPUN');
^APPUN..wwv_flow_upgrade.flows_files_objects_create('^APPUN');
end;
/
exec
sys.dbms_session.modify_package_state(sys.dbms_session.reinitialize)
;
declare
l_apex_version varchar2(30);
l_schemas sys.dbms_registry.schema_list_t;
begin
sys.dbms_registry.set_session_namespace (namespace =>
'DBTOOLS');
execute immediate 'drop package ^APPUN..WWV_FLOW_DB_VERSION';
l_apex_version := ^APPUN..wwv_flows_release;
sys.dbms_registry.loading('APEX','Oracle Application
Express','validate_apex', '^APPUN');
select username
bulk collect into l_schemas
from sys.all_users
where username in
('FLOWS_FILES','APEX_PUBLIC_USER','APEX_LISTENER','APEX_REST_PUBLIC_
USER','APEX_INSTANCE_ADMIN_USER')
order by 1;
sys.dbms_registry.update_schema_list('APEX', l_schemas);
C-28
Appendix C
Cleaning Up After a Failed Installation
sys.dbms_registry.loaded('APEX',l_apex_version);
commit;
sys.validate_apex;
end;
/
4. Create a second new text file in that directory named apxdwngrd_cdb.sql consisting of
the following:
set define '^'
whenever sqlerror exit
column :xe_home new_value OH_HOME NOPRINT
variable xe_home varchar2(255)
set serverout on
begin
-- get oracle_home
sys.dbms_system.get_env('ORACLE_HOME',:xe_home);
if length(:xe_home) = 0 then
sys.dbms_output.put_line(lpad('-',80,'-'));
raise_application_error (-20001,'Oracle Home environment variable not set' );
end if;
end;
/
whenever sqlerror continue
set termout off
select :xe_home from sys.dual;
set termout on
host ^OH_HOME/perl/bin/perl -I ^OH_HOME/rdbms/admin ^OH_HOME/rdbms/admin/catcon.pl
-b apx181dgrd apxdwngrd.sql
5. Start SQL*Plus and connect to CDB$ROOT of the database where Oracle APEX is installed
as SYS specifying the SYSDBA role:
On Windows:
SYSTEM_DRIVE:\ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password
7. Remove the Oracle APEX release schema. See Removing the Oracle APEX Release
Schema.
See Also:
Reverting the Images Directory
C-29
Appendix C
Cleaning Up After a Failed Installation
1. If you altered your images directory, revert it back to the release you want to revert
to.
2. Change your working directory to apex in the 18.2 source.
3. Create a new text file in that directory named apxdwngrd.sql consisting of the
following:
@@core/scripts/set_appun.sql
declare
l_cnt number := 0;
begin
select count(*) into l_cnt from sys.dba_users where username =
'^APPUN';
if l_cnt = 0 then
dbms_output.put_line('^APPUN not found in this database.');
raise program_error;
end if;
end;
/
whenever sqlerror continue
@@core/sys_core_views.sql
@@core/wwv_flow_val.sql
grant execute on sys.wwv_flow_val to ^APPUN.;
@@core/wwv_flow_val.plb
C-30
Appendix C
Cleaning Up After a Failed Installation
exec sys.dbms_session.modify_package_state(sys.dbms_session.reinitialize);
begin
^APPUN..wwv_flow_upgrade.remove_jobs();
^APPUN..wwv_flow_upgrade.create_jobs('^APPUN');
^APPUN..wwv_flow_upgrade.create_public_synonyms('^APPUN');
^APPUN..wwv_flow_upgrade.grant_public_synonyms('^APPUN');
^APPUN..wwv_flow_upgrade.flows_files_objects_remove('^APPUN');
^APPUN..wwv_flow_upgrade.flows_files_objects_create('^APPUN');
end;
/
exec sys.dbms_session.modify_package_state(sys.dbms_session.reinitialize);
declare
l_apex_version varchar2(30);
l_schemas sys.dbms_registry.schema_list_t;
begin
sys.dbms_registry.set_session_namespace (namespace => 'DBTOOLS');
execute immediate 'drop package ^APPUN..WWV_FLOW_DB_VERSION';
l_apex_version := ^APPUN..wwv_flows_release;
sys.dbms_registry.loading('APEX','Oracle Application
Express','validate_apex', '^APPUN');
select username
bulk collect into l_schemas
from sys.all_users
where username in
('FLOWS_FILES','APEX_PUBLIC_USER','APEX_LISTENER','APEX_REST_PUBLIC_USER',
'APEX_INSTANCE_ADMIN_USER')
order by 1;
sys.dbms_registry.update_schema_list('APEX', l_schemas);
sys.dbms_registry.loaded('APEX',l_apex_version);
commit;
sys.validate_apex;
end;
/
4. Start SQL*Plus and connect to the database where Oracle APEX is installed as SYS
specifying the SYSDBA role:
On Windows:
C-31
Appendix C
Cleaning Up After a Failed Installation
SQL> @apxdwngrd.sql
6. Remove the Oracle APEX release schema. See Removing the Oracle APEX
Release Schema.
See Also:
Reverting the Images Directory
@@core/scripts/set_appun.sql
declare
l_cnt number := 0;
begin
select count(*) into l_cnt from sys.dba_users where username =
C-32
Appendix C
Cleaning Up After a Failed Installation
'^APPUN';
if l_cnt = 0 then
dbms_output.put_line('^APPUN not found in this database.');
raise program_error;
end if;
end;
/
whenever sqlerror continue
@@core/sys_core_views.sql
@@core/wwv_flow_val.sql
grant execute on sys.wwv_flow_val to ^APPUN.;
@@core/wwv_flow_val.plb
exec sys.dbms_session.modify_package_state(sys.dbms_session.reinitialize);
begin
^APPUN..wwv_flow_upgrade.remove_jobs();
^APPUN..wwv_flow_upgrade.create_jobs('^APPUN');
^APPUN..wwv_flow_upgrade.create_public_synonyms('^APPUN');
^APPUN..wwv_flow_upgrade.grant_public_synonyms('^APPUN');
^APPUN..wwv_flow_upgrade.flows_files_objects_remove('^APPUN');
^APPUN..wwv_flow_upgrade.flows_files_objects_create('^APPUN');
end;
/
exec sys.dbms_session.modify_package_state(sys.dbms_session.reinitialize);
declare
l_apex_version varchar2(30);
l_schemas sys.dbms_registry.schema_list_t;
begin
sys.dbms_registry.set_session_namespace (namespace => 'DBTOOLS');
C-33
Appendix C
Cleaning Up After a Failed Installation
5. Start SQL*Plus and connect to CDB$ROOT of the database where Oracle APEX is
installed as SYS specifying the SYSDBA role:
On Windows:
SYSTEM_DRIVE:\ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password
C-34
Appendix C
Cleaning Up After a Failed Installation
7. Remove the Oracle APEX release schema. See Removing the Oracle APEX Release
Schema.
See Also:
Reverting the Images Directory
$ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password
SQL> @apxdwngrd.sql
5. Remove the Oracle APEX release schema. See Removing the Oracle APEX Release
Schema.
C-35
Appendix C
Cleaning Up After a Failed Installation
sys.dbms_system.get_env('ORACLE_HOME',:xe_home);
if length(:xe_home) = 0 then
sys.dbms_output.put_line(lpad('-',80,'-'));
raise_application_error (-20001,'Oracle Home environment
variable not set' );
end if;
end;
/
whenever sqlerror continue
set termout off
select :xe_home from sys.dual;
set termout on
host ^OH_HOME/perl/bin/perl -I ^OH_HOME/rdbms/admin ^OH_HOME/rdbms/
admin/catcon.pl -b apx191dgrd apxdwngrd.sql
4. Start SQL*Plus and connect to the database where Oracle APEX is installed as
SYS specifying the SYSDBA role:
• On Windows:
$ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password
SQL> @apxdwngrd_cdb.sql
6. Remove the Oracle APEX release schema. See Removing the Oracle APEX
Release Schema.
C-36
Appendix C
Cleaning Up After a Failed Installation
$ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password
SQL> @apxdwngrd.sql
5. Remove the Oracle APEX release schema. See Removing the Oracle APEX Release
Schema.
4. Start SQL*Plus and connect to the database where Oracle APEX is installed as SYS
specifying the SYSDBA role:
• On Windows:
C-37
Appendix C
Cleaning Up After a Failed Installation
$ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password
SQL> @apxdwngrd_cdb.sql
6. Remove the Oracle APEX release schema. See Removing the Oracle APEX
Release Schema.
$ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password
SQL> @apxdwngrd.sql
5. Remove the Oracle APEX release schema. See Removing the Oracle APEX
Release Schema.
C-38
Appendix C
Cleaning Up After a Failed Installation
3. Create a script in the apex directory called apxdwngrd_cdb.sql with the following
contents:
4. Start SQL*Plus and connect to the database where Oracle APEX is installed as SYS
specifying the SYSDBA role:
• On Windows:
$ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password
SQL> @apxdwngrd_cdb.sql
6. Remove the Oracle APEX release schema. See Removing the Oracle APEX Release
Schema.
C-39
Appendix C
Cleaning Up After a Failed Installation
3. Start SQL*Plus and connect to the database where Oracle APEX is installed as
SYS specifying the SYSDBA role:
• On Windows:
$ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password
SQL> @apxdwngrd.sql
5. Remove the Oracle APEX release schema. See Removing the Oracle APEX
Release Schema.
C-40
Appendix C
Cleaning Up After a Failed Installation
4. Start SQL*Plus and connect to the database where Oracle APEX is installed as SYS
specifying the SYSDBA role:
• On Windows:
$ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password
SQL> @apxdwngrd_cdb.sql
6. Remove the Oracle APEX release schema. See Removing the Oracle APEX Release
Schema.
$ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password
SQL> @apxdwngrd.sql
5. Remove the Oracle APEX release schema. See Removing the Oracle APEX Release
Schema.
C-41
Appendix C
Cleaning Up After a Failed Installation
1. If you altered your images directory, revert it back to the release you want to revert
to.
2. Change your working directory to apex in the 21.1 source.
3. Create a script in the apex directory called apxdwngrd_cdb.sql with the following
contents:
4. Start SQL*Plus and connect to the database where Oracle APEX is installed as
SYS specifying the SYSDBA role:
• On Windows:
$ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password
SQL> @apxdwngrd_cdb.sql
6. Remove the Oracle APEX release schema. See Removing the Oracle APEX
Release Schema.
C-42
Appendix C
Cleaning Up After a Failed Installation
1. If you altered your images directory, revert it back to the release you want to revert to.
2. Change your working directory to apex in the 21.2 source.
3. Start SQL*Plus and connect to the database where Oracle APEX is installed as SYS
specifying the SYSDBA role:
• On Windows:
$ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password
SQL> @apxdwngrd.sql
5. Remove the Oracle APEX release schema. See Removing the Oracle APEX Release
Schema.
C-43
Appendix C
Cleaning Up After a Failed Installation
4. Start SQL*Plus and connect to the database where Oracle APEX is installed as
SYS specifying the SYSDBA role:
• On Windows:
$ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password
SQL> @apxdwngrd_cdb.sql
6. Remove the Oracle APEX release schema. See Removing the Oracle APEX
Release Schema.
1. Change your working directory to apex in the, XX.X release source (where XX.X is
the release number you reverted to).
2. Start SQL*Plus and connect to the database where Oracle APEX is installed as
SYS specifying the SYSDBA role:
• On Windows:
$ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password
C-44
Appendix C
Cleaning Up After a Failed Installation
$ sqlplus /nolog
SQL> SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password
Once you have removed the Oracle APEX 22.1 schema, you can now attempt the
upgrade again.
C.3.1.4.2 Removing the Oracle APEX Release 22.1 Schema from a CDB
Create text files, start SQL*Plus and connect to the database execute
@remove_apx221_usr.sql.
C-45
Appendix C
Cleaning Up After a Failed Installation
1. Create a new text file named remove_apx221_usr1.sql with the following contents:
2. Create a second new text file named remove_apx221_usr.sql with the following
contents:
set serverout on
begin
-- get oracle_home
sys.dbms_system.get_env('ORACLE_HOME',:xe_home);
if length(:xe_home) = 0 then
sys.dbms_output.put_line(lpad('-',80,'-'));
raise_application_error (
-20001,
'Oracle Home environment variable not set' );
end if;
end;
/
whenever sqlerror continue
3. Start SQL*Plus and connect to the database where APEX is installed as SYS
specifying the SYSDBA role:
• On Windows:
SYSTEM_DRIVE:\ sqlplus /nolog
SQL> SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password
Once you have removed the APEX 22.1 schema, you can now attempt the
upgrade again.
C-46
Appendix C
About Images Displaying Incorrectly in Oracle APEX
This section describes how to remove the Oracle APEX schema, synonyms, and users from
the database without deleting the database.
Note:
Do NOT follow these steps if you have upgraded your database from a prior
release, and still want to use the prior release of Oracle APEX. For information
about reverting to a prior release, see Reverting to a Previous Release. If you are
not sure whether you have completed a new installation or an upgrade installation,
review Cleaning Up After a Failed Installation to verify if a previous release of
Oracle APEX exists in the database.
4. After successfully removing Oracle APEX using apxremov.sql, you must exit your current
SQL*Plus session and reconnect before attempting another install using apexins.sql.
C-47
Appendix C
About Page Protection Violation
C-48
D
Upgrading Oracle APEX within Oracle
Database Express Edition
Learn how to upgrade Oracle APEX included with Oracle Database Express Edition (XE) .
Tip:
Upgrading Oracle APEX does not change the Oracle Support policy for Oracle
Database XE. Oracle Database XE is only supported on the Oracle OTN forums.
Oracle Support will not answer questions about Oracle APEX on Oracle Database
XE.
Tip:
To learn more about Oracle Database XE, see https://www.oracle.com/database/
technologies/appdev/xe.html
Tip:
Keep the directory tree where you unzip the files short and not under
directories that contain spaces. For example, within Windows unzip to C:\.
D-1
Appendix D
Upgrading to the Latest Oracle APEX Release
4. Start SQL*Plus and connect to the Oracle Database XE where Oracle APEX is
installed as SYS specifying the SYSDBA role. For example:
• On Windows:
SYSTEM_DRIVE:\ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password
Tip:
Keep the directory tree where you unzip the files short and not under
directories that contain spaces. For example, within Windows unzip
to C:\.
Where:
• tablespace_apex is the name of the tablespace for the Oracle APEX
application user.
• tablespace_files is the name of the tablespace for the Oracle APEX files
user.
• tablespace_temp is the name of the temporary tablespace or tablespace
group.
• images is the virtual directory for Oracle APEX images. To support future
Oracle APEX upgrades, define the virtual image directory as /i/.
Example
@apexins.sql SYSAUX SYSAUX TEMP /i/
6. Configure ORDS for HTTP(s) access. See Installing and Configuring Oracle APEX
and Oracle REST Data Services.
7. Upgrade the Oracle APEX password by running apxchpwd.sql:
@apxchpwd.sql
Where:
hostname is the name of the system where Oracle XML DB Protocol server is
installed.
D-2
Appendix D
Upgrading to the Latest Oracle APEX Release
port is the port number assigned to HTTP on the Oracle XML DB Protocol server. In
a default installation, this number is 8080. If you are using the Oracle Database 12c
or later multitenant architecture, then each pluggable database (PDB) will have a
distinct port number.
apex is the database access descriptor (DAD) defined in the configuration file.
b. On the Sign In page:
• Username - Enter admin.
• Password - Enter the Oracle APEX administrator account password you
specified in step 4.
• Click Sign In to Administration.
Note that, depending on your setup, you might be required to change your password
when you log in for the first time.
D-3
Index
A CDBs
patching Oracle APEX, 5-14
ACL uninstalling, 5-7
fixing invalid, 6-32 CDBs reinstalling Oracle APEX, 5-9
Administration Services common APEX from another CDB, 5-18
signing in, 6-25 configure
APEX HTTP access, 5-6
accessing in Oracle Cloud, 3-3 creating
architecture, 3-1 application PDB, application root seed, 5-5
getting started, 6-24 application seed, 5-4
XML DB requirement, 2-4
APEX_PUBLIC_USER account
about, 6-9
D
changing password, 6-10 database requirement
configuring, 6-9 Oracle APEX, 2-1
expiration in Oracle Database 11g, 6-10 development environment
unlocking, 6-9 changing to runtime, 6-34
apexins.sql disk space
running, 6-4 requirements, 2-4
application container
about, 5-2
applications E
upgrading, 4-4 environment, configuring, 3-5
apxchpwd.sql, 6-8, D-2
changing Instance Administrator account
password, 6-7 F
creating Instance Administrator account, 6-7
full development environment
running, 6-8
about, 6-33
unlockin Instance Administrator account, 6-7
converting to runtime, 6-34
updating Instance Administrator account, 6-7
installing in, 6-4
apxdevrm.sql, 6-35
apxdvins.sql, 6-34
apxrtins.sql G
running, 6-4
getting started
APEX, 6-24
B
browser I
requirement, 2-4
installation
downloading Oracle REST Data Services,
C 6-12
enabling network services, 6-15
CDB
installing in other languages, 6-21
application container, 5-3
managing JOB_QUEUE_PROCESSES, 6-19
Index-1
Index
installation (continued) N
Oracle APEX, 6-3
Oracle REST Data Services, 6-12 network services
overview, 3-5 enabling, 6-15
patch sets, 3-4 granting connect privileges, Oracle Database
performing security tasks, 6-18 12c, 6-17
planning, 3-4 invalid ACL error, 6-17
point releases, 3-4 non-CDB
process, 3-5 installing in, 6-4
requirements, 2-1, 3-4
restart processes, 6-9
signing in, 6-24
O
understanding, 3-3 Oracle APEX
verifying validity, C-1 about users, 6-24
installation option about workspaces, 6-24
full development environment, 6-5 Administration Services, 6-25
runtime environment, 6-5 browser requirement, 2-4
installing configuring, 6-1
failures, C-2 configuring your environment, 3-5
in application container, 5-3 creating users, 6-27
Oracle APEX, 6-3 creating workspace manually, 6-26
Oracle REST Data Services, 6-12 database requirement, 2-1
other languages, 6-21 disk space requirements, 2-4
Instance administrator account download and install in non-CDB, 6-4
about, 6-7 download and install locally, 6-4
creating, 6-6 downloading, 6-3
running apxchpwd.sql, 6-7 incompatible versions, 5-14
updating, 6-6 installing, 6-1, 6-3
Instance Administrator account installing translated versions, 6-22
changing password, 6-7 patching in CDBs, 5-14
creating, 6-7 patching in PDBs, 5-15, 5-16
creating password, 6-7 pre-installation tasks, 6-2
unlocking, 6-7 reinstalling in CDBs, 5-9
release number, 4-2
J releases included with Oracle Database, 4-3
signing in to workspace, 6-29
JOB_QUEUE_PROCESSES, 6-19 uninstalling in CDBs, 5-7
changing number of, 6-20 Oracle APEX Administration Services, 6-26
viewing from SQL*Plus, 6-20 Oracle APEX Application Development
viewing in installation log, 6-19 accessing APEX, 3-3
viewing number of, 6-19 Oracle APEX Clusters (Oracle RAC)
viewing on About page, 6-20 shutting down instances, 6-2
Oracle Autonomous Database
accessing Oracle APEX, 3-3
L Oracle Cloud
log file, C-1 accessing APEX, 3-3
login credentials Oracle Database
recovering workspace name, 3-8 Oracle APEX included, 4-3
Oracle REST Data Services
configuring, 6-1, 6-14
M configuring behind load balancer, 6-13
MEMORY_TARGET configuring behind reverse proxy, 6-13
checking, 2-2 configuring RESTful Services, 6-11
Multitenant Architecture, 5-1 Copying the Images Directory, 6-14
downloading, 6-12
Index-2
Index
Index-3
Index
W X
Web browser XML DB
requirements, 2-4 requirement, 2-4
Index-4