zoukankan      html  css  js  c++  java
  • 【DB2】监控临时表空间使用

    在我们使用数据库的时候,我们都知道应用程序在DB2上运行时,会产生临时表空间,我们想要监测这些临时表空间的使用情况,可以使用以下步骤:

    (1)打开monitor switches 中的table监视器:

    db2inst1@Linux:/qinys> db2 update monitor switches using table on
    DB20000I  The UPDATE MONITOR SWITCHES command completed successfully.

    (2)对数据库抓取table快照

    db2inst1@Linux:~> db2 get snapshot for tables on qindb>>snap_tables.out

    (3)在快照信息中输出定位系统临时表信息(通过执行2的语句即可获得)

    db2inst1@Linux:~> cat -n snap_tables.out | grep "TEMP"
         14     Table Name          = TEMP (00003,00002)

    (4)在系统临时表中定位对应的agent ID

    image

    上图表记的1105即为临时表空间使用的agent ID

    (5)通过快照ID,我们就可以使用应用程序快照或者db2pd工具找到对应的应用

    db2inst1@Linux:~> db2 get snapshot for application agentid 1105 | grep "Application name"
    Application name                           = db2jcc_application

  • 相关阅读:
    网络基础复习02
    网络基础复习01
    python 基础复习之数据库02
    python 基础复习之数据库01
    python 基础复习 13
    python基础复习 12
    python基础复习 11
    python基础复习10
    列表切片,内置方法
    文件操作基础流程
  • 原文地址:https://www.cnblogs.com/OliverQin/p/10203588.html
Copyright © 2011-2022 走看看