Beruflich Dokumente
Kultur Dokumente
http://www.snapdba.com/2013/04/installing-apex-4-2-and-configuring-...
(http://www.snapdba.com)
(http://twitter.com
(https://google.com
(http://uk.linkedin.com
(mailto:garth@snapdba.com
(http://www.snapdba.co
/SnapDBA)
/+GarthHarbach)
/in/gharbach)
A standard Oracle 11.2.0.3 database installation comes bundled with Application Express (APEX) 3.2.1 by
default. Im going to upgrade to the latest version of APEX (currently 4.2.2) and then configure the Embedded
PL/SQL Gateway (EPG), which uses the Oracle XML DB HTTP components within the database itself, so I
dont need to run a separate HTTP server.
First off, download apex_4.2.2_en.zip (http://download.oracle.com/otn/java/appexpress
/apex_4.2.2_en.zip) from the following location and copy the zip file to your database server:
http://www.oracle.com/technetwork/developer-tools/apex/downloads/index.html (http://www.oracle.com
/technetwork/developer-tools/apex/downloads/index.html)
Disable HTTP access and backup the existing binaries
Connect as SYS and disable the Oracle XML DB HTTP server by temporarily setting the HTTP port to zero (if
its already zero, then its not enabled):
sqlplus / as sysdba
SELECT dbms_xdb.gethttpport FROM dual;
EXEC dbms_xdb.sethttpport(0);
Unzip the APEX 4.2.2 software and change directories ready for the install:
unzip /u01/app/oracle/software/apex_4.2.2_en.zip -d $ORACLE_HOME
cd $ORACLE_HOME/apex
1 of 11
1/22/2015 10:29 AM
http://www.snapdba.com/2013/04/installing-apex-4-2-and-configuring-...
VERSION
STATUS
3.2.1.00.12
VALID
NOTE: The password must contain at least one punctuation character: (!#$%&()*+,-/:;?_).
Check the registry again:
COL comp_name FOR A30
SELECT comp_name, version, status FROM dba_registry WHERE comp_id='APEX';
COMP_NAME
VERSION
STATUS
4.2.2.00.11
VALID
Update the APEX images with those from the new release:
@apxldimg.sql /u01/app/oracle/product/11.2.0.3
NOTE: This step isnt necessary if you ran the apex_epg_config.sql script above, as it will have already done
this for you. If you didnt run the EPG script above, because youve upgraded from an install where EPG was
already configured, then you do need to run this.
Make sure that the following accounts are unlocked:
ALTER USER anonymous ACCOUNT UNLOCK;
ALTER USER xdb ACCOUNT UNLOCK;
ALTER USER apex_public_user ACCOUNT UNLOCK;
ALTER USER flows_files ACCOUNT UNLOCK;
For a small group of concurrent users, Oracle recommends a value of 5 for SHARED_SERVERS:
SHOW PARAMETER shared_servers
ALTER system SET shared_servers=5 scope=both;
2 of 11
1/22/2015 10:29 AM
http://www.snapdba.com/2013/04/installing-apex-4-2-and-configuring-...
If l_access is set to TRUE, setListenerLocalAccess allows access to the XML DB HTTP server on the
localhost only.
If l_access is set to FALSE, setListenerLocalAccess allows access to the XML DB HTTP server on both the
localhost and non-localhost interfaces i.e. remote connections.
By default, the ability to interact with network services is disabled in Oracle Database 11g. Therefore, you
must use the DBMS_NETWORK_ACL_ADMIN package to grant connect privileges to any host for the
APEX_040200 database user:
DECLARE
ACL_PATH VARCHAR2(4000);
BEGIN
-- Look for the ACL currently assigned to '*' and give APEX_040200
-- the "connect" privilege if APEX_040200
-- 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_040200',
'connect') IS NULL THEN
DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE(ACL_PATH,
'APEX_040200', 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_040200', TRUE, 'connect');
DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL('power_users.xml','*');
END;
/
COMMIT;
3 of 11
1/22/2015 10:29 AM
http://www.snapdba.com/2013/04/installing-apex-4-2-and-configuring-...
References:
Oracle Application Express Installation Guide Release 4.2 (http://docs.oracle.com/cd/E37097_01
/doc/install.42/e35123/otn_install.htm#CBHBCBBJ)
Like
Tweet
4 of 11
1/22/2015 10:29 AM
http://www.snapdba.com/2013/04/installing-apex-4-2-and-configuring-...
/configuring-the-apex-listener-2-0-1-on-weblogic-12c/)
hangs-at-security-warning-with-the-applications-digitalsignature-cannot-be-verified/)
Nice document. Can I have your email address. I want your help if I ran into any issues with apex installation
and in learning
Reply (/2013/04/installing-apex-4-2-and-configuring-embedded-plsql-gateway-epg/?replytocom=19#respond
(/2013/04/installing-apex-4-2-and-configuring-embedded-plsql-gateway-epg/?replytocom=19#respond)
/2013/04/installing-apex-4-2-and-configuring-embedded-plsql-gateway-epg/?replytocom=19#respond)
Garth says:
May 8, 2013 at 1:42 pm (http://www.snapdba.com/2013/04/installing-apex-4-2-and-configuringembedded-plsql-gateway-epg/#comment-20)
Thanks Kal. You can contact me via email using the social icons at the top of my site
Reply (/2013/04/installing-apex-4-2-and-configuring-embedded-plsql-gateway(/2013/04/installing-apex-4-2-and-configuring-embedded-plsql-gatewayepg/?replytocom=20#respond)
epg/?replytocom=20#respond)
This is one of the best installation tips I ever read. And I tried it more then twice with oracle and other tips on
different server systems. There is no missing, all statements are fully functionable and the XDB part is a
mistery for me always.
Therefore: thanks a lot, perfect job
Berrnd
Reply (/2013/04/installing-apex-4-2-and-configuring-embedded-plsql-gateway-epg/?replytocom=22#respond
(/2013/04/installing-apex-4-2-and-configuring-embedded-plsql-gateway-epg/?replytocom=22#respond)
/2013/04/installing-apex-4-2-and-configuring-embedded-plsql-gateway-epg/?replytocom=22#respond)
Garth says:
May 19, 2013 at 10:52 pm (http://www.snapdba.com/2013/04/installing-apex-4-2-and-configuringembedded-plsql-gateway-epg/#comment-23)
5 of 11
1/22/2015 10:29 AM
6 of 11
http://www.snapdba.com/2013/04/installing-apex-4-2-and-configuring-...
Pat says:
May 28, 2013 at 6:59 pm (http://www.snapdba.com/2013/04/installing-apex-4-2-and-configuringembedded-plsql-gateway-epg/#comment-24)
Garth says:
May 29, 2013 at 11:31 am (http://www.snapdba.com/2013/04/installing-apex-4-2and-configuring-embedded-plsql-gateway-epg/#comment-25)
Thanks for the feedback Pat. You can use 8080 yes, I just chose 8082 in this example as I
already had services running on port 8080.
If youre still having problem with the APEX admin screen, I would take a look at this Oracle
documentation first (http://docs.oracle.com/cd/E37097_01/doc/install.42/e35123
/trouble.htm) to begin with just to make sure the installation was successful, and images
loaded correctly.
Cheers,
Garth
Reply (/2013/04/installing-apex-4-2-and-configuring-embedded-plsql-gateway(/2013/04/installing-apex-4-2-and-configuring-embedded-plsql-gatewayepg/?replytocom=25#respond)
epg/?replytocom=25#respond)
Nice and clear installation instructions. Can you please add instructions on how to install Apex Listener 2.0.1
on standalone and on Glassfish?
Thanks
Reply (/2013/04/installing-apex-4-2-and-configuring-embedded-plsql-gateway-epg/?replytocom=26#respond
(/2013/04/installing-apex-4-2-and-configuring-embedded-plsql-gateway-epg/?replytocom=26#respond)
/2013/04/installing-apex-4-2-and-configuring-embedded-plsql-gateway-epg/?replytocom=26#respond)
1/22/2015 10:29 AM
7 of 11
http://www.snapdba.com/2013/04/installing-apex-4-2-and-configuring-...
Felipe says:
July 29, 2013 at 5:24 pm (http://www.snapdba.com/2013/04/installing-apex-4-2-and-configuring-embeddedplsql-gateway-epg/#comment-27)
Hi Garth,
Ive installed as per instructions but I can only get page with Internet Explorer cannot display the webpage
is there anything I might be missing ? Could be anything related to secuty/firewall ? Ive basically used HTTP
port 48112 which is the one setup when I list the listener services (lsnrctl services) Ive also tried just the
default 8080 but no lucky as well btw, I installed APEX on the db server and Im trying to access remotely
from my machine.
Any thoughts ?
Thanks in advance for your help !
Regards,
-Felipe
Reply (/2013/04/installing-apex-4-2-and-configuring-embedded-plsql-gateway-epg/?replytocom=27#respond
(/2013/04/installing-apex-4-2-and-configuring-embedded-plsql-gateway-epg/?replytocom=27#respond)
/2013/04/installing-apex-4-2-and-configuring-embedded-plsql-gateway-epg/?replytocom=27#respond)
Garth says:
July 31, 2013 at 3:51 pm (http://www.snapdba.com/2013/04/installing-apex-4-2-and-configuringembedded-plsql-gateway-epg/#comment-29)
Hi Felipe,
First off, I would make sure that port 48112 is accessible via your firewall(s)make sure iptables in Linux
isnt blocking the port, and that your remote server is indeed listening on that port: netstat
-na|grep LISTEN|grep 48112
Presumably running SELECT dbms_xdb.gethttpport FROM dual; returns port 48112?
Make sure the ACL settings have been configured, as per the Enable network services (ACL) and XML
DB HTTP server section above. Also check that the XDB, ANONYMOUS, APEX_PUBLIC_USER
accounts are unlocked as this has caused me problems in the past.
If youre still having no joy, check that the APEX component is indeed valid:
VERSION
STATUS
4.2.2.00.11
VALID
Felipe says:
August 5, 2013 at 3:24 pm (http://www.snapdba.com/2013/04/installing-apex-4-2and-configuring-embedded-plsql-gateway-epg/#comment-30)
Thanks Garth.
I had checked all that and everything seems fine/correct. I had installed it once before as well
I also had an Oracle SR opened to help me with that and we were not having any luck
Buuuut, maybe luckily, the sever/db were rebooted over this past wkd for maintenance and now
its working
Thanks again for your help !
Regards,
1/22/2015 10:29 AM
8 of 11
http://www.snapdba.com/2013/04/installing-apex-4-2-and-configuring-...
-Felipe
Reply (/2013/04/installing-apex-4-2-and-configuring-embedded-plsql-gateway( /2013/04/installing-apex-4-2-and-configuring-embedded-plsql-gatewayepg/?replytocom=30#respond)
epg/?replytocom=30#respond)
Farid says:
July 31, 2013 at 12:46 pm (http://www.snapdba.com/2013/04/installing-apex-4-2-and-configuring-embeddedplsql-gateway-epg/#comment-28)
Thank you for your post. Very fast tutorial on setuping the Oracle Apex. A good article to avoid complex oracle
documentations.
Reply (/2013/04/installing-apex-4-2-and-configuring-embedded-plsql-gateway-epg/?replytocom=28#respond
(/2013/04/installing-apex-4-2-and-configuring-embedded-plsql-gateway-epg/?replytocom=28#respond)
/2013/04/installing-apex-4-2-and-configuring-embedded-plsql-gateway-epg/?replytocom=28#respond)
F Angaine says:
November 28, 2013 at 2:57 pm (http://www.snapdba.com/2013/04/installing-apex-4-2-and-configuringembedded-plsql-gateway-epg/#comment-545)
Hi
Very informative post
followed word to word and it worked
regards
Francis Kamundia
Reply (/2013/04/installing-apex-4-2-and-configuring-embedded-plsql-gateway-epg/?replytocom=545#respond
(/2013/04/installing-apex-4-2-and-configuring-embedded-plsql-gateway-epg/?replytocom=545#respond)
/2013/04/installing-apex-4-2-and-configuring-embedded-plsql-gateway-epg/?replytocom=545#respond)
Awesome post! These appear to be the most complete instructions for this task available. Im part way
through this task on my own, and am eager to implement some of your suggestions along the way. Thanks
again!
Reply (/2013/04/installing-apex-4-2-and-configuring-embedded-plsql-gateway-epg/?replytocom=2290#respond
(/2013/04/installing-apex-4-2-and-configuring-embedded-plsql-gateway-epg/?replytocom=2290#respond)
/2013/04/installing-apex-4-2-and-configuring-embedded-plsql-gateway-epg/?replytocom=2290#respond)
Installing Apex 4.2 with Oracle 11gR2 was a long frustrating process partially because the documentation is
incomplete. Thanks to everyone out there in forums and blogs, I managed to get it done. Im using EPG. What
made the big difference for me was running this script:
$ORACLE_HOME/rdbms/admin/epgstat.sql
It showed ANONYMOUS access as FALSE. I ran the script from this page:
1/22/2015 10:29 AM
9 of 11
http://www.snapdba.com/2013/04/installing-apex-4-2-and-configuring-...
https://community.oracle.com/thread/2344127?tstart=0 (https://community.oracle.com/thread
/2344127?tstart=0)
which fixed the problem that epgstat.sql found and set user ANONYMOUS access to TRUE.
Some other things I did that may have helped:
Changed ANONYMOUS password to NULL: alter user ANONYMOUS identified by NULL;
Its hard to find error messages with Apex. To get error messages:
execute dbms_epg.set_global_attribute(log-level, 7);
Then look for logs in your Oracle trace directory that start with _s . Or grep for epg or apex in that directory
and youll see some errors.
Switching to brand new port. I made up 8083 as I wasnt sure some settings somewhere were still stuck for
8080. Setting it back and forth to 0 and back to 8083 seems to help.
EXEC dbms_xdb.sethttpport(8083);
EXEC dbms_xdb.sethttpport(0);
EXEC dbms_xdb.sethttpport(8083);
8083 never showed up in netstat but it doesnt seem to make a difference
Went into OEM and edited acls:
Log into OEM
select schema
select resources
select images and click edit
select the security tab
click edit (the file you should be editing is /sys/acls/ro_anonymous_acl.xml)
ensure you have the following:
principal: ANONYMOUS
privilege: read-contents
granted: ticked
click apply
alter user xdb identified by xdb;
Clear the Firefox browser cache; restarting the browser in Safe Mode with plugins off
APEX_HOME is the directory many of the apex scripts want. Its the PARENT directory of the apex directory
the one that its unzipped into. In my 11gR2 installation its the same as ORACLE_HOME .
With Apex 4.2 there is no need to enter anything into listener.ora or tnsnames.ora if youre using the PL/SQL
gateway (EPG). The listener will show the epg port in its status if its working. Check the listener.log for
connections.
Im putting all this here hoping it helps someone else and they wont have to spend as much time as I did on
this.
Reply (/2013/04/installing-apex-4-2-and-configuring-embedded-plsql-gateway-epg/?replytocom=2772#respond
(/2013/04/installing-apex-4-2-and-configuring-embedded-plsql-gateway-epg/?replytocom=2772#respond)
/2013/04/installing-apex-4-2-and-configuring-embedded-plsql-gateway-epg/?replytocom=2772#respond)
Garth says:
April 16, 2014 at 7:55 am (http://www.snapdba.com/2013/04/installing-apex-4-2-and-configuringembedded-plsql-gateway-epg/#comment-3228)
Thanks for taking the time to share this feedback Nancy, much appreciated! I too found the process
frustrating and missing steps in the documentation, hence my post about the process, hopefully this will
be of use to others thanks again.
Reply (/2013/04/installing-apex-4-2-and-configuring-embedded-plsql-gateway(/2013/04/installing-apex-4-2-and-configuring-embedded-plsql-gatewayepg/?replytocom=3228#respond)
epg/?replytocom=3228#respond)
Hiep says:
June 13, 2014 at 2:58 pm (http://www.snapdba.com/2013/04/installing-apex-4-2-and-configuring-embeddedplsql-gateway-epg/#comment-4531)
Get a little hint from this site and I did get solve my problem about to install Oracle Application Express.
Thanks :-)))
/Hiep
1/22/2015 10:29 AM
http://www.snapdba.com/2013/04/installing-apex-4-2-and-configuring-...
Reply (/2013/04/installing-apex-4-2-and-configuring-embedded-plsql-gateway-epg/?replytocom=4531#respond
(/2013/04/installing-apex-4-2-and-configuring-embedded-plsql-gateway-epg/?replytocom=4531#respond)
/2013/04/installing-apex-4-2-and-configuring-embedded-plsql-gateway-epg/?replytocom=4531#respond)
joeri says:
July 20, 2014 at 1:17 pm (http://www.snapdba.com/2013/04/installing-apex-4-2-and-configuring-embeddedplsql-gateway-epg/#comment-5114)
Great work Garth, happily your page turns up high in the Google ranking!
I followed you instructions word to word on a W7 box and it all installed without a single glitch.
Reply (/2013/04/installing-apex-4-2-and-configuring-embedded-plsql-gateway-epg/?replytocom=5114#respond
(/2013/04/installing-apex-4-2-and-configuring-embedded-plsql-gateway-epg/?replytocom=5114#respond)
/2013/04/installing-apex-4-2-and-configuring-embedded-plsql-gateway-epg/?replytocom=5114#respond)
Nice article !!
Thanks
Reply (/2013/04/installing-apex-4-2-and-configuring-embedded-plsql-gateway-epg/?replytocom=7925#respond
(/2013/04/installing-apex-4-2-and-configuring-embedded-plsql-gateway-epg/?replytocom=7925#respond)
/2013/04/installing-apex-4-2-and-configuring-embedded-plsql-gateway-epg/?replytocom=7925#respond)
Leave a comment
Your email address will not be published. Required fields are marked *
Name *
Email *
Website
DmByRJMermww
Comment
You may use these HTML (HyperText Markup Language) tags and attributes: <a href="" title=""> <abbr
title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q
10 of 11
1/22/2015 10:29 AM
11 of 11
http://www.snapdba.com/2013/04/installing-apex-4-2-and-configuring-...
Post Comment
Notify me of follow-up comments by email.
Notify me of new posts by email.
1/22/2015 10:29 AM