Top Banner
OBIEE - How to limit the number of records fetch About There are 2 standard ways for an administrator to limit the number of rows returned : in the repository level in the presentation server level Articles Related OBIEE - BI Presentation Server (SAW/OBIPS) Repository Level -Max Rows At the rpd level, you can Manage Query Execution Privileges to limit queries by number of rows received by a user or group with the max rows parameter. It determines the number of rows that can be returned from the database. If the number of rows exceeds this limit, an ODBC error occurs. From the Administration Tool menu bar, choose Manage > Security. In the Security Manager dialog box, in the tree pane, select Users or Groups. In the right pane, right-click the name that you want to change and select Properties. In the User or Group dialog box, click the Permissions tab. In the User/Group Permissions dialog box, click the Query Limits tab and expand the dialog box to view all columns. To specify or change the maximum number of rows each query can retrieve from a database, in the Query Limits tab, perform the following steps: In the Max Rows column, type the maximum number of rows. In the Status Max Rows field, select a status. Click OK twice to return to the Security Manager dialog box. If a query exceeds the limit set by the Administrator, the end user will get the message: [nQSError: 60008] The query for user 'user1'
17
Welcome message from author
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
Page 1: Data

OBIEE - How to limit the number of records fetch

About

There are 2 standard ways for an administrator to limit the number of rows returned :

in the repository level in the presentation server level

Articles Related

OBIEE - BI Presentation Server (SAW/OBIPS)

Repository Level -Max Rows

At the rpd level, you can Manage Query Execution Privileges to limit queries by number of rows received by a user or group with the max rows parameter. It determines the number of rows that can be returned from the database. If the number of rows exceeds this limit, an ODBC error occurs.

From the Administration Tool menu bar, choose Manage > Security.

In the Security Manager dialog box, in the tree pane, select Users or Groups. In the right pane, right-click the name that you want to change and select Properties. In the User or Group dialog box, click the Permissions tab. In the User/Group Permissions dialog box, click the Query Limits tab and expand the

dialog box to view all columns. To specify or change the maximum number of rows each query can retrieve from a

database, in the Query Limits tab, perform the following steps: In the Max Rows column, type the maximum number of rows. In the Status Max Rows field, select a status. Click OK twice to return to the Security Manager dialog box.

If a query exceeds the limit set by the Administrator, the end user will get the message:

[nQSError: 60008] The query for user 'user1'exceeded the maximum query governing rows n from the database x

Status Max Rows or Status Max Time Description

Status Description Disable When selected, disables any limits set in the Max Rows or Max Time fields

Enable This limits the number of rows or time to the value specified. If the number of rows exceeds the Max Rows value, the query is terminated.

Ignore Limits will be inherited from the parent group. If there is no row limit to inherit, no limit is enforced

Presentation Server level

You can also limit the number of rows at the Presentation Server level.

Page 2: Data

Configuring the Maximum Number of Rows in an Answers Table View You can override the maximum number of rows that can appear in a Table view by modifying the Oracle BI Presentation Services configuration file (instanceconfig.xml) to add the following entry. The internal default is 65000. If the user exceeds this value, the server returns an error message when the table view is rendered. NOTE: This entry applies to the Table view, not the Pivot Table view. The following entry is an example: 95000

The ResultRowLimit entry controls the maximum value that can be set for :

DefaultRowsDisplayed, DefaultRowsDisplayedInDelivery, and DefaultRowsDisplayedInDownload entries.

To set :

DefaultRowsDisplayed, DefaultRowsDisplayedInDelivery, or DefaultRowsDisplayedInDownload

to a value that exceeds the current value of ResultRowLimit, you also must increase the value of ResultRowLimit to equal or exceed the value that you want to set.

In instanceconfig.xml, the node below limit the number of rows returned.

<ResultRowLimit>100</ResultRowLimit>

To display a message, set up the No result view in your report.

For the end user to limit the result set they would have to set a filter in the query.

Apr6

Setting LOGLEVEL from Answers

Posted on April 6, 2009

Setting LOGLEVEL from Answers

Normally, we check query in NQQuery.log file or from Answers also we can check the query directly.

Difference is: NQQuery.log contains all the queries and need to identify them by time the report run.

If it’s directly from Answers (go to Settings > Administration > Manage Sessions), log available for every report runs until the query is changed.

For every query of report there will be created one cursor, by accessing the cursor you can see the physical query generated by BI server.

Page 3: Data

If we are unable to see the log file or if we find any error message saying that, No Log found while trying to watch the query in log the first step in the mind is to check the LOGLEVEL. When creating rpd by default, loglevel takes 0 values for Administrator user.

If it’s set to 0, we go for 2 or 3 accordingly, such that, the query will be appeared.

For suppose, if you are accessing presentation service of another system and unable to see the query. You need not to set the LOGLEVEL=2 in the rpd presented in another system.

I am assuming that all cursors are closed and LOGLEVEL is zero for particular user.

Log into answers with user who has LOGLEVEL =0, run any report then go to Settings > Administration > Manage Sessions. Click on View Log option.

You will have error message or you may open the view log but you can’t find the query run at this moment because of loglevel – “0″. (To test this error message, you better delete the content of NQQuery.log completely but before doing this you need to stop your BI Server service then clear the content and save file again start BI Server service)

Close the window as well as cursors

Just go to advanced tab of particular report.

Scroll down to see the option: Prefix

Here write SET VARIABLE LOGLEVEL=2; (semi-colon at the end is must)

Page 4: Data

Cache in OBIEE!!

Different ways to Manage Cache in OBIEE!!

One of the most powerful features of OBIEE is the way it uses it’s cache. Good cache management can really boost your performance. From the system management point of view there are a couple of tips and tricks to influence the cache performance.

Here are few Examples of Managing Cache.

1. Purging the whole cache.

If you have a completed database reload or want to do some performance testing with your repository you might want to purge the whole cache.Put the following in a .txt file in your maintenance directory

// Purge complete cache// executed by cmd string:// nqcmd -d AnalyticsWeb -u Administrator -p Administrator -s

c:\obiee\mscripts\purgecompletecache.txt Call SAPurgeAllCache()

You can execute this from the commandline: nqcmd -d AnalyticsWeb -u Administrator -p Administrator -s c:\obiee\mscripts\purgecompletecache.txt

2. Purging the cache by table

If you have a major update of your dimensional tables you might want to clear the cache for just one table.Put the following in a .txt file in your maintenance directory:

// Purge complete cache// FileName: PurgeTableCache.txt// executed by cmd string:// nqcmd -d AnalyticsWeb -u Administrator -p Administrator -sc:\obiee\mscripts\PurgeTableCache.txt

Call SAPurgeCacheByTable( ‘AQIES_SH’, NULL, ‘SH’, ‘TBLTRY’ );

You can execute this from the commandline: nqcmd -d AnalyticsWeb -u Administrator -p

Page 5: Data

Administrator -s c:\obiee\mscripts\PurgeTableCache.txt

3. Purging the cache by query

Sometimes you only want to purge only “old” data from your cache.Put the following in a .txt. file in your maintenance directory:

// Purge cache by Query// FileName: PurgeQueryCache.txt// executed by cmd string:// nqcmd -d AnalyticsWeb -u Administrator -p Administrator -sc:\obiee\mscripts\PurgeQueryCache.txt

Call SAPurgeCacheByQuery(’SELECT * FROM TransactionsWHERE Transactions.Date_entered <= TIMESTAMPADD(SQL_TSI_YEAR, -1,NOW())’); // The “query” line must be one continues line! You can execute this from the commandline: nqcmd -d AnalyticsWeb -u Administrator -p Administrator -s c:\obiee\mscripts\PurgeQueryCache.txt

4 Purging the cache by database

Put the following in a .txt. file in your maintenance directory:// Purge cache by Database// FileName: PurgeDataBaseCache.txt// executed by cmd string:// nqcmd -d AnalyticsWeb -u Administrator -p Administrator -sc:\obiee\mscripts\PurgeDataBaseCache.txt

Call SAPurgeCacheByDatabase( ‘AQIES_SH’ );

// The “dbName” is the OBIEE name!

Page 6: Data

You can execute this from the commandline: nqcmd -d AnalyticsWeb -u Administrator -p Administrator -s c:\obiee\mscripts\PurgeDataBaseCache.txt

You can also purge cache direct from Dashboard by following the given steps.

Goto  Settings—>Administration —> Issue sql

call sapurgeallcache() and click issues sql..below is the screen shot

Page 7: Data

Thanks to-http://techblog.aqies.com/2011/04/11/cache-management-in-obiee/

PRESENTATION CACHEBy default, the cache files for the presentation server reside in the \tmp directory within the respective subdirectories sawcharts, sawrptcache and sawvc; while the xml cache files lying in the \tmp folder itself.   

Chart Cache - \OracleBIData\tmp\sawcharts\Report Cache - \OracleBIData\tmp\sawrptcache\ State Pool Cache - \OracleBIData\tmp\sawvc\XML Cache - \OracleBIData\tmp\See image below for an example of how to modify the instance config to explicitly change the default presentation cache directory locations. 

Additionally, and only specific to the XML Cache directory location change, you must also make a change to the nqconfig file as follows:

WORK_DIRECTORY_PATHS = "C:\DataSources\Cache\tmp";

ENABLE PRESENTATION CACHEIn instanceconfig.xml file ( \OracleBIData\web\config\instanceconfig.xml )

<ServerInstance> <Cache><Query><MaxEntries>100</MaxEntries><MaxExpireMinutes>60</MaxExpireMinutes><MinExpireMinutes>10</MinExpireMinutes><MinUserExpireMinutes>10</MinUserExpireMinutes></Query></Cache><ServerInstance>

DISABLE PRESENTATION CACHE FOR ENTIRE APPLICATIONIn instanceconfig.xml file ( \OracleBIData\web\config\instanceconfig.xml )<ServerInstance> <ForceRefresh>TRUE</ForceRefresh> </ServerInstance>

BYPASS PRESENTATION CACHE

Sometimes you want to bypass the presentation / cache for development purposes. Or more often when you get weird write back behaviour. Add this to the instanceconfig file:

Page 8: Data

<CacheMaxExpireMinutes>-1</CacheMaxExpireMinutes><CacheMinExpireMinutes>-1</CacheMinExpireMinutes><CacheMinUserExpireMinutes>-1</CacheMinUserExpireMinutes>

CLEAR PRESENTATION CACHEVia Oracle BI Web Application Settings-->Administration-->Reload Files and Metadata-->Finished

or

Via Server ServiceShut down Presentation Services to remove the files for the Presentation Cache

**If you delete cache files when Presentation Services are still running or SAW does not shut down cleanly, then various cache files might be left on disk.

BI SERVER CACHEBy default, the BI Server Cache is stored in the \OracleBIData\cache\ directory and stored as NQS*.tbl files. 

BI SERVER CACHE FILE NAME FORMAT

NQS(Prefix)_VMVGGOBI(Originating Server Name)_733547(Days passed since 1-1-0000)40458(Seconds passed since last midnight)_00000006(Incremental number since last BI server start).TBL

ENABLE BI SERVER CACHETo enable the query cache for the entire application, you must set the ENABLE cache parameter value to YES in the file nqsconfig.  ( \OracleBI\server\Config\NQSConfig.INI )ENABLE = YES;

DISABLE BI SERVER CACHE FOR ENTIRE APPLICATIONTo disable the query cache for the entire application, you must set the ENABLE cache parameter value to NO in the file nqsconfig.  ( \OracleBI\server\Config\NQSConfig.INI )ENABLE = NO;

BYPASS BI SERVER CACHE FOR SINGLE REPORTIn Answers, goto Advanced Reporting tab when building report, set Prefix value to following:SET VARIABLE DISABLE_CACHE_HIT=1, DISABLE_CACHE_SEED=1, LOGLEVEL=7;

CLEAR BI SERVER CACHETo clear the BI Server Cache files, run the following command file:  \OracleBI\server\cache_purge_reseed\call.bat  

This calls the purge.txt file, which simply contains the following command:call SAPurgeAllCache();

This will clear the BI Server Cache (.TBL) files in the Cache directory:  \OracleBIData\cache\

or

Page 9: Data

An alternate way of doing this is via the OBI Admin Tool, using the Cache management feature.

 

BI SERVER CACHE PERSISTENCE

...When a dynamic repository variable is updated, cache is automatically purged. This is designed behavior. Cache will be invalidated (i.e. purged) whenever the initialization block that populates dynamic repository variable is refreshed. The reason that refreshing a variable purges cache is that if a variable was used in a calculation, and the variable changed, then cache would have invalid data. By purging cache when a variable changes, this problem is eliminated.

Since this is the designed functionality, Change Request 12-EOHPZ3 titled ‘Repository variable refresh purges cache’ exists on our database to address a product enhancement request. The workaround is to go through the dynamic repository variables and verify that the variables are being refreshed at the correct interval. If a variable needs to be refreshed daily, there may be a need to set up a cache seeding .bat file that runs after the dynamic variable has been updated. If the cache seeding .bat file runs prior to the refresh of the dynamic variable refresh, then the cache will be lost.

BI SERVER CACHE ENABLED BUT NOT CACHINGOBIEE cache is enabled, but why is the query not cached?...

Non-cacheable SQL function:  If a request contains certain SQL functions, OBIEE will not cache the query. The functions are CURRENT_TIMESTAMP, CURRENT_DATE, CURRENT_TIME, RAND, POPULATE. OBIEE will also not cache queries that contain parameter markers.

Non-cacheable Table:  Physical tables in the OBIEE repository can be marked ‘non-cacheable’. If a query makes a reference to a table that has been marked as non-cacheable, then the results are not cached even if all other tables are marked as cacheable.

Page 10: Data

Query got a cache hit: In general, if the query gets a cache hit on a previously cached query, then the results of the current query are not added to the cache. Note: The only exception is the query hits that are aggregate “roll-up” hits, will be added to the cache if the nqsconfig.ini parameter POPULATE_AGGREGATE_ROLLUP_HITS has been set to Yes.

Caching is not configured: Caching is not enabled in NQSConfig.ini file.

Page 11: Data

Result set too big: The query result set may have too many rows, or may consume too many bytes. The row-count limitation is controlled by the MAX_ROWS_PER_CACHE_ENTRY nqsconfig.ini parameter. The default is 100,000 rows. The query result set max-bytes is controlled by the MAX_CACHE_ENTRY_SIZE nqsconfig.ini parameter. The default value is 1 MB. Note: the 1MB default is fairly small. Data typically becomes “bigger” when it enters OBIEE. This is primarily due to Unicode expansion of strings (a 2x or 4x multiplier). In addition to Unicode expansion, rows also get wider due to : (1) column alignment (typically double-word alignment), (2) nullable column representation, and (3) pad bytes.

Bad cache configuration: This should be rare, but if the MAX_CACHE_ENTRY_SIZE parameter is bigger than the DATA_STORAGE_PATHS specified capacity, then nothing can possibly be added to the cache.

Query execution is cancelled: If the query is cancelled from the presentation server or if a timeout

Page 12: Data

has occurred, cache is not created.

OBIEE Server is clustered: Only the queries that fall under “Cache Seeding” family are propagated throughout the cluster. Other queries are stored locally. If a query is generated using OBIEE Server node 1, the cache is created on OBIEE Server node 1 and is not propagated to OBIEE Server node 2

 

Thanks to-http://mjlong999.blogspot.in/2011/07/disabling-cache.html

Emails to Non-OBIEE users

without comments

This has been tested using Oracle BIEE version 10.1.3.4.1

Setup the SA System subject area as shown here (Nico’s post on the same here http://gerardnico.com/wiki/dat/obiee/sasystem)

I have used a simple Oracle Database table to set this up, created a table called USER all the columns as shown here and used the same to create the SA System

Page 13: Data

I have populate the USER table with some dummy details as shown here

Save the above answer query as “test” and this is used to identify the users to send the emails to. In this example I am trying to use the iBot to send the email to a user (srini) who is a non-obiee user with an external email address as shown above.

Page 14: Data

Now create the ibot

On the General tab -> Select Not Personalized from the drop-down.

On the Conditional Request tab -> Select the report “test” created above

On schedule tab -> Select Start Immediately to test the ibot immediately after saving

On Recipients tab -> Select the check box Determine recipients from Condition Request and select the column Logon from the Dropdown.

Page 15: Data

On the Destinations tab -> Select Email

and save the iBot. Thats it, it should now send an email to my external email address.

The anatomy and heritage of OBIEESuddenly interested about knowing the History and all the past versions of OBIEE including all its predecessors and major acquisitions :“These products have a long heritage with Oracle BIEE being based on Siebel Business Analytics which was originally created by nQuire in 1997 . The following major releases of the software have occurred” :Siebel Analytics 7.0 – 2002Siebel Analytics 7.5 – 2003Siebel Analytics 7.7 – 2004Siebel Analytics 7.8.2 and 7.8.3 – 2005Siebel Analytics / Oracle Business Intelligence 7.8.4 and 7.8.5 – 2006OBIEE 10gR3, 10.1.3.2 – Jan 2007 (MAUI)OBIEE 10gR3, 10.1.3.2.1 – Apr 2007OBIEE 10gR3, 10.1.3.3.0 – Aug 2007OBIEE 10gR3, 10.1.3.3.1 – Oct 2007 (Enhanced Localization)OBIEE 10gR3, 10.1.3.3.2 – Dec 2007 (Essbase Integration)OBIEE 10gR3, 10.1.3.3.3 – May 2007OBIEE 10gR3, 10.1.3.4 – Aug 2008 (Disco Migration ,Workspace Integration, SmartSpaceIntegration )

Page 16: Data

OBIEE 10gR3, 10.1.3.4.1 – Apr 2009As of today :The latest shipping versions are:OBIEE: 10.1.3.4.1Future expected version : OBIEE 11g (Negril) – A Major and Mega blockbuster release .Thanks Darryn for the above inputs .