Sybernet / Upgrade Instructions
Release 3.00
Mar 01, 2006

Upgrade Instructions

When you upgrade your Oracle database, no changes are required to Sybernet. It will continue to run on older versions of Oracle as well as newer versions of Oracle without your having to do anything. If you relink Sybernet, however, you may benefit from performance improvements and possibly bug fixes that are available only with the new Oracle libraries. This document describes the steps to relink Sybernet.

The following scripts are used to relink Sybernet software. Only software that uses OCI is affected. This includes Sybernet, Scout, and SQLPlus as well as the shared libraries extproc.so, oci.so and stdio.so. Sybercron (for example) does not use OCI and does not need to be relinked when you upgrade your Oracle database. You must edit the script called compile.oracle.setenv whenever you upgrade your Oracle database and you want to relink Sybernet software. If you are relinking Sybernet, you must also edit start_sybernet.

Summary of Upgrade Scripts

Name Description
compile.oracle.setenv
 
Set compiler flags and paths.
compile.oracle.cp
 
This script calls cp after it archives the destination.
relink
 
This script calls relink.oracle or relink.sybase or both if passed the name all.
relink.oracle
 
This script calls relink.oracle.software or all scripts if passed the name all.
relink.oracle.client
 
Relinks Sybernet.cgi.
relink.oracle.csv
 
Relinks csv.
relink.oracle.extproc
 
Relinks extproc.so.
relink.oracle.oci
 
Relinks oci.so.
relink.oracle.proxy
 
Relinks the Sybernet Utility proxy.
relink.oracle.scout
 
Relinks Sybernet.scout.
relink.oracle.secproc
 
Relinks secproc.so.
relink.oracle.server
 
Relinks Sybernet.
relink.oracle.sqlplus
 
Relinks SQLPlus.
relink.oracle.stdio
 
Relinks stdio.so.
relink.oracle.sybercron
 
Relinks Sybercron.
relink.oracle.utility
 
Relinks Sybernet.utility.
relink.oracle.validator
 
Relinks the Sybernet W3C validator.
start_sybernet
 
Initializes the Sybernet environment and starts sybernet


The following example illustrates how to relink SQLPlus for 9.2.0.1:

relink oracle sqlplus 9.2.0.1

In this example, relink calls relink.oracle and relink.oracle calls relink.oracle.sqlplus. Calling the relink script is the preferred usage and can be used to relink all Sybernet software by passing the keyword all. It is important to note that the above example only works if 9.2.0.1 is defined in the compile.oracle.setenv script.




COMPILE.ORACLE.SETENV

You must edit this script whenever you upgrade your Oracle database and you want to relink Sybernet to use the new Oracle libraries. All of the relink scripts "source" this file to set environment variables. In this script are three environment variables that are exported during the relink process. DEBUG (if defined) inhibits the copy script (compile.oracle.cp) from actually installing this software. Define this environment variable if you want to test the new software before you install it. ENVIRONMENT determines if you are linking against 32-bit or 64-bit binaries. With the release of 10g Oracle is no longer releasing 32-bit versions of their libraries. This variable must be one of -m32 or -m64. The other environment variable is LD_LIBRARY_PATH. This is explicitly undefined to keep you honest and to make sure the relink actually worked.

When you upgrade your Oracle database, add a new case statement to this script that corresponds to the version you are installing; for example, 9.2.0.1. In this case you need to set two variables: USERLIB and INCLUDE. USERLIB is the path to your LIB directory and is required for linking. INCLUDE points to Oracle's header files and is required for compiling. If you have installed the Oracle client on this machine, the USERLIB path is $ORACLE_HOME/lib. If you are using Oracle Instant Client, however, you need to point it to the Instant Client folder (because there is no LIB directory). Refer to the cases already defined to help you find your new libraries and header files.

The following example illustrates how to define USERLIB and INCLUDE for Oracle 9.2.0.1:

  case "9.2.0.1":
    #
    # Oracle 9i (9.2.0.1)
    #
    set ORACLE  = /u00/app/oracle/product/9.2.0.1
    set USERLIB = $ORACLE/lib
    set INCLUDE = "-I. -I$ORACLE/rdbms/demo -I$ORACLE/rdbms/public"
    breaksw

You are now ready to relink your software.

Trouble Shooting

ld: fatal: library -lclntsh: not found

Make sure USERLIB points to Oracle's library directory (usually lib).

You may need to define a soft link for libclntsh.so; for example, if you are upgrading to Oracle 9i, the library may be actually called libclntsh.so.9.1. Define a soft link using the following:

ln -s libclntsh.so.9.1 libclntsh.so



START_SYBERNET

You need to edit this script if you are relinking Sybernet. This script requires you to add both ORACLE_HOME and LD_LIBRARY_PATH for this version. Remember, however, that the library directory may or may not be in the LIB directory under ORACLE_HOME so make sure both are correct.

When you upgrade your Oracle database, add a new case statement to this script that corresponds to the version your are installing; for example, 9.2.0.1. If you plan to make this default version when Sybernet is restarted, edit the default case in this script as well.

The following example illustrates how to define ORACLE_HOME and LD_LIBRARY_PATH for Oracle 9.2.0.1:

  case "9.2.0.1":
    #
    # Oracle 9i (9.2.0.1)
    #
    setenv ORACLE_HOME      /u00/app/oracle/product/9.2.0.1
    setenv LD_LIBRARY_PATH  $ORACLE_HOME/lib:$LD_LIBRARY_PATH
    breaksw

You are now read to start Sybernet.

Trouble Shooting

libclntsh.so.9.1: open failed: No such file or directory

Your LD_LIBRARY_PATH does not include the path to your Oracle LIB directory. Remember, Oracle's lib path may or may not be in the LIB directory under ORACLE_HOME. Since you were able to successfully relink this software, go look at the define for USERLIB in compile.oracle.setenv. LD_LIBRARY_PATH should include the same path.



See Also

SQLPlus
Sybercron
Sybernet
Sybernet.scout
Sybernet.Utility



Sybernet is a trademark of SRI International.
Copyright © 1996-2008 SRI International. All Rights Reserved.
Denis D. Workman / http://Sybernet.sri.com/