Resetting database performance values

You should reset the database performance values if you are testing your database environment or performing maintenance. Resetting performance values allows you to collect specific data from controlled database loads.

About this task

When an application calls the Db2 Connect monitor APIs, the information returned is normally the cumulative values since the database server was started. However, it is often useful to:
  • Reset performance values.
  • Run a test.
  • Reset the values again.
  • Re-run the test.
To reset database performance values, use the db2perfc program. Type:
   db2perfc
By default, this resets performance values for all active databases. However, you can also specify a list of databases to reset. You can also use the -d option to specify that performance values for DCS databases should be reset. For example:
    db2perfc     
    db2perfc dbalias1 dbalias2 ... dbaliasn      
 
    db2perfc  -d 
    db2perfc  -d  dbalias1 dbalias2 ... dbaliasn 

The first example resets performance values for all active databases. The second example resets values for specific databases. The third example resets performance values for all active DCS databases. The last example resets values for specific DCS databases.

The db2perfc program resets the values for ALL programs currently accessing database performance information for the relevant database server instance (that is, the one held in DB2INSTANCE in the session in which you run db2perfc.

Invoking db2perfc also resets the values seen by anyone remotely accessing database performance information when the db2perfc command is executed.

Note: There is a database API, sqlmrset, that allows an application to reset the values it sees locally, not globally, for particular databases.