Know How

OBIEE-11g: To clear the OBIEE 11g repository cache via an automated command-line script

This document describes a method to clear the OBIEE 11g repository cache via an automated command-line script.

This examples shows how to purge all the cache entries on Linux/Unix , for other options see the documentation.

For Windows, modify the paths and use .bat files.

Step 1: Create a file in the following location called purgecache.txt


In the purgecache.txt file put the following single line with no quotes or tick marks:

Call SAPurgeAllCache()

Step 2: Set the environment to run the command: (Optional)

. [middlware_home]/instances/instance1/bifoundation/OracleBIApplication/coreapplication/setup/

Notice: dot space command. This will ensure the environment variables are carried through any subsequent shells that that command may call.

Step 3: Execute the following command, substituting your appropriate values. Do not include the [ ], they represent values that you need to substitute:

[middlware_home]/Oracle_BI1/bifoundation/server/bin/nqcmd -d AnalyticsWeb -u [your user id] -p [your password] -s [middlware_home]/instances/instance1/bifoundation/OracleBIApplication/coreapplication/setup/purgecache.txt

-d<data source name>
-u<user name>
-s<sql input file name>
-o<output result file name>

Click the Windows “Start” button and then click “Control Panel.” Click “Administrative Tools” in the list of utilities. Double-click the icon labeled “Data Sources (ODBC).” A list of DSNs display.

Note: AnalyticsWeb is the odbc dsn name which is used to connect to BI Server


D:\mw_home\Oracle_BI1\bifoundation\server\bin> nqcmd -d coreapplication_OH9650303466 -u weblogic -p T35yuiyr -s D:\mw_home\instances\instance1\bifoundation\OracleBIApplication\coreapplication\setup\PurgeCache.bat


Oracle BI ODBC Client
Copyright (c) 1997-2014 Oracle Corporation, All rights reserved

Call SAPurgeAllCache()
Call SAPurgeAllCache()

1 [59118] Operation SAPurgeAllCache succeeded!

Row count: 1

Processed: 1 queries



Step 4: Check that the cache was cleared

ls -ltr [middlware_home]/instances/instance1/bifoundation/OracleBIServerComponent/coreapplication_obis1/cache

Once you have tested the individual command lines, then you may incorporate the commands into a single script and use an automated method to call them (i.e. – cron job, windows scheduler, etc)

🌟For Windows user: Schedule a task in windows scheduler 🌟

Step 5: Schedule a task to invoke the purgeCache.bat file

Step 6: Goto Control Panel => schedule task => enter name => enter the schedule details => the file to invoke => Click Finish.

Let's make something intelligent together