Consultor Eletrônico



Kbase 19643: Oracle dataserver - The Advantages/Disadvantages of Static Versus Dynamic Linking
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   15/10/2008
Status: Verified

GOAL:

Oracle dataserver - The advantages/disadvantages of static versus dynamic linking

FACT(s) (Environment):

IBM AIX
HP/UX 11
Sun Solaris

FIX:

Precompiled and OCI applications can be linked with Oracle client libraries (libclntsh) either statically or dynamically.

In static linking, the libraries and objects of the entire application are linked together into a single executable program. As a result, application executables can become fairly large. Statically linked applications though large but are less dependent on the location or availability of the library itself since the library is linked into the application.

With dynamic linking, the executing code partly resides in the executable program but also in libraries that are dynamically linked by the application at runtime. Libraries that are linked at runtime are called dynamic or shared libraries.
Dynamic linking offers two primary benefits:

1) Smaller disk requirements:
Different applications, or different invocations of the same
application, can use the same shared or dynamic library. As
a result, overall disk requirements are reduced.

2) Smaller main memory requirements:
The same shared or dynamic library image (for example, the
in-memory copy), can be shared by different applications. A
library needs to be loaded into the main memory only once and
then multiple applications can use the same library. The
result is a reduction in main memory requirements.

The ORACLE shared library is under $ORACLE_HOME/lib, and file name changes depending on the operating system are:
-- AIX: libclntsh.a
-- Sun Solaris and Digital UNIX: libclntsh.so
-- HP/UX: libclntsh.sl