Apex Installation(v4.0)

1.Oracle Application Express Installation Requirements

1.1 Oracle Database Requirement

Oracle Application Express version 4.0 requires an Oracle database (Enterprise Edition, Standard Edition or Standard Edition One) that is release 10.2.0.3 or higher. Application Express 4.0 can also be used with Oracle Database 10g Express.

1.1.1 Checking the shared_pool_size of the Target Database

Note:Ignore this requirement if your configuration uses non-null values for the database initialization parameters SGA_TARGET (in Oracle Database 10g and 11g) or MEMORY_TARGET (in Oracle Database 11g).

Oracle Application Express requires the shared_pool_size of the target database to be at least 100 MB.

To check the shared_pool_size of the target database:

1. Start the database:

SQL> STARTUP

2. 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;

If in the output the value of spfile is not empty,this means that database is started by spfile. If value is empty-database is started by pfile.

3.  Determine the current values of the shared_pool_size parameter:

SQL> SHOW PARAMETER SHARED_POOL_SIZE

4.   If the system is using a server parameter file, set the value of the SHARED_POOL_SIZE initialization parameter to at least 100 MB:

SQL> ALTER SYSTEM SET SHARED_POOL_SIZE='100M' SCOPE=spfile;

5.  Shut down the database:

SQL> SHUTDOWN

6.  Restart the database:

SQL> STARTUP

1.2 Browser Requirements

To view or develop Oracle Application Express applications, Web browsers must support Java Script and the HTML 4.0 and CSS 1.0 standards. The following browsers are required to develop applications in Oracle Application Express:

  • Microsoft Internet Explorer 7.0 or later version
  • Mozilla Firefox 3.5 or later version
  • Google Chrome 4.0 or later version
  • Apple Safari 4.0 or later version

Application Express applications can be developed that support earlier Web browser versions, including Microsoft Explorer 6.0.

1.3 Disk Space Requirement

Oracle Application Express disk space requirements are as follows:

  • Free space for Oracle Application Express software files on the file system: 450 MB if using English only download (apex_4_0_en.zip) and 1 GB if using full download (apex_4_0.zip).
  • Free space in Oracle Application Express tablespace: 185 MB
  • Free space in SYSTEM tablespace: 100 MB
  • Free space in Oracle Application Express tablespace for each additional language (other than English) installed: 75 MB

1.4 Oracle XML DB Requirement

Oracle XML DB must be installed in the Oracle database that you want to use. If you are using a preconfigured database created either during an installation or by Database Configuration Assistant (DBCA), Oracle XML DB is already installed and configured.

See Also: Oracle XML DB Developer’s Guide for more information about manually adding Oracle XML DB to an existing database

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 Oracle Application Express workspace to work properly, the ANONYMOUS user must not be dropped from the database.

1.5 PL/SQL Web Toolkit

Oracle Application Express requires the PL/SQL Web Toolkit version 10.1.2.0.6 or later. For instructions on determining the current version of the PL/SQL Web Toolkit, and for instructions on installing version 10.1.2.0.6, please review the README.txt file contained in the directory apex/owa.

2. install Oracle Application Express

2.1 Recommended Pre-installation Tasks

Before installing Oracle Application Express, Oracle recommends that you complete the following steps:

1.      Shut down with normal or immediate priority the Oracle Database instances where you plan to install Oracle Application Express. On Oracle Real Application Clusters (Oracle RAC) systems, shut down all instances on each node.

  1. Back up the Oracle Database installation. Oracle recommends that you create a backup of the current Oracle Database installation before you install Oracle Application Express. You can use Oracle Database Recovery Manager, which is included the Oracle Database installation, to perform the backup.
  2. Start the Oracle Database instance that contains the target database. After backing up the system, you must start the Oracle instance that contains the target Oracle database. Do not start other processes such as the listener or Oracle HTTP Server. However, if you are performing a remote installation, make sure the database listener for the remote database has started.

2.2 Download and Install Oracle Application Express

To install Oracle Application Express:

1.For installations where the development will be in English only, download the file apex_4.0_en.zip from the Oracle Application Express download page. Where the development will include languages other than English, download apex_4.0.zip from the Oracle Application Express download page. See:

http://www.oracle.com/technology/products/database/application_express/download.html

Note that the actual file name may differ if a more recent release has shipped since this document was published.

2.Unzip downloaded zip file:

  • UNIX and Linux: Unzip apex_4.0.zip
  • Windows: Double click the file apex_4.0.zip in Windows Explorer

3.Change your working directory to apex.

4.Start SQL*Plus and connect to the database where Oracle Application Express 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

On UNIX and Linux:

$ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

And run the command:

SQL>@apexins SYSAUX SYSAUX TEMP /i/
Note:
Arguments:
Position 1: Name of tablespace for Application Express application user(in this case  SYSAUX)
Position 2: Name of tablespace for Application Express files user (in this case SYSAUX)
Position 3: Name of temporary tablespace (in this case TEMP)
Position 4: Virtual directory for APEX images   (in this case /i/)

When Oracle Application Express installs it creates three new database accounts:

  • APEX_040000 – The account that owns the Oracle Application Express schema and metadata.
  • FLOWS_FILES – The account that owns the Oracle Application Express uploaded files.
  • APEX_PUBLIC_USER – The minimally privileged account used for Oracle Application Express configuration with Oracle HTTP Server and mod_plsql or Oracle Application Express Listener.

2.3 Change the Password for the ADMIN Account

To change the password for the ADMIN account:

  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 Application Express 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

On UNIX and Linux:

$ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

3.Run apxchpwd.sql. For example:

SQL>@apxchpwd

When prompted enter a password for the ADMIN account.

2.4 Restart Processes

After you install Oracle Application Express, you must restart the processes that you stopped before you began the installation, such as listener and other processes.

2.5 Configure the Embedded PL/SQL Gateway

2.5 .1 Running the apex_epg_config.sql Configuration Script
The embedded PL/SQL gateway installs with the Oracle Database 11g. However, you must configure it before you can use it with Oracle Application Express. To accomplish this, you run a configuration file and unlock the ANONYMOUS account.

To run the apex_epg_config.sql configuration script:

1.Change your working directory to the apex directory where you unzipped the Oracle Application Express software.

2.Start SQL*Plus and connect to the database where Oracle Application Express 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

On UNIX and Linux:

$ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

3.Run apex_epg_config.sql passing the file system path to the base directory where the Oracle Application Express software was unzipped as shown in the following example:

On Windows:

SQL> @apex_epg_config SYSTEM_DRIVE:\directory_name
Note:
I’ve windows 7 and I’ve unzipped it to the D:\install directory, so I should write the following:
SQL> @apex_epg_config  D:\install
P.S Just for clarification. My file hierarchy is the following:  D:\install\apex\images\
from here you can guess what should be indicated as a parameter for “apex_epg_config” script.

On UNIX and Linux:

SQL> @apex_epg_config  /directory_name
  1. Enter the following statement to unlock the ANONYMOUS account:
SQL> ALTER USER ANONYMOUS ACCOUNT UNLOCK;

2.5.2 Updating the Images Directory When Upgrading from a Previous Release

If you are upgrading Oracle Application Express from a previous release, you must run the apxldimg.sql script to update the images directory.

Tip:
If you are not upgrading from a prior release of Oracle Application Express, this step is unnecessary. The images will be loaded by runningapex_epg_config.sql as described in the prior section.

To run the apxldimg.sql script:

1.Start SQL*Plus and connect to the database where Oracle Application Express is installed as SYS specifying the SYSDBA role:
On Windows:

SYSTEM_DRIVE:\ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

On UNIX and Linux:

$ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

2.Run apxldimg.sql passing the file system path to the base directory where the Oracle Application Express software was unzipped as shown in the following example:

On Windows:

@apxldimg.sql SYSTEM_DRIVE:\directory_name

On UNIX and Linux:

@apxldimg.sql /directory_name
Tip:
The above examples assume that you unzipped Oracle Application Express in a SYSTEM_DRIVE:\directory_name on Windows and /directory_name on UNIX or Linux.

2.5 .3 Verifying the Oracle XML DB HTTP Server Port

The embedded PL/SQL gateway runs in the Oracle XML DB HTTP server in the Oracle database. You can determine if the Oracle XML DB HTTP server is enabled by verifying the associated port number.

To verify the port number where the Oracle XML DB HTTP Server is running:

1.Start SQL*Plus and connect to the database where Oracle Application Express is installed as SYS specifying the SYSDBA role:

On Windows:

SYSTEM_DRIVE:\ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

On UNIX and Linux:

$ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

2.Enter the following statement to verify the port number:

SELECT DBMS_XDB.GETHTTPPORT FROM DUAL;

If the port number returns 0, the Oracle XML DB HTTP Server is disabled.

3.To enable it, follow the instructions in 2.5 .3 Enabling Oracle XML DB HTTP Server.

2.5 .4  Enabling Oracle XML DB HTTP Server

The embedded PL/SQL gateway runs in the Oracle XML DB HTTP server in the Oracle database.

To enable Oracle XML DB HTTP server:

1.Start SQL*Plus and connect to the database where Oracle Application Express 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

On UNIX and Linux:

$ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

2.Enter a statement similar to the following:

EXEC DBMS_XDB.SETHTTPPORT(port);

For example:

EXEC DBMS_XDB.SETHTTPPORT(8080);

2.7 About Managing JOB_QUEUE_PROCESSES

JOB_QUEUE_PROCESSES determine the maximum number of concurrently running jobs. In Oracle Application Express release 4.0, transactional support and SQL scripts require jobs.

If  JOB_QUEUE_PROCESSES is not enabled and working properly, you cannot successfully execute a script.

2.7.1 Viewing JOB_QUEUE_PROCESSES from SQL*Plus

SELECT VALUE FROM v$parameter WHERE NAME = 'job_queue_processes'
Note:(I have 1000)

2.7.2 Changing the Number of JOB_QUEUE_PROCESSES

You can change the number of JOB_QUEUE_PROCESSES by running a SQL statement in SQL*Plus:

To update the number of JOB_QUEUE_PROCESSES:

1.Start SQL*Plus and connect to the database where Oracle Application Express is installed as SYS specifying the SYSDBA role:

On Windows:

SYSTEM_DRIVE:\ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

On UNIX and Linux:

$ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

2.In SQL*Plus run the following SQL statement:

ALTER SYSTEM SET JOB_QUEUE_PROCESSES = <number>

For example, running the statement ALTER SYSTEM SET JOB_QUEUE_PROCESSES = 20 sets JOB_QUEUE_PROCESSES to 20.

2.8 Configuring the SHARED_SERVERS Parameter

The embedded PL/SQL gateway uses the shared server architecture of the Oracle Database. To achieve acceptable performance when using the embedded PL/SQL gateway, ensure the SHARED_SERVERS database initialization parameter is set to a reasonable value (that is, not 0 or 1). For a small group of concurrent users, Oracle recommends a value of 5 for SHARED_SERVERS.

Consider the following example:

  1. Start SQL*Plus and connect to the database where Oracle Application Express 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

On UNIX and Linux:

$ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password
  1. Run the following statement:
ALTER SYSTEM SET SHARED_SERVERS = 5 SCOPE=BOTH;
Note: If database is not started by spfile shutdown and start it by spfile.

2.9 Unlock APEX_PUBLIC_USER user and change its password.

1.Connect as SYS user:

On Windows:

SYSTEM_DRIVE:\ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

On UNIX and Linux:

$ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
Enter password: SYS_password

2.Run the following command:

alter user APEX_PUBLIC_USER account unlock identified by new_password;

Go to the link to check if it works

http://hostname:port/apex/apex_admin

Advertisement

About Mariami Kupatadze
Oracle Certified Master Linkedin: https://www.linkedin.com/in/mariami-kupatadze-01074722/

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: