PATH search failure

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

dsex100
Premium Member
Premium Member
Posts: 45
Joined: Wed Apr 01, 2009 9:41 am

PATH search failure

Post by dsex100 »

Hello,

I'm running on Windows Server 2003 Enterprise Edition.

Oracle 11g database server and client both installed on the same machine.
Datastage enterprise server and client both installed on the same machine.

I have searched the datastage docs, dsxchange forum and google in order to try and solve this problem.

It has happened to others however it's still giving me a problem.


I have a parallel job that has an Oracle Enterprise Manager stage trying to "View Data" from an Oracle 11g database.

I was able to import the metadata column definitions as ODBC definitions from the Oracle 11g database in Manager and import those same definitions into the Oracle Enterprise Manager stage.

When I try to "View Data" from the stage I get the following error:

##I TOSH 000002 18:07:09(001) <main_program> orchgeneral: loaded
##I TOSH 000002 18:07:09(002) <main_program> orchsort: loaded
##I TOSH 000002 18:07:09(003) <main_program> orchstats: loaded
>##E TOSH 000205 18:07:09(004) <main_program> PATH search failure:
>##E TOSH 000000 18:07:09(005) <main_program> Error loading "orchoracle": Could not load "orchoracle": The specified module could not be found.
>##E TOSH 000000 18:07:09(006) <main_program> Could not locate operator definition, wrapper, or Unix command for "oraread"; please check that all needed libraries are preloaded, and check the PATH for the wrappers
>##E TCOS 000029 18:07:09(007) <main_program> Creation of step finished with status = FAILED


I didn't have the .net c++ compiler so I installed visual studio.net 2003 and then re-installed datastage.

In the administrator, I have set the following user-defined environment variables:

ORACLE_HOME String F:\oracle
ORACLE_SID String orcl
LIBPATH String F:\oracle\product\11.1.0\db_1\LIB

In my computer properties-environment variables I have a system variable called "Path" with this value:

F:\PROGRA~1\MKSTOO~1\bin;F:\PROGRA~1\MKSTOO~1\bin\X11;F:\PROGRA~1\MKSTOO~1\mksnt;F:\oracle_base\product\11.1.0\client_1\bin;F:\oracle\product\11.1.0\db_1\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem

As for the compiler variables, in Administrator I have these:

APT_COMPILEOPT -W/TP -W/EHa -DAPT_USE_ANSI_IOSTREAMS -c
APT_COMPILER cxx
APT_LINKER cxx
APT_LINKOPT -W/TP -W/dll -W/base:0x50000000

I've also created the DSXE role and assigned it to the oracle user

In the documentation in states:

Add ORACLE_HOME/bin to your PATH and ORACLE_HOME/lib to your LIBPATH, LD_LIBRARY_PATH, or SHLIB_PATH. (APT_ORCHHOME/bin must appear before ORACLE_HOME/bin in your PATH.)


I'm on Windows and I'm not sure if I need all of those variables plus I'm confused as to which "PATH" takes priorty, the path defined in Administrator or the one defined in the Windows Server 2003 environment variables.
dsex100
Premium Member
Premium Member
Posts: 45
Joined: Wed Apr 01, 2009 9:41 am

Post by dsex100 »

well I noticed that my ORACLE_HOME path was wrong

I had my Oracle base directory (the term base coming from the Oracle Universal Installer) instead of the home

so I corrected it and made it:

F:\oracle\product\11.1.0\db_1


still having problem also added the APT_ORCHHOME to my Path
however I have 2 home paths in my paths as you may notice above

one is the oracle client and the other is the server

i had specified the server for ORACLE_HOME

currently trying to modify Path
dsex100
Premium Member
Premium Member
Posts: 45
Joined: Wed Apr 01, 2009 9:41 am

Post by dsex100 »

I got this to work in the ODBC stage with an oracle client system dsn based on a named service I created with Oracle Net Manager (on the Oracle client), I can view data in the ODBC stage like this.


I'm still having this same error in the Oracle Enterprise stage however..

The problem is with the PATH as stated in the error message,

My PATH variable in Datastage Adminstrator has been set to my Oracle client's ORACLE_HOME/bin..
lstsaur
Participant
Posts: 1139
Joined: Thu Oct 21, 2004 9:59 pm

Post by lstsaur »

You need to re-execute the install.liborchoracle file. However, since the script's logic is only looking for 8i, 9i, and 10g, so you also need to modify the script's logic to add "oracle11g" in serveral places.
dsex100
Premium Member
Premium Member
Posts: 45
Joined: Wed Apr 01, 2009 9:41 am

Post by dsex100 »

ok I saw a fix for this on the ibm web site however it was for unix

I will look into what info I can find for this fix for windows.. does it involve using the mks toolkit?

I'm using Datastage 7.5x2 EE for windows
lstsaur
Participant
Posts: 1139
Joined: Thu Oct 21, 2004 9:59 pm

Post by lstsaur »

The instruction that I gave you is exactly for the 7.5x2 Windows EE. Did you browse the file install.liborchoracle to see where you have to modify the script's logic?
dsex100
Premium Member
Premium Member
Posts: 45
Joined: Wed Apr 01, 2009 9:41 am

Post by dsex100 »

yes I opened the file up in notepad,

this is how I modified it:
---------------------------------------------------------------
#! /bin/sh
# Copyright (c) 1998 - 2002 Ascential Software
# All Rights Reserved
#
# THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF ASCENTIAL SOFTWARE.
# The copyright notice above does not evidence any
# actual or intended publication of such source code.
#
# Install the Parallel Extender/Orchestrate Data Mining System Oracle
# driver
######################################################
##
## Maintenence log - insert most recent change at top
##
## Date Ecase# WHO Description
## --------------------------------------------------
##
## 12/07/04 none lgreene support Windows
## 06/15/2004 54490 cfreitas fix SHLIB_PATH for HPUX
## 05/27/2004 none cfreitas add LD_LIBRARY_PATH for
## linux oracle 10g support
## 05/25/2004 none cfreitas add SHLIB_PATH for hp
## add oracle 10g support
##
######################################################

. ./basic.sh

echo "Installing $asc_product_name Oracle driver"

#PATH=/opt/SUNWspro/bin:/usr/ccs/bin:$PATH
if [ `uname` = 'Windows_NT' ] ; then
PATH="$PATH"
else
PATH=/opt/SUNPRO6/SUNWspro/bin:/usr/ccs/bin:$PATH
fi
export PATH

oldwd=`pwd`
badoraclehome=0
askedoraclehome=0
major_version=8
minor_version=1
arch="`uname`"

intexit() {
echo '***Oracle installation interrupted. Cleaning up.'
badexit
}

badexit() {
rm -rf ${APT_ORCHHOME}/lib/oracle.install
cd $oldwd && rm -f findoraclehome
exit 1
}

goodexit() {
rm -rf ${APT_ORCHHOME}/lib/oracle.install
cd $oldwd && rm -f findoraclehome
exit 0
}

get_oraclehome() {
if [ "$askedoraclehome" = 0 ] ; then
previousspecifiedoraclehome='.'
lastspecifiedoraclehome='.'
while [ \( -z "$ORACLE_HOME" -o ! -d "${ORACLE_HOME}/bin" \) -a \( \( -n "$NONINTERACTIVE" -a "$previousspecifiedoraclehome" = "." \) -o \( -z

"$NONINTERACTIVE" -a "$ORACLE_HOME" != "$lastspecifiedoraclehome" \) \) ] ; do
if [ -n "$ORACLE_HOME" ] ; then
echo "Your specified Oracle home directory, $ORACLE_HOME,"
echo "does not appear to be valid, as $ORACLE_HOME/bin"
echo "is not present. If you wish to use this as your ORACLE_HOME"
echo "anyway, please re-enter it at the following prompt."
else
echo "No ORACLE_HOME is currently specified."
fi
if [ "$previousspecifiedoraclehome" != . ] ; then
ORACLE_HOME=''
fi
cat findoraclehome
noninteractivekey='ORACLE_HOME'
readdir 0 "$ORACLE_HOME" findoraclehome
noninteractivekey=''
if [ "$dirin" = "." -o -z "$dirin" ] ; then
echo "OK, skipping Oracle installation."
echo "You will not be able to run $asc_product_name jobs using Oracle"
echo "until you complete the installation. To complete the"
echo "installation at a later date, you will need to run"
echo "$APT_ORCHHOME/install/install.liborchoracle."
goodexit
fi
ORACLE_HOME="$dirin"
lastspecifiedoraclehome="$previousspecifiedoraclehome"
previousspecifiedoraclehome="$ORACLE_HOME"
done
echo "Using $ORACLE_HOME as ORACLE_HOME"
if [ ! -d "${ORACLE_HOME}/bin" ] ; then
echo 'WARNING: This directory does not actually exist. You will not'
echo 'be able to use Oracle with this directory as ORACLE_HOME'
echo 'and will have to set it correctly later.'
badoraclehome=1
fi
gotoraclehome=1
askedoraclehome=1
fi
export ORACLE_HOME
}

checkstatus() {
if [ $? != 0 ] ; then
localstatus=1
exitstatus=1
fi
}


install_8i() {
echo "Installing $asc_product_name driver for Oracle Version 8i"
oldwd=`pwd`

if [ `uname` = 'Windows_NT' ] ; then
cd $APT_ORCHHOME/bin
for f in *oracle8i* ; do
rm -f `echo $f | sed 's/8i//'`
cp -f $f `echo $f | sed 's/8i//'`
done
else
cd $APT_ORCHHOME/lib
for f in *oracle8i* ; do
rm -f `echo $f | sed 's/8i//'`
ln -s $f `echo $f | sed 's/8i//'`
done
fi

cd $oldwd
echo "$asc_product_name Oracle installation is complete."
}


install_9i() {
echo "Installing $asc_product_name driver for Oracle Version 9i"
oldwd=`pwd`

if [ `uname` = 'Windows_NT' ] ; then
cd $APT_ORCHHOME/bin
for f in *oracle9i* ; do
rm -f `echo $f | sed 's/9i//'`
cp -f $f `echo $f | sed 's/9i//'`
done
else
cd $APT_ORCHHOME/lib
for f in *oracle9i* ; do
rm -f `echo $f | sed 's/9i//'`
ln -s $f `echo $f | sed 's/9i//'`
done
fi

cd $oldwd
echo "$asc_product_name Oracle installation is complete."
}

install_10g() {
echo "Installing $asc_product_name driver for Oracle Version 10g"
oldwd=`pwd`

if [ `uname` = 'Windows_NT' ] ; then
cd $APT_ORCHHOME/bin
for f in *oracle10g* ; do
rm -f `echo $f | sed 's/10g//'`
cp -f $f `echo $f | sed 's/10g//'`
done
else
cd $APT_ORCHHOME/lib

for f in *oracle10g* ; do
rm -f `echo $f | sed 's/10g//'`
ln -s $f `echo $f | sed 's/10g//'`
done
fi

cd $oldwd
echo "$asc_product_name Oracle installation is complete."
}

install_11g() {
echo "Installing $asc_product_name driver for Oracle Version 11g"
oldwd=`pwd`

if [ `uname` = 'Windows_NT' ] ; then
cd $APT_ORCHHOME/bin
for f in *oracle10g* ; do
rm -f `echo $f | sed 's/11g//'`
cp -f $f `echo $f | sed 's/11g//'`
done
else
cd $APT_ORCHHOME/lib

for f in *oracle11g* ; do
rm -f `echo $f | sed 's/11g//'`
ln -s $f `echo $f | sed 's/11g//'`
done
fi

cd $oldwd
echo "$asc_product_name Oracle installation is complete."
}


try_oraclehome() {
if [ "$badoraclehome" = 1 ] ; then
try_nodefault
else
get_version
fi

if [ "$major_version" = 8 -a "$minor_version" = 1 ] ; then
install_8i
elif [ "$major_version" = 9 ] ; then
install_9i
elif [ "$major_version" = 10 ] ; then
install_10g
elif [ "$major_version" = 11 ] ; then
install_11g
else
echo "***Unknown version of Oracle. Defaulting to Oracle 8i. $asc_product_name may be unable to successfully connect to Oracle."
install_8i
fi
}

get_version() {
if [ "$arch" = "HP-UX" ] ; then
SHLIB_PATH=$APT_ORCHHOME/lib:$APT_ORCHHOME/java/jre/lib/PA_RISC:$APT_ORCHHOME/java/jre/lib/PA_RISC/server:$ORACLE_HOME/lib
export SHLIB_PATH
elif [ "$arch" = "Linux" ] ; then
LD_LIBRARY_PATH=$APT_ORCHHOME/lib:$ORACLE_HOME/lib
export LD_LIBRARY_PATH
fi

if [ `uname` = 'Windows_NT' ] ; then
if [ -x $ORACLE_HOME/bin/sqlplus.exe ]; then
version=`$ORACLE_HOME/bin/sqlplus.exe "-V" | grep SQL | tr "." " "`
major_version=`echo $version | awk '{print $3}'`
minor_version=`echo $version | awk '{print $4}'`
unset version
fi
elif [ -x $ORACLE_HOME/bin/sqlplus ] ; then
version=`$ORACLE_HOME/bin/sqlplus "-?" | grep SQL | tr "." " "`
major_version=`echo $version | awk '{print $3}'`
minor_version=`echo $version | awk '{print $4}'`
unset version
fi
}

try_nodefault() {
noninteractivekey='OracleVersion'
while true ; do
echo "The ORACLE_HOME you have specified,"
echo "$ORACLE_HOME, does not exist."
echo "I cannot determine what version of Oracle you are running."
/bin/echo "What version of Oracle are you running 8i, 9i or 10g (10g is supported on Sun only)? \c"
readstring 'no default'
noninteractivekey=''
case "$stringin" in
8i)
major_version = 8
minor_version = 1
break
;;
9i)
major_version = 9
minor_version = 0
break
;;
10g)
major_version = 10
minor_version = 0
break
;;
11g)
major_version = 10
minor_version = 0
break
;;
*)
echo 'There is no default; you must specify 8i, 9i or 10g or 11g.'
esac
done
}

cat > findoraclehome <<EOF
Please type the name of your Oracle installation directory. If you do
not wish to install the $asc_product_name Oracle driver at this time, please
answer ".".
EOF

if [ `uname` = 'Windows_NT' ]; then
libs_8i="`ls $APT_ORCHHOME/bin |grep oracle8i`"
libs_9i="`ls $APT_ORCHHOME/bin |grep oracle9i`"
libs_10g="`ls $APT_ORCHHOME/bin |grep oracle10g`"
libs_11g="`ls $APT_ORCHHOME/bin |grep oracle11g`"
else
libs_8i="`ls $APT_ORCHHOME/lib |grep oracle8i`"
libs_9i="`ls $APT_ORCHHOME/lib |grep oracle9i`"
libs_10g="`ls $APT_ORCHHOME/lib |grep oracle10g`"
libs_11g="`ls $APT_ORCHHOME/bin |grep oracle11g`"
fi

if [ -z "$libs_9i" -a -z "$libs_11g" -a -n "$libs_8i" ] ; then
install_8i
elif [ -z "$libs_8i" -a -z "$libs_11g" -a -n "$libs_9i" ] ; then
install_9i
elif [ -z "$libs_9i" -a -z "$libs_8i" -a -n "$libs_11g" ] ; then
install_10g
elif [ -z "$libs_8i" -a -z "$libs_9i" -a -z "$libs_11g" ] ; then
# Now what?
true
else
get_oraclehome
try_oraclehome
fi

goodexit

----------------------------------------------------
dsex100
Premium Member
Premium Member
Posts: 45
Joined: Wed Apr 01, 2009 9:41 am

Post by dsex100 »

so now I'm trying to "re" execute the install.liborchoracle with the command prompt

I go to F:Ascential\Datastage\PXEngine\install and type install.liborchoracle and it just opens it up in notepad again :)

do you use the command prompt to "re-execute" this file?

so i will probably find some errors in the file, I just need to find out how to re-execute the file.

thanks a lot for your help :)
dsex100
Premium Member
Premium Member
Posts: 45
Joined: Wed Apr 01, 2009 9:41 am

Post by dsex100 »

i set the ORACLE_HOME and APT_ORCHHOME using the sh command from the windows command prompt

(can do because mks is installed right)

so then it told me that it installed 9i

"Installing driver for Oracle Version 9i"

"Oracle installation is complete"

I restarted all datastage services and tried again, same error.
lstsaur
Participant
Posts: 1139
Joined: Thu Oct 21, 2004 9:59 pm

Post by lstsaur »

Hi,
Your modified logic is incorrect. It should be as follows:
......
if [ -z "$libs_9i" -a -z "$libs_10g" -a -z "$libs_11g" -a -n "$libs_8i" ] ; then
install_8i
elif [ -z "$libs_8i" -a -z "$libs_10g" -a -z "$libs_11g" -a -n "$libs_9i" ] ; then
install_9i
elif [ -z "$libs_9i" -a -z "$libs_8i" -a -z "$libs_11g" -a -n "$libs_10g" ] ; then
install_10g
elif [ -z "$libs_9i" -a -z "$libs_8i" -a -z "$libs_10g" -a -n "$libs_11g" ] ; then
install_11g
elif [ -z "$libs_8i" -a -z "$libs_9i" -a -z "$libs_10g" -a -z "$libs_11g"] ; then
# Now what?
true
dsex100
Premium Member
Premium Member
Posts: 45
Joined: Wed Apr 01, 2009 9:41 am

Post by dsex100 »

revised my above code and put in 11g where appropriate
also added the if logic

i get a particular error:

installing Oracle driver
[: install.liborchoracle 320: expression syntax error
Using F:\oracle_base\product\11.1.0Installling driver for Oracle Version 11g
cp: *oracle11g*: The system cannot find the file specified.
Oracle installation is complete.
$

the "cannot find the file specified" error I was also getting before I put in the logic

I checked line 320 of the file, it's the fi before it says goodexit

would you be able to show me the complete file?
lstsaur
Participant
Posts: 1139
Joined: Thu Oct 21, 2004 9:59 pm

Post by lstsaur »

Hi,
Don't have 7.5X2 at work. However, the following code is also wrong:
....
11g)
major_version = 10----->should be 11
minor_version = 0
break

Then try run it again.
dsex100
Premium Member
Premium Member
Posts: 45
Joined: Wed Apr 01, 2009 9:41 am

Post by dsex100 »

thank you for the pointer lstsaur,

here is my current file

it has a problem with the line

libs_11g="`ls $APT_ORCHHOME/bin |grep oracle11g`"

error:

cp: *oracle11g*: The system cannot find the file specified.


#! /bin/sh
# Copyright (c) 1998 - 2002 Ascential Software
# All Rights Reserved
#
# THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF ASCENTIAL SOFTWARE.
# The copyright notice above does not evidence any
# actual or intended publication of such source code.
#
# Install the Parallel Extender/Orchestrate Data Mining System Oracle
# driver
######################################################
##
## Maintenence log - insert most recent change at top
##
## Date Ecase# WHO Description
## --------------------------------------------------
##
## 12/07/04 none lgreene support Windows
## 06/15/2004 54490 cfreitas fix SHLIB_PATH for HPUX
## 05/27/2004 none cfreitas add LD_LIBRARY_PATH for
## linux oracle 10g support
## 05/25/2004 none cfreitas add SHLIB_PATH for hp
## add oracle 10g support
##
######################################################

. ./basic.sh

echo "Installing $asc_product_name Oracle driver"

#PATH=/opt/SUNWspro/bin:/usr/ccs/bin:$PATH
if [ `uname` = 'Windows_NT' ] ; then
PATH="$PATH"
else
PATH=/opt/SUNPRO6/SUNWspro/bin:/usr/ccs/bin:$PATH
fi
export PATH

oldwd=`pwd`
badoraclehome=0
askedoraclehome=0
major_version=8
minor_version=1
arch="`uname`"

intexit() {
echo '***Oracle installation interrupted. Cleaning up.'
badexit
}

badexit() {
rm -rf ${APT_ORCHHOME}/lib/oracle.install
cd $oldwd && rm -f findoraclehome
exit 1
}

goodexit() {
rm -rf ${APT_ORCHHOME}/lib/oracle.install
cd $oldwd && rm -f findoraclehome
exit 0
}

get_oraclehome() {
if [ "$askedoraclehome" = 0 ] ; then
previousspecifiedoraclehome='.'
lastspecifiedoraclehome='.'
while [ \( -z "$ORACLE_HOME" -o ! -d "${ORACLE_HOME}/bin" \) -a \( \( -n "$NONINTERACTIVE" -a "$previousspecifiedoraclehome" = "." \) -o \( -z "$NONINTERACTIVE" -a "$ORACLE_HOME" != "$lastspecifiedoraclehome" \) \) ] ; do
if [ -n "$ORACLE_HOME" ] ; then
echo "Your specified Oracle home directory, $ORACLE_HOME,"
echo "does not appear to be valid, as $ORACLE_HOME/bin"
echo "is not present. If you wish to use this as your ORACLE_HOME"
echo "anyway, please re-enter it at the following prompt."
else
echo "No ORACLE_HOME is currently specified."
fi
if [ "$previousspecifiedoraclehome" != . ] ; then
ORACLE_HOME=''
fi
cat findoraclehome
noninteractivekey='ORACLE_HOME'
readdir 0 "$ORACLE_HOME" findoraclehome
noninteractivekey=''
if [ "$dirin" = "." -o -z "$dirin" ] ; then
echo "OK, skipping Oracle installation."
echo "You will not be able to run $asc_product_name jobs using Oracle"
echo "until you complete the installation. To complete the"
echo "installation at a later date, you will need to run"
echo "$APT_ORCHHOME/install/install.liborchoracle."
goodexit
fi
ORACLE_HOME="$dirin"
lastspecifiedoraclehome="$previousspecifiedoraclehome"
previousspecifiedoraclehome="$ORACLE_HOME"
done
echo "Using $ORACLE_HOME as ORACLE_HOME"
if [ ! -d "${ORACLE_HOME}/bin" ] ; then
echo 'WARNING: This directory does not actually exist. You will not'
echo 'be able to use Oracle with this directory as ORACLE_HOME'
echo 'and will have to set it correctly later.'
badoraclehome=1
fi
gotoraclehome=1
askedoraclehome=1
fi
export ORACLE_HOME
}

checkstatus() {
if [ $? != 0 ] ; then
localstatus=1
exitstatus=1
fi
}


install_8i() {
echo "Installing $asc_product_name driver for Oracle Version 8i"
oldwd=`pwd`

if [ `uname` = 'Windows_NT' ] ; then
cd $APT_ORCHHOME/bin
for f in *oracle8i* ; do
rm -f `echo $f | sed 's/8i//'`
cp -f $f `echo $f | sed 's/8i//'`
done
else
cd $APT_ORCHHOME/lib
for f in *oracle8i* ; do
rm -f `echo $f | sed 's/8i//'`
ln -s $f `echo $f | sed 's/8i//'`
done
fi

cd $oldwd
echo "$asc_product_name Oracle installation is complete."
}


install_9i() {
echo "Installing $asc_product_name driver for Oracle Version 9i"
oldwd=`pwd`

if [ `uname` = 'Windows_NT' ] ; then
cd $APT_ORCHHOME/bin
for f in *oracle9i* ; do
rm -f `echo $f | sed 's/9i//'`
cp -f $f `echo $f | sed 's/9i//'`
done
else
cd $APT_ORCHHOME/lib
for f in *oracle9i* ; do
rm -f `echo $f | sed 's/9i//'`
ln -s $f `echo $f | sed 's/9i//'`
done
fi

cd $oldwd
echo "$asc_product_name Oracle installation is complete."
}

install_10g() {
echo "Installing $asc_product_name driver for Oracle Version 10g"
oldwd=`pwd`

if [ `uname` = 'Windows_NT' ] ; then
cd $APT_ORCHHOME/bin
for f in *oracle10g* ; do
rm -f `echo $f | sed 's/10g//'`
cp -f $f `echo $f | sed 's/10g//'`
done
else
cd $APT_ORCHHOME/lib

for f in *oracle10g* ; do
rm -f `echo $f | sed 's/10g//'`
ln -s $f `echo $f | sed 's/10g//'`
done
fi

cd $oldwd
echo "$asc_product_name Oracle installation is complete."
}

install_11g() {
echo "Installing $asc_product_name driver for Oracle Version 11g"
oldwd=`pwd`

if [ `uname` = 'Windows_NT' ] ; then
cd $APT_ORCHHOME/bin
for f in *oracle11g* ; do
rm -f `echo $f | sed 's/11g//'`
cp -f $f `echo $f | sed 's/11g//'`
done
else
cd $APT_ORCHHOME/lib

for f in *oracle11g* ; do
rm -f `echo $f | sed 's/11g//'`
ln -s $f `echo $f | sed 's/11g//'`
done
fi

cd $oldwd
echo "$asc_product_name Oracle installation is complete."
}

try_oraclehome() {
if [ "$badoraclehome" = 1 ] ; then
try_nodefault
else
get_version
fi

if [ "$major_version" = 8 -a "$minor_version" = 1 ] ; then
install_8i
elif [ "$major_version" = 9 ] ; then
install_9i
elif [ "$major_version" = 10 ] ; then
install_10g
elif [ "$major_version" = 11 ] ; then
install_11g
else
echo "***Unknown version of Oracle. Defaulting to Oracle 8i. $asc_product_name may be unable to successfully connect to Oracle."
install_8i
fi
}

get_version() {
if [ "$arch" = "HP-UX" ] ; then
SHLIB_PATH=$APT_ORCHHOME/lib:$APT_ORCHHOME/java/jre/lib/PA_RISC:$APT_ORCHHOME/java/jre/lib/PA_RISC/server:$ORACLE_HOME/lib
export SHLIB_PATH
elif [ "$arch" = "Linux" ] ; then
LD_LIBRARY_PATH=$APT_ORCHHOME/lib:$ORACLE_HOME/lib
export LD_LIBRARY_PATH
fi

if [ `uname` = 'Windows_NT' ] ; then
if [ -x $ORACLE_HOME/bin/sqlplus.exe ]; then
version=`$ORACLE_HOME/bin/sqlplus.exe "-V" | grep SQL | tr "." " "`
major_version=`echo $version | awk '{print $3}'`
minor_version=`echo $version | awk '{print $4}'`
unset version
fi
elif [ -x $ORACLE_HOME/bin/sqlplus ] ; then
version=`$ORACLE_HOME/bin/sqlplus "-?" | grep SQL | tr "." " "`
major_version=`echo $version | awk '{print $3}'`
minor_version=`echo $version | awk '{print $4}'`
unset version
fi
}

try_nodefault() {
noninteractivekey='OracleVersion'
while true ; do
echo "The ORACLE_HOME you have specified,"
echo "$ORACLE_HOME, does not exist."
echo "I cannot determine what version of Oracle you are running."
/bin/echo "What version of Oracle are you running 8i, 9i or 10g or 11g (10g is supported on Sun only)? \c"
readstring 'no default'
noninteractivekey=''
case "$stringin" in
8i)
major_version = 8
minor_version = 1
break
;;
9i)
major_version = 9
minor_version = 0
break
;;
10g)
major_version = 10
minor_version = 0
break
;;
11g)
major_version = 11
minor_version = 0
break
;;
*)
echo 'There is no default; you must specify 8i, 9i or 10g or 11g.'
esac
done
}

cat > findoraclehome <<EOF
Please type the name of your Oracle installation directory. If you do
not wish to install the $asc_product_name Oracle driver at this time, please
answer ".".
EOF

if [ `uname` = 'Windows_NT' ]; then
libs_8i="`ls $APT_ORCHHOME/bin |grep oracle8i`"
libs_9i="`ls $APT_ORCHHOME/bin |grep oracle9i`"
libs_10g="`ls $APT_ORCHHOME/bin |grep oracle10g`"
libs_11g="`ls $APT_ORCHHOME/bin |grep oracle11g`"
else
libs_8i="`ls $APT_ORCHHOME/lib |grep oracle8i`"
libs_9i="`ls $APT_ORCHHOME/lib |grep oracle9i`"
libs_10g="`ls $APT_ORCHHOME/lib |grep oracle10g`"
libs_11g="`ls $APT_ORCHHOME/bin |grep oracle11g`"
fi

if [ -z "$libs_9i" -a -z "$libs_10g" -a -z "$libs_11g" -a -n "$libs_8i" ] ; then
install_8i
elif [ -z "$libs_8i" -a -z "$libs_10g" -a -z "$libs_11g" -a -n "$libs_9i" ] ; then
install_9i
elif [ -z "$libs_9i" -a -z "$libs_8i" -a -z "$libs_11g" -a -n "$libs_10g" ] ; then
install_10g
elif [ -z "$libs_9i" -a -z "$libs_8i" -a -z "$libs_10g" -a -n "$libs_11g" ] ; then
install_11g
elif [ -z "$libs_8i" -a -z "$libs_9i" -a -z "$libs_10g" -a -z "$libs_11g"] ; then
# Now what?
true
else
get_oraclehome
try_oraclehome
fi

goodexit
dsex100
Premium Member
Premium Member
Posts: 45
Joined: Wed Apr 01, 2009 9:41 am

Post by dsex100 »

so.. a problem seems to be with the instance of the string *oracle11g* in the for loop
lstsaur
Participant
Posts: 1139
Joined: Thu Oct 21, 2004 9:59 pm

Post by lstsaur »

OK. Please go to your 11g client's Oracle_Home/bin directory; then issue a sqlplus -V to see whether you get something like "SQL*Plus Release 11.0.2.0 Production" or something else.
Post Reply