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

  • 相关阅读:
    行盒(line box)垂直方向的属性详解:从font-size、line-height到vertical-align
    CSS绝对定位的原点:是在border上、padding上还是在content上?
    从知乎首页用户操作入口学习到的CSS技巧
    重置表单中的文件上传控件(file input)的方法
    ASCII, Unicode, UTF-8, 8进制, 16进制等各种编码学习理解笔记
    Yarn的Linking dependencies特别慢的优化方法
    MongoDB学习记录(四)
    MongoDB学习记录(三)
    MongoDB学习记录(二)
    AdBlock——拦截网页广告
  • 原文地址:https://www.cnblogs.com/OliverQin/p/10207371.html
Copyright © 2011-2022 走看看