How to configure Oracle Database Monitoring - LoadRunner

Configure Oracle Database Monitoring in LoadRunner


Most of the time, with every application, there comes with the Database setup and most of the time, it’s Oracle (being the biggest player in the DB industry). Fundamentally,

(1) it requires a Oracle client to be installed on the machine as a native client.

(2) A valid account and privileges to the Oracle V$ tables that holds statistics.

(3) Ensure that you can properly query from the Controller using the SQL tools and extract data from the V$ table and you should be fine with the setup.

Let’s go through an overview for implementing the Oracle DB. Bascially, we are doing in this sequence:

1. Get an account to the V$ tables that contains the monitoring data.
2. Install 32-bit Oracle client on the Controller machine.
3. Ensuring that proper configuration is done to connect to the DB using TNSNAMES.ora and defining the Oracle path.
4. Login to the DB using SQL*PLUS and run a query to see if you can collect the statistics from the V$ tables.
5. Launch LoadRunner Controller, configure the monitor and start your load test!

1. Request for an account and password to be created in the database instance (unless you are the DBA). Example, loadtester, and grant them access to read the following table. These tables consist of the statistic of the database instance.

V$SESSTAT
V$SYSSTAT
V$STATNAME
V$INSTANCE
V$SESSION

2. Ensure that Oracle client libraries are installed on the Controller. Remembered that in order to monitor, you need local installation of
the client in order for LoadRunner to query the monitoring data. If you do not have the client libraries, download it from Oracle Downloads. Download only the 32-bit Oracle client.
3. If you have the client installed, ensure the 32-bit Oracle client is installed on the Controller, not the 16-bit client.
4. Verify that %OracleHome%\bin is included in the path environment. This can be done by going to START > My Computer > Properties
> “Advanced Tab” > Enviromental Settings
5. Configure the TNSNAMES.ora file on the Controller. TNSNAMES.ora file is a SQL*Net configuration file that defines databases addresses for establishing connections to them. This file normally resides in the ORACLE_HOME\NETWORK\ADMIN directory. (Source: OraFaq) Attached is an example of the TNSNAMES.ora file. Click here to download.
6. Ensure login successful with the created account (e.g. loadtester) with SQL*Plus from the Controller machine.
7. Ensure the privileges are given properly by typing the following command. If they don’t return results or return access rights
issues, it’s best to sort it out again with the DBA

SELECT * FROM V$SESSTAT
SELECT * FROM V$SYSSTAT
SELECT * FROM V$STATNAME
SELECT * FROM V$INSTANCE
SELECT * FROM V$SESSION

8. Launch LoadRunner Controller as per norm and add the Oracle Database Monitor. When prompt, enter the account name (e.g. loadtester), it’s corresponding password and the destination server name. Statistics should be drawn from the V$ table and displayed in
Controller. With the above, you should be able to successfully configure the monitoring environment and the Controller with minimal difficulty.

Note:
You can change the sampling interval for the monitor using the vmon.cfg file located in {loadrunner-installed-dir}
\monitors\vmon.cfg

Comments

Popular Posts