Install Apex (Application Express) Formerly HTMLDB

Some time ago I read a post about HTMLDB at Vidya Bala’s Blog She has mentioned nice description about HTMLDB & Installing HTMLDB 2.0. You can check her post at Install HTMLDB 2.0

Now HTMLDB is called as Application Express or more commonly as Apex. Latest Apex Version is 2.2 and today I’ll quickly cover Installation of Apex Version 2.2. You can find Installation Document and software at end of this post.

Requirement:
In order to install Apex (Former HTMLDB) ver 2.2 you should have
–Application Server Version 1.0.2.2 or higher
–Database should be version 9.2.0.3 or higher
–Disk Space around 500 MB on middle tier (Application Server)
–Tablespace (in which you will install Apex ) with around 100MB free space
–System tablespace with around 85 MB free space
–Database shared pool size should be 100MB or more

Tablespaces:
At time of Apex installation it asks for tablespace for user data & tablespace for Apex files. You can use existing single tablespace for both or can create these two tablespace. For better understanding I will create two tablespace one for User data & other for Apex files.

Assumptions
Below Apex 2.2 Installation steps are of Database version 10.2.X and application server version 10.1.2.0.2 (There might be minor changes on other database or application server version)

Pre Installation Configuration
Login to database and create two tablespace

create tablespace tsapexf datafile ‘/$datafile_location/tsapexf01.dbf’ size 50M autoextend on next 10M maxsize 300M;

create tablespace tsapexu datafile ‘/$datafile_location/tsapexu01.dbf’ size 50M autoextend on next 10M maxsize 300M;
These tablespaces we are going to use during Apex Installation

Loading Apex into Database

Login to middle tier(Application Server) & download Apex 2.2 software from location mentioned at end of this post (software is with name apex_2.2.zip);
Copy it to location where you want to install Apex on Middle tier ; assume its /u01/dev
unzip software as ; unzip apex_2.2.zip
This will craete a subdirectory with name apex ; cd apex
sqlplus system@tns_alias as sysdba (From middle tier connect to database as sysdba)
@apexins.sql {passwd} {ts for user} {ts for files} {ts for temp} /i/ {connect_info}

Where
passwd – Password for Apex Super User
ts for user – Tablespace for User data (Created above)
ts for files – Tablespace for Apex files (Created above)
ts for temp – temporary tablespace (Usually Temp)
i – is the alias for image directory configuration in Application Server (Apache httpd.conf)
connect info – TNS Alias to connect to database from middle Tier

@apexins.sql mypasswd tsapexu tsapexf temp /i/ tns_alias

This step will take 1-2 hours depending on server configuration


Configure Apex at Middle Tier
(Application Server)
Create a file marvel.conf in $ORACLE_HOME/Apache/modplsql/conf

Replace ORACLE_HOME, hostname, port number, service_name, and apex_public_user_password with values appropriate for your environment.#########Alias /i/ “/u01/dev/apex/images/”

AddType text/xml xbl
AddType text/x-component htc


Order deny,allow
PlsqlDocumentPath docs
AllowOverride None
PlsqlDocumentProcedure wwv_flow_file_manager.process_download
PlsqlDatabaseConnectString hostname.domainname:db_port:SID ServiceNameFormat
PlsqlNLSLanguage AMERICAN_AMERICA.AL32UTF8
PlsqlAuthenticationMode Basic
SetHandler pls_handler
PlsqlDocumentTablename wwv_flow_file_objects$
PlsqlDatabaseUsername APEX_PUBLIC_USER
PlsqlDefaultPage apex
PlsqlDatabasePassword password
Allow from all
#######

include marvel.conf in httpd.conf like below so that it can be invoked each time Apache(Web Server) Starts

include “/replace_this_with_oracle_home/Apache/modplsql/conf/marvel.conf”

Update this configuration change in DCM repository (This step is required only on 10g Application Server, Skip this if you are configuring it with Apps 11i or standalone HTTP Server)

Make sure Alias /i/ “/u01/dev/apex/images/” this alias in marvel.conf is pointing to right apex images directory

Post Installation Steps
dcmctl updateconfig -ct ohs
opmnctl restartproc ias-component=HTTP_Server (Restart HTTP Server to check it)

Now try access application via URL
http://hostname.domainname:port/pls/apex

Software & Related Document
You can find Apex Software Version 2.2
from here

How to configure Apex or HTMLDB applications with SSO Server coming soon ….

Become Apps DBA

About the Author Masroof Ahmad

Leave a Comment:

52 comments
Arunkumar says November 11, 2006

hey Atul, Nice post man. I was looking for this as i am new to this apex stuff.

-Arun

Reply
Atul Kumar says November 11, 2006

Thanks Buddy,
I heard lot of guys started using Apex these days . I am Soon going to write on configuring Apex Application with SSO server.

Kindly share any other thing in Apex you are looking for …

Reply
Anonymous says November 13, 2006

Nice to see your postings..
–Madhura

Reply
Atul Kumar says November 13, 2006

Hi Madhura,
Great to see your comments , You were among best managers 🙂 . Its all becoz of you & harmeet’s mentoring skills .

Regards
Atul Kumar

Reply
Anonymous says December 15, 2006

Nice post on Apex, Atul….you should add that they may need to change the image directory within the marvel.conf file, just in case they decided to install Apex within another directory, as I did.

-Ken McCary
http://blakgeek.blogspot.com

Reply
Atul Kumar says December 15, 2006

Ken McCary

Thanks for pointing that , mentioned this in post Now .

Atul

Reply
Anonymous says February 18, 2007

Is it critical that application server 10g is installed before apex?

Reply
Atul Kumar says February 18, 2007

No, You just need a HTTP Server and an Oracle Database (10g AS is just one option)

Atul

Reply
amol says March 19, 2007

Hi Atul,
While installing apex ,
i get an error
oracle disconnected ,
memory exhausted ,
Thanks,
Amol

Reply
Atul Kumar says March 19, 2007

Amol,
Check if you have enough memory in database. Check alert log for any messages furher. Make sure you got enough memory in database shared pool size should be 100MB or more

as mentioned in preinstall steps

Reply
amol says March 20, 2007

Thanks Atul ,
Looks like it was sqlplus issue ,
i was running the script from a remote machine .
i ran the script from the same machine and it worked fine .
Regards,
Amol

Reply
pankaj says April 4, 2007

hi , after configuring dads.conf , i am getting

503-Service Temporarily Unavailable
The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.

any clue , pankajch1982@gmail.com

Reply
Atul Kumar says April 4, 2007

Check error_log in $ORACLE_HOME/Apache/Apache/logs if this is 10g AS or

$OS/ohs/Apache/logs/error_logs if this is standalone apache

for error related to 503

Reply
qAnand says August 1, 2007

Hi Atul,
This section looks interesting. Do we need to install this separately in ebusiness suite environment or installation of ebuss suite installs htmldb also?
Does it involve separate license cost?

Please update about this also.

Thanks
Anand

Reply
Atul Kumar says August 1, 2007

E-Business Suite doesn’t install Apex you have to install is seperately. For Licensing check Oracle Sales

Reply
qAnand says August 1, 2007

Thanks Atul.
I checked in other sites and its mentioned as license free, anyway as you suggested will check with Oracle Sales.

Reply
qAnand says August 2, 2007

Hi Atul,
After struggling, I got the Oracle Apex installed and created a demo application (which displays report). Now the challenge is to integrate this demo-application with my EBusiness suite.
Is it possible? Can you throw some light in this area?

Regards,
Anand

Reply
Atul Kumar says August 2, 2007

Anand,
What do you mean by integration of Apex with E-Business Suite here.

How you wish or what you want to do from E-business suite ?

Reply
qAnand says August 2, 2007

Thanks for the reply. In simple words – Create a new responsibility with some menus/submenus. On click of the links/submenus, the application-report (developed using apex) should open without again prompting for any username/password.

Is it possible to achieve?

Regards,
Anand

Reply
Atul Kumar says August 2, 2007

Anand,
So you want authentication to be enabled via FND_USERS. In Apaex you have various authentication scheme or you can create your own authentication scheme and map users in apex with users in FND_User but this is all customization.

For standard configure SSO with Apaex and SSO with E-Business Suite and then these two applications (apex and e-business) are partner application against same SSO and user can login without re-authentication but this is again big thing.

Reply
qAnand says August 2, 2007

Thanks Atul,
You said it is possible now I’ll give a try.
This site is AskTom for APPS.

Keep up the great work. Awaiting your posts on Apex-SSO

Reply
Atul Kumar says August 2, 2007

Thanks Anand for nice compliment

For configuring SSO with Apex visit

http://becomeappsdba.blogspot.com/2007/01/apex-apps-configure-sso-ii.html

Reply
qAnand says August 2, 2007

Sorry to bother you Atul. I am stuck again with ApEx. Can I email you in detail?

Thanks
Anand

Reply
Atul Kumar says August 2, 2007

Raise them in forum at http://teachMeOracle.com/forum so that it can be useful for other readers as well in future.

Reply
qAnand says August 2, 2007

Thanks Atul,
Since I could not find relevant forum for ApEx, I posted my problem under Troubleshooting Forum of teachme.

Hope to get a good response.

Regards,
Anand

Reply
Anonymous says August 5, 2007

For Apex3.0 you can ref thi blog

http://dgielis.blogspot.com/2007/06/testing-oracle-bi-publisher-with-apex.html

Regards
Ramnik Gupta

Reply
Ashish says September 17, 2007

Hi Atul,

I am new to the DBA world and many of my freinds who are into this feild have recommended your site, an amazing fact was that one of them is not a DBA but still he knew about you and said that there is a lot of Quality stuff here.

As a matter of fact i am trying to install an HTML database , after following all the steps that are given on your site as well as the Companion Cd installation guide, the installation is not working , the http server when invoked says Internal server error , i have checked the dads.conf file , what i am trying to do is that i have a 10g database on which i have installed the htmldb by providing all the connect identifier but still its not working . Can you provide some help on this issue.

Regards,
Ashish

Reply
Atul Kumar says September 17, 2007

Ashish,
Thanks for compliment, If you have followed doc properly then in order to find issue of Internal server error go to Web Server (HTTP Server) under which you have configured dads.conf like $ORACLE_HOME/Apache/Apache/logs and look for error_log and check what error message it is reporting and look for possible cause of problem reported in error_log

Reply
Ashish says September 18, 2007

Hi Atul,

Thanks for the solution, i had a look at the error logs they said its a configuration prob, i have modified the dads.conf file and now the login page is diaplayed correctly but the fact is that the images are not being displayed properly and when i am trying to login to the page its showing an error. Please suggest.

Ashish

Reply
Atul Kumar says September 18, 2007

Ashish Good that you moved to next step.

For image check if image directory is mapped correctly in dads.conf to images directory on file system.

For login problem what error message you are getting in logs

Reply
Chetan Parmar says September 18, 2007

Hi,

I’ve been reading your post but don’t see a solution to “Error 503 Service Temporarily Unavailable…”

I checked the Apache logs and all I see is this:
“10.64.0.24 – – [18/Sep/2007:17:29:51 -0400] “GET /pls/apex HTTP/1.1” 302 5
10.64.0.24 – APEX_PUBLIC_USER [18/Sep/2007:17:29:52 -0400] “GET /pls/apex/apex HTTP/1.1” 503 441

Why am I getting the above error? Thank you for you help and nice post!

Reply
Atul Kumar says September 18, 2007

Chetan,
share your dads.conf information the one under /pls/apex

check if database user APEX_PUBLIC_USER can connect to database using connect string defined in {location /pls/apex} with directive

PlsqlDatabaseConnectString

Check if password is correct and user is not enddated/ locked

Reply
Chetan Parmar says September 18, 2007

Atul thanks for the quick reply. I resolved the issue but only after you jogged my memory. The APEX user was locked but off course I was over thinking the issue and forgot to check the basics! Also, I believe the ‘anonymous’ account needs to be unlocked but maybe you can verify that for the group. Thank you for quick reply! Chetan.

Reply
Ashish says September 20, 2007

Hi Atul,

My images problem was solved by changing the path in the dads.conf file……….thanks for all your help…….now I am facing a strange problem , when I am trying to invoke the enterprise manager it says that the database status is corrently unavailable. I tried to bounce the enterprise manager but still the problem persists.Please Help.

Thanks
Ashish

Reply
Atul Kumar says September 20, 2007

Ashish, This is good news that you manage to fix your issues.
You can raise your issues/doubts at http://teachMeOracle.com/forum and help other budding DBA’s in this forum

Reply
BlackSigma says July 24, 2008

hi all
I have the same problem that face Chetan Parmar but the problem is I can get to the apex home page and login but after period of time i face the message “Error 503 Service Temporarily Unavailable…” the dads.conf is ok cause it work and to solve the problem i restart the server
I don’t wont to restart the server every time i face this message and there is no high traffic on service only 3 pcs are connected to it
any body can help ????

Reply
Atul says July 24, 2008

Hi,
You need to check web server log file to find root cause of 503.

503 means server crash and if this is in Oracle HTTP Server or Oracle Web Server then check logs at $ORACLE_HOME /Apache/Apache /logs/error_log

Reply
BlackSigma says July 28, 2008

ok i look to the web server log file but I cant figure out the cause of 503
i got this
Mon Jul 28 01:21:27 2008] [error] [client 10.11.32.56] [ecid: 1217233286:127.0.0.1:1652:3384:11,0] mod_plsql: /pls/htmldb/f HTTP-503 ORA-12541

adn

[Sun Jul 27 01:58:20 2008] [error] [client 10.11.32.55] [ecid: 1217149099:127.0.0.1:3284:4048:9,0] mod_plsql: /pls/htmldb/htmldb HTTP-503 ORA-12541
[Sun Jul 27 01:58:24 2008] [error] [client 10.11.32.55] [ecid: 1217149102:127.0.0.1:3284:2220:15,0] mod_plsql: /pls/htmldb/htmldb HTTP-503 ORA-12541
[Sun Jul 27 01:58:57 2008] [error] [client 10.11.32.55] [ecid: 1217149136:127.0.0.1:3284:3648:10,0] mod_plsql: /pls/htmldb/htmldb HTTP-503 ORA-12541
[Sun Jul 27 01:59:53 2008] [error] [client 10.11.32.55] [ecid: 1217149192:127.0.0.1:3284:2544:9,0] mod_plsql: /pls/htmldb/htmldb HTTP-503 ORA-12541
[Sun Jul 27 01:59:56 2008] [error] [client 10.11.32.55] [ecid: 1217149195:127.0.0.1:3284:2504:10,0] mod_plsql: /pls/htmldb/htmldb HTTP-503 ORA-12541
[Sun Jul 27 02:01:37 2008] [error] [client 10.11.32.56] [ecid: 1217149295:127.0.0.1:3284:2500:9,0] mod_plsql: /pls/htmldb/f HTTP-503 ORA-12541

Reply
Atul says July 28, 2008

BlackSigma,
ORA-12541 is cause of issue which means application can’t connect to database.

Check your dads.conf if database server, port are correct and database & db listener is up.

Check if you can ping & tnsping using connection details in dads.conf or marvel.conf

Reply
BlackSigma says August 5, 2008

thanx i solve the problem
I just substitute “loclhost” with the “ip” of the server and every thing goes correct

Reply
Roslyn74 says August 27, 2008

Hello,

Firstly I would like to express my sincere appreciation for the work that goes in to this site to help Oracle newbies. Excellent!!

I am looking for help please. I have Oracle 10g Database Express Edition on my local server and the application has been created here. I am trying to install APEX as I need to create report writing abilities and print options to PDF but I am very new and the installation is going right over my head.

Please help me.

Thank you kindly
Roslyn74

Reply
Atul says August 28, 2008

Roslyn74,
Which version of APEX you are installing (2 or 3) ?

Is this installation on windows machine (XP or Vista) ?

Reply
Roslyn74 says September 16, 2008

Hi Atul,

Thanks so much for the reply.

The version is 3.1.1. which is bundled with 11g and I am installing locally on a windows XP laptop. 10g XE is currently running successfully.
The process I am following:
The install 11g using OUI and completing a custom install with real time testing.
Create database
Change working user to APEX (3.1.1 which is packaged with 11g though I want to actually instally 3.1.2 but I will worry about this next)
Log in to newly created 11g database
Run @apxconf and change port to 8080 and admin password ( I am running Download APEX from OTN and configure HTTP but I am not sure if I sure be doing embedded PL/SQL gateway or even if this correct at all)
Run @apexins but I am being asked to enter values which is not in the manual? I have been using SYSAUX as value 1, SYSAUX as value 2, TEMP as value 3 and /i/ as 5 with 9 left blank but I am sure this is not correct!
The APEX package runs but I get errors at line 1 throughout.
I unlock the public user account
I enter details in to browser http:\\localhost:8080\apex\apex_home and get error message.
I have tried the install about 5 times using different installation processes found in the Oracle installation manual as well as other processes documented on the internet.

Thank you!!!!

Reply
Atul says September 17, 2008

Roslyn,
Lets first fix apex using embedded pls/sql gateway

all you need after 11g DB is

1. Run apxconf.sql ($ORACLE_HOME/apex) – enter ADMIN password and XML DB HTTP Server port when prompted
2. Unlock ANONYMOUS account (SQL> ALTER USER ANONYMOUS ACCOUNT UNLOCK;)
3. Access Apex using http://hostname:port/apex/apex_admin

Use 8085 as I suspect 8080 may be used by XE database

Try and see if this works , You don’t need HTTP server for embedded plsql gateway

check http://onlineappsdba.com/index.php/2008/09/17/oracle-application-express-apex-architecture-and-changes-from-oracle-database-11g/

Reply
BlackSigma says September 17, 2008

I have faced the same problem that happening with Roslyn74
I solved it by removing the apex schema form the database and removing all related users then reinstalling the apex from the beginning

Reply
Roslyn74 says September 24, 2008

Hi Atul,

Oracle APEX is all working fine except my print server does not seem to work. I have created an application, and enable report printing but when I go to print I get a PDF error message say my file is damaged.

I think I have configured the print server correctly (same as the book) in apex_admin but not sure how to check?

Any thoughts?

Thank you kindly

Reply
Atul says September 24, 2008

If you are trying PDF printing, did you install and configure Oracle BI Publisher (XML Publisher earlier) to generate PDF reports ?

If not stay tuned on this blog to configure BI Publisher with Apex for PDF printing.

Reply
moly says February 4, 2009

Hi Atul,

I am new in APEX but knows oracle DBA part .
I need help from you i have to develop an application for my own work. I am little bit confused about selection/combination out of following It would be great if you can help me to find out the correct & simple option for thr same.

1. oracle10gR2 + APEX
2. ORACLE XE + APEX
3. Oracle11g (as i read from above post it packaged with APEX)

Hardware i have
2 G RAM
speed 2.1 GHz

software -Vista

Reply
Suresh says April 15, 2009

Hi Do you have any pointers in upgrading htmldb 020000 to apex3.2? also I don’t have passwords for FLOWS_020000 and FLOWS_FILES is there a way to retrive them?

Reply
samishah says December 25, 2011

Dear Atul,

I have to uninstall HTMLDB 3.2 and install oracle APEX 4.1 on ebusiness suite database 10.2.0.5. please guide me as i’m new for ebusiness and apex. waiting for you reply.

best regards,
sami

Reply
Atul Kumar says December 27, 2011

@ Samishah,
Use this video to install Apex 4.1 http://www.youtube.com/watch?v=cXQ_RP3Z6bI

Reply
Add Your Reply