`

db2cat 命令

    博客分类:
  • db2
阅读更多

今天无意看到一个命令:db2cat(系统目录分析).

现把测试记录贴上来(在db2cmd下面):

C:\Documents and Settings\Administrator>db2cat


      ____________________________________________________________________

              _____   DB2 Relational Data Services Tools   _____

                              I      B      M

                                   DB2CAT

          This tool is a utility designed to help in examining packed
          descriptor information stored in the system catalog tables.

      ____________________________________________________________________


DB2 Version 9.5, 5622-044 (c) Copyright IBM Corp. 2007
Licensed Material - Program Property of IBM
IBM DATABASE 2 Catalog Analysis and Repair Tool

Please use single quote for delimited name

Enter Database Name ==> SAMPLE
Connecting to the Database.
Connect to Database Successful.
Enter up to 128 character schema name ==> IES
Enter up to 128 character name ==> AAA
Enter outfile name. Default is to terminal ==> AAA
Output is in AAA.(输出文件)

Executing Connect Reset -- Connect Reset was Successful.

C:\Documents and Settings\Administrator>

 

下面把输出文件AAA贴出来:

DB2 Version 9.5, 5622-044 (c) Copyright IBM Corp. 2007
Licensed Material - Program Property of IBM
IBM DATABASE 2 Catalog Analysis and Repair Tool

Please use single quote for delimited name


*****************************************************************
Table: IES     .AAA   (TABLE)

-----------------------------------------------------------------
TABLE PACKED DESCRIPTOR:


       PACKED DESCRIPTOR HEADER
       ------------------------

 db2cat generated pd       : N
 Length                    : 2816
 Version                   : 0x C00
 Default schema length     : 8
 Default schema            : IES    
 No. of rows               : 148
 No. of pages for table    : 1
 No. of pages in the file  : 1
 No. of overflow records   : 0
 Offset to index info.     : 1248
 No. of indexes            : 0
 No. of xml indexes        : 0
 Total no. of columns      : 1
 Number of column desc     : 1
 Seq ID of identity column : 0

 Read only                 : 0
 Materialization           : 0
 Check Option              : 0
 Create time               : {2009-06-19-13.54.10.491001}
 Alter time                : {2009-06-19-13.54.10.491001}
 Invalidate time           : {2009-06-19-13.54.10.491001}
 Last regeneration time    : {2009-06-19-13.54.10.491001}
 Data Capture              : N
 Table Composite Codepage  : 1208
 Default collation name    : IDENTITY
 Default collation ID in hex: B'00 00 00 02 FF 00 FF FF
 Default order-by collation name: IDENTITY
 Default order-by collation ID in hex: B'00 00 00 02 FF 00 FF FF
 CCSID UNICODE in
      non-unicode database : N
 Table CCSID ASCII         : N
 Table CCSID UNICODE       : N
 Fid                       : 48
 Tid                       : 2
 Last statistic time       : {2009-06-19-16.39.43.624000}
 Last statistic fabrication time       : {0000-00-00-00.00.00.000000}

 Table space name          : USERSPACE1       
 Table space type          : F
 Table space pagesize      : 8192
 Table extent size         : 32
 Table prefetch size       : 32
 Table overhead            : 7.500000
 Table transfer rate       : 0.060000

 Index table space name    :                  

 Tablespace ID             : 2
 Index Tablespace ID       : 2
 Long Tablespace ID        : 2
 Alternate Collating Seq   : 0

 Log Index Build           : NULL
 Table not logged          : 0
 Partitioning type         : 
 Max free space search     : 999
 Offset to partition info  : 1248
 No. of unique constraints : 0
 Table Percent free space  : 0
 Row type id               : -2
 Column id of ref-self col : -2
 Row type schema length    : 0
 Row type schema           :
 Row type name length      : 0
 Row type name             :
 Specific PD offset        : 0
 Append mode               : N
 Delete / Insert counter   : 0
 Generic PD offset         : 0
 Datapart PD offset        : 1264
 Lock size                 : row
 View content properties   : 0000000000
 Volatile                  : 
 Inoperative               : 
 Full Constraint Enforced  : 0
 Query Optimization Option : 0
 Property of table (1)     : 0
 Property of table (2)     : 0
 Number of ADT columns     : 0

 Global Temporary table     : NO
 On commit delete rows
 On rollback delete rows
 MDC                        : NO

 DGTT options              : 0
 Avg Row Compression Ratio : 0.000000
 Percentage of rows compressed : 0.000000
 Avg length of compressed row  : 0
 Avg row size               : 33
 DataJoiner Pd offset      : 0
 Offset directory          : 0
 Dimension Info Offset     : 0
 Number of Column Groups   : 0
 Column Group Stats Offset : 0
 Latest_statsrun Offset    : 2696
 Stats Profile Offset      : 0
 Stats Type                : A

 Bufferpool id for Primary tablespace : 1

 Active Blocks             : 0
 Number of QTB (simulated AST only) : 0
 VALUE COMPRESSION           : NO
 ROW COMPRESSION             : NO

 Generated partition key column altered : NO
 detach source table schema length : 0
 detach source table schema        :
 detach source table length        : 0
 detach source table               :
 Records per page (0 = variable)   : 0
 Protection Granularity            : 
 Security Policy ID                : 0
 Audit Policy ID                   : 0


          COLUMN DESCRIPTION
          ------------------

            
 COLUMN NAME               : TABNAME
 Length of column name     : 7
 Column id                 : 0
 Col type {hex, type}      : 0x0101 ,  VARCHAR
 Col dist. type {hex, type}: 0x0038 ,  VARCHAR
 Column length             :    100
 Blob length               : 100
 Statistic offset          : 272
 Flags                     : 0x20000090
                             - SQLRG_MIXED
                             - SQLRG_NULLIND
 Codepage                  : 1208
 Collation name            : IDENTITY
 Collation ID in hex       : B'00 00 00 02 FF 00 FF FF
 Length of user default    : 0
 Logged                    : 0
 Compact                   : 0
 Datalink Features         : 000000
 Ref. row type desc. offset: 0
 No. unique values in col. : 77
 Average column length     : 23
 Expected Change Rate      : 0.520270
 High2key and Low2key len. : 66
 Avg column length in chars: 18
 Delimiter length          : -1
 Number of Subelements     : -1
 Number of nulls           : 0
 High2key                  : {V_XSDDMX_DL                      }
 High2key in Hex Format    : 565f585344444d585f444c20202020202020202020202020202020202020202020
 Low2key                   : {T_CGDDMX                         }
 Low2key in Hex Format     : 545f434744444d5820202020202020202020202020202020202020202020202020
 Statistic Descriptor      :
  colid                    : 0
  fd offset                : 16
  hd offset                : 416
  nmostfreq                : 10
  mtiles                   : 20
 Histogram Descriptor      : Count   Distcount   Value_len   Value  Hex(value)
                             ---------------------------------------------
                             1     0     18           {T_CGDD            }   545f43474444202020202020202020202020
                             9     0     18           {T_CKD             }   545f434b4420202020202020202020202020
                             17     0     18           {T_DDJHMX          }   545f44444a484d5820202020202020202020
                             24     0     18           {T_FP              }   545f46502020202020202020202020202020
                             32     0     18           {T_JHJG            }   545f4a484a47202020202020202020202020
                             40     0     18           {T_KCCLMXZ_WLXX    }   545f4b43434c4d585a5f574c585820202020
                             48     0     18           {T_RYXX            }   545f52595858202020202020202020202020
                             53     0     18           {T_WLDWXX          }   545f574c4457585820202020202020202020
                             68     0     18           {T_WLDWXX          }   545f574c4457585820202020202020202020
                             71     0     18           {T_WLXX            }   545f574c5858202020202020202020202020
                             79     0     18           {T_YWDJLX          }   545f5957444a4c5820202020202020202020
                             86     0     18           {V_CGJHMX          }   565f43474a484d5820202020202020202020
                             94     0     18           {V_CKDMX_DL        }   565f434b444d585f444c2020202020202020
                             102     0     18           {V_FP              }   565f46502020202020202020202020202020
                             110     0     18           {V_FPMX            }   565f46504d58202020202020202020202020
                             118     0     18           {V_JSD_BK          }   565f4a53445f424b20202020202020202020
                             126     0     18           {V_SBLPDMX         }   565f53424c50444d58202020202020202020
                             133     0     18           {V_WLXX            }   565f574c5858202020202020202020202020
                             141     0     18           {V_XSDDMX          }   565f585344444d5820202020202020202020
                             148     0     18           {V_XSJH            }   565f58534a48202020202020202020202020
 Frequency Descriptor      : Count   Value_len   Value  Hex(value)
                             ---------------------------------
                             15  18            {T_WLDWXX          }   545f574c4457585820202020202020202020
                             8  18            {V_FP              }   565f46502020202020202020202020202020
                             8  18            {V_FPMX            }   565f46504d58202020202020202020202020
                             7  18            {T_CKD             }   545f434b4420202020202020202020202020
                             5  18            {T_FP              }   545f46502020202020202020202020202020
                             5  18            {T_FP_CKD_RKD      }   545f46505f434b445f524b44202020202020
                             4  18            {V_XSDD            }   565f58534444202020202020202020202020
                             4  18            {V_XSDDMX          }   565f585344444d5820202020202020202020
                             4  18            {V_XSDDMX_DL       }   565f585344444d585f444c20202020202020
                             4  18            {V_WLDWXX          }   565f574c4457585820202020202020202020
 Security Label ID         : 0
 

          PARTITIONING KEY DESCRIPTION
          ----------------------------

 Multiple node(TRUE/FALSE) : FALSE
 Node number               : 0
 Partition map id          : 1
 No partition columns      : 0
 Column id's               :

          Data Partitioning DESCRIPTION
          -----------------------------

 Flags                     :
 Number partitions         : 1
 Number partitioning cols  : 0
 MAX Data Partition ID     : 1

 Partitions:
   [0] doid {2, 48} ridDepCount 0 datapartID 0 longTbsp 2 flags 0x0


 data partition ID map:

        0

          LATEST RAN STATISTIC PROFILE
          ----------------------------

            
 Length                                        : 120
 Number of columns to collect statistic        : 1
 Number of columns to collect dist. statistic  : 1
 Number of column group to collect statistic   : 0
 Number of index to collect statistic          : 0
 Sampling percentage                           : 0.000000
 Throttle level (util_impact_priority)         : 0
 Default number of frequent values             : 10
 Default number of quantiles                   : 20
 Single node option (TRUE/FALSE)               : TRUE
 Allow access option (TRUE/FALSE)              : TRUE
 Number of nodes                               : 1
 Offset to column list                         : 104
 Offset to column dist. list                   : 112
 Offset to column group list                   : 0
 Offset to index list                          : 0

 Distribution stats on all columns             : TRUE
 Sampled detailed index stats on all indexes   : TRUE

 Per node cardinality :
    Node number      Node card
     0                148

 Column List :
    Column Id        Like Stats (YES/NO)
     0                NO

 Column with distribution statistic list :
    Column Id        Num_Freqvalues      Num_Quantiles
     0                10                  20     

 

-----------------------------------------------------------------
VIEW PACKED DESCRIPTOR:

No view packed descriptor.
-----------------------------------------------------------------
CONSTRAINTS PACKED DESCRIPTOR:

No constraints packed descriptor.
-----------------------------------------------------------------
REFERENTIAL PACKED DESCRIPTOR:

No referential packed descriptor.
-----------------------------------------------------------------
TRIGGER PACKED DESCRIPTOR:

No trigger packed descriptor.
-----------------------------------------------------------------
SYSTABLES.REMOTE_DESC:

No remote packed descriptor.
-----------------------------------------------------------------
AST PACKED DESCRIPTOR:

No ast packed descriptor.
=====

 

注意:这个只能在server断执行。

个人感觉这个还是有点用的,尤其是想全面了解一个表的时候 。

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics