Oracle on the Web, Part 4 - Upgrading HTML DB

Tuesday Jun 21st 2005 by Steve Callan

Hidden away in the depths of your Oracle installation is a valuable resource you can use to get a jump-start on learning how to combine Oracle's strength as a relational database management system and the power of the Internet. Part 4 of this series covers the steps of upgrading to version 1.6 and creating a simple Web service.

In part 4 of the HTML DB series, I will cover the steps of upgrading to version 1.6 and creating a simple Web service. The upgrade/installation steps come straight out of the March 2005 Oracle® HTML DB Installation Guide, Release 1.6. The steps to create a simple Web service are from the Oracle® HTML DB 2 Day Developer document also available on the OTN Web site. In the last article, I mentioned the patch set for version 1.6. The patch set is available via MetaLink, so if you do not have access to Oracle Support Services, obtaining this patch may be a problem.

As a tip, locating the patch set number or file name can be somewhat of a chore when using the search interface at Patches & Updates. If the link for the patch does not work, look at the page source (the HTML code) and see where the hyperlink is supposed to send you. It turns out that the name of the zipped patch file is


so at least now you know the name of the file to look for. The complete URI is:


Pre-installation steps

The steps are few and easy to perform: ensure the shared pool is large enough, and that XML DB and Oracle Text are installed.

For checking the shared pool (at least 100MB), use the show parameter[s] command:

Oracle XML DB and Oracle Text must be installed (done for you if you used the Database Configuration Assistant). Each feature has it own set of developer guides in the RDBMS documentation set. Look for Oracle Text Application Developer's Guide under the TEX hyperlink in the list of books (it appears as "Text Application Developer's Guide").

There are several ways to determine if you have XML DB and Oracle Text installed. One way is to start the Universal Installer and look at the list of installed products.

Another way is to query dba_users, and if CTXSYS and XDB appear, chances are their respective objects are installed. Of course, that is not a guarantee, but if the users exist and their objects do not, what kind of clean up job was done in the first place? If necessary, you can reinstall both users and their objects automatically (stored in the SYSAUX tablespace) via DBCA or by using canned scripts. See the respective developer guides for installation instructions.

As always, taking a backup of your database is a prudent measure. Obtain version 1.6 from OTN (http://www.oracle.com/technology/products/database/htmldb/index.html) and extract the contents of the zip file. Navigate to the htmldb folder. In that folder, you will see the htmldbins.sql file. The command line syntax you will use is:

sqlplus sys/<password> as sysdba @htmldbins password sysaux sysaux temp /i/ none

where "none" indicates a local installation and password is the HTML DB administrator's password. The htmldbins script accomplishes the following in addition to a fresh installation:

Note: If at all possible, use the same HTML DB password during this step. If you use a new or different password, you will have more work to perform after the basic installation is finished.

The "/i/" parameter refers to an images directory, and assuming you are following along using a 10g database and your original HTML DB installation, replacing the images folder will be quite easy (more on that later). Upon initiating the script, you will see a considerable amount of text output (and hopefully with lots of "No errors" lines).

The time to complete took almost 12 minutes, and the most important output of all is "Upgrade completed successfully no errors encountered."

In your original (version 1.5) HTML DB installation, there is an images folder which must be replaced with the one under the htmldb folder (where the htmldbins script was just run from). The 1.6 installation guide recommends renaming the original in case you need to revert to it. Where is the installed images folder? Look for the marvel.conf file and confirm the location of your images folder. My original HTML DB installation path is c:\oracle\product\10.1.0, so locating the marvel.conf file was easy.

After the rename and copy steps:

Assuming no password changes are required, you should be able to start OPMN and try out the upgraded version of HTML DB. Start the process manager (Windows service) or use the opmnctl startall command (a status check is shown below).

Optional - Installing the Patch

If you have access to MetaLink, this is the page (same for other platforms) you are looking for:

The bugs are minor and none of them seems to have anything to do with a Web service.

Accessing HTML DB (again)

In a browser session, entering http://server:port/pls/htmldb should take you to the login page we have seen before.

Click for larger image

Note the version number in the lower right hand corner: (at least the 1.6 part should be the same).

Login as a user and note the differences. The user interface has a different look and feel, and the upgrade process, true to form, did migrate existing applications.

How to Implement a Web Service

This example consumes only six pages in the 2 Day Developer guide, so let's run through this small example and see just how easy (and accurate) the steps are. The individual sections (starting on page 6-2) are discussed below.

Section Title: Creating a New Application

The very first step, "From the Application Builder home page, click Create Application" is incorrect. The "Create Application" button is at the home page (the page you see immediately after logging in).

Progress check: On Step 7 (select a theme), there are 12 themes to choose from (the sample says to pick Theme 2). The workflow process is (as before) shown in the left margin area. The red border of Theme 1 should look familiar if you have been to the AskTom Web site.

Section Title: Specifying an Application Proxy Server Address

More than likely, this section does not apply to you. If you are doing this at home and use Comcast High-Speed Internet service (as an example), you are not using a proxy server.

Section Title: Searching a UDDI Registry for a Business Name

This section involves providing input for the UDDI registry used to find a WSDL. UDDI? WSDL? The explanation of these items in the 2 Day Developer guide is fairly dry. A better description of what a Universal Description, Discovery, and Integration registry and a Web Services Description Language document are can be found at W3Schools (http://www.w3schools.com/wsdl/wsdl_uddi.asp). This is getting pretty far away from Oracle, but do realize that Oracle Corporation is a participant in this cross-industry effort to use UDDI. The example mentioned at the W3Schools site is based on an airline reservation system, so the applicability of a database (i.e., Oracle) providing the data should be fairly obvious.

If you follow the steps exactly as written in the guide (Step 6 - select "IBM UDDI" followed by "%xMethods%" followed by clicking Search), the end result is:

ORA-20001: The webservice was unreachable because either the URL you supplied was invalid, or your environment requires a valid proxy server address for HTTP requests.

A missing bit of information: what is meant by "select IBM UDDI" is use the oddly designed drop down menu button to the right of the text field. Click that button and a popup window with a list of choices appears. That's where/how you select IBM UDDI v2.

After clicking the menu button, select IBM UDDI v2:

The location field is then filled in for you:

At the next step, entering %xMethods% (note the lowercase "x" after the leading per cent symbol, it kind of blends in if you don't read that too closely), toggle the xMethods Delayed Stock Quotes radio button.

The Web Service Summary gives you an overview of what you just selected.

Your confirmation of success:

Section Title: Create a Form to Display a Stock Quote

Run through the first six steps as written. The end result is:

Click Run Page and login (use the same user you are already logged in as, but why do you have to login at all at this point?). I used ORCL for Oracle and ran the query.

This completes the first example shown in the developer guide.

In Closing

Overall, the upgrade process is fairly straightforward. The use of a script to perform the upgrade is somewhat of a departure for Oracle as many products use the Universal Installer or some other GUI interface. As you watch the output or feedback statements scroll by when htmldbins is running, note that there are over 1000 different pages being created, which is pretty impressive. It is obvious a significant amount of work went into the development of HTML DB.

The process shown for creating a Web service is almost exact with respect to the steps required in each section. The omission in how to select IBM UDDI is a show stopper, and you would think that Oracle would follow conventional Web or application design standards for indicating a drop down menu list, or use a button with a label saying Select, View, or Browse.

Just for fun, you can navigate to the icons folder, open the view_small.gif file, rotate it 180 degrees and save it. The icons folder is located under the virtual path ("/i/" from before) at HTML DB HOME\marvel\images\htmldb\icons. The end result is:

Finally, the odd (and new) part of the database setup or structure is the "flow" naming, and getting to a point where most of the Oracle community understands the HTML DB architecture as well as it understands standard database or application architecture will take some time which will happen as HTML DB gains more acceptance and use. In the next article of this series, I will cover another example from the 2 Day Developer guide and point out some additional resources for HTML DB.

» See All Articles by Columnist Steve Callan

Mobile Site | Full Site