| APPX 5 connectivity to Oracle on HP-UX PA-RISC
How to configure APPX 5 to store data inside Oracle on HP-UX PA-RISC. |
|
I'll use the Oracle Easy Connect syntax to log in.
Failure without SHLIB_PATH |
|
< < | # /opt/instantclient_10_2/sqlplus larry/yacht@10.50.0.6:1521/customer
Error 6 initializing SQL*Plus
Message file sp1<lang>.msb not found
SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory |
> > | # /usr/lib/instantclient_10_2/sqlplus larry/yacht@10.50.0.6:1521/customer
/usr/lib/dld.sl: Can't open shared library: /b/216/lib//libnnz10.sl
/usr/lib/dld.sl: No such file or directory
Abort(coredump) |
| #
|
|
< < | Notice the failure to find libsqlplus.so in the text above. You can resolve this on AIX with an OS environment variable LIBPATH. An example is below.
Success with LIBPATH
#
# export LIBPATH=/opt/instantclient_10_2 |
> > | Notice the failure to open libnnz10 in the text above. You can resolve this on HP-UX PA-RISC with an OS environment variable SHLIB_PATH. An example is below.
Success with SHLIB_PATH |
| # |
|
< < | # /opt/instantclient_10_2/sqlplus larry/yacht@10.50.0.6:1521/customer |
> > | # export SHLIB_PATH=/usr/lib/instantclient_10_2
#
# /usr/lib/instantclient_10_2/sqlplus larry/yacht@10.50.0.6:1521/customer |
| |
|
< < | SQL*Plus: Release 10.2.0.4.0 - Production on Thu Jul 8 11:07:25 2010 |
> > | SQL*Plus: Release 10.2.0.4.0 - Production on Thu Jul 8 11:19:24 2010 |
|
Copyright (c) 1982, 2007, Oracle. All Rights Reserved. |
| SQL> quit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options |
|
< < | # |
> > | #
|
| APPX
We can configure APPX now that we know that we can connect to Oracle using the Instant Client library files via the special Instant Client version of SQL*Plus (you did perform that test right?). In order for APPX to successfully connect to Oracle via the Oracle Instant Client, APPX must have visibility of certain environment variables prior to the start of APPX. Setting these environment variables in the commonly used appx.env file will not work. Setting them in the shell would work for APPX sessions started in that shell session. You should consider setting them inside the service environment variable file so that all connections to APPX via TCP (even the text based ones via appx -c) will be able to connect to Oracle via the Oracle Instant Client. |
| Since the environment variables needed to enable APPX make use of the Oracle Instant Client must be present prior to the start of APPX, I've decided to place them in the APPX Login Manager environment variable file.
Environment variables |
|
< < | I'm going to set two environment variables, the first is for the OS (LIBPATH) and the second is for APPX (APPX_OCI_DIR). These will be placed inside my APPX Login Manager environment variable file /usr/local/appx/services/appx-8060.env).
pwd |
> > | I'm going to set four environment variables, the first two are for the OS (SHLIB_PATH and LD_PRELOAD), and the last two are for APPX (APPX_OCI_DIR and APPX_OCI_LIB). These will be placed inside my APPX Login Manager environment variable file /usr/local/appx/services/appx-8060.env).
pwd |
| /usr/local/appx/appx.502/services |
|
< < | #
cat appxd-8060.env |
> > | cat appxd-18060.env |
| # Appx connection manager environment variables
#
# The entries in this file will become |
| #
# letter case IS important in this file
# -------------------------------------------------- |
|
< < | APPX_KEYMAP=WINDOWS
APPXPATH=/usr/local/appx/appx.502/data
# APPX_DBG_CODE = 0xFFFFFFFF
APPX_OCI_DIR = /opt/instantclient_10_2
# APPX_OCI_LIB = /opt/instantclient_10_2/libclntsh.so |
> > | SHLIB_PATH=/usr/lib/instantclient_10_2
LD_PRELOAD=libclntsh.sl.10.1 |
| # APPX_SQL_CMD = /usr/local/appx/appx.502/appx_sql_cmd.txt |
|
< < | # LDR_PRELOAD = libclntsh.so
LIBPATH = /opt/instantclient_10_2
# |
> > | # APPX_DBG_CODE=0xFFFFFFF
APPX_OCI_DIR=/lib/instantclient_10_2
APPX_OCI_LIB=libclntsh.sl.10.1
|
| |
|
< < | The two environment varialbes needed for for the Oracle connection on AIX are LIBPATH and APPX_OCI_DIR. |
> > | The four environment varialbes needed for for the Oracle connection on HP-UX PA-RISC are SHLIB_PATH, LD_PRELOAD, APPX_OCI_LIB and APPX_OCI_DIR. |
| FMS settings
We need to create an FMS group of type 5 (Oracle) that will point to the Oracle server. To do this we will need the same five pieces of Oracle configuration data that we used when we performed a test connection to Oracle using the Instant Client version of SQL*Plus. The values that I'm using in this example are listed below in parenthesis. |