Summary of DB2 and Q Replication Performance Tuning Techniques

Posted by Frank Fillmore on March 25, 2014 under DB2 for Linux Unix Windows, Q-Replication, SQL Tuning. Tags: , .

Performance tuning for both DB2 and Q Replication are an ongoing process.  However, there are three tools which provide an initial set of recommendations for bufferpools, Database Manager (DBM or instance) and database configuration parameters, indexes, and other application table objects.

 

DB2 Configuration Advisor

The DB2 Configuration Advisor recommends the initial values of the bufferpool size, database configuration parameters, and database manager configuration parameters.

To use the Configuration Advisor, specify the AUTOCONFIGURE command for an existing database, or specify AUTOCONFIGURE as an option of the CREATE DATABASE command.

Example:

db2 autoconfigure using mem_percent 50 num_stmts 100000 tpm 6000 admin_priority performance num_local_apps 144 num_remote_apps 0 isolation UR apply none

DB2 Design Advisor

The DB2 Design Advisor is used to improve application SQL performance by creating (or dropping) indexes, Materialized Query Tables (MQTs), and MultiDimensional Clustering (MDCs).  The Design Advisor analyzes an SQL workload against existing table structures and recommends changes to improve performance.  The workload can be derived from Dynamic Statement Cache (DSC).  The DB2 Design Advisor command can be invoked by the db2advis command.

A prerequisite is creating the DB2 EXPLAIN tables for the schema conducting the analysis.

cd /<path>/sqllib/misc

db2 –vtf EXPLAIN.DDL

Then run the db2advis command.

db2advis -d mydb -g -a myuser -x -c USERSPACE1 -f -m IMCP -o db2advis_output

 

Q Replication Dashboard Performance Advisor

The Q Replication Performance Advisor helps you identify latency issues with your replication environment and suggests ways to lower end-to-end latency.  The Performance Advisor tab is located within each Monitoring Group.  The Q Replication Dashboard Performance Advisor can recommend updating statistics or reorganizing tables.

Changing the Hostname for a DB2 Server – An Update

Posted by Frank Fillmore on February 7, 2014 under DB2 for Linux Unix Windows, DB2 Migrations. Tags: , .

Probably my most popular blog post of all time – certainly the one most commented upon – was called Changing the Hostname for a DB2 Server.  If you work in a shop that uses the same image (i.e. a Windows backup, VMWare image, or some other form of snap-shotting a Windows computer) containing DB2 for LUW for multiple implementations you will have run into a problem.  When changing the “Computer name” or hostname, the DB2 instance fails to start with an SQL1042C error.

I won’t repeat the entire blog post here – that’s why I included the link above – but I do need to post an update on the location of the important db2nodes.cfg file.  The db2nodes.cfg file now (in DB2 version 9.7) resides in the instance directory.  On a default Windows DB2 installation, that would be x:\ProgramData\IBM\DB2\DB2COPY1\DB2

Please be sure to follow the rest of the instructions on the original post to clear the SQL1042C error.