欢迎来到天天文库
浏览记录
ID:40527579
大小:69.64 KB
页数:21页
时间:2019-08-04
《DB2使用命令监控锁的情况》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、作业:1.使用命令监控锁的情况,使用类型2.练习在CLP命令中使用不同的隔离级别3.使用快照监控数据库的使用情况4.使用表函数监控SQL语句的使用情况1.使用命令监控锁的情况,使用类型[myinst@ye~]$db2activatedatabasemydb3SQL1493NTheapplicationisalreadyconnectedtoanactivedatabase.#查看锁表--看应用在等什么[myinst@ye~]$db2pd-dbmydb3-locksshowlockwaitDatabaseMember0--DatabaseMYDB
2、3--Active--Up0days01:50:51--Date2015-08-18-15.48.27.193864Locks:AddressTranHdlLocknameTypeModeStsOwnerDurHoldCountAttReleaseFlgrrIIDTableNmSchemaNm[myinst@ye~]$db2getdbcfg
3、grepDLCHKTIME#是DB2检查死锁的间隔时间,该值为10000msIntervalforcheckingdeadlock(ms)(DLCHKTIME)=10000[myinst@ye~]$db2g
4、etdbcfg
5、grepLOCKTIMEOUT#锁等待最长时间,单位是秒Locktimeout(sec)(LOCKTIMEOUT)=-1Locktimeoutevents(MON_LOCKTIMEOUT)=NONE#查看当前的隔离级别[myinst@ye~]$db2"SELECTCURRENTISOLATIONFROMSYSIBM.SYSDUMMY1"#查看锁表--用快照[myinst@ye~]$db2"GETSNAPSHOTFORLOCKSONmydb3"DatabaseLockSnapshotDatabasename=MYDB3Databa
6、sepath=/www/db2/db2test/myinst/NODE0000/SQL00001/MEMBER0000/Inputdatabasealias=MYDB3Locksheld=0Applicationscurrentlyconnected=1Agentscurrentlywaitingonlocks=0Snapshottimestamp=08/18/201515:53:47.009051Applicationhandle=13ApplicationID=*LOCAL.DB2.150818055741Sequencenumber=00
7、001Applicationname=db2fw0CONNECTAuthorizationID=MYINSTApplicationstatus=ConnectCompletedStatuschangetime=NotCollectedApplicationcodepage=1386Locksheld=0Totalwaittime(ms)=0Applicationhandle=12ApplicationID=*LOCAL.DB2.150818055740Sequencenumber=00001Applicationname=db2lusedCON
8、NECTAuthorizationID=MYINSTApplicationstatus=ConnectCompletedStatuschangetime=NotCollectedApplicationcodepage=1208Locksheld=0Totalwaittime(ms)=0Applicationhandle=11ApplicationID=*LOCAL.DB2.150818055739Sequencenumber=00001Applicationname=db2wlmdCONNECTAuthorizationID=MYINSTApp
9、licationstatus=ConnectCompletedStatuschangetime=NotCollectedApplicationcodepage=1208Locksheld=0Totalwaittime(ms)=0Applicationhandle=10ApplicationID=*LOCAL.DB2.150818055738Sequencenumber=00001Applicationname=db2taskdCONNECTAuthorizationID=MYINSTApplicationstatus=ConnectComple
10、tedStatuschangetime=NotCollectedApplicationcodepage=1208Locksheld=0Totalwai
此文档下载收益归作者所有