​A selection of topics on IT and its application to finance. 
​Send me your comments, questions ​or suggestions by clicking
h​ere


elmama
Setting up and running Oracle9i Forms and Application Server 


This tip assumes that the Oracle9i Forms and Oracle9iAS have already been installed  successfully on your (Windows based) PC's. I'm assuming the O/S is Windows NT4 and that the 9iAS and Forms are on separate nodes but the techniques should easily be applied to other systems and architectures. Note that you will also need to supply your versions of the hostnames and port numbers contained in the URLS given below. I've kept the most common port numbers that are typically used but these could be different from your own setup.Some of the processes and environment variables  referred to may also be named differently depending on what names you have given to your ORACLE_HOMES

Oracle 9i Forms

The only Forms issue you need to be aware of once it's installed is to ensure that the OC4J instance has been started up on your development machine before trying to run any forms on it. Do this by clicking on Start->Programs->Oracle9i Developer Suite->Forms Developer-> Start OC4J Instance


Oracle 9i Application Server

To enable forms applications to be run by other users on the network (intranet or internet) it is necessary to deploy them to a middle tier running the Oracle 9i application server software. From a Forms perspective the application server comprises two distinct pieces of software - the Infrastructure and the Business Intelligence. The physical location of the application server software components is not important, they can be installed on the same node though it's more usual for each to be set up on separate dedicated networked nodes. The discussions below assume they are on the same node. Starting and stopping the application server should be done in the following order. Start Infrastructure - Start Business Intelligence - Stop Business Intelligence - Stop Infrastructure


Starting the Application Server

After installation, on the Infrastructure node, first ensure that the database and listener services are marked for automatic start up and are already started. These services will be named something like OracleServiceIASDB and Oracleora9ias_homeTNSListener. Click on Start->Settings->Control Panel->Services to check.  You also need to make sure that the Infrastructure database is accessible. Check this out by using Start->Oracle9i Application Server ->ora9ias_home->Configuration and Migration Tools->Net manager. The rest of the Infrastructure and BI services now need to be started up using the following DOS commands:-

set ORACLE_HOME= D:\ORA9IAS_HOME
set PATH=%ORACLE_HOME%\bin;%ORACLE_HOME%\dcm\bin;
set PATH=%ORACLE_HOME%\opmn\bin;%PATH%;
set ORACLE_SID='your database sid'
oidmon start
oidctl server=oidldapd instance=1 start
REM Wait for about 30 secs before issuing the next command
opmnctl startall
webcachectl start


Next check the Infrastructure services using Start->Settings->Control Panel->Services and make sure the following are all started. Manually start any not already up.

Oracleora9ias_homeInternetDirectory
Oracleora9ias_homeProcessManager
Oracleora9ias_homeTNSListener
Oracleora9ias_homeWebCache
Oracleora9ias_homeWebCacheAdmin
OracleServiceIASDB

Next we start up all the required BI services using the following commands:-

set ORACLE_HOME= D:\ORA9BIF_HOME
set PATH=%ORACLE_HOME%\bin;%ORACLE_HOME%\dcm\bin;
set PATH=%ORACLE_HOME%\opmn\bin;%PATH%;
set ORACLE_SID='your database sid'
opmnctl startall
webcachectl start



Again, we check that all the BI services we need are up. Those are :-

Oracleora9bif_homeProcessManager
Oracleora9bif_homeWebCache
Oracleora9bif_homeWebCacheAdmin

Stopping the Application Server

You should stop the Business Intelligence services first using the following commands:-

set ORACLE_HOME= D:\ORA9BIF_HOME
set PATH=%ORACLE_HOME%\bin;%ORACLE_HOME%\dcm\bin;
set PATH=%ORACLE_HOME%\opmn\bin;%PATH%;
set ORACLE_SID='your database sid'
net stop Oracleora9ias_homeEMWebsite
webcachectl stop
opmnctl stopall


Next, the Infrastructure

set ORACLE_HOME= D:\ORA9IAS_HOME
set PATH=%ORACLE_HOME%\bin;%ORACLE_HOME%\dcm\bin;
set PATH=%ORACLE_HOME%\opmn\bin;%PATH%;
set ORACLE_SID=BOND
set EM_ADMIN_PWD=<the EM password>
webcachectl stop
opmnctl stopall
oidctl server-oidldapd configset=0 instance=1 stop
REM Wait approx 30 seconds before issuing next command
oidmon stop



As a last resort shutting down the machine will kill all Application Server services though this should be avoided unless absolutely necessary.

The Enterprise Manager Console

Starting and stopping the Application Server services can also be done via a graphical tool called the Oracle Enterprise Manager Console. However Oracle recommends that the manual methods described above are used whenever possible. Before running the EM console make sure the Oracleora9ias_homeEMwebsite service is up and running. If not type the following DOS command:-

net start Oracleora9ias_homeEMwebsite

After checking that the service is running start up the Oracle Enterprise Manager console by typing the URL http://ias_host_name:1810 into IE (Username: 'your_username' [typically this is ias_admin], Password:'your_pass'). This will list the application servers on the machine. Under the status column header you want to see a little tick for each of the application servers. This means that they are up and running. Clicking on each server drills down to a more detailed look at all the services running for the server. For Forms, the important server to check is the Business Intelligence server. You need to ensure that all the required system components are up, so click on it and you will see a screen that shows the system components and their status. The ones that need to be up i.e have a little tick under the status column are Forms, HTTP Server, OC4J BI Forms and Web cache. If any of these are down click the radio button to their left and hit the start button (NB The Forms component cannot be selected, however starting the OC4J component should automatically start the Forms component also.) If you come across any problems try starting the services manually as discussed above.

When you are sure that all the relevant servers/services are up and running, test everything is working as it should be by typing in the URL http://ias_host_name:7777 into IE. If everything is OK the 9iAS welcome screen should appear. You can test further by clicking on the Demonstrations tab, then the Business Intelligence and Forms link, and finally the Forms Services link. This should display a test form. It should now be possible to deploy your forms onto the Application Server where they can be run by anyone with a browser that has a network connection to the IAS machine. Deployment can be as simple as just copying the .FMX files onto an appropriate directory on the IAS machine. Once deployed the form can be accessed via the following URL:-

http://ias_host_name:7779/forms90/f90servlet?form=<full_path_name_to_form.fmx>


The Oracle Enterprise Manager Server

Database management can be performed using the Oracle Enterprise Manager Server. Before doing this you must ensure that the appropriate listener.ora and tnsnames.ora files are set up for the database you wish to manage. Oracle provides two tools to help you do this and they can be accessed via Start->Oracle9i Application Server - ora9ias_home->Configuration and Migration Tools->Net Configuration Assistant and also Start->Oracle9i Application Server ->ora9ias_home->Configuration and Migration Tools->Net manager. Once the configuration files are set up properly you can start the Oracle Management Server via Start->Programs->Oracle9i Application Server ->ora9ias_home->Enterprise Manager Console. There are two methods of connecting to the databases. For routine basic database management tasks use Standalone Mode. If you connect this way you don't need to enter a username/password and you will be taken to a screen that will allow you to add databases manually by clicking on Navigator->Add database to Tree. Once this has been done clicking on the database name will display a screen asking for your database username/password.
If you need access to more advanced database management functionality such as jobs, events etc. then login under management server mode (username: 'your username - typically this is sysman, password:your_pass). If this is the first time you have logged in you will need to discover the database(s) you are interested in managing. To do this click on Navigator->Discover Nodes and follow the on-screen instructions. Note that if the database server node(s) you are interested in managing is not running an Intelligent Agent, automatic discovery will not work but you should still be able to discover the node manually. However manually discovered databases cannot use some of the advanced features available in management server mode such as jobs, events etc ., so it defeats the purpose of logging in via management server node in the first place. In other words if you need to access advanced database management functions such as events and jobs you need to make sure that your database server node is running Intelligent Agent and doing that is beyond the scope of my brain. Suffice it to say - among many other gotchas - make sure your Intelligent Agent node has a fully qualified domain name - nuff said.

NB Occasionally when logging in under management server mode you will get the following error message "VTK1000 - Unable to connect to the management server . Please verify you have entered the correct host name etc.". If this happens, and after checking for obvious errors such as incorrect username/password/server, you may need to start the Oracle Enterprise Manager manually using the oemctl utility under DOS. Do this by bringing up a DOS window and typing in the following:- 

oemctl start oms