How to run custom queries for the Oracle monitor in LoadRunner

How to run custom queries for the Oracle monitor in LoadRunner

Running custom queries for the Oracle monitor in LoadRunner

The Oracle monitor in LoadRunner 7.x has the ability to run custom queries rather than only queries against V$SESSSTAT and V$SYSSTAT . When adding instances to the Oracle monitor, there are three available objects now: V$SESSSTAT, V$SYSSTAT and CUSTOM. CUSTOM will be the user-defined queries.

To define a custom queries:
1. Go to the <LoadRunner>\dat\monitors directory.
2. Edit VMON.CFG.
3. There are examples of two custom queries that are commented out in VMON.CFG. Uncomment and set CustomCounters under [V$ Monitor] to the number of queries you will have.

Note:
All queries must return a single integer value to be valid.

EXAMPLE of VMON.CFG that you will work with:

[V$ Monitor]
Counters=150 ;
CustomCounters=2 ;
How many seconds for each data sample?
SamplingRate=10

;[Custom0]
;Name must be unique
;Name=Five Hundred
;Description=This counter always returns 500.
;Query=SELECT 500 FROM DUAL
;IsRate=0

;[Custom1]
;Name=Thirty Five
;Description=This counter always returns 35.
;Query=SELECT 35 FROM DUAL
;IsRate=1

Note:
In the IsRate line, enter 0 if you want the database to report the counter as an absolute number.
If you want the database to report the change in the counter per unit time, enter 1.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s