Thursday, January 17, 2013

[OBIEE11g] Cannot connect to DB using OCI


I was not able to connect to DB in OBIEE 11g using OCI.
It happened all of a sudden in a working BI application.
I got the below error message for all the reports.
State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A
general error has occurred. [nQSError: 17003] Oracle gateway error:
OCIEnvNlsCreate or OCIEnvInit failed to initialize environment. Please check
your Oracle Client installation and make sure the correct version of OCI
libraries are in the library path. (HY000)
Solution:
Set the below values in the .profile of the unix OS user in which the application and the DB are installed. In my case both DB and apps were in the same machine
ORACLE_HOME=/obiee/oracle/obiee/db/tech_st/11.1.0 (DB home)
TNS_ADMIN=/obiee/oracle/obiee/db/tech_st/11.1.0/network/admin/OBIEE_ksebsobiee
LD_LIBRARY_PATH=$ORACLE_HOME/lib
LIB_PATH=$ORACLE_HOME/lib
PATH=$PATH:$ORACLE_HOME/lib:$ORACLE_HOME/bin