Sunday, 11 May 2014

Installing APEX 4.2 to run on Oracle XE



Oracle 11gXE database currently comes with an older version of Application Express  This blog is aimed at giving you a step by step approach to upgrading to APEX 4.2

First of all download the software
Step 1
here

Step 2
Download APEX 4.2 from
Next install the database
Step 3
Install Oracle XE by double clicking on the OracleXE.exe file  
– specify the destination folder such as  c:\oraclexe
– specify the database password – this will be used for both the SYS AND SYSTEM users

Step 4
Make a note of the port numbers allocated as part of the installation eg
Port for the HTTP listener = 8080
Port for the database listener = 1521

Step 5
Once XE is installed rename/empty the existing apex  folder at c:\oraclexe\app\oracle\product\11.2.0\server\apex (this holds an older version of APEX and unzip the APEX 4.2 file into the following folder c:\oraclexe\apex

Next upgrade to APEX 4.2
The following steps assume you have the following directory structures:
c:\oraclexe\apex (this is the unzipped Version 4.2 file)
c:\oraclexe\app (this is created by the Oracle XE installation) 

Step 6
Open DOS window and change the default directory to the directory of the unzipped APEX file.
e.g.
CMD> cd c:\oraclexe\apex

Step 7 – Now upgrade to Version 4.2 - replace the word password  below with the password you created in Step 3 above
CMD> sqlplus system/password as sysdba
SQL> @apexins SYSAUX SYSAUX TEMP /i/
NB if you have problems accessing sqlplus you may need to set the environment variables in the DOS session eg:
set ORACLE_HOME = c:\oraclexe\app\oracle\product\11.2.0\server
set ORACLE_SID = XE

Once this step has completed you will automatically be logged out of SQLPlus.

Step 8 - Set the images directory - replace the word password  below with the password you created in Step 3 above
CMD> sqlplus system/password as sysdba
SQL> @apxldimg.sql c:\oraclexe

Step 9 - Set the Admin password - replace the word password  below with your own value – this will be used to log into the internal workspace
SQL> @apxxepwd.sql password

Step 10 - Enable remote http connections - set l_access to TRUE to restrict the EPG to listen on the localhost only or set it to FALSE to listen on both localhost and non-localhost interfaces.
SQL> exec dbms_xdb.setListenerLocalAccess (l_access => FALSE);

Your upgrade should now be complete.
To test it open up a browser and type the following URL:
 http://localhost:8080/apex

This should take you to the Oracle Application Express login page

Enter the following values replacing password with the one you created at Step 9 above
Workspace: Internal
Username: Admin
Password: password