Manohar Paleti

My photo
Hyderabad, AP, India
Working as a BI Consultant, Served for various organizations as an OBIEE Developer by building the BI Solutions for Business Decision Making..

Monday, May 16, 2011

Purging Cache on Post ETL Run

Hi Folks,

This is the easier way to purging the cache after ETL run.


In short, we are going to create a simple batch file that calls an NQ Command to clear the cache. This batch file will then be called during the Post Load phase of the ETL run via DAC.

Let’s get started:

1) First we need to navigate to the OracleBI\server\bin directory. In my case: D:\OracleBI\server\bin

2) Now let’s create a text file called PurgeAllCache.txt.

This file will contain the following command: Call SAPurgeAllCache()


 

3) Then we need to create a batch file that will call our text file. Let’s call it PurgeAllCache.bat and give it the following content:

nqcmd -d “AnalyticsWeb” -u RPDUserName -p RPDPassword -s D:\OracleBI\server\Bin\PurgeAllCache.txt

nqcmd invokes the nqcmd executable

-d is the DNS name

-u the user

-p the password

-s the file that contains the command

To make my life a little bit easier I have added a bit of logging to the batch file – just in case


4) You can now test your batch file and verify that it is indeed deleting your cache.


If not, your newly created log file will prove quite handy.

5) Now we need to create a new DAC task to call the file.



6) Then we need to add the task to the “Following Tasks” in our Execution Plan.

7) Build your Execution Plan. The “Clear Cache” task should now show up at the end of your “Ordered Tasks” of your Execution Plan and will be executed the next time the ETL is run.

And that’s it – quick and easy!



Tnx,










4 comments:

  1. Hi Mano, this is very good and nice to know. It was very helpful for me. Can we do the same kind of stuff in OBIEE 11g too or do we need to follow different startegy to purge the cache post ETL run ?

    ReplyDelete
  2. Hi Selva,

    You can use the same approach in 11g as well, Pls follow the same steps and let me know if you struck somewhere.
    will help you out there ...

    ReplyDelete
  3. Hello Manohar,
    Great post! would you be so kind as to post the text used for logging in a TXT file?
    thanks
    Dor

    ReplyDelete
  4. Hello Manohar,
    The above is for windows, how about if it is linux and if OBIEE and DAC are in two different servers.

    Thanks
    Deva

    ReplyDelete