zoukankan      html  css  js  c++  java
  • 【DB2】查看表空间对应的物理文件地址

    使用的命令:

    db2 list tablespaces show detail

    db2 list tablespace containers for [Tablespace ID] [show detail]

    说明:在语句末尾添加show detail,则能查看表空间大小以及使用的信息

    以下是具体实现案例:

    在日常使用db2的过程中,有时候我们需要查询db2表空间所存储的位置来判断磁盘空间是否还够用,下面为查询表空间TEMPTS16K的位置

    db2inst1@Linux:/opt> db2 list tablespaces show detail

               Tablespaces for Current Database

    Tablespace ID                        = 0
      Name                                 = SYSCATSPACE
      Type                                 = Database managed space
      Contents                             = All permanent data. Regular table space.
      State                                = 0x0000
        Detailed explanation:
          Normal
      Total pages                          = 24576
      Useable pages                        = 24572
      Used pages                           = 22552
      Free pages                           = 2020
      High water mark (pages)              = 22552
      Page size (bytes)                    = 4096
      Extent size (pages)                  = 4
      Prefetch size (pages)                = 4
      Number of containers                 = 1

    Tablespace ID                        = 1
      Name                                 = TEMPSPACE1
      Type                                 = System managed space
      Contents                             = System Temporary data
      State                                = 0x0000
        Detailed explanation:
          Normal
      Total pages                          = 1
      Useable pages                        = 1
      Used pages                           = 1
      Free pages                           = Not applicable
      High water mark (pages)              = Not applicable
      Page size (bytes)                    = 4096
      Extent size (pages)                  = 32
      Prefetch size (pages)                = 32
      Number of containers                 = 1

    Tablespace ID                        = 2
      Name                                 = USERSPACE1
      Type                                 = Database managed space
      Contents                             = All permanent data. Large table space.
      State                                = 0x0000
        Detailed explanation:
          Normal
      Total pages                          = 49152
      Useable pages                        = 49120
      Used pages                           = 45984
      Free pages                           = 3136
      High water mark (pages)              = 45984
      Page size (bytes)                    = 4096
      Extent size (pages)                  = 32
      Prefetch size (pages)                = 32
      Number of containers                 = 1

    Tablespace ID                        = 3
      Name                                 = TEMPTS16K
      Type                                 = System managed space
      Contents                             = System Temporary data
      State                                = 0x0000
        Detailed explanation:
          Normal
      Total pages                          = 1
      Useable pages                        = 1
      Used pages                           = 1
      Free pages                           = Not applicable
      High water mark (pages)              = Not applicable
      Page size (bytes)                    = 16384
      Extent size (pages)                  = 32
      Prefetch size (pages)                = 32
      Number of containers                 = 1

    db2inst1@Linux:/opt> db2 list tablespace containers for 3

                Tablespace Containers for Tablespace 3

    Container ID                         = 0
      Name                                 = /db2home/db2inst1/db2inst1/NODE0000/QINDB/T0000003/C0000000.TMP
      Type                                 = Path

    从上述显示结果我们可以看出,表空间TEMPTS16K对应的物理文件路径为:/db2home/db2inst1/db2inst1/NODE0000/QINDB/T0000003/C0000000.TMP

  • 相关阅读:
    C# 編譯錯誤 CS0016 解決方案
    Javascript 日期
    Javascript Url处理
    Linq中in用法
    oracle中的排名函数用法
    webservices [WebServiceBinding(ConformsTo = WsiProfiles.None)]
    C#中的多态
    C# Math类简介 (转)
    客服工单任务系统发展简史 商商
    jQuery LigerUI 使用教程表格篇(2) 服务器数据交互
  • 原文地址:https://www.cnblogs.com/OliverQin/p/10207371.html
Copyright © 2011-2022 走看看