APPX is the Premier Development and Runtime Environment for Business Application Software
(Answer) (Category) FAQ's - APPX Software, Inc. : (Category) APPX Utility : (Category) APPX System Administration :
How to connect Appx to Oracle.
Let's assume we have two different hosts, the Appx server host we'll call appxhost, the Oracle server host we'll call oraclehost. They may or may not be the same machine. (But they perform much better if on the same machine.)

You must install a package called "Oracle Client Software" on appxhost. As of Appx 4.1.a, you must install Oracle Client version 8, the version we built our 4.1.a engine against. (ecr #6417, 7008)

Appx connects to Oracle using the Oracle Client software (called the OCI). The OCI must be able to find a few configuration (and localization) files using the $ORACLE_HOME environment variable. (If you don't have $ORACLE_HOME properly defined, Appx displays the error message: "*Oracle initialization failed".) The typical way to define $ORACLE_HOME is to use the oraenv shell script. Just run: ".oraenv"

When Appx connects to Oracle, there are three different ways that the OCI can locate the Oracle server:

 1) Enter a server name in the Appx/Oracle FMS group (either an Oracle
    SID, or the name of a remote server as described below).

 2) If you leave the server name blank, the OCI uses the environment
    variable $TWO_TASK to locate a remote server.

 3) If you leave the server name blank and $TWO_TASK is not defined, the
    OCI uses the $ORACLE_SID environment variable to locate a local
    server.

You use $ORACLE_SID when appxhost and oraclehost are the same machine.
You use $TWO_TASK when appxhost and oraclehost are different machines.

The $ORACLE_SID environment variable refers to an entry in the /etc/oratab file (created by Oracle).

Here's a sample /etc/oratab file:

This file is used by ORACLE utilities. It is created by root.sh and updated by the Database Configuration Assistant when creating a database. A colon, ':', is used as the field terminator. A new line terminates the entry. Lines beginning with a pound sign, '#', are comments. Entries are of the form:

       $ORACLE_SID:$ORACLE_HOME:<N|Y>:
The first and second fields are the system identifier and home directory of the database respectively. The third filed indicates to the dbstart utility that the database should , "Y", or should not, "N", be brought up at system boot time. Multiple entries with the same $ORACLE_SID are not allowed.

     oracle:/opt/oracle/product/9.2.0:N

The $ORACLE_SID here is 'oracle' and the $ORACLE_HOME is '/opt/oracle/product/9.2.0'.

The oraenv script examines the /etc/oratab file. oraenv uses a command named dbhome to find the $ORACLE_HOME location given an $ORACLE_SID

The $TWO_TASK environment variable refers to an entry in the tnsnames.ora file (located somewhere in the $ORACLE_HOME directory tree). Here's a sample tnsnames.ora file:

      ORACLE.INTERNAL.APPX.COM =
      (DESCRIPTION =
      (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = badger.appx.com)(PORT = 1521)))
      (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = oracle)))

This entry defines a server named ORACLE. It also defines a server named ORACLE.APPX.COM). The body of this entry tells the OCI to find the DBMS server using the TCP protocol to connect to the listener running on port 1521 at badger.appx.com. You can refer to this server as 'oracle' or 'oracle.appx.com'.

The OCI supports many different protocols. TCP is probably the most common. On Windows machines, you'll find named-pipe servers. The fastest transport mechanism (which can only be used for local servers) is the bequeath adapter which uses shared memory to communicate between the client (appx) and the server (oracle).

Here's our recommendation for finding all of the magic values you need:

 1) If you know your Oracle server is installed on the same machine as
    your Appx server,
a) Examine the /etc/oratab file to find your Oracle SID
b) Examine the /etc/oratab file to find your $ORACLE_HOME
c) Make sure $ORACLE_HOME is defined in your start-appxd.sh script
d) Create an Oracle FMS group (type 5) and enter the Oracle SID in the server name field
2) If you know your Oracle server is installed on a remote host,
a) Examine the /etc/oratab file to find your $ORACLE_HOME. (In this case, $ORACLE_HOME will tell the OCI where to find config files.)
b) Examine the 'tnsnames.ora' file to find your remote server name. c) Make sure $ORACLE_HOME is defined in your start-appxd.sh script.
d) Create an Oracle FMS group (type 5) and enter the remote server name in the server name field.

Using the APPX/Oracle Connection, providing APPX/Oracle connection setup and operation instructions:

         www.appx.com/assets/asp/dynamic_generator.asp?pageid=605
How to Debug an APPX/Oracle Connection:
         www.appx.com/assets/asp/dynamic_generator.asp?pageid=682

[Append to This Answer]
2004-Feb-13 6:03am
Previous: (Answer) Commit parameter doesn’t seem to work?
Next: (Answer) Can I run different releases of APPX on the same server?
This document is: http://board.appx.com/cgi-bin/fom.cgi?file=201
[Search] [Appearance]
This is a Faq-O-Matic 2.719.
Copyright 2003 by APPX Software, Inc. All rights reserved.