Oracle OCI connection error in WAS - Websphere
This is a discussion on Oracle OCI connection error in WAS - Websphere ; we have a WAS ND for solaris x86 6.0.2.17 on Sun x2100 m2, OS is Generic_118855-36. version of Oracle Server is 10.1.0.3, version of Oracle client is 10.2.0.1. after datasource was configed, we tried test connection but got failed.
java.lang.Exception: ...
-
Oracle OCI connection error in WAS
we have a WAS ND for solaris x86 6.0.2.17 on Sun x2100 m2, OS is Generic_118855-36. version of Oracle Server is 10.1.0.3, version of Oracle client is 10.2.0.1. after datasource was configed, we tried test connection but got failed.
java.lang.Exception: java.sql.SQLException: ORA-12154: TNS:could not resolve the connect identifier specified DSRA0010E: SQL state = 66000?error code = 12,154
if we changed to thin mode, the connection is ok.
Variables setting in WAS:
ORACLE_BASE=/opt/oracle
export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/10.2.0
export ORACLE_HOME
ORACLE_SID=urpdb
export ORACLE_SID
NLS_LANG=AMERICAN_AMERICA.AL32UTF8
export NLS_LANG
ORA_NLS33=$ORACLE_HOME/nls/data
export ORA_NLS33
LD_LIBRARY_PATH=$ORACLE_HOME/lib32:$ORACLE_HOME/rdbms/lib32
export LD_LIBRARY_PATH
LIBPATH=$ORACLE_HOME/lib32:$ORACLE_HOME/rdbms/lib32
export LIBPATH
PATH=$PATH:$ORACLE_HOME/bin
export PATH
CLASSPATH=$ORACLE_HOME/jre:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
CLASSPATH=$CLASSPATH:/usr/java/jre:$ORACLE_HOME/network/jlib
export CLASSPATH
TNS_ADMIN=/opt/oracle/product/10.2.0/network/admin
export TNS_ADMIN
tnsnames.ora content:
URPDB =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 202.203.192.137)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = urpdb)
)
)
sqlnet.ora content:
NAMES.DIRECTORY_PATH= (TNSNAMES)
tnsping urpdb can ben passed, sqlplus xg/xgdb@urpdb is also ok.
If we change OS to redhat , oci is ok. but we want to know where problem is.
any comments are very appreciated
-
Re: Oracle OCI connection error in WAS
On Sep 21, 5:34 am, wrote:
> we have a WAS ND for solaris x86 6.0.2.17 on Sun x2100 m2, OS is Generic_118855-36. version of Oracle Server is 10.1.0.3, version of Oracle client is 10.2.0.1. after datasource was configed, we tried test connection but got failed.
>
> java.lang.Exception: java.sql.SQLException: ORA-12154: TNS:could not resolve the connect identifier specified DSRA0010E: SQL state = 66000?error code = 12,154
>
> if we changed to thin mode, the connection is ok.
>
> Variables setting in WAS:
>
> ORACLE_BASE=/opt/oracle
> export ORACLE_BASE
> ORACLE_HOME=$ORACLE_BASE/product/10.2.0
> export ORACLE_HOME
> ORACLE_SID=urpdb
> export ORACLE_SID
> NLS_LANG=AMERICAN_AMERICA.AL32UTF8
> export NLS_LANG
> ORA_NLS33=$ORACLE_HOME/nls/data
> export ORA_NLS33
> LD_LIBRARY_PATH=$ORACLE_HOME/lib32:$ORACLE_HOME/rdbms/lib32
> export LD_LIBRARY_PATH
> LIBPATH=$ORACLE_HOME/lib32:$ORACLE_HOME/rdbms/lib32
> export LIBPATH
> PATH=$PATH:$ORACLE_HOME/bin
> export PATH
> CLASSPATH=$ORACLE_HOME/jre:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
> CLASSPATH=$CLASSPATH:/usr/java/jre:$ORACLE_HOME/network/jlib
> export CLASSPATH
> TNS_ADMIN=/opt/oracle/product/10.2.0/network/admin
> export TNS_ADMIN
>
> tnsnames.ora content:
>
> URPDB =
> (DESCRIPTION =
> (ADDRESS_LIST =
> (ADDRESS = (PROTOCOL = TCP)(HOST = 202.203.192.137)(PORT = 1521))
> )
> (CONNECT_DATA =
> (SERVICE_NAME = urpdb)
> )
> )
>
> sqlnet.ora content:
>
> NAMES.DIRECTORY_PATH= (TNSNAMES)
>
> tnsping urpdb can ben passed, sqlplus xg/xgdb@urpdb is also ok.
>
> If we change OS to redhat , oci is ok. but we want to know where problem is.
>
> any comments are very appreciated
What scope did you define the datasource at? If you defined it at the
cell scope, then I believe the test connection is performed by the
deployment manager and its variables need to be set. If the scope is
node, then the node agent does the test.
-
Re: Oracle OCI connection error in WAS
I had a similar problem. I couldn't get OCI programs to connect using TNSNAMES. It was an Oracle bug. I downloaded patch 5389730 from Oracle and installed it using opatch. This fixed the problem.