oracle error

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

acool
Participant
Posts: 29
Joined: Tue Feb 17, 2004 4:31 pm

oracle error

Post by acool »

Hi,

I get this error message when I run the ORAOCI9 stage.


ds_loadlibrary: error in dlopen of oraoci9.so -ld.so.1: dsapi_slave: fata;: libclntsh.so.9.0: open failed: No such file or directory.

Does anyone know what the problem is?
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Were you ever able to use the OCI stage or is this your first time trying? Load Library errors typically mean the changes required in the "dsenv" file have not been made or are incorrect. Did you setup the appropriate $ORACLE_HOME and make changes to your Shared Library Path environment variable as documented? (varies by system)
-craig

"You can never have too many knives" -- Logan Nine Fingers
fk4u
Participant
Posts: 30
Joined: Fri May 12, 2006 12:38 am

Post by fk4u »

Hi All i m facing same error on Linux server.
ds_loadlibrary: error in dlopen of oraoci9.so - libclntsh.so: cannot open shared object file: No such file or directory

Can any one help me regarding setting dsenv file parameter values.

here is the current dsenv file contents.

LD_LIBRARY_PATH=/usr/lib:$ORACLE_HOME/lib:$ORACLE_HOME/lib32:`dirname $DSHOME`/branded_odbc/lib:$DSHOME/lib:$DSHOME/uv
dlls:$DSHOME/java/jre/lib/i386/client:$DSHOME/java/jre/lib/i386:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH
export ORACLE_HOME=$ORACLE_BASE/product/10gR2/db_1
export PATH=$ORACLE_HOME/bin:$PATH:/usr/local/bin
export ORACLE_SID=paked
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

They are not in the order you've shown here in the actual dsenv file, are they? That obviously wouldn't work as they would be set 'out of order'. :?

I also see you are using $ORACLE_BASE to set your $ORACLE_HOME value - is that also being set somewhere in the dsenv? I would make no assumptions about what is or is not set in that particular environment. Specifically set that was well.
-craig

"You can never have too many knives" -- Logan Nine Fingers
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

You'll also need to reverse the order you declare the Oracle libraries - DataStage is 32bit so the 'lib32' library needs to come first. Unless you know for a fact everything you have is 64bit...
-craig

"You can never have too many knives" -- Logan Nine Fingers
fk4u
Participant
Posts: 30
Joined: Fri May 12, 2006 12:38 am

Post by fk4u »

Thanks chulett
I m new to this so little confused . Let me write the complete file so please tell me whats the proper format for this. It will be great help for this.

========================================
\#!/bin/sh
####################################################################
#
# dsenv - DataStage environment file
#
# Copyright (c) 1997 - 2004 Ascential Software Corporation. All Rights Reserved
# This is unpublished proprietary source code of Ascential Software Corporation
# The copyright notice above does not evidence any actual or
# intended publication of such source code.
#
# This script is sourced by the DataStage dsrpcd daemon to establish
# proper environment settings for DataStage client connections.
#
# This script may also be sourced by bourne shells to establish
# proper environment settings for local DataStage use.
#
####################################################################

# PLATFORM SPECIFIC SECTION

set +u

if [ -z "$DSHOME" ] && [ -f "/.dshome" ]
then
DSHOME=`cat /.dshome`
export DSHOME
fi

if [ -z "$DSHOME" ]
then
DSHOME=/home/dsadm/Ascential/DataStage/DSEngine; export DSHOME
fi

if [ -z "$APT_ORCHHOME" ]
then
APT_ORCHHOME=; export APT_ORCHHOME
fi

if [ -z "$UDTHOME" ]
then
UDTHOME=/home/dsadm/Ascential/DataStage/ud41; export UDTHOME
UDTBIN=/home/dsadm/Ascential/DataStage/ud41/bin; export UDTBIN
fi

if [ -n "$DSHOME" ] && [ -d "$DSHOME" ]
then
ODBCINI=$DSHOME/.odbc.ini; export ODBCINI
HOME=${HOME:-/}; export HOME

#LANG="<langdef>";export LANG
#LC_ALL="<langdef>";export LC_ALL
#LC_CTYPE="<langdef>";export LC_CTYPE
#LC_COLLATE="<langdef>";export LC_COLLATE
#LC_MONETARY="<langdef>";export LC_MONETARY
#LC_NUMERIC="<langdef>";export LC_NUMERIC
#LC_TIME="<langdef>";export LC_TIME
#LC_MESSAGES="<langdef>"; export LC_MESSAGES

ORACLE_HOME=/u01/app/oracle/product/10gR2/db_1; export ORACLE_HOME
ORAHOME=/u01/app/oracle/product/10gR2/db_1; export ORAHOME

LD_LIBRARY_PATH=/usr/lib:$ORACLE_HOME/lib:$ORACLE_HOME/lib32:`dirname $DSHOME`/branded_odbc/lib:$DSHOME/lib:$DSHOME/uv
dlls:$DSHOME/java/jre/lib/i386/client:$DSHOME/java/jre/lib/i386:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH
fi
LD_LIBRARY_PATH=/usr/lib:$ORACLE_HOME/lib:$ORACLE_HOME/lib32:`dirname $DSHOME`/branded_odbc/lib:$DSHOME/lib:$DSHOME/uvdlls:$DS
HOME/java/jre/lib/i386/client:$DSHOME/java/jre/lib/i386:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH
SHLIB_PATH=$ORACLE_HOME/lib32:$ORACLE_HOME/lib:$SHLIB_PATH
export SHLIB_PATH
export ORACLE_HOME=$ORACLE_BASE/product/10gR2/db_1
export PATH=$ORACLE_HOME/bin:$PATH:/usr/local/bin
export ORACLE_SID=pakedwp


Thanks
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Weird - who set this up for you? :? This is the significant part...

Code: Select all

ORACLE_HOME=/u01/app/oracle/product/10gR2/db_1; export ORACLE_HOME 
ORAHOME=/u01/app/oracle/product/10gR2/db_1; export ORAHOME 

LD_LIBRARY_PATH=/usr/lib:$ORACLE_HOME/lib:$ORACLE_HOME/lib32:`dirname $DSHOME`/branded_odbc/lib:$DSHOME/lib:$DSHOME/uv 
dlls:$DSHOME/java/jre/lib/i386/client:$DSHOME/java/jre/lib/i386:$LD_LIBRARY_PATH 
export LD_LIBRARY_PATH 
fi 
LD_LIBRARY_PATH=/usr/lib:$ORACLE_HOME/lib:$ORACLE_HOME/lib32:`dirname $DSHOME`/branded_odbc/lib:$DSHOME/lib:$DSHOME/uvdlls:$DS 
HOME/java/jre/lib/i386/client:$DSHOME/java/jre/lib/i386:$LD_LIBRARY_PATH 
export LD_LIBRARY_PATH 
SHLIB_PATH=$ORACLE_HOME/lib32:$ORACLE_HOME/lib:$SHLIB_PATH 
export SHLIB_PATH 
export ORACLE_HOME=$ORACLE_BASE/product/10gR2/db_1 
export PATH=$ORACLE_HOME/bin:$PATH:/usr/local/bin 
export ORACLE_SID=pakedwp 
The first setting of ORACLE_HOME and LD_LIBRARY_PATH happen inside the if statement for ODBC. Not a problem per se, it should work there, but not really where it's 'supposed' to go.

Then it is set again outside the if. One place or the other, your LD_LIBRARY_PATH must be quite long and overloaded with duplicates at this point.

Then you set SHLIB_PATH. I'm not familiar enough with Linux to say for certain, but in my experience an O/S uses one or the other not both. Can you verify with your SAs which one of the two we really need to worry about setting please?

Then $ORACLE_HOME is set again using an environment variable that more than likely isn't set at that point. :?

I'd suggest setting it up like this, assuming a couple of things: 1) You are 32bit and 2) LD_LIBRARY_PATH is what needs to be set.

Code: Select all

fi 

ORACLE_HOME=/u01/app/oracle/product/10gR2/db_1; export ORACLE_HOME 
ORAHOME=/u01/app/oracle/product/10gR2/db_1; export ORAHOME 
export PATH=$ORACLE_HOME/bin:$PATH:/usr/local/bin 
export ORACLE_SID=pakedwp

LD_LIBRARY_PATH=/usr/lib:$ORACLE_HOME/lib32:$ORACLE_HOME/lib:`dirname $DSHOME`/branded_odbc/lib:$DSHOME/lib:$DSHOME/uvdlls:$DSHOME/java/jre/lib/i386/client:$DSHOME/java/jre/lib/i386:$LD_LIBRARY_PATH 
export LD_LIBRARY_PATH 

SHLIB_PATH=$ORACLE_HOME/lib32:$ORACLE_HOME/lib:$SHLIB_PATH 
export SHLIB_PATH
There's no need to set these three variables, it doesn't hurt but it also doesn't buy you anything here AFAIK:

ORAHOME
PATH
ORACLE_SID

Make sure you realize the line where LD_LIBRARY_PATH is set is one long line, not two or three. And I left in the setting of the SHLIB_PATH, I believe it falls into the same category as the three noted above.

Make a copy of your dsenv file before you change it. Keep in mind the fact that you'll need to stop and restart DataStage for any changes to this file to take effect.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

And make sure that DSHOME has been set before you start using it in other environment variable definitions.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
fk4u
Participant
Posts: 30
Joined: Fri May 12, 2006 12:38 am

Post by fk4u »

Thanks Ray and Chulett I will test the new dsenv file and let you know the results.
fk4u
Participant
Posts: 30
Joined: Fri May 12, 2006 12:38 am

Post by fk4u »

Hi there,
I changed the dsenv file as advised above and every thing was working. After two days we imported complete project and then tried to view the data or tried to import table definitions we are receiving again the same error.
I have not made any change to the env file but even then this problem appeared again.
It just looks odd that after the problem was fixed, it is appearing again.
Sorry for this again.
Here is the context of dsenv file.

#!/bin/sh
# PLATFORM SPECIFIC SECTION

set +u
export ORACLE_HOME=/u01/app/oracle/product/10gR2/db_1
export PATH=$ORACLE_HOME/bin:$PATH:/usr/local/bin
export ORACLE_SID=pakedwp
export ORAHOME=/u01/app/oracle/product/10gR2/db_1
export LD_LIBRARY_PATH=/usr/lib:$ORACLE_HOME/lib:$ORACLE_HOME/lib32:`dirname $DSHOME`/branded_odbc/lib:$DSHOME/lib:$DSHOME/uvdlls:$DSHOME/java/jre/lib/i386/client:$DSHOME/java/jre/lib/i386:$LD_LIBRARY_PATH
export SHLIB_PATH=$ORACLE_HOME/lib32:$ORACLE_HOME/lib:$SHLIB_PATH

if [ -z "$DSHOME" ] && [ -f "/.dshome" ]
then
DSHOME=`cat /.dshome`
export DSHOME
fi

if [ -z "$DSHOME" ]
then
DSHOME=/home/dsadm/Ascential/DataStage/DSEngine; export DSHOME
fi

if [ -z "$APT_ORCHHOME" ]
then
APT_ORCHHOME=; export APT_ORCHHOME
fi

if [ -z "$UDTHOME" ]
then
UDTHOME=/home/dsadm/Ascential/DataStage/ud41; export UDTHOME
UDTBIN=/home/dsadm/Ascential/DataStage/ud41/bin; export UDTBIN
fi

if [ -n "$DSHOME" ] && [ -d "$DSHOME" ]
then
ODBCINI=$DSHOME/.odbc.ini; export ODBCINI
HOME=${HOME:-/}; export HOME
fi
fk4u
Participant
Posts: 30
Joined: Fri May 12, 2006 12:38 am

Post by fk4u »

Any suggestion guys please???
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Patience! People have lives and are not here 24x7. Or they've got no idea.

Start over. When you say 'import table definitions' how exactly were you doing that? Paste your error in again, even if you think it is exactly the same. Oh, and what changed between now and when it used to work? 'Nothing' is (obviously) not the right answer.

Let's start with that.
-craig

"You can never have too many knives" -- Logan Nine Fingers
fk4u
Participant
Posts: 30
Joined: Fri May 12, 2006 12:38 am

Post by fk4u »

Hello Chulett!
In Oracel Oci Stage When I try to View Data It prompt me this error

ds_loadlibrary: error in dlopen of oraoci9.so - libclntsh.so: cannot open shared object file: No such file or directory

Similarly when i try to import table metadata in Oci stage i.e in Import Plug-in Metadata it gives me error that

Unable to Initialize Plug-in:

I have changed the rights on Ascential Dir (chmod 777 -R * ) and peformed Project Import from AIX server to This Linux Based Ascential Server.
I have compared my dsenv file with currently running AIX server and it seems ok.
But the plug-in error is still occuring.
Any idea?
Thanks
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Besides the fact that you really can't directly compare a dsenv file from an AIX box with a Linux box, seeing as how they are different operating systems and all, let's start with something simple.

Do you have an Oracle client installed on this Linux server? Are you certain that the Oracle information in the Linux dsenv file is correct for that server? Don't make any assumptions about where things are, verify.

The contents of the dsenv file you just posted - is it from the Linux server or the AIX server? I still find it confusing, an operating system uses either LD_LIBRARY_PATH or SHLIB_PATH - one or the other, not both. And yet you continue to set both. :?

Which one does Linux actually use? Anyone?
-craig

"You can never have too many knives" -- Logan Nine Fingers
fk4u
Participant
Posts: 30
Joined: Fri May 12, 2006 12:38 am

Post by fk4u »

Well I have verified the Oracle Path and it is exactly same what i placed in orale os user profile.
I can connect to database from dsadm user which is owner of datastage installation.
The file i placed earlier is of linux server which is currently facing the problem.
I m not sure about using which path value i.e LD_LIBRARY_PATH or SHLIB_PATH. Thats why i placed both and it works last time.
Any other point which you think we might check?
Post Reply