DB2の設定値


$ db2 get db cfg

        データベースのデータベース構成

 データベース・マネージャー構成リリース・レベル                                     = 0x0a00
 データベース・リリース・レベル                                                     = 0x0a00

 データベース・テリトリー                                                           = Ja
 データベース・コード・ページ                                                       = 954
 データベース・コード・セット                                                       = eucJP
 データベース国 / 領域コード                                                        = 81

 動的 SQL 照会管理                                                 (DYN_QUERY_MGMT) = DISABLE

 データベースに応じたディスカバリー・サポート                         (DISCOVER_DB) = ENABLE

 デフォルトの照会最適化クラス                                        (DFT_QUERYOPT) = 5
 並列処理度                                                            (DFT_DEGREE) = 1
 算術例外の場合の続行                                             (DFT_SQLMATHWARN) = NO
 デフォルト・リフレッシュ経過時間                                 (DFT_REFRESH_AGE) = 0
 値の頻度数保持                                                    (NUM_FREQVALUES) = 10
 保存変位値数                                                       (NUM_QUANTILES) = 20

 バックアップ・ペンディング                                                         = NO

 整合状態のデータベース                                                             = NO
 ロールフォワード・ペンディング中                                                   = NO
 リストア・ペンディング中                                                           = NO

 複数ページ・ファイル割り振り使用可能                                               = NO

 リカバリー用ログの保持状態                                                         = NO
 ロギング用ユーザー出口状況                                                         = NO

 データ・リンク・トークン有効期限インターバル (秒)                      (DL_EXPINT) = 60
 データ・リンク書き込みトークン初期満了間隔                         (DL_WT_IEXPINT) = 60
  データ・リンクのコピー数                                          (DL_NUM_COPIES) = 1
 ドロップ後のデータ・リンク時間 (日数)                               (DL_TIME_DROP) = 1
 英大文字のデータ・リンク・トークン                                      (DL_UPPER) = NO
 データ・リンク・トークン・アルゴリズム                                  (DL_TOKEN) = MAC0

 データベース・ヒープ (4KB)                                                (DBHEAP) = 1200
 データベース共有メモリーのサイズ (4KB)                           (DATABASE_MEMORY) = AUTOMATIC
 カタログ・キャッシュ・サイズ (4KB)                               (CATALOGCACHE_SZ) = (MAXAPPLS*4)
 ログ・バッファー・サイズ (4KB)                                          (LOGBUFSZ) = 8
 ユーティリティー・ヒープ・サイズ (4KB)                              (UTIL_HEAP_SZ) = 5000
 バッファー・プール・サイズ (ページ)                                     (BUFFPAGE) = 1000
 拡張ストレージ・セグメント・サイズ (4KB)                           (ESTORE_SEG_SZ) = 16000
 拡張ストレージ・セグメントの数                                   (NUM_ESTORE_SEGS) = 0
 ロック・リスト用最大ストレージ (4KB)                                    (LOCKLIST) = 100

 アプリケーション・グループ・メンバー・セットの最大サイズ (4KB)   (APPGROUP_MEM_SZ) = 30000
 アプリケーション・グループ・ヒープのメンバーのパーセント         (GROUPHEAP_RATIO) = 70
 アプリケーション・コントロール・ヒープ最大サイズ (4KB)           (APP_CTL_HEAP_SZ) = 128

 共有ヒープのソート・ヒープしきい値 (4KB)                          (SHEAPTHRES_SHR) = (SHEAPTHRES)
 ソート・リスト・ヒープ (4KB)                                            (SORTHEAP) = 256
 SQL ステートメント・ヒープ (4KB)                                        (STMTHEAP) = 4096
 デフォルト・アプリケーション・ヒープ (4KB)                            (APPLHEAPSZ) = 256
 パッケージ・キャッシュ・サイズ (4KB)                                  (PCKCACHESZ) = (MAXAPPLS*8)
 統計ヒープ・サイズ (4KB)                                            (STAT_HEAP_SZ) = 4384

 デッドロックのチェック・インターバル (ms)                              (DLCHKTIME) = 10000
 アプリケーションあたりのロック・リストのパーセント                      (MAXLOCKS) = 10
 ロック・タイムアウト (秒)                                            (LOCKTIMEOUT) = -1

 変更ページしきい値                                                (CHNGPGS_THRESH) = 60
 非同期ページ・クリーナー数                                        (NUM_IOCLEANERS) = 1
 入出力サーバー数                                                   (NUM_IOSERVERS) = 3
 索引ソート・フラグ                                                     (INDEXSORT) = YES
 順次検出フラグ                                                         (SEQDETECT) = YES
 デフォルトのプリフェッチ・サイズ (ページ)                        (DFT_PREFETCH_SZ) = 32

 トラック変更ページ                                                      (TRACKMOD) = OFF

 コンテナーのデフォルト数                                                           = 1
 デフォルトの表スペース・エクステント・サイズ (ページ)              (DFT_EXTENT_SZ) = 32

 活動アプリケーションの最大数                                            (MAXAPPLS) = AUTOMATIC
 活動アプリケーションの平均数                                           (AVG_APPLS) = 1
 アプリケーションあたりの最大 DB ファイル・オープン                      (MAXFILOP) = 64

 ログ・ファイルのサイズ (4KB)                                           (LOGFILSIZ) = 1000
 1 次ログ・ファイルの数                                                (LOGPRIMARY) = 3
 2 次ログ・ファイル数                                                   (LOGSECOND) = 2
 ログ・ファイル用に変更されたパス                                      (NEWLOGPATH) =
 ログ・ファイルのパス                                                               = /db2/n001/sys1/mirror0/NODE0000/
 ログ・パスのオーバーフロー                                       (OVERFLOWLOGPATH) =
 ログ・パスのミラー                                                 (MIRRORLOGPATH) =
 最初のアクティブ・ログ・ファイル                                                   =
 ログディスクフルによるアプリケーション中断                       (BLK_LOG_DSK_FUL) = NO
 トランザクションによる最大アクティブ・ログ・スペースのパーセント         (MAX_LOG) = 0
 1 アクティブ UOW に対するアクティブ・ログの数                       (NUM_LOG_SPAN) = 0

 グループ・コミット数                                                   (MINCOMMIT) = 1
 ソフト・チェックポイント前のログ・ファイル再利用率                       (SOFTMAX) = 100
 リカバリー用ログの保持使用可能                                         (LOGRETAIN) = OFF
 ロギング用ユーザー出口使用可能                                          (USEREXIT) = OFF

 自動再始動使用可能                                                   (AUTORESTART) = ON
 索引再作成時期                                                          (INDEXREC) = SYSTEM (RESTART)
 デフォルトの loadrec セッション数                                (DFT_LOADREC_SES) = 1
 保存するデータベース・バックアップ数                              (NUM_DB_BACKUPS) = 12

 リカバリー履歴保持 (日)                                          (REC_HIS_RETENTN) = 366
 TSM 管理クラス                                                     (TSM_MGMTCLASS) =
 TSM ノード名                                                        (TSM_NODENAME) =
 TSM 所有者                                                             (TSM_OWNER) =
 TSM パスワード                                                      (TSM_PASSWORD) =


$





db2 update db cfg for db2res using LOCKLIST 200



http://www.cs.yorku.ca/~seela/db2/problem.htm



Here is the response form Samir: Regarding the errors in the db2diag.log: 

Locking is controlled by two database configuration parameters: 
1. LOCKLIST - The amount of memory allocated to store lock information. 
2. MAXLOCKS - The maximum percentage of the locklist any one transaction can use.

Lock escalation will occur when: 
A - The locklist becomes full. 
B - A transaction uses more that maxlocks % of the locklist. If the locklist becomes full, 
the transaction using the largest amount of the locklist is selected 
and will have its record locks on the same table changed to a table lock. (One lock replaces many)


If a transaction exceeds maxlocks, the transaction will have its row locks for the most locked table 
changed to a table lock. 
When a transaction is waiting for a lock it will wait until one of the following conditions is

met: 
1. The lock it is waiting on is freed by the other application either committing or rolling back. 
2. It has waited for a time period equal to the lock time-out database configuration parameter. 
3. By default the lock time-out parameter is set to -1. This means it will NOT time-out while waiting for locks. 
It will continue to wait for the lock to be freed and may wait for the lock to be freed and may wait "forever". 
This is referred to as a lock wait/hang situation. Beware that an application which appears to be hung 
and not working may in fact be waiting for locks held by other long running transactions. 
A lock snapshot can help determine this. A locktimeout will give sql0902 RC 68. 
If the application "hogging" the locks, desn't COMMIT or ROLLBACK, 
other applications wait until the lock is available or time-out value exceeded.

While reading the locklist and deadlock detector builds a lock chain for it's own internal processing. Once the chain is built it is examined to see if a deadlock exists. If a deadlock does exist, the last transaction within the chain is chosen to be rolled back. Hence, the diaglog errors suggest that the locklist and maxlocks parameter should be increased.


2003/06/19 ugya@lycos.com