This discussion is archived
6 Replies Latest reply: Jan 16, 2013 5:21 PM by 953333 RSS

Purging OBI Server cache through DAC post ETL run

953333 Newbie
Currently Being Moderated
Hello folks,
I am trying to schedule a task in DAC to purge all cache entries in BI Server after every ETL run. I could find Windows based installation related information on internet but in my case OBI is installed on a Unix machine. Can someone guide me how it can be done?

Any hint is appreciated.

Thanks,
  • 1. Re: Purging OBI Server cache through DAC post ETL run
    Maqsood Hussain Journeyer
    Currently Being Moderated
    Follow the link below to create a shell script to purge cache.

    http://obieeinnerview.blogspot.in/2012/10/cache-purging-in-obiee.html

    Then call this shell script using DAC after full and incremental load as mention in the blog below.

    http://obieemanu.blogspot.in/2011/05/purging-cache-on-post-etl-run.html

    Instead of purge.bat you will have to provide the path of the Cachepurge.sh in Unix.


    Hope this helps
  • 2. Re: Purging OBI Server cache through DAC post ETL run
    953333 Newbie
    Currently Being Moderated
    Thanks Maqsood,
    I was reading on the web about this issue. I found that first we need to run bi-init.sh before running nqcmd to launch a shell window that is initialized to your Oracle instance and then, run nqcmd from the resulting shell window with the desired options. I am not sure how to achieve this.
  • 3. Re: Purging OBI Server cache through DAC post ETL run
    968311 Newbie
    Currently Being Moderated
    Hi,

    We have recently implemented same in unix environment.

    create a shell script and first initialize environment variables manually and then call nqcmd <you can use sample > :



    export ORACLE_HOME=<PATH_TO>/middleware/Oracle_BI1
    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/<PATH_TO>/middleware/Oracle_BI1/bifoundation/odbc/lib
    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/<PATH_TO>/middleware/Oracle_BI1/bifoundation/server/bin
    export ODBCINI=/<PATH_TO>/middleware/instances/instance1/bifoundation/OracleBIApplication/coreapplication/setup/odbc.ini
    /<PATH_TO>/middleware/Oracle_BI1/bifoundation/server/bin/nqcmd -d AnalyticsWeb -u weblogic -p <password> -s /<PATH_TO>l/purgecache.txt


    PS: Purgecache.txt contains call to SAPurgeAllCache()

    plz mark if found helpful ;)
  • 4. Re: Purging OBI Server cache through DAC post ETL run
    953333 Newbie
    Currently Being Moderated
    Thank you very much.

    So this is what I need to do, correct me if I am wrong:

    1. Create cachepurge.txt file with command Call SAPurgeAllCache() and save it.

    2. Create a script file with following content:

    *#!/bin/sh*
    ORACLE_HOME=/app/oracle/FMWhome/Oracle_BI1
    export ORACLE_HOME
    ORACLE_INSTANCE=/app/oracle/FMWhome/instances/instance1
    export ORACLE_INSTANCE
    ORACLE_BI_APPLICATION=coreapplication
    export ORACLE_BI_APPLICATION
    JAVA_HOME=/app/oracle/FMWhome/Oracle_BI1/jdk
    export JAVA_HOME
    ESSBASEPATH=$ORACLE_HOME/clients/epm/Essbase/EssbaseRTC
    export ESSBASEPATH
    ODBCINI=$ORACLE_INSTANCE/bifoundation/OracleBIApplication/$ORACLE_BI_APPLICATION/setup/odbc.ini
    export ODBCINI
    *. $ORACLE_INSTANCE/bifoundation/OracleBIApplication/$ORACLE_BI_APPLICATION/setup/user.sh*

    /<PATH_TO>/middleware/Oracle_BI1/bifoundation/server/bin/nqcmd -d AnalyticsWeb -u weblogic -p <password> -s /<PATH_TO>l/purgecache.txt

    I copied the Bold part of script from bi-init.sh file. I am not sure do I need to include the last line: *. $ORACLE_INSTANCE/bifoundation/OracleBIApplication/$ORACLE_BI_APPLICATION/setup/user.sh*

    3. Create a new task in DAC to run this script and add it to the execution plan to run at the end.

    Correct?

    One more thing, we have DAC and OBI installed on two separate machines, would it be an issue? Where do I provide the user credentials for the user where OBI is installed(Do I need to)?


    Thanks,

    Edited by: 950330 on Jan 14, 2013 1:22 PM
  • 5. Re: Purging OBI Server cache through DAC post ETL run
    968311 Newbie
    Currently Being Moderated
    Hi,

    I could not find LD_LIBRARY_PATH environment variable in your bold script. if you are not getting and Library files related error then it should be fine, else try also putting below part..

    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/<PATH_TO>/middleware/Oracle_BI1/bifoundation/odbc/lib
    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/<PATH_TO>/middleware/Oracle_BI1/bifoundation/server/bin


    Even we tried creating script from bi-init.sh file and user.sh which will initiailize environment variable and then issue nqcmd command.. but it was not working for us.. might be some errror.. let us know if it worked for you..

    then we created small shell script with only required initialization of environment variables having followed by nqcmd it worked for us and cache purge was done successfully.

    Hmm..regarding your below question.

    One more thing, we have DAC and OBI installed on two separate machines, would it be an issue? Where do I provide the user credentials for the user where OBI is installed(Do I need to)?

    if you have OBIEE utilities setup and nqcmd available on DAC server then .. it should not be problem.. and you can put all in shell script and then call it from DAC/infa workflow it should work else you would have try setting up ssh without password which will connect to OBIEE Server and call nqcmd there to purge cache.

    Thanks
  • 6. Re: Purging OBI Server cache through DAC post ETL run
    953333 Newbie
    Currently Being Moderated
    Thanks!
    Yes you were right, I had to include lib path. I ran it without lib path first but that gave error. Also I created SSH link and I was able to invoke the script successfully. I have to try it with DAC now. Hopefully it will go though.

    Thanks again!

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points