Install and configure Apex 4.1.1 embedded PL/SQL

This article presents how to install Apex 4.1.1

Download installation package from Oracle site and unzip.

Download apex_4.1.zip to directory /tmp and unzip it
http://www.oracle.com/technetwork/developer-tools/apex/downloads/index.html

After unzip new directory will be created /tmp/apex so go to this directory and loging to database as SYSDBA. Always use SYSDBA account for running all scripts.

cd /tmp/apex
sqlplus / as sysdba

Install full development option

@apexins tablespace_apex tablespace_files tablespace_temp images

tablespace_apex - name of the tablespace for APEX user.
tablespace_files - name of the tablespace for APEX files user.
tablespace_temp - name of the temporary tablespace.
images - virtual directory for APEX images. Define the virtual 
image directory as /i/ for future updates.

@apexins SYSAUX SYSAUX TEMP /i/
Change password for ADMIN account. When prompted enter a password for the ADMIN account.
@apxchpwd

Configure embedded PL/SQL Gateway and unlock ANONYMOUS account

@apex_epg_config /tmp
ALTER USER ANONYMOUS ACCOUNT UNLOCK;

Update images from previous releases

@apxldimg.sql /tmp

Verifying Oracle XML DB HTTP Server Port and set it to 8080

SELECT DBMS_XDB.GETHTTPPORT FROM DUAL;
EXEC DBMS_XDB.SETHTTPPORT(port);
EXEC DBMS_XDB.SETHTTPPORT(8080);

Enable Network Services in 11g

By default, the ability to interact with network services is disabled in Oracle Database 11g release 1 or 2. Therefore, if you are running Oracle Application Express with Oracle Database 11g release 1 or 2, you must use the new DBMS_NETWORK_ACL_ADMIN package to grant connect privileges to any host for the APEX_040100 database user.

DECLARE
  ACL_PATH  VARCHAR2(4000);
BEGIN
  -- Look for the ACL currently assigned to '*' and give APEX_040100
  -- the "connect" privilege if APEX_040100 
  -- does not have the privilege yet.

  SELECT ACL INTO ACL_PATH FROM DBA_NETWORK_ACLS
   WHERE HOST = '*' AND LOWER_PORT IS NULL AND UPPER_PORT IS NULL;

  IF DBMS_NETWORK_ACL_ADMIN.CHECK_PRIVILEGE(ACL_PATH, 'APEX_040100',
     'connect') IS NULL THEN
      DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE(ACL_PATH,
     'APEX_040100', TRUE, 'connect');
  END IF;

EXCEPTION
  -- When no ACL has been assigned to '*'.
  WHEN NO_DATA_FOUND THEN
  DBMS_NETWORK_ACL_ADMIN.CREATE_ACL('power_users.xml',
    'ACL that lets power users to connect to everywhere',
    'APEX_040100', TRUE, 'connect');
  DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL('power_users.xml','*');
END;
/
COMMIT;

Configure database parameters for APEX

JOB_QUEUE_PROCESSES must be set to at least 20

ALTER SYSTEM SET JOB_QUEUE_PROCESSES = <number>
ALTER SYSTEM SET JOB_QUEUE_PROCESSES = 20

The embedded PL/SQL gateway uses the shared server architecture of the Oracle database. For a small group of concurrent users, Oracle recommends a value of 5 for SHARED_SERVERS.

ALTER SYSTEM SET SHARED_SERVERS = 5 SCOPE=BOTH;

Verify APEX is working

Administration page

http://hostname:port/apex/apex_admin

Development page

http://hostname:port/apex

Leave a Reply

Your email address will not be published. Required fields are marked *