Purging the Cache using iBots on Tuesday, 19 August 2008 As you can create (seed) the cache using iBots, you can also purge it using the iBots. When you don’t have option of the EVENT POLLING tables this option is really helpful. While creating the iBot, you can schedule the iBot as per your requirement of when you need to purge the cache. Now in the ‘Advanced’ tab, you can ‘Add Action’ under section ‘Execute these actions when iBot conditions are satisfied’. Select ‘Custom Script’ option in this ‘Add Action’ menu and specify the javascript filename which contains the script to purge the cache. Following is the sample javascript which needs to be placed at following location; {drive}\OracleBI\server\Scripts\Common // purgeSASCache.js // // Purges the cache on SAS. // Parameter(0) - The user name to pass in to NQCMD. // Parameter(1) - The password for the aforementioned user. ///////////////////////////////////////////////////////// // The full path to nqcmd.exe var nqCmd = "C:\\OracleBI\\server\\Bin\\nQCmd.exe"; // The data source name var dsn = "AnalyticsWeb"; // The user to execute the queries var user = "Administrator"; // The password of the aforementioned user var pswd = "Administrator"; // The ODBC procedure call for purging the cache var sqlStatement = "{call SAPurgeAllCache()};"; ////////////////////////////////////////////////////////// // Returns a string from the file name //////////////////////////////////////////////////////////
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Purging the Cache using iBots on Tuesday, 19 August 2008
As you can create (seed) the cache using iBots, you can also purge it using the iBots. When you
don’t have option of the EVENT POLLING tables this option is really helpful.
While creating the iBot, you can schedule the iBot as per your requirement of when you need to
purge the cache. Now in the ‘Advanced’ tab, you can ‘Add Action’ under section ‘Execute these
actions when iBot conditions are satisfied’. Select ‘Custom Script’ option in this ‘Add Action’
menu and specify the javascript filename which contains the script to purge the cache.
Following is the sample javascript which needs to be placed at following location; {drive}\
OracleBI\server\Scripts\Common
// purgeSASCache.js
//
// Purges the cache on SAS.
// Parameter(0) - The user name to pass in to NQCMD.
// Parameter(1) - The password for the aforementioned user.
3. Once the cache is purged run only those iBots which are using the table using the below
command.
./saschinvoke -u userid/password -j $jobid
Automating cache purging without using OBIEE Scheduler
My team had a requirement to automate cache purging feature in OBIEE without using Scheduler services.
I will tell you why this scenario came.
We had around 100 iBots scheduled in Test environment. Developers did not want to make the scheduler services up as it would send wrong results to users. And we did not want to disable all the iBots by opening it one by one manually so that we can make the scheduler services up.
So I had to schedule the cache purging feature without using scheduler feature of OBIEE.
Now, I am gonna tell you how we can do this by using windows scheduler feature.
1. Go to Control Panel> System and Security> Administrative tools> Schedule tasks
2. Click on Schedule tasks. It will open Task Scheduler window.
3. On the right hand side, click on Create task. It will open a new window to create task.
4. Now give the name of the task. Go to the triggers tab. Click on New button to get New Trigger window.
5. Depending on your choice, you can change the trigger setting. Here I have done repeat task every 1 hour.
6. Go to Actions tab. Click on New button to get New Action window. Select the .exe file which you want to schedule. Here we will select nQcmd.exe which is present in c:\oraclebi\server\Bin folder. Add the arguments which is required to open nQcmd.exe and purge the cache. Here the arguments are :
-s is File path where the purge cache command is writtent.
Create a file SQL.txt and write the purge command:
{call SAPurgeAllCache()};
Place the file in Bin folder
7. Now in the conditions tab, you can give the condition as per your choice.
8. Now once you finish this task, your scheduled task will appear on Task Scheduler library. And it will trigger autmatically and purge the cache in OBIEE.
I would like to thank my friend Diptesh for helping me in this scenario.
OBIEE – iBot TrackingPosted on December 2, 2010 by John Lamont Watson
We have Delivers functionality in obiee to schedule report delivery; and we
also have a model provided for tracking application usage. What we don’t
seem to have is a model for tracking iBot usage.
I have a requirement to deliver an email to an Administrative group once
the daily data load is complete, or an error report should the load fail. This
is fine, out of the box Delivers functionality. However, the client does not
want to recieve the report more than once per day; we can do this as a
conditinoal request, but how do we know whether a report has already been
emailed out today.
Below are the steps that I have completed in order to provide a Subject
Area for Usage Tracking – iBots. I make no effort to cover out of the box
usage tracking or out of the box Delivers functionality; this information is
alreadys available in abundance, but please ask if you are unsure.
In The Physical Layer
If you have already deployed Usage Tracking then the following tables will
be available from your database; import them in the physical layer.
S_NQ_JOB
S_NQ_JOB_PARAM
S_NQ_INSTANCE
These tables are shown below, among others. Create an Alias for each of
these tables to represent your dimensions. Create an additional Alias for
the table S_NQ_INSTANCE to represent your fact table.
Please ignore the table and alias for S_NQ_ERR_MSG; it is not necessary for
my requirement; but, an optional extra.
Create the following Physical Tables and Alias'
Primary Keys for these Alias Tables should be created as below.
Dim_S_NA_JOB=JOB_ID
Dim_S_NQ_JOB_PARAM=JOB_ID
Dim_S_NQ_INSTANCE=JOB_ID, INSTANCE_ID
Fact_S_NQ_INSTANCE=JOB_ID, INSTANCE_ID
The Screenshot below shows how these Alias tables should relate to one
another. The Joins themselves are listed below the screenshot.
There are lots of extensions to this schema that could enhance it greatly. I
have thought of a couple this morning, but as its not required I’ll not have
the time to implement. Hopefully, you found this helpfull/interesting; let me
know if you extend it in an interesting way. Good Luck!
OBIEE: Seeding the Dashboards for End Users and Purging on Nightly Basis Many dashboards on most systems can be seeded with an iBot that runs overnight and caches the reports to the dashboards for quick access and less queries to the database. We created a series of iBots that are triggered by an initial iBot the purges the old Cache and starts the process of reseeding the data. First we created the iBot Purge Cache:
This iBot is run at 5:00am every night after the ETL completion by the Administrator user. The delivery content is the first report we needed to cache. The destination for the iBot is the Oracle BI Server Cache.