Oracle Analytics Cloud and Server

Welcome to the Oracle Analytics Community: Please complete your User Profile and upload your Profile Picture

OBIEE 12c -OCIEnvNlsCreate or OCIEnvInit failed to initialize environment.

Received Response
166
Views
12
Comments
sabyakgp
sabyakgp Rank 2 - Community Beginner

Hi Friends

I am facing a problem while running an Analysis in <host_name>:9502/analytics. I am able to see my subject area and pull the columns but when I click on the Results I get an ODBC error. The error says:

 [nQSError: 17002] 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

I have installed OBIEE 12c Release 2.1.4.0 in Oracle Linux 7 and it is running in Oracle Virtual Box. The same guest has also Oracle Database 12c Release 2 running from which BI would fetch the data. I have installed OBIEE 12c client tool in my Windows 10 and I am able to create the repository and I uploaded the repository to the BI server using uploadrpd. I have also installed Oracle client 12c in my Windows 10. My questions do I need to install Oracle client in the Linux system as well? I thought Oracle OBIEE comes with Oracle client. Or do I need to set some library path (LD_LIBRARY_PATH) to OCI library? I am not sure how to do that. It would be of great help if anyone could help me.

Thanks

«1

Answers

  • [Deleted User]
    [Deleted User] Rank 2 - Community Beginner

    Your server must be able to connect to the DB. Your client plays no role except for the creation of the RPD.

    So the questions are: Can the server connect to the DB with the information provided in your RPD? Is string correct for example?

    Can you connect to the DB on your server with SQL Developer when using the exact same connectivitiy information as in your RPD?

    Re "LD_LIBRARY_PATH": https://stackoverflow.com/questions/13428910/how-to-set-the-environmental-variable-ld-library-path-in-linux

  • sabyakgp
    sabyakgp Rank 2 - Community Beginner

    Hi Christian

    Thanks for your response. In my server I am able connect using SQLPLUS. I logged into SQPLUS with nolog and issued connect username/password@<host name>:1521/orclpdb and I am able to login.

    The Oracle DB and Oracle BI server are on the same system (Oracle Linux 7).

    I did not set any LD_LIBRARY_PATH in my source profile. Please let me know if I need to apply any more settings.

    Thanks

  • [Deleted User]
    [Deleted User] Rank 2 - Community Beginner
    sabyakgp wrote:with the information provided in your RPD? Is string correct for example

    Are you suing the EXACT same connect string?!

    For example: <span class="key">SERVER</span>=<span class="value">(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=MyHost)(PORT=MyPort))(CONNECT_DATA=(SERVICE_NAME=MyOracleSID)))</span>

    https://asktom.oracle.com/pls/asktom/f?p=100:11:0::NO::P11_QUESTION_ID:45033135081903

    https://docs.oracle.com/cd/E11882_01/network.112/e41945/concepts.htm#NETAG177

    And you were asking about how to set the LD path and that's explained in the SO post.

    sabyakgp wrote:Or do I need to set some library path (LD_LIBRARY_PATH) to OCI library? I am not sure how to do that.
  • sabyakgp
    sabyakgp Rank 2 - Community Beginner

    Hi Christian

    I have changed the data source to the following:

    (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = ol7-orcl-db)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orclpdb)))

    in the Data Source Name, saved the RPD and uploaded it to the server, stopped and started the obis1 service. Yet the same error appears when try to run my analysis.

    I am able to connect to the database using the same connect string in SQLPLUS:

    sqlplus system/oracle@(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = ol7-orcl-db)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orclpdb)))

    I am now totally lost as to what the issue could be and I need help.

    I have now set the LD_LIBRARY_PATH to $ORACLE_HOME/lib:/lib:/usr/lib

    Merry Christmas anyway

    Thanks

  • Madasamy -Oracle
    Madasamy -Oracle Rank 6 - Analytics Lead

    I understand that you are not using any external database client, and using the OOTB ones from BIEE.

    1. Can you create a DSN entry in odbc.ini file $DOMAIN/config/fmwconfig/bienv/core ( Choose the same datadirect driver in the driver specification) and perform an nqcmd for the same.

    Reference: https://docs.oracle.com/middleware/1221/biee/BIEMG/deploy_rpd.htm

    2. $DOMAIN_HOME/bitools/bin/nqcmd -d DATASOURCE_NAME -u USERNAME -p PASSWORD

    If that works, use the same DSN entry ( The name of the DSN entry that you will be providing on the odbc.ini file) on your Admintool and try to deploy the same to check this once.    

    If there is any error, please paste the same here.    

  • sabyakgp
    sabyakgp Rank 2 - Community Beginner

    Thanks. I am able to setup ODBC in the BI server (and nqcmd is working). But I am unable to setup in my Windows 10 host system. I have Obiee 12c 12.2.1.4.0 client. When I try to add ODBC source for Oracle BI Server I get an error "Oracle BI Server ODBC Driver could not be found. Please reinstall the driver - component not found in registry". However I can see the registry entry in HKEY_LOCAL_MACHINE->SOFTWARE->ODBCINST.INI with the driver.

    Please let me know if you have any solution for this.

  • sabyakgp
    sabyakgp Rank 2 - Community Beginner

    Hi Madasamy

    It seems that I am able to connect to the database through OCI now. However, when I am creating a simple Analysis I am getting the following error:

    Odbc driver returned an error (SQLExecDirectW).Error Codes: OPR4ONWY:U9IM8TAC:U9IM8TAC:U9IM8TAC:U9IM8TAC:OI2DL65P
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. (HY000)

    State: HY000. Code: 43113. [nQSError: 43113] Message returned from OBIS. (HY000)State: HY000. Code: 17001. [nQSError: 17001] Oracle Error code: 942, message: ORA-00942: table or view does not exist at OCI call OCIStmtExecute. (HY000)State: HY000. Code: 17010. [nQSError: 17010] SQL statement preparation failed. (HY000)SQL Issued: SELECT 0 s_0, "SH - SALES"."PRODUCTS"."PROD_CATEGORY" s_1, "SH - SALES"."PRODUCTS"."PROD_CATEGORY_DESC" s_2 FROM "SH - SALES" FETCH FIRST 65001 ROWS ONLY 

    This suggests at least I am able to connect to the database though my TNS entries as I am no longer getting the OCI client library not found error. But if OBIEE is connecting through OCI why it is throwing an ODBC error? Also in my RPD I am connecting as SYSTEM so why it not able to locate the table in the database?

    I am able to execute direct SQL query in the OBIEE analytics however.

    Can someone please help me? It seems I am very close. I have spent more than a week on the OBIEE setup but still hitting some or the other issues. Any help would be greatly appreciated.

    Thanks

  • Thomas Dodds
    Thomas Dodds Rank 8 - Analytics Strategist

    "ORA-00942: table or view does not exist at OCI call" <- user can't see the table (if it exists)

    why are you connecting as SYSTEM?  risky move ... SYS and SYSTEM should be for DBA only

    are you using fully qualified database object names "schema.object",  depending on your settings, you might be trying to fetch data from SCHEMA.TABLE_NAME but your physical queries are running as SYSTEM.TABLE_NAME ...

  • sabyakgp
    sabyakgp Rank 2 - Community Beginner

    Thanks Thomas.

    I have made it working now. I must say the behavior of BI Answer is not quite consistent. The error some time appears while it works the other time. May it be a browser issue? I am not sure. To my joy, after a week of struggle (with sleepless nights and innumerable re-installations and settings) I have finally set up OBIEE 12c test box. Thanks to all of you for your guidance and assistance. I shall be back with more questions soon

    Thanks

  • [Deleted User]
    [Deleted User] Rank 2 - Community Beginner
    sabyakgp wrote: I must say the behavior of BI Answer is not quite consistent. The error some time appears while it works the other time.

    I highly doubt that it's the product itself as otherwise pretty much no one would be using it