Linking Oracle 6 & 7 Database Agents

It is sometimes necessary to link or re-link the Oracle database agents for one of the following reasons:

  1. No executable was supplied. We did not have access to an Oracle installation at the time but an object file was shipped which can be linked later.

  2. The executable does not interface to your Oracle installation. The original executable was linked to a version of Oracle whose libraries differ from yours.

After a normal agent installation you should follow the procedure below to build a new executable.

  1. Go to the openlink/lib directory and locate the file dbpaths.sample
    ie: cd ~/openlink/lib where ~ is any directories that precede openlink.

  2. Copy this file to a new file called dbpaths
    ie: cp dbpaths.sample dbpaths.

  3. Edit the file dbpaths using an editor of your choice, eg: vi, and set ORACLE6DIR or ORACLE7DIR equal to your ORACLE_HOME variable depending on your version of Oracle.

  4. Run the link script, either ldora6 or ldora7 depending on your version of Oracle. This should automatically build a new Oracle agent (ora6_sv or ora7_sv) and place it in your openlink/bin directory ready for you to use.

Errors in Linking & Other Link Scripts

The Link script provided will be generic across all UNIX platforms and should work with most versions of Oracle. If you encounter errors while relinking then:

1st Check that you are using the most appropriate link script. Available scripts are for versions:

ORACLE 6.x

ORACLE 7.1.x

ORACLE 7.2.x

ORACLE 7.3.x

You should choose the one that best matches you version of Oracle. Copy the relevant script to a new file and run it as described above.

2nd Note the library name that is causing you problems, edit the link script using a simple text editor such as VI, and remove the reference to the library.

It is quite common that the link script contains references to libraries that do not apply to you version or platform. Removing them is normal.

If after following the above procedure and linking fails please contact Technical Support who will be happy to help.

The \ character in the scripts signify to the linker that the command is continued on the next line, please leave them in.


ORACLE 6.x Link Script


#!/bin/sh
#
# ldora6
#
# $Id: ldora6,v 1.6 1995/03/30 16:36:20 openlink Exp $
#
# Link script for the Oracle 6 database agent
#
# (C)Copyright 1993, 1994 OpenLink Software.
# All Rights Reserved.
#
# The copyright above and this notice must be preserved in all
# copies of this source code. The copyright above does not
# evidence any actual or intended publication of this source code.
#
# This is unpublished proprietary trade secret of OpenLink Software.
# This source code may not be copied, disclosed, distributed, demonstrated
# or licensed except as authorized by OpenLink Software.
#
[ -s syslibs ] && . syslibs
[ -s dbpaths ] && . dbpaths

ORACLE_HOME=$ORACLE6DIR
export ORACLE_HOME
echo Linking Oracle 6 Database Agent
$ORACLE_HOME/bin/genosntab >osntab.c

cc -s -o ora6_sv ora6_sv.o osntab.c -L${ORACLE_HOME}/rdbms/lib -loci14c -lsqlnet -lora \
`cat $ORACLE_HOME/rdbms/lib/sysliblist` || exit 1

rm osntab.[co]
[ -x /usr/bin/mcs ] && /usr/bin/mcs -d ora6_sv
mv ora6_sv ../bin
ls -l ../bin/ora6_sv


ORACLE 7.1.x Link Script


#!/bin/sh
#
# ldora7
#
# $Id: ldora7,v 1.2 1994/10/11 09:31:51 openlink Exp $
#
# Link script for the Oracle 7 database agent
#
# (C)Copyright 1993, 1994 OpenLink Software.
# All Rights Reserved.
#
# The copyright above and this notice must be preserved in all
# copies of this source code. The copyright above does not
# evidence any actual or intended publication of this source code.
#
# This is unpublished proprietary trade secret of OpenLink Software.
# This source code may not be copied, disclosed, distributed, demonstrated
# or licensed except as authorized by OpenLink Software.


[ -s syslibs ] && . syslibs
[ -s dbpaths ] && . dbpaths

ORACLE_HOME=$ORACLE7DIR

export ORACLE_HOME

echo Linking Oracle 7 Database Agent

$ORACLE_HOME/bin/echodo cc -o ora7_sv -s -I. -O -L$ORACLE_HOME/lib ora7_sv.o \
$ORACLE_HOME/lib/libocic.a $ORACLE_HOME/lib/osntab.o -lsqlnet -lora -lora \
$ORACLE_HOME/lib/libpls.a -lsqlnet -lnlsrtl -lcv6 -lcore -lnlsrtl -lcv6 -locic -lnetwork -lcore \
`cat $ORACLE_HOME/rdbms/lib/sysliblist`

[ -x /usr/bin/mcs ] && /usr/bin/mcs -d ora7_sv
mv ora7_sv ../bin
ls -l ../bin/ora7_sv


ORACLE 7.2.x Link Script


#!/bin/sh
#
# ldora7
#
# $Id: ldora7,v 1.2 1994/10/11 09:31:51 openlink Exp $
#
# Link script for the Oracle 7 database agent
#
# (C)Copyright 1993, 1994 OpenLink Software.
# All Rights Reserved.
#
# The copyright above and this notice must be preserved in all
# copies of this source code. The copyright above does not
# evidence any actual or intended publication of this source code.
#
# This is unpublished proprietary trade secret of OpenLink Software.
# This source code may not be copied, disclosed, distributed, demonstrated
# or licensed except as authorized by OpenLink Software.


[ -s syslibs ] && . syslibs
[ -s dbpaths ] && . dbpaths

ORACLE_HOME=$ORACLE7DIR

export ORACLE_HOME

echo Linking Oracle 7 Database Agent

$ORACLE_HOME/bin/echodo cc -o ora7_sv -s -I. -O -L$ORACLE_HOME/lib \
ora7_sv.o $ORACLE_HOME/lib/libocic.a $ORACLE_HOME/lib/osntab.o -lsqlnet -lora \
$ORACLE_HOME/lib/libpls.a -lsqlnet -lora -lnlsrtl -lnlsrtl3 -lcv6 -lcore \
-lcore3 -lnlsrtl -lnlsrtl3 -lcv6 -locic -lcore -lcore3 -lora \
`cat $ORACLE_HOME/rdbms/lib/sysliblist`

[ -x /usr/bin/mcs ] && /usr/bin/mcs -d ora7_sv
mv ora7_sv ../bin
ls -l ../bin/ora7_sv


ORACLE 7.3.x Link Script


#!/bin/sh
#
# ldora7
#
# $Id: ldora7,v 1.2 1994/10/11 09:31:51 openlink Exp $
#
# Link script for the Oracle 7 database agent
#
# (C)Copyright 1993, 1994 OpenLink Software.
# All Rights Reserved.
#
# The copyright above and this notice must be preserved in all
# copies of this source code. The copyright above does not
# evidence any actual or intended publication of this source code.
#
# This is unpublished proprietary trade secret of OpenLink Software.
# This source code may not be copied, disclosed, distributed, demonstrated
# or licensed except as authorized by OpenLink Software.


[ -s syslibs ] && . syslibs
[ -s dbpaths ] && . dbpaths

ORACLE_HOME=$ORACLE7DIR

export ORACLE_HOME

echo Linking Oracle 7 Database Agent

$ORACLE_HOME/bin/echodo cc -o ora7_sv -s -I. -O -L$ORACLE_HOME/lib ora7_sv.o \
$ORACLE_HOME/lib/osntab.o -lxa -lsql -lsqlnet -lncr -lsqlnet -lclient \
-lcommon -lgeneric -lsqlnet -lncr -lsqlnet -lclient -lcommon -lgeneric \
-lepc -lnlsrtl3 -lc3v6 -lcore3 -lnlsrtl3 -lcore3 -lnlsrtl3 \
`cat $ORACLE_HOME/rdbms/lib/sysliblist`

[ -x /usr/bin/mcs ] && /usr/bin/mcs -d ora7_sv
mv ora7_sv ../bin
ls -l ../bin/ora7_sv