Kbase 19602: Oracle DSV: Static vs. Dynamic Linking on UNIX Platforms
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  10/15/2008 |
|
Status: Verified
GOAL:
When is it necessary to Probuild the Oracle DataServer executable?
GOAL:
When do we statically or dynamically link Oracle DataServer Executables?
FACT(s) (Environment):
Progress 7.x
Progress 8.x
Progress 9.x
Progress 9.1x
Progress 9.1A
Progress 9.1B
Progress 9.1C
Progress 9.1D
OpenEdge 10.x
UNIX
Oracle DataServer
FIX:
Under certain circumstances the Progress PROBUILD Utility must be run to generate the scripts to link the server portion of the DataServer to the client executable (_progres, by default). This is only necessary on UNIX platforms and in certain versions of Progress.
This solution outlines the methods of linking and describes when it is appropriate to include the server portion of the DataServer in the client executable.
There are two methods of linking the server portion of the DataServer into the Progress client executable:
- Static linking
- Dynamic linking
There is also one other method where we do not link the ORACLE symbols in our executables. Progress loads the shared library at connect time (dynamic access).
The PROBUILD utility defaults to a particular method depending upon which version of Progress you are running:
- In Progress Version 8.2C and earlier, the utility sets the
ORACLE Library Environment Variable (ORALIB) to link
statically.
- In Progress Versions 8.3, 9.0, and 9.1, the utility sets ORALIB
to link dynamically.
In some Progress versions, more than one method of linking is available. The situations and details about how to change the method of linking is described in the applicable sections below.
Progress Version 8.2C and earlier:
The Server portion of the DataServer must be built into the UNIX
client under either of these circumstances:
- The ORACLE connection is local.
- ORACLE is remote and networking is SQL*NET.
In these versions of Progress, the only method of linking the
server portion of the DataServer into the client is static.
The PROBUILD utility tries to automatically set the ORALIB
variable to the static libraries.
Progress Versions 8.3A and 8.3B:
The server portion of the DataServer must be built into the UNIX
client under either of these circumstances:
- The ORACLE connection is local.
- ORACLE is remote and networking is SQL*NET.
There are two methods of linking the server portion of the
DataServer into the client; statically and dynamically. PROBUILD
tries to set ORALIB to libclntsh.xx (.so for Solaris and
Compaq Tru64 (Digital UNIX), .sl for HP, .a for AIX).
However, depending on the ORACLE version and platform, Progress
might not be able to use the ORACLE shared library libclntsh.xx).
If Progress cannot use the shared library, errors might occur
during the execution of the link script or when the client
executable is invoked after the link script is run.
The following chart details which ORACLE versions Progress can
link to dynamically. If your platform is not listed in the chart
below, you must link statically.
If the chart indicates "static" for your platform/Oracle version,
you must set ORALIB manually so that it links statically. To
manually set ORALIB you must run the "make" command (Refer to the
DataServer for ORACLE Guide or Progress Solutions for
detailed information regarding how to set ORALIB manually ):
ORACLE Solaris HP-UX Compaq Tru64
(Digital UNIX)
7.0.x static static static
7.1.x static static static
7.2.2 static static static
7.3.2 static static dynamic
7.3.3 dynamic dynamic dynamic
7.3.4 dynamic dynamic dynamic
8.0.x dynamic dynamic dynamic
8.1.x dynamic dynamic dynamic
Progress Versions .9.0A and 9.0B:
In these versions of Progress, two client executables are
provided with the ORACLE DataServer license that have the server
portion of the DataServer built in. The two executables are
$DLC/bin/ora7rx and $DLC/bin/ora8rx.
The executable ora7rx is provided to allow connections to ORACLE
7 databases and ora8rx is provided to allow connections to ORACLE
8 databases.
These executables require libclntsh.xx in order to start running.
If this shared library is not on the system, ora7rx and ora8rx
will not run. Also, if your ORACLE version/platform is not listed
as "dynamic" in the chart above, even if the libclntsh.xx file is
on your system, it is unusable for Progress.
If your version/platform is not listed as "dynamic", you must
manually set ORALIB to link statically. To manually set ORALIB
you must run the "make" command. (Refer to the DataServer for
ORACLE Guide and to the Progress Solutions for detailed
information about how to set ORALIB manually).
Progress Version 9.1A:
This version of Progress loads the shared library (libclntsh.xx)
at ORACLE connect time (dynamic access). The Progress ORACLE DataServer license
provides an executable $DLC/bin/_progres that loads the ORACLE
shared library at the time of the connection to ORACLE.
This executable only works on platforms where ORACLE provides
a functional libclntsh.xx. In the chart above, the ORACLE
versions that are denoted "dynamic" are the versions that have
functional libclntsh.xx files. On these platforms, you should NOT
PROBUILD the executables, as we do not link the ORACLE library in
our executables.
The exception is if you are on HP-UX. You might have to PROBUILD
the executable depending on your ORACLE version to include the
reference to -lpthread libjava.sl. Refer to the Progress
Solution described at the end of this solution for more
details.
If your ORACLE version/platform does not denote "dynamic" on the
above chart, you must manually set ORALIB to link statically. To
manually set ORALIB, you must run the "make" command (Refer to
the DataServer for ORACLE Guide and to the Progress Solutions
for detailed information about how to set ORALIB manually).
Progress Version 9.1C:
The buildenv script will try to set ORALIB to the shared library
on IBM AIX, for ORACLE version 8. So this is the first release
where we try to link the ORACLE shared library dynamicaly on IBM
AIX..