[OBIEE Issue] Whole Cache Purging Scripts

Be sure to set your Oracle BI home in the ‘.profile’, as the base installed directory of OBIEE, on the OBIEE Server. The following script would reference it as ORACLEBI

I will create a temporary “purge-log”  folder under Oracle BI Home that would store the log information of the cache purge.

1.You need to put the following lines into a .sql file. I call it purgecache.sql and put this file under purge-log folder temporarily.

// The below script should be run at the terminal to purge the OBIEE Cache.
// The following command should run from $ORACLEBI/server/Bin64
// nqcmd -d AnalyticsWeb64 -u Administrator -p -s /purge-log/purgebicache.sql
Call SAPurgeAllCache()

2.The script for purging all BI Server cache is shown below and I name it as cachepurge.sh.

# Custom Script for Purging OBIEE Server Cache
# Usage ./cachepurge.sh <OBI_Administrator_Password>
# Oracle BI Home is the Root Directory where OBIEE is installed
# and this parameter should be set in the profile
echo OracleBI Home Directory is $ORACLEBI
cd $ORACLEBI/setup
echo current directory is `pwd`
. common.sh
. sa-init64.sh
#echo 2
cd $ORACLEBI/server/Bin64
echo current directory is `pwd`
# script to run nqcmd
date >> $SAROOTDIR/purge-log/cacheoutput.log
echo ——– >> $SAROOTDIR/purge-log/cacheoutput.log
echo ‘OBIEE Whole Cache Purging’ >> $SAROOTDIR/purge-log/cacheoutput.log
echo ——– >> $SAROOTDIR/purge-log/cacheoutput.log
nqcmd -d AnalyticsWeb64 -u Administrator -p $1 -s $SAROOTDIR/purge-log/purgebicache.sql >> $SAROOTDIR/purge-log/cacheoutput.log
echo ‘script completed’

cd c1

4.You could run the script anywhere once you set up your Oracle BI home. Suppose I put the script under purge-log folder as well.The format to run the Cache Purging scripts is

$cd $ORACLEBI/purge-log
./filename.sh OBI_Administrator_password
Eg: To clear the OBIEE Cache as a whole, run the following command assuming ‘Administrator’ as the password
./cachepurge.sh Administrator