发布网友 发布时间:2022-04-07 15:24
共2个回答
懂视网 时间:2022-04-07 19:45
一、获取快照日志
#1.查看数据库编目
db2 list db directory
#2.attach 到要分析的数据库
db2 attach to pm1_9 user db2dev
#3.connect 到要分析的数据
db2 connect to pm1_9 user db2dev
#4.抓取快照
db2 get snapshot for all on pm1_9 > /tmp/snap.out
二、分析日志
#1.Rows Read大的表定位
grep -ni "Rows Read" /tmp/snap.out | grep -v "Not Collected" | sort -k 5rn | more
#2.执行次数多的sql
grep -ni "Number of executions" /tmp/snap.out | sort -k 6rn | more
db2快照监控
标签:
热心网友 时间:2022-04-07 16:53
db2 update monitor swtiches using lock on