Chapter 8. Tuning DB2 for Content Manager 183
4. Alternative to running the ALL snapshot, you can run individual snapshots
that enable the output to be saved in a more specific manner. Example 8-1
shows a list of individual snapshots you can run.
Example 8-1 Running individual snapshots
db2 get snapshot for database manager > snapdbm.txt
db2 get snapshot for database on rmdb > snapdbr.txt
db2 get snapshot for database on icmnlsdb > snapdbi.txt
db2 get snapshot for bufferpools on rmdb > snapbpr.txt
db2 get snapshot for bufferpools on icmnlsdb > snapbpi.txt
db2 get snapshot for tablespaces on rmdb > snaptspr.txt
db2 get snapshot for tablespaces on icmnlsdb > snaptspi.txt
db2 get snapshot for tables on rmdb > snaptblr.txt
db2 get snapshot for tables on icmnlsdb > snaptbli.txt
Our recommendation
We recommend regularly taking a DB2 snapshot of the database manager
(instance) and each database, and that you keep the snapshot data in either a
file, a spreadsheet, or loaded into a DB2 table for historical and trend analysis.
Analyze the results for immediate issues such as a high number of package
cache overflows or database files closed. Perform a trend analysis to determine
whether a problem is building. Is your buffer pool hit ratio going down? Are your
sort overflows steadily increasing? Take appropriate corrective action and
continue to monitor.
8.3.3 Keeping database statistics and execution plans up to date
through runstats/rebind
Routinely keep the Library Server and the Resource Manager database statistics
and execution plans up to date using the runstats and rebind commands to
maintain good performance. For runstats to be effective, a rebind of the
application is necessary after the runstats execution.
Script generation
Example 8-2 contains a set of commands you can run from a DB2 command line
window that creates a script you need to run.
Example 8-2 Commands to generate a script for runstats and rebind
db2 connect to db user userid using password
echo db2 connect to db user userid using password > fname.bat
db2 –x "select 'db2 runstats on table 'concat tabschema concat

Get Performance Tuning for Content Manager now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.