The document discusses configuring and monitoring buffer pools and memory settings for a DB2 database instance and partitions. It includes commands to:
- Show buffer pool information and alter a buffer pool size
- View tablespace to buffer pool mappings
- Check database and instance configuration parameters for memory settings
- List instances and reset the monitoring
- View buffer pool snapshots
1. SR230559907
To show all the bufferpool:-
db2pd -d DEV -bufferpools
select varchar(bpname,20) as bpname,npages,pagesize from syscat.bufferpools
alter bufferpool IBMSYSTEMBP16K immediate size 20;
select * from syscat.bufferpools
MESSAGE : ADM6019E All pages in buffer pool "IBMSYSTEMBP16K" (ID "4098") are
in use. Refer to the documentation for SQLCODE -1218.
SELECT TBSPACE, BUFFERPOOLID FROM SYSCAT.TABLESPACES
dbdev-se:db2dev 88> db2 update db cfg for DEV | grep SORTHEAP
dbdev-se:db2dev 89> db2 get db cfg for DEV | grep SORTHEAP
Sort list heap (4KB) (SORTHEAP) = AUTOMATIC(256)
SELECT varchar(bp_name,20) AS
bp_name,pool_data_gbp_l_reads,pool_data_gbp_p_reads,member FROM
TABLE(MON_GET_BUFFERPOOL('',-2))
dbdev-se:db2dev 82> db2pd -dbptn mem
Invalid suboption mem
Invalid suboption mem
Database Partition 0 -- Active -- Up 1 days 20:32:28 -- Date 06/07/2012 09:55:30
Database Partition Memory Controller Statistics
customer.care@icicibank.com
Sajjan ATM Card Dept
Chirag Gada
8june firsr flight
CC9132083
dwarka
kalka ji
model town
Pitam puta
ICICI Rp1 10-3
Controller Automatic: N
Memory Limit: 2048000 KB
Current usage: 462848 KB
HWM usage: 463424 KB
Cached memory: 185728 KB
2. •softmax represents the percentage of log files that are to be recovered
following a database crash;
for example, if the value of softmax is 250, then 2.5 log files will contain the
changes that need to be recovered if a crash occurs
dbdev-se:db2dev 52> db2 get db cfg for DEV | grep instance
HADR instance name of remote server (HADR_REMOTE_INST) =
dbdev-se:db2dev 53> db2 get db cfg for DEV | grep MEMORY
Size of database shared memory (4KB) (DATABASE_MEMORY) = AUTOMATIC(43872)
Application Memory Size (4KB) (APPL_MEMORY) = AUTOMATIC(40000)
dbdev-se:db2dev 54> db2 get dbm cfg | grep instance
Monitor health of instance and databases (HEALTH_MON) = OFF
Size of instance shared memory (4KB) (INSTANCE_MEMORY) = 512000
Discover server instance (DISCOVER_INST) = ENABLE
*************
dbqas-se:db2qas 55> db2 get db cfg for QAS | grep MEMORY
Size of database shared memory (4KB) (DATABASE_MEMORY) = AUTOMATIC(710200)
Application Memory Size (4KB) (APPL_MEMORY) = AUTOMATIC(40000)
dbqas-se:db2qas 56> db2 get dbm cfg | grep instance
Monitor health of instance and databases (HEALTH_MON) = OFF
Size of instance shared memory (4KB) (INSTANCE_MEMORY) = 768000
Discover server instance (DISCOVER_INST) = ENABLE
dbdev-se:db2dev 55> db2ilist
db2dev
SELECT VARCHAR(BP_NAME,20) AS BP, SUM(POOL_DATA_GBP_L_READS),
SUM(POOL_DATA_GBP_P_READS) FROM TABLE(MON_GET_BUFFERPOOL('',-1)) GROUP BY
BP_NAME
db2 reset monitor all
db2 get snapshot for bufferpools on DEV
./sapinst SAPINST_JSLIB_TRACE=all SAPINST_USE_HOSTNAME=dbmst-se /mnt/medi-
it/SRM/Install/BS_2005_SR3_SAP_Installation_Master/IM_LINUX_X86_64/product.catal
og
/mnt/medi-
it/SRM/Install/BS_2005_SR3_SAP_Installation_Master/IM_LINUX_X86_64/NW04S/WEBAS/I
ND
./sapinst SAPINST_JSLIB_TRACE=all SAPINST_USE_HOSTNAME=dbmst-se /mnt/medi-
it/SRM/Install/BS_2005_SR3_SAP_Installation_Master/IM_LINUX_X86_64/product.catal
og
3. select distinct(status) from dba_indexes;
select status,index_name,owner,table_name from dba_indexes where status not like
'VALID' and 'UNUSABLE';
select table_name,INDEX_TYPE,PARTITIONED,status from dba_indexes where status !
='USABLE'
/proc/cpuinfo
uname -a
uname -X
cat /proc/meminfo
/sapdb/programs/bin/dbmcli