gyans
asked on
sqlplus in 10g Oracle
Hi ,
I have installed Oracle 10g version 2 on my test server and now in the process of upgrading the 9i db to 10g .
Cannot use sqlplus at all .
It gives the following error:
ld.so.1: sqlplus: fatal: relocation error: file /sandbox01/app/ora_oem/pro
Killed
Does any one have any clue at all as to what it means and how should I go about trouble shooting .
thank you ,Vinni
ASKER
This is my current ORACLE_HOME:
ORACLE_HOME = /oracle/apps/product/10.2. 0
I do have another 10g version 1 installed on the same server .
My current environment variable look like the following:
dbadmin-msw-01> env
_=/usr/bin/env
SQLPATH=.:/opt/users/oracl e:/opt/use rs/oracle/ dba:/opt/u sers/oracl e/dba/yy
SSH_TTY=/dev/pts/3
PATH=/usr/bin:/usr/ccs/bin :/usr/ucb: /etc:/usr/ local/bin: /var/opt/o racle:/usr /dt/
lib:.:/oracle/apps/product /10.2.0/bi n:/opt/bin :/bin:/usr /openwin/b in:/sandbo x01/
app/ora_oem/product/10g/li b
ORACLE_BASE=/sandbox01/app /ora_oem
EDITOR=vi
LOGNAME=oracle
MAIL=/var/mail//oracle
ORACLE_SID=test10g2
USER=oracle
ORACLE_DOC=/sandbox01/app/ ora_oem/do c
DISPLAY=10.100.106.218:0.0
SHELL=/bin/ksh
ORACLE_TERM=xterm
HOME=/opt/users/oracle
SSH_CONNECTION=10.100.126. 76 1827 10.102.21.147 22
SSH_CLIENT=10.100.126.76 1827 22
LD_LIBRARY_PATH=/sandbox01 /app/ora_o em/product /10g/lib:/ usr/dt/lib :/usr/open win/
lib:/usr/lib
TERM=xterm
ORACLE_HOME=/oracle/apps/p roduct/10. 2.0
PWD=/oracle/apps/product/1 0.2.0/rdbm s/admin
TZ=US/Eastern
How do I modify the LD_LIBRARY PATH, Thanks, vinni
ORACLE_HOME = /oracle/apps/product/10.2.
I do have another 10g version 1 installed on the same server .
My current environment variable look like the following:
dbadmin-msw-01> env
_=/usr/bin/env
SQLPATH=.:/opt/users/oracl
SSH_TTY=/dev/pts/3
PATH=/usr/bin:/usr/ccs/bin
lib:.:/oracle/apps/product
app/ora_oem/product/10g/li
ORACLE_BASE=/sandbox01/app
EDITOR=vi
LOGNAME=oracle
MAIL=/var/mail//oracle
ORACLE_SID=test10g2
USER=oracle
ORACLE_DOC=/sandbox01/app/
DISPLAY=10.100.106.218:0.0
SHELL=/bin/ksh
ORACLE_TERM=xterm
HOME=/opt/users/oracle
SSH_CONNECTION=10.100.126.
SSH_CLIENT=10.100.126.76 1827 22
LD_LIBRARY_PATH=/sandbox01
lib:/usr/lib
TERM=xterm
ORACLE_HOME=/oracle/apps/p
PWD=/oracle/apps/product/1
TZ=US/Eastern
How do I modify the LD_LIBRARY PATH, Thanks, vinni
LD_LIBRARY PATH seems to be good.
I hope you have installed the new Oracle under another user domain.
Because in the other case the environment variables will show to the old installation.
I hope you have installed the new Oracle under another user domain.
Because in the other case the environment variables will show to the old installation.
ASKER
The new installation was also done under Oracle user .
LD_LIBRARY_PATH=/sandbox01 /app/ora_o em/product /10g/lib(o ld home)
It has a different home .
ORACLE_HOME = /oracle/apps/product/10.2. 0 (new home)
When I am under the new home ,the environment variable should be pointing to the new home and the LD_LIBRARY-PATH is not pointing to the correct home .
How do I make it reflect ot the new home .
Oracle Support says the same thing ,that you Library path is not set for the new oracle home .
thanks
LD_LIBRARY_PATH=/sandbox01
It has a different home .
ORACLE_HOME = /oracle/apps/product/10.2.
When I am under the new home ,the environment variable should be pointing to the new home and the LD_LIBRARY-PATH is not pointing to the correct home .
How do I make it reflect ot the new home .
Oracle Support says the same thing ,that you Library path is not set for the new oracle home .
thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
By the way, LD_LIBRARY_PATH should be $ORACLE_HOME/lib
So, if the $ORACLE_HOME has the right dir, your libraries will be fine.
So, if the $ORACLE_HOME has the right dir, your libraries will be fine.
As I guessed you did the mistake to make your second installation under the 'Oracle' user of your first installation.
I this case all yours environment variables are pointing to the first Oracle Home.
There are two workarounds:
1. Either remove the installation, create a new Oracle user and make a new installation of Oracle
2. Or create 2 scripts that will set the needed environment variable sets according the instance you are intended to use.
Because you are in the initial step of using the new database I strongly recommend the workaround #1.
I this case all yours environment variables are pointing to the first Oracle Home.
There are two workarounds:
1. Either remove the installation, create a new Oracle user and make a new installation of Oracle
2. Or create 2 scripts that will set the needed environment variable sets according the instance you are intended to use.
Because you are in the initial step of using the new database I strongly recommend the workaround #1.
Normally sqlplus runs OK, but there is a famous bug in listener.ora file
that will prevent you to logon.
Whenever a program runs on UNIX under the 'root' permissions, the
environment variable "LD_LIBRARY_PATH" is not read for security reasons.
This means that all shared libraries, linked in dynamically into the
executable will have to be present in the "/usr/lib" directory.
To avoid problems with the shared libraries, there are three options:
1) Link the software statically
If the libraries are statically linked in, the 'ld' will not consider
them 'shared', solving the problem.
Downside here is that the executable will be a lot larger in size.
2) Copy or link the shared libraries in the "/usr/lib" directory.
An easy and straightforward trick is to create a symbolic link to
the needed shared library in "/usr/lib". Since this directory is
hardcoded into the library loader, all shared objects placed in this
directory will always be found.
Potential problems can arise in this case if several versions of
software are installed on the same machine. Since the "/usr/lib"
directory is the same for the entire machine, any file copied or
linked in this directory will be used throughout the machine,
meaning that other versions of software might be picking up the
wrong shared object.
3) Reference the shared objects by their absolute path. The best
solution, but also the hardest, as it includes modifying the make
file and adding the full hardcoded path to the used libraries.
After the modification, relink the software, to make sure the
libraries are found correctly.
Specifically for the agent, the following errors can be encountered if
there is a problem with the shared libraries:
ld: Can not map libclntsh.so.1.0
ld: Error opening libclntsh.so.1.0
ld: Can not find libnet.so
If an error is generated when the agent starts, do the following:
1) Relink the agent:
$ make -f ins_oemagent.mk install
2) Change the settings of the executable:
$ chmod u+s dbsnmp
$ chown root dbsnmp
3) Start again. If the problem persist, create a temporal symbolic
link for the offending library to the "/usr/bin" directory, and call
Customer Support to get a fix for the agent makefile to solve the
issue permenantly.
$ ln -s /usr/lib/libclntsh.so.1.0 $ORACLE_HOME/lib/libclntsh