2.2 Database monitoring Update all the monitoring switches first :- "db2 update dbm cfg using dft_mon_bufpool on dft_mon_lock on dft_mon_uow on dft_mon_stmt on dft_mon_table on dft_mon_sort on"
To get a database snapshot: - �db2 get snapshot for db on <database>� 2.3 Event monitoring DB2 Event monitor collects stats on SQL statements. "db2 create event monitor <event_name> for statements write to file '<filepath>'" "db2 set event monitor <monitor_name> state = 1" If there's no event analyser, the collected event files can be ftp'ed back to the PC or the "db2evmon -path <path>" where <path> is where the DB2 event monitor files are located, can be used. This provides a textual output. If using the DB2 event analyser you can sort by "elapsed time" or "sort time" say to work out which SQL statements are using the most resources. 2.4 Access plans Use visual explain to identify the problems with the query plans. This is a quick way to spot where indexes aren't being used. If you can't do this, use one of the following to get text output:- a) db2exfmt - Provides access plan for previously explained statement b) dynexpln - provides access plans for dynamic sql statements provided in input file c) db2expln - provides access plans for static sql statements held in packages There's also a tool which will allow you to capture SQL and instead of viewing it using the Event Analyzer, view it in Excel. It's available at:- http://www.macehill.co.uk/db2sqlcrunch.zip - ::: When replying to the list, please use 'Reply-All' and make sure ::: a copy goes to the list ([EMAIL PROTECTED]). *** To unsubscribe, send 'unsubscribe' to [EMAIL PROTECTED] *** For more information, check http://www.db2eug.uni.cc
