Progress
DataServer
for ORACLE Guide
Setting ORALIB
Before you run the link scripts to generate executables that include the DataServer module, the ORALIB environment variable must point to the appropriate ORACLE libraries. The
buildenv
script, which the link scripts call, sets ORALIB for you. Try to run the link script or scripts that you created with PROBUILD before setting ORALIB yourself.NOTE: ORALIB settings vary depending on your installation of ORACLE and the ORACLE version you are accessing. You must reset ORALIB if you want to access a different version of ORACLE.Do not set ORALIB for executables that access ORACLE 7.3 or ORACLE8. Setting LD_LIBRARY_PATH, LIBPATH, or SHLIB_PATH when you run those executables provides the required library information.
The automatic setting of ORALIB might fail on some platforms. Indications that ORALIB is set incorrectly are:
These are alternate techniques for setting ORALIB:
If you need to probuild the ORACLE executables on HP-UX with ORACLE 7.3.3 and 7.3.4, you must set the ORALIB environment variable manually to include an additional library. This additional library is cma or /usr/lib/libcma.sl which is a subset of dce. The automatic script does not include this library. If you use ORACLE 7.3.3, or 7.3.4, you need to get a patch from ORACLE and regenerate the the libclntsh.sl.
Set the environment variable as follows:
When PROBUILD generates ldpro and ldorasrv, they pick up this definition and build the orasrv and _progres executables with the shared library.
Using a Shell Script to Set ORALIB
If you know the appropriate value for ORALIB given your installation of ORACLE, write a shell script named
oralib.sh
to set ORALIB to that value as follows:
Setting ORALIB Manually
Follow these steps to determine possible values for ORALIB using the ORACLE PRO*C sample program.
- On your host machine, set PATH to
$PATH:$ORACLE_HOME/bin
.- Make sure that you have installed the PRO*C product for ORACLE on your host machine. PRO*C contains the libraries that allow you to access the ORACLE database, the sample make file, and the sample C program.
For Version 7.3 and later, these files typically reside in
$ORACLE_HOME/rdbms/demo/
. Earlier versions resided in$ORACLE_HOME/rdbms/lib/
- Copy the files from
demo/
to another directory.- Delete the
sample.o
file, if it exists.- Enter one of the following commands to use the make file to link the ORACLE sample C program and direct the output to a temporary file. On some platforms, the sample C program is called
samplec
:ORACLE 7.3
ORACLE8
You must have read, write, and execute permissions to run the make file.
If you link the sample C program successfully, the make command displays a list of ORACLE libraries in the order it uses them. It displays some libraries more than once. Some of the library names are preceded by a -l. The -l indicates that an alias for a library name is being used.
If you still cannot link the sample C program successfully, see the ORACLE documentation for information on linking the program.
- Edit the
tmpfile
as follows:
- Delete the beginning of the file up to and including
-o sample sample.o
.- For ORACLE 7.2, 7.3, and ORACLE8 add
$ORACLE_HOME/lib/libclient.a
as the first entry in the file.- Delete all entries of -llib-name for which there is not a corresponding entry of liblib-name in
$ORACLE_HOME/lib
.- Delete the -lm at the end of the file, if applicable.
- For the libraries that exist in your
ORACLE_HOME/lib
directory, replace all the -l prefixes with$ORACLE_HOME/lib/lib
and add a .a extension. For example, change-lsqlnet
to$ORACLE_HOME/lib/libsqlnet.a
if this library exists in your$ORACLE_HOME/
directory.This is a sample make file. Strike-through lines indicate the information that you must delete:
- Add the appropriate commands and symbols to the
tmpfile
so that the remaining text becomes a setting for the ORALIB environment variable. For example, add thesetenv
command to the remaining text.
If you are using a Bourne shell, add the following command to the remaining text.
- Export the environment variable.
- Run the
tmpfile
from the system prompt within the same shell to set ORALIB.If the following message appears, you can ignore it:
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |