LoginSignup
3
0

More than 3 years have passed since last update.

ビューの定義を確認

Last updated at Posted at 2020-10-22

目的

ビューの定義を確認

コマンド

内容 コマンド 実行例
ビューの定義を確認 show view [ビュー名] show view dbc.TablesV;
ビューの内容を確認 help view [ビュー名] help view dbc.TablesV;

実行例

show view dbc.TablesV;

 *** Text of DDL statement returned. 
 *** Total elapsed time was 1 second.

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
REPLACE VIEW DBC.TablesV
AS SELECT dbase.DatabaseName  (NAMED DataBaseName),
          tvm.TVMName  (NAMED TableName),
          tvm.Version(FORMAT 'zzzz(9)'),
          CAST(tvm.TableKind AS CHAR(1)) (NAMED TableKind),
          tvm.ProtectionType,
          tvm.JournalFlag,
          coalesce(DB1.DatabaseName ,DBC.tvm.CreatorName )(named CreatorName),
          tvm.RequestText,
          tvm.CommentString,
          tvm.ParentCount,            
          tvm.ChildCount,        
          tvm.NamedTblCheckCount,     
          tvm.UnnamedTblCheckExist,   
          tvm.PrimaryKeyIndexId,
          tvm.TblStatus(NAMED RepStatus),
          tvm.CreateTimeStamp,
          DB2.DatabaseName (named LastAlterName),
          tvm.LastAlterTimeStamp,
          tvm.RequestTxtOverFlow,
          OU.UserAccessCnt AS AccessCount,
          OU.LastAccessTimeStamp,
          tvm.UtilVersion (FORMAT '-----9'),
          tvm.QueueFlag,
          tvm.CommitOpt,
          tvm.TransLog,
          tvm.CheckOpt,
          tvm.TemporalProperty, 
          tvm.ResolvedCurrent_Date, 
          tvm.ResolvedCurrent_Timestamp, 
          tvm.SystemDefinedJI, 
          tvm.VTQualifier, 
          tvm.TTQualifier,
          tvm.PIColumnCount,
          tvm.PartitioningLevels,
          tvm.LoadProperty,
          tvm.CurrentLoadId,
          tvm.LoadIdLayout,
          tvm.DelayedJI,
          tvm.LastArchiveId,
          tvm.LastFullArchiveId,
          tvm.BlockSize (FORMAT 'Z,ZZZ,ZZZ,ZZ9'),
          tvm.FreeSpacePercent (FORMAT 'Z9%'),
          tvm.MergeBlockRatio (FORMAT 'ZZ9%'),
          tvm.CheckSum,
          (CASE tvm.BlockCompression 
            WHEN 0 THEN 'DEFAULT'
            WHEN 1 THEN 'MANUAL'
            WHEN 2 THEN 'AUTOTEMP' 
            WHEN 3 THEN 'NEVER'
            WHEN 4 THEN 'ALWAYS'
              ELSE NULL 
          END) (NAMED BlockCompression),
          (CASE tvm.BlockCompressionAlgorithm 
            WHEN 0 THEN 'DEFAULT'
            WHEN 1 THEN 'ZLIB'
            WHEN 2 THEN 'ELZS_H' 
              ELSE NULL 
              END) (NAMED BlockCompressionAlgorithm),
          (CASE tvm.BlockCompressionLevel
            WHEN 0 THEN 'DEFAULT'
            WHEN 1 THEN '1'
            WHEN 2 THEN '2'
            WHEN 3 THEN '3'
            WHEN 4 THEN '4'
            WHEN 5 THEN '5'
            WHEN 6 THEN '6'
            WHEN 7 THEN '7'
            WHEN 8 THEN '8'
            WHEN 9 THEN '9'
              ELSE NULL
              END) (NAMED BlockCompressionLevel),
          tvm.TableHeaderFormat,
          (CASE WHEN tvm.RowSizeFormat IS NULL THEN '0'
             ELSE tvm.RowSizeFormat END)(NAMED RowSizeFormat),
          Maps.MapName,
          tvm.ColocationName,           
          tvm.TVMFlavor (named TVMFlavor)
FROM DBC.tvm
         LEFT OUTER JOIN DBC.Dbase DB1
                      ON DBC.tvm.CreatorName = DB1.DatabaseNameI
         LEFT OUTER JOIN DBC.Dbase DB2
                      ON DBC.tvm.LastAlterUID = DB2.DatabaseID
         LEFT OUTER JOIN DBC.ObjectUsage OU
                      ON OU.DatabaseId = DBC.TVM.DatabaseId
                     AND OU.ObjectId = DBC.TVM.TVMId
                     AND OU.FieldId IS NULL
                     AND OU.IndexNumber IS NULL
         LEFT OUTER JOIN DBC.Maps 
                      ON DBC.TVM.MapNo = DBC.Maps.MapNo,
         DBC.dbase
WHERE tvm.DatabaseId = dbase.DatabaseId 
  AND tvm.tvmid NOT IN ( '00C001000000'xb, '00C002000000'xb,
                         '00C009000000'xb, '00C010000000'xb,
                         '00C017000000'xb)
WITH CHECK OPTION;


 BTEQ -- Enter your SQL request or BTEQ command:

ビューの内容を確認

help view dbc.TablesV

;

 *** Help information returned. 52 rows.
 *** Total elapsed time was 1 second.

Column Name                    Type Comment
------------------------------ ---- ---------------------------------------
DataBaseName                   ?    The TablesV.DatabaseName field identifi
TableName                      ?    The TablesV.TableName field identifies
Version                        ?    Returns the version count, which is inc
TableKind                      ?    Type of table.
ProtectionType                 ?    Returns F (Fallback) or N (None) to ind
JournalFlag                    ?    Journaling in effect for the table, or
CreatorName                    ?    The TablesV.CreatorName field identifie
RequestText                    ?    The TablesV.RequestText field contains
CommentString                  ?    The TablesV.CommentString field contain
ParentCount                    ?    Returns the number of parent tables for
ChildCount                     ?    Returns the count of the referencing ta
NamedTblCheckCount             ?    Returns the count of named table-level
UnnamedTblCheckExist           ?    Returns an indicator for whether the ta
PrimaryKeyIndexId              ?    Returns information about the identific
RepStatus                      ?    These are the possible values: C = conn
CreateTimeStamp                ?    Returns the date and time that the obje
LastAlterName                  ?    Returns the name of the user who last u
LastAlterTimeStamp             ?    Returns the time the dictionary row was
RequestTxtOverflow             ?    The TablesV.RequestTxtOverFlow identifi
AccessCount                    ?    Returns the access count for the corres
LastAccessTimeStamp            ?    Returns the time that the corresponding
UtilVersion                    ?    Returns the utility version count.
QueueFlag                      ?    Stores the queuing option for the table
CommitOpt                      ?    The TablesV.CommitOpt specifies the ON
TransLog                       ?    Specifies whether transaction journals
CheckOpt                       ?    Indicates whether or not the table allo
TemporalProperty               ?    DBC.TablesV.TemporalProperty indicates
ResolvedCurrent_Date           ?    Returns the last resolved value of CURR
ResolvedCurrent_Timestamp      ?    Returns the last resolved value of CURR
SystemDefinedJI                ?    DBC.TablesV.SystemDefinedJI records whe
VTQualifier                    ?    DBC.TablesV.VTQualifier records the tem
TTQualifier                    ?    DBC.TablesV.TTQualifier records the tem
PIColumnCount                  ?    TablesV.PIColumnCount is the number of
PartitioningLevels             ?    DBC.TablesV.PartitioningLevels indicate
LoadProperty                   ?    LoadProperty is NULL for non-LDI object
CurrentLoadId                  ?    CurrentLoadId indicates the CurrLoadID
LoadIdLayout                   ?    LoadIdLayout indicates the RowLoadID la
DelayedJI                      ?    DelayedJI is set to NULL for non-join i
LastArchiveId                  ?    LastArchiveId is the id from the last i
LastFullArchiveId              ?    LastFullArchiveId is the id from the la
BlockSize                      ?    DataBlockSize is the integer value in b
FreeSpacePercent               ?    FreeSpacePercent is the byte integer va
MergeBlockRatio                ?    MergeBlockRatio is the byte integer val
CheckSum                       ?    CheckSum is "N" for OFF or "Y" for ON t
BlockCompression               ?    BlockCompression corresponds to the str
BlockCompressionAlgorithm      ?    BlockCompressionAlgorithm corresponds t
BlockCompressionLevel          ?    BlockCompressionLevel corresponds to th
TableHeaderFormat              ?    TableHeaderFormat is a single character
RowSizeFormat                  ?    RowSizeFormat indicates the row size; "
MapName                        ?    Returns name of map in which correspond
ColocationName                 ?    ColocationName is the colocation name f
TVMFlavor                      ?    TVMFlavor S is used in conjunction with

参考



3
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
0