Академический Документы
Профессиональный Документы
Культура Документы
1 | P a g e w w w . a p p s - s t u f f . c o m
This Document provides an overview of installing of Oracle Application Express on Different Oracle
Database (10g, 11g, XE) and How to Choosing an HTTP Server.
If you the first time using Oracle Application Express we must know that Oracle application Express
(ORACLE APEX) is the native Web application development framework for the Oracle Database.
Using only a web browser and limited programming experience.
Where oracle apex builds a web application there should be a web server between web browser and
Database to handle request between both of them so before running oracle apex we must have access
one of 3 options provided by oracle.
Before running Oracle Application Express you must have access one of the following:
To know the Oracle APEX Architecture and what happen when running APEX show the following
Figure:
In this case (use oracle HTTP Server) the web server sits between the web browser and the
Database and is responsible for handling the requests from the web browser, passing them
through to the database (via something called mod_plsql), then APEX processes the request and
generates the response (the HTML code to send back) which is passed by to the browser via the
mod_plsql module in the OHS. The version prior Oracle Database 11.1 required Oracle
Application Express Listener OR Oracle HTTP Server (Apache) with mod_plsql
2 | P a g e w w w . a p p s - s t u f f . c o m
The different between APEX Listener and OHS(Oracle HTTP Server) that OHS uses the mod_plsql plugin to communicate with the Oracle Application Express engine within the Oracle database. Oracle
Application Express Listener communicates directly with the Oracle Application Express engine, thus
eliminating the need for the mod_plsql plug-in . Oracle Application Express Listener
and the Oracle HTTP Server function as communication brokers between the Web server and the Oracle Application
Express objects in the Oracle database.
This three tier architecture consists of the following components:
Web browser
Oracle Application Express Listener or Oracle HTTP Server (Apache) with mod_plsql
Oracle database containing Oracle Application Express
The major advantage of Oracle Application Express Listener or Oracle HTTP Server (Apache) with mod_plsql
is the separation of the mid-tier and the database tier.
.
.PL/SQL
.
:
Oracle HTTP Server and mod_plsql
: , ,
.mod_plsql
Oracle Listener
.mod_plsql .
.
.
w w w . a p p s - s t u f f . c o m 3 | P a g e
Oracle XML DB HTTP Server with the embedded PL/SQL gateway installs with Oracle Database 11g. It
provides the Oracle database with a Web server and also the necessary infrastructure to create dynamic
applications. The embedded PL/SQL gateway runs in the Oracle XML DB HTTP server in the Oracle
database and includes the core features of mod_plsql.
As shown in the figure, the embedded PL/SQL gateway consists of simple two tier architecture: a Web
browser and an Oracle database containing the embedded PL/SQL gateway and Oracle Application
Express.
Advantages of the embedded PL/SQL gateway include:
Ease of configuration
Included in the database
No separate server installation
Embedded PL/SQL Gateway
Embedded PL/SQL
.
4 | P a g e w w w . a p p s - s t u f f . c o m
After we know the Oracle APEX Architecture the installation of Oracle APEX depends upon HTTP
server you decided to use .there 3 scenarios to install Oracle APEX
Scenario 1: Downloading from OTN and Configuring the Oracle Application Express Listener
Scenario 2: Downloading from OTN and Configuring the Embedded PL/SQL Gateway
1-Install oracle APEX and configuring the oracle Application Express Listener
Download and installation Oracle APEX
1. Download apex_4.1_EN zip file from oracle apex download page..see below link
http://www.oracle.com/technetwork/developer-tools/apex/downloads/index.html
5 | P a g e w w w . a p p s - s t u f f . c o m
4. I prefer to create new Tablespace for APEX installation for holding APEX objects and any files
uploaded to the database .To create new table space called APEX run the following :
CREATE TABLESPACE APEX datafile path/APEX.dbf
SIZE 300M
EXTENT MANAGEMENT LOCAL
SEGMENT SPACE MANAGEMENT AUTO;
tablespace_apex: name of the tablespace for the Oracle Application Express application user.
tablespace_files: name of the tablespace for the Oracle Application Express application files user.
tablespace_temp: name of the temporary tablespace.
Images: image directory for oracle Application Express and define as /i/
Example: You must in the APEX Directory to run this command
@apexins APEX APEX TEMP /i/ (if you create new Tablesapce)
OR
@apexins SYSAUX SYSAUX TEMP /i/ (if you dont create Tablesapce)
Full development environment :provide complete access to the application builder environment
to develop application RUN @apexins
Runtime environment :enable user to run application without modified it RUN @apxrtins
6 | P a g e w w w . a p p s - s t u f f . c o m
When Oracle Application Express installs, it creates three new database accounts
APEX_040100 - The account that owns the Oracle Application Express schema and metadata.
APEX_PUBLIC_USER - The minimally privileged account is used for Oracle Application Express
configuration with Oracle Application Express Listener or Oracle HTTP Server and mod_plsql.
FLOWS_FILES - The account that owns the Oracle Application Express uploaded files.
6. Change the password of Admin account of Oracle Application Express follow this steps
Change your working directory to the apex directory where you unzipped the installation software
Connect to database as sys where oracle APEX is installed and Run apxchpwd.sql
7. Unlocking the APEX_PUBLIC_USER Account where this account locked at the end of new
installation of oracle apex so we must unlock this account before configuring the database access
descriptor (DAD).
Connect as sys and run the following script
ALTER USER APEX_PUBLIC_USER ACCOUNT UNLOCK
8 | P a g e w w w . a p p s - s t u f f . c o m
Oracle Apex Listener can be used in combination with any of 3 following webserver or
Can be used in standalone mode:
Oracle WebLogic Server
Oracle Glassfish Server.
Oracle Containers for J2EE (OC4J).
In this Document Iwill discuss install and run Oracle APEX Listener in Standalone mode
10. After Unzip the Listener folder run the following command after get into
<JDK_HOME\bin> ( Oracle Application Express Listener Required Java 6 Update 20 JDK or higher):
java jar <temp directory>\apex.war
temp directory : is the directory location of the unzipped Oracle Application Express Listener.
When prompted, enter path of the location of the APEX folder which containing the static resources used
by Oracle Application Express (ex: C:\APEX\images)
When prompted, choose a user name and password for the Oracle Application Express Listener
Administrator and Manager roles.
9 | P a g e w w w . a p p s - s t u f f . c o m
=================================================================================
VIP Note: there are folder in unzip APEX folder called images this file contain all apex required resources (css,
image..etc) And must be specify the path of this file when start Oracle Application Express Listener
=================================================================================
10 | P a g e w w w . a p p s - s t u f f . c o m
http://<host>:<port>/apex/listenerConfigure, http://<host>:<port>/apex/listenerAdmin
Oracle Application Express Listener Status : http://<host>:<port>/apex/listenerStatus
Apex connection
Access Apex Admin Console: : http://<host>:<port>/apex/apex_admin
11 | P a g e w w w . a p p s - s t u f f . c o m
2-Install oracle APEX and configuring the Embedded PL/SQL Gateway (EPG)
The Embedded PL/SQL Gateway install with the Database11g but must be Configure it before use it with
Oracle Application Express.
1- Download and Install Oracle Apex ( see steps 1-7 in APEX Installation)
2- Running the apex_epg_config.sql Configuration Script to configure embedded PL/SQL ( script
Change your working directory to the apex directory where you unzipped the Oracle Application
Express software.
Start SQL plus and connect as sys user and Run the apex_epg_config.sql passing the path
where oracle APEX Software Unzipped :@apex_epg_config c:\apex
5- Verifying the Oracle XML DB HTTP SERVER PORT where EPG runs in this server by default
this server disabled and must be enabled
To check the status to Oracle XML DB HTTP Server runs the command
SELECT DBMS_XDB.GETHTTPPORT FROM DUAL;
12 | P a g e w w w . a p p s - s t u f f . c o m
If the port number return 0, the Oracle XML DB HTTP Server is disabled and Enabled by run
following command:
EXEC DBMS_XDB.SETHTTPPORT(port)
For example:
EXEC DBMS_XDB.SETHTTPPORT(8080)
Now you can access the APEX page as
http://<db server name>:8080/apex
6- The embedded PL/SQL Gateway uses shared server architecture, So ensure not 0 or 1
SELECT NAME, VALUE FROM v$parameter WHERE NAME='shared_servers'
If return 0 or 1 run this:
ALTER SYSTEM SET SHARED_SERVERS=5 SCOPE BOTH;
Note: be aware EPG on 10g is not supported by Oracle. And not recommend install EPG with
10G.
13 | P a g e w w w . a p p s - s t u f f . c o m
2- Download Oracle HTTP Server and install it. the following product include appropriate versions
of HTTP Server and mod_plsql:
Oracle Database 10g Companion CD release 2 or Oracle Application Server 10g
Oracle Database 11g release 1 or 2
14 | P a g e w w w . a p p s - s t u f f . c o m
w w w . a p p s - s t u f f . c o m 15 | P a g e
3- Copy the image file from APEX folder to the location on the file system containing the Oracle
home for Oracle HTTP Server.
Oracle Application Server 10g Copy images folder to Apache folder
Oracle HTTP Server in 11g Copy images folder to ohs folder
4- Editing the dads.conf file the dads.conf file contains the information about the DAD(database
access descriptor) to access Oracle Application Express
Go to dads.conf file and open it with text editor you find it in
The content of this file can you copy from below and paste in your dads.conf file after
you change it according your parameters
Replace ORACLE_HTTPSERVER_HOME, host: port: service_name and
apex_public_user_password
16 | P a g e w w w . a p p s - s t u f f . c o m
Note: to know what web Server are running in you instance (EPG,APEX Listener or HTTP)
Just go into APEX SQL Workshop -> SQL Commands and enter and execute this:
select owa_util.get_cgi_env('SERVER_SOFTWARE') from dual
17 | P a g e w w w . a p p s - s t u f f . c o m
Now you want to access oracle APEX must choose whether to use Oracle HTTP server or the embedded
light weight PL/SQL gateway to run Apex .it is easier to use embedded PL/SQL gateway.
2-
3-
18 | P a g e w w w . a p p s - s t u f f . c o m
4-
Note: you can use Oracle HTTP server with mod_plsql in Oracle Database 11g but is easy to use
embedded PL/SQL gateway where it run using Oracle XML DB HTTP server which is already in Oracle
database, so there is no need to install a separate HTTP server.
19 | P a g e w w w . a p p s - s t u f f . c o m
Reference:
20 | P a g e w w w . a p p s - s t u f f . c o m