Hi is there some easy way to find out what is transaction per minute value for the database? Should I use db2 get snapshot? We are using DB2 9.7 ESE on Linux
Thank you in advance
Hi is there some easy way to find out what is transaction per minute value for the database? Should I use db2 get snapshot? We are using DB2 9.7 ESE on Linux
Thank you in advance
Since you are indeed interested in the transaction log sizing, not performance, you will get better information observing the actual log usage instead of the number of transactions.
$ db2 get snapshot for database on sample | grep "Log space" Log space available to the database (Bytes)= 52893203 Log space used by the database (Bytes) = 94797 There is no "per minute" metric available, you will need to query the monitor repeatedly and divide the delta of the metric you're after by the time interval since the previous query. The following two queries will return the total number of application units of work and the total number of completed units of work, respectively.
SELECT TOTAL_APP_COMMITS + TOTAL_APP_ROLLBACKS FROM SYSIBMADM.MON_DB_SUMMARY SELECT SUM(TOTAL_APP_COMMITS) + SUM(INT_COMMITS) + SUM(TOTAL_APP_ROLLBACKS) + SUM(INT_ROLLBACKS) FROM TABLE(MON_GET_WORKLOAD('',-2)) There are other monitor views that you may find useful: http://pic.dhe.ibm.com/infocenter/db2luw/v9r7/topic/com.ibm.db2.luw.sql.rtn.doc/doc/r0023485.html#r0023485__mon_23485
You can obtain the same information using the GET SNAPSHOT command, but the use of old-style snapshot monitor is not recommended. For example, you can try this:
db2 get snapshot for database on sample | grep -Ei "commit|rollback" GET SNAPSHOT command to obtain the same metrics, but the use of traditional snapshots is not recommended.