Link to home
Start Free TrialLog in
Avatar of kingpukky
kingpukky

asked on

Error while logging into sqlplus prompt

I have installed oracle into an AIX5.1 machine using the "oracle" user belonging to "dba" group.
Now in oracle user everything works on fine, I can go to sqlplus and login etc etc
But I have another user "gateway" belonging to the "dba" group
If I login thru this user in sqlplus it gives me the following error
xpdm is my SID
******************************************
<gateway> $sqlplus
 SQL*Plus: Release 9.2.0.1.0 - Production on Tue Oct 11 19:43:44 2005
 Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.
 Enter user-name: system
Enter password:
exec(): 0509-036 Cannot load program oraclexpdm because of the following errors:
        0509-150   Dependent module libjox9.a(shr.o) could not be loaded.
        0509-022 Cannot load module libjox9.a(shr.o).
        0509-026 System error: A file or directory in the path name does not exist.
ERROR:
ORA-12547: TNS:lost contact
******************************************

Whats wrong??
Can you help me with this?
I have exported the following variables:
1. ORACLE_SID
2. ORACLE_HOME
3. Included ORACLE_HOME/bin in PATH
3. Included ORACLE_HOME/lib and ORACLE_HOME/lib32 in LIBPATH
Avatar of argonux
argonux

run
ldd sqlplus
This will give you the libraries oracle is having problems with
Have you installed all the oracle recomended OS Patches?


AIX 5L Version 5.1:
IBM software requirements for AIX 5L v5.1 support of Oracle Database 10g Release 1 (10.1.0.x) or Oracle9i Database Release 2 (9.2.0.5 and following):
HACMP PSSP GPFS JDK VAC Required AIX filesets

AIX 5L Version 5.1 ML06 plus:
< No additional PTFs required at this time >.
HACMP

HACMP V5.1 plus:
U498114 and all co-requisite PTFs.
-OR-
HACMP/ES CRM 4.5 plus
IY32874
PSSP
PSSP 3.5
-OR-

PSSP 3.4
GPFS

For latest GPFS information, see: http://publib.boulder.ibm.com/clresctr/library/gpfs_faqs.html

GPFS 2.1 plus:
U489058, U496347, U496395, IY52454
 
JDK
IBM JDK 1.3.1.11 (32 bit) IY47055
IBM JDK 1.4.1.2 (32 bit) IY47536
IBM JDK 1.4.1.1 (64 bit) IY47538

VAC
VAC 6 C and C++ for AIX July PTF (6.0.0.4) U489726
Required AIX filesets

The following filesets must be installed and committed:
bos.adt.base
bos.adt.lib
bos.adt.libm
bos.perf.libperfstat
bos.perf.perfstat
bos.perf.proctools

 

I've seen someone on metalink with a simular same problem on AIX 5.2,

ldd sqlplus gives :

sqlplus needs:
/usr/lib/libc.a(shr_64.o)
/usr/lib/libpthreads.a(shr_xpg5_64.o)
/usr/lib/libdl.a(shr_64.o)

ar: Permission denied
ar: 0707-113 The fopen system call failed on file shr_64.o.
/usr/lib/libodm.a(shr_64.o)

ar: Permission denied
ar: 0707-113 The fopen system call failed on file shr_64.o.
/usr/lib/libc.a(aio_64.o)

/unix
/usr/lib/libcrypt.a(shr_64.o)

ar: Permission denied
ar: 0707-113 The fopen system call failed on file shr_64.o.

Needed Applying the APAR IY48404 solved the problem on Aix 5L 5.2.
You should relink Oracle software after.
This is a referenced problem at IBM on this platform concerning the shared libraries.
Avatar of kingpukky

ASKER

Hi  argonux

Well I checked up with the pre requistes and I have all the apars installed.
Though as specified by you I dont have the bos.perf.proctools installed since it is not mentioned in the Oracle Documentation.

Also, I just noticed an unusual thing,
If I log in using to sqlplus using tthe sqlplus username/password@SID, it is logging in without any errors !!!

<gateway> $echo $ORACLE_SID
xpdm
<gateway> $sqlplus system/pass@xpdm

SQL*Plus: Release 9.2.0.1.0 - Production on Thu Oct 13 18:24:44 2005

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.


Connected to:
Oracle9i Enterprise Edition Release 9.2.0.1.0 - 64bit Production
With the Partitioning and Oracle Data Mining options
JServer Release 9.2.0.1.0 - Production

SQL>

But since I have specified the ORACLE_SID env variable, I feel the giving @xpdm is not necessary
Help !!Help !! Help !! Help !!
ASKER CERTIFIED SOLUTION
Avatar of argonux
argonux

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of slightwv (䄆 Netminder)
argonux is correct and should get full points.

Just wanted to expand a little.  

The ORACLE_SID env variable is used to connect to a local instance and proper setup of the users environment.  To force the default instance to be a remote DB you must set TWO_TASK on UNIX or LOCAL on Windows.
Hi Argonux,

I used TWO_TASK=xpdm env variable and now everything is working on fine.
Though I didnt get the logic y it is required
Can you explain please?

Hey thanks a lot !!!!!!

Cheers
Yes, I can explain.

The way you tried to connect before is called a direct/bequeath connection. This works by directly creating a new oracle process from sqlplus and comunicating with it using a pipe (no listener involved) . But since you were running it as a different user it was having some problems starting, I am not sure exactly why, maybe its permissions on the shared memory segments or the actual data files. In principle it should be able to work this way,even from another user, but maybe not on all platforms and depending on permissions, I am not sure.

TWO_TASK works differently, when TWO_TASK is defined any connection you make without specifying a TNS entry will get "@TWO_TASK" glued to it before trying to connect. This works exactly as if you have connected to "sqlplus system/pass@xpdm". This will actualy connect via the network listener (dependant on your tnsnames configuration) and the oracle process will get started by the oracle user, so there are no problems with permissions on shared memory or files.

Hope it clears it.
Check the permissions on the $ORACLE_HOME/bin/oracle executable.  Sounds like that may be the issue.
Yeah that clears it !!!
Thanks a lot !!