db2set配置:
db2set DB2_ENABLE_LDAP=NO
db2set DB2_ALTERNATE_GROUP_LOOKUP=GETGROUPLIST
db2set DB2_RESTORE_GRANT_ADMIN_AUTHORITIES=ON
db2set DB2_SKIPINSERTED=ON
db2set DB2_LOAD_COPY_NO_OVERRIDE=NONRECOVERABLE
db2set DB2_EVALUNCOMMITTED=ON
db2set DB2_SKIPDELETED=ON
db2set DB2COMM=TCPIP
db2set DB2FCMCOMM=TCPIP4
db2set DB2_PARALLEL_IO=*
dbm配置:
db2 DBM CFG USING SVCENAME db2c_inst1
db2 DBM CFG USING maxagents 2000
db2 DBM CFG USING num_initagents 50 instance_memory automatic
db2 DBM CFG USING max_coordagents 200 automatic max_connection 200 automatic
db2 DBM CFG USING DIAGSIZE 1024
db2 DBM CFG USING DFT_MON_BUFPOOL ON DFT_MON_LOCK ON DFT_MON_SORT DFT_MON_SORT ON DFT_MON_STMT ON DFT_MON_TABLE ON DFT_MON_UOW ON HEALTH_MON OFF
db配置:
db2 update db cfg for $DBNAME USING SELF_TUNING_MEM ON
db2 update db cfg for $DBNAME USING DATABASE_MEMORY AUTOMATIC
db2 update db cfg for $DBNAME USING LOCKLIST 524288
db2 update db cfg for $DBNAME USING MAXLOCKS 95
db2 update db cfg for $DBNAME USING LOCKTIMEOUT 300
db2 update db cfg for $DBNAME USING MON_LW_THRESH 10000
db2 update db cfg for $DBNAME USING MON_LCK_MSG_LVL 3
db2 update db cfg for $DBNAME USING MON_DEALOCK HIST_AND_VALUES
db2 update db cfg for $DBNAME USING MON_LOCKTIMEOUT HIST_AND_VALUES
db2 update db cfg for $DBNAME USING MON_LOCKWAIT HIST_AND_VALUES
db2 update db cfg for $DBNAME USING MON_ACT_METRICS EXTENDED
db2 update db cfg for $DBNAME USING MON_REQ_METRICS EXTENDED
db2 update db cfg for $DBNAME USING MON_obj_METRICS EXTENDED
db2 update db cfg for $DBNAME USING MON_PKGLIST_SZ 1024
db2 update db cfg for $DBNAME USING MON_UOW_DATA BASE
db2 update db cfg for $DBNAME USING CUR_COMMIT ON
db2 update db cfg for $DBNAME USING REC_HIS RETENTN 31
db2 update db cfg for $DBNAME USING LOGFILSIZ 131072
OLAP:
db2 update db cfg for $DBNAME USING LOGPRIMARY 56
db2 update db cfg for $DBNAME USING LOGSECOND 200
OLTP:
db2 update db cfg for $DBNAME USING LOGPRIMARY 10
db2 update db cfg for $DBNAME USING LOGSECOND 240
db2 update db cfg for $DBNAME USING MAX_LOG 95
db2 update db cfg for $DBNAME USING NUM_LOG_SPAN 220
db2 update db cfg for $DBNAME USING SHEAPTHRES_SHR AUTOMATIC
db2 update db cfg for $DBNAME USING STAT_HEAP_SZ AUTOMATIC
db2 update db cfg for $DBNAME USING SORTHEAP AUTOMATIC
db2 update db cfg for $DBNAME USING MAXAPPLS AUTOMATIC
db2 update db cfg for $DBNAME USING CATALOGCACHE_SZ -1
db2 update db cfg for $DBNAME USING PCKCACHESZ AUTOMATIC
db2 update db cfg for $DBNAME USING APPL_MEMORY AUTOMATIC
db2 update db cfg for $DBNAME USING STMTHEAP AUTOMATIC
db2 update db cfg for $DBNAME USING UTIL_HEAP_SZ 32768
db2 update db cfg for $DBNAME USING AUTO_MAINT ON
db2 update db cfg for $DBNAME USING AUTO_TBL_MAINT ON
db2 update db cfg for $DBNAME USING AUTO_RUNSTATS ON
db2 10以上版本配置:
db2 update db cfg for $DBNAME USING LOGARCHCOMPR1 ON
db2 update db cfg for $DBNAME USING MON_RTN_DATA BASE
db2 update db cfg for $DBNAME USING MON_RTN_EXECLIST ON
db2 update db cfg for $DBNAME USING MON_UOW_EXECLIST ON
db2 update db cfg for $DBNAME USING MON_UOW PKGLIST ON
db2 update db cfg for $DBNAME USING UTIL_HEAP_SZ AUTOMATIC
db2 update db cfg for $DBNAME USING AUTO_SAMPLING ON
db2 update db cfg for $DBNAME USING AUTO_STATS_VIEWS ON
#批量执行该语句修改bufferpool
db2 "select ‘alter bufferpool ‘ concat varchar(bpname,32) concat ‘ immediate size 1000 automatic‘ from syscat.bufferpools with ur" grep -i alter