Installing APEX 3.2.1

I know Oracle APEX 3.2.1 has been out for a little while now, and Oracle APEX 4.0 is on the horizon, but following my recent installation of Oracle XE on Windows 7 and subsequent upgrade to APEX 3.2.1 I thought I’d provide the steps I took to upgrade to version 3.2.1.

The steps provided are for upgrading to APEX 3.2.1 from an earlier version on Oracle XE. However, I’ve also included notes for upgrading and if you are using the EPG on 11g or a HTTP server on10g. Hopefully this will come in handy to anyone starting out with APEX.

First you need a database. A version of APEX is installed with 11g, but this will need to be upgraded using the steps below. If you haven’t an Oracle 10g or 11g database that you can install APEX on, then you will need to install Oracle XE. This is a cut down Oracle database, it’s free but has some limitations. If you are unfamiliar with this database, then you should take a look at the details on the Oracle OTN site. Installation of this database is very simple, you just need to follow the instructions in the wizard.

Now that you have your database, download APEX 3.2.1 from the Oracle website. Create a new folder on your C drive called APEX3.2 and unzip the downloaded zip file here. This should create a folder called apex in your APEX3.2 directory. I’ve included this step as a lot of people have problems uploading the required images and JavaScript files, ensuring you have this folder and follow this step correctly should reduce the chance of problems later.

Run SQL*Plus from the command line, starting in the C:\APEX3.2\apex directory. To do this run the command line, change directory to C:\APEX3.2\apex then run sqlplus logging in as sys dba. Then follow the steps below:

1 – To install APEX the system tablespace must have at least 85MB free. To check the current free space in your tablespace you can run the following select statement:SELECT tablespace_name, sum(bytes)
FROM dba_free_space
GROUP BY tablespace_name;

If you don’t have 85MB free in the system tablespace, you will need to increase the tablespace size. First check the current size of your tablespace. To do this run the following:
SELECT tablespace_name, sum(bytes)
FROM dba_data_files
GROUP BY tablespace_name;

Now increase your tablespace size to have at least 85MB free. I tend to add 85MB to the current size and then round up to the nearest 50MB. Then select the file_name from dba_data_files for the system tablespace. Once you’ve decided on the new size, run the following replacing 100M with the size you want your tablespace to be:
ALTER DATABASE DATAFILE '<file name>' RESIZE 100M;
This will resize your system tablespace so that it has enough free space to install APEX.
2 – Although you can install APEX into an existing tablespace, I recommend creating a new tablespace. This will hold all the APEX objects and also any files uploaded to the database. To create a new tablespace called APEX run the following:
CREATE TABLESPACE APEX DATAFILE '<file name and path>'
SIZE 200M
EXTENT MANAGEMENT LOCAL
SEGMENT SPACE MANAGEMENT AUTO;

3 – Now that you have the required tablespaces, you can install APEX into your database. If you have a previous version of APEX already installed then this step will upgrade it to APEX 3.2.1. In SQL plus run the following:
@apexins APEX APEX TEMP /i/
This will take a little while to run, so now is a good time to get a coffee.
4 – Check the output from the installation to see if there have been any errors. I’ve installed different versions of APEX in different environments, and the only errors I have encountered were due to not enough tablespace and once when I forgot to log in as sys dba so didn’t have the correct permissions.
5 – Step 4 will have logged you out of SQL*Plus, so connect again as sys dba. If this is a new installation then you will need to set the admin password. You will also need to do this if you are installing APEX on a new Oracle XE database. To do this run @apxchpwd and you will be prompted to enter the password.
6 – If you are installing this on Oracle 11g then you will need to configure the EPG. To do this refer to the section in the installation guide.
7 – The final step is to upload the images required for this version. If you are installing this on Oracle 10g or are using a HTTP server with Oracle 11g then you will need to replace your existing /i/ directory with C:\APEX3.2\apex\images. The location of your /i/ directory will have been defined in your DAD file. If this is a new installation then you will need to refer to the Oracle Installation Guide for details on how to configure your HTTP server. If you are installing on Oracle XE or Oracle 11g using the EPG then you will need to run the following in SQL*Plus:
@apxldimg.sql C:\APEX3.2\

Following the steps above, you should now be able to log into APEX 3.2.1. You will need to log in using the workspace internal, username admin and the password you specified in step 5. From here you will need to create your own workspace, using the wizard. Happy developing!

Sara

Sara Blair is a freelance Oracle developer with over 10 years Oracle experience. She has been working with Oracle APEX for nearly 4 years since htmldb 1.5, and is available to hire through Silvercore Solutions.

6 Responses to “Installing APEX 3.2.1”

  • […] hat mich der Beitrag “Installing APEX 3.2.1” von Sara Blair im APEX-Blog. Er baut zwar auf die Dokumentation von ORACLE auf, geht aber […]

  • Mark says:

    Thanks, Sara! This was my 3rd attempt at installing Oracle XE and updating to Apex 3.2.1 — and, by following your instructions, I was finally successful. Amazing how much misinformation is available on this topic!

  • Coder says:

    Thanks a lot!!
    I used this blog to install Apex 4.0 on a fresh Oracle XE 10g installation. Worked like a charm!

  • lilacblu says:

    Thanks to this simple-to-follow instructions, I’ve installed the APEX 4.0.1 on 2nd attempt! That’s not bad for someone with zero knowledge to start with.

    Need to refer to the previous APEX installation tutorial for the path where the database files are to be stored.

    And also for the last step in putting back the image files, the command I used is : @apxldimg c:\ (My apex install files are unzipped into c:\apex folder)

  • This is a very handful Help!!

    I installed the 4.0.2 Apex Upgrade without any problems with your help!

    Really , really Thanks!!

    — I can do a favor? give your permision to make a translation of the post and publish in my blog. I cited your blog and the source (Course!!)

  • snipercat says:

    Thak you so much! :D.
    It was easy following these steps ;).

Comments can no longer be submitted.