HEALTH_TBS_HI 表函数

从数据库中表空间的运行状况快照返回表空间的运行状况指示器信息。

重要信息: 不推荐使用此表函数,在将来的发行版中可能会将其除去,因为在版本 9.7中已不推荐使用运行状况监视器。 它在 Db2® pureScale® 环境中不受支持。 有关更多信息,请参阅 已不推荐使用运行状况监视器

语法

Read syntax diagramSkip visual syntax diagramHEALTH_TBS_HI(dbname,member)

模式为 SYSPROC。

表函数参数

dbname
类型为 VARCHAR (255) 的输入参数,用于在调用此函数时指定与当前连接的数据库相同的实例中的有效数据库名称。 指定目录条目类型为 "Indirect" 或 "Home" 的数据库名称,如 LIST DATABASE DIRECTORY 命令所返回。 指定空值以从当前连接的数据库获取快照。
成员
类型为 INTEGER 的输入参数,用于指定有效的数据库成员编号。 对当前数据库成员指定 -1 ,或对所有活动数据库成员的聚集指定 -2 。 活动数据库成员是数据库可供应用程序连接和使用的成员。

如果指定了空值,那么将隐式设置 -1

权限

需要下列其中一项权限才能执行此例程:
  • 对例程的 EXECUTE 特权
  • DATAACCESS 权限
  • DBADM 权限
  • SQLADM 权限

缺省 PUBLIC 特权

在非限制性数据库中,当自动创建该功能时,将向 PUBLIC 授予 EXECUTE 特权。

示例

SELECT * FROM TABLE(HEALTH_TBS_HI('',-1)) AS T
下列是从此查询输出的示例。
SNAPSHOT_TIMESTAMP         TABLESPACE_NAME     HI_ID     HI_VALUE ...
-------------------------- ---------------...- -----...- -------- ...
2006-02-13-12.30.35.229196 SYSCATSPACE              2001        0 ...
2006-02-13-12.30.35.229196 SYSCATSPACE              2002       99 ...
2006-02-13-12.30.35.229196 SYSCATSPACE              2003        0 ...
2006-02-13-12.30.35.229196 SYSTOOLSPACE             2001        0 ...
2006-02-13-12.30.35.229196 SYSTOOLSPACE             2002       62 ...
2006-02-13-12.30.35.229196 SYSTOOLSPACE             2003        0 ...
2006-02-13-12.30.35.229196 SYSTOOLSTMPSPACE         2001        0 ...
2006-02-13-12.30.35.229196 TEMPSPACE1               2001        0 ...
2006-02-13-12.30.35.229196 USERSPACE1               2001        0 ...
2006-02-13-12.30.35.229196 USERSPACE1               2002      100 ...
2006-02-13-12.30.35.229196 USERSPACE1               2003        0 ...
                                                                     
  11 record(s) selected.                                             
此查询的输出(继续)。
... HI_TIMESTAMP               HI_ALERT_STATE  HI_ALERT_STATE_DETAIL ...
... -------------------------- --------------- --------------------- ...
... 2006-02-13-12.26.26.158000               1 Normal                ...
... 2006-02-13-12.26.26.158000               4 Alarm                 ...
... 2006-02-13-12.26.26.158000               1 Normal                ...
... 2006-02-13-12.26.26.158000               1 Normal                ...
... 2006-02-13-12.26.26.158000               1 Normal                ...
... 2006-02-13-12.26.26.158000               1 Normal                ...
... 2006-02-13-12.26.26.158000               1 Normal                ...
... 2006-02-13-12.26.26.158000               1 Normal                ...
... 2006-02-13-12.26.26.158000               1 Normal                ...
... 2006-02-13-12.26.26.158000               4 Alarm                 ...
... 2006-02-13-12.26.26.158000               1 Normal                ...
此查询的输出(继续)。
... HI_FORMULA                HI_ADDITIONAL_INFO                              
... ---------------------...- ------------------------------------------------
... 0                         -                                               
... ((9376 / 9468) * 100)     The short term table space growth rate          
                                from "02/13/2006 11:26:26.000158" to          
                                "02/13/2006 12:26:26.000158" is "N/A"         
                                bytes per second and the long term growth     
                                rate from "02/12/2006 12:26:26.000158"        
                                to "02/13/2006 12:26:26.000158" is "N/A"      
                                bytes per second. Time to fullness is         
                                projected to be "N/A" and "N/A".               
                                The table space is defined      
                                with automatic storage set to "YES" and       
                                automatic resize enabled set to "YES".        
... 0                         The table space is defined with automatic       
                                storage set to "YES" and automatic resize     
                                enabled set to "YES". The following are       
                                the automatic resize settings: increase       
                                size (bytes) "-1", increase size (percent)    
                                "N/A", maximum size (bytes) "-1". The         
                                current table space size (bytes) is           
                                "38797312".                                   
... 0                         -                                               
... ((156 / 252) * 100)       The short term table space growth rate          
                                from "02/13/2006 11:26:26.000158" to          
                                "02/13/2006 12:26:26.000158" is "N/A"         
                                bytes per second and the long term growth     
                                rate from "02/12/2006 12:26:26.000158"        
                                to "02/13/2006 12:26:26.000158" is "N/A"      
                                bytes per second. Time to fullness is         
                                projected to be "N/A" and "N/A".               
                                The table space is defined      
                                with automatic storage set to "YES" and       
                                automatic resize enabled set to "YES".        
... 0                         The table space is defined with automatic       
                                storage set to "YES" and automatic resize     
                                enabled set to "YES". The following are       
                                the automatic resize settings: increase       
                                size (bytes) "-1", increase size (percent)    
                                "N/A", maximum size (bytes) "-1". The         
                                current table space size (bytes) is           
                                "1048576".                                    
... 0                         -                                               
... 0                         -                                               
... 0                         -                                               
... ((1504 / 1504) * 100)     The short term table space growth rate from     
                                "02/13/2006 11:26:26.000158" to               
                                "02/13/2006 12:26:26.000158" is "N/A"         
                                bytes per second and the long term growth     
                                rate from "02/12/2006 12:26:26.000158" to     
                                "02/13/2006 12:26:26.000158" is "N/A" bytes   
                                per second. Time to fullness is projected     
                                to be "N/A" and "N/A". The       
                                table space is defined with automatic storage 
                                set to "YES" and automatic resize enabled     
                                set to "YES".                                 
... 0                         The table space is defined with automatic       
                                storage set to "YES" and automatic resize     
                                enabled set to "YES". The following are       
                                the automatic resize settings: increase       
                                size (bytes) "-1", increase size (percent)    
                                "N/A", maximum size (bytes) "-1". The         
                                current table space size (bytes) is           
                                "6291456".                                    

返回的信息

表 1. HEALTH_TBS_HI 表函数返回的信息
列名 数据类型 描述或相应的监视元素
snapshot_timestamp TIMESTAMP snapshot_timestamp - 快照时间戳记
TABLESPACE_NAME VARCHAR(128) tablespace_name - 表空间名称
HI_ID BIGINT 唯一标识快照数据流中的运行状况指示器的数字。
HI_VALUE SMALLINT 运行状况指示器的值。
HI_TIMESTAMP TIMESTAMP 生成警报的日期和时间。
HI_ALERT_STATE BIGINT 警报的严重性。
HI_ALERT_STATE_DETAIL VARCHAR(20) HI_ALERT_STATE 列的文本描述。
(H) VARCHAR(2048) 用于计算运行状况指示器的公式。
HI_ADDITIONAL_INFO VARCHAR(4096) 有关运行状况指示器的其他信息。