DB2查询数据库大小

 

1.  查询表函数snaphot_tbs_cfg

db2 “select (SUM(total_pages)*4)/1024.0/1024 TOTAL_ALLOCATED_SPACE_IN_GB from table (snapshot_tbs_cfg(‘dbname’,-1)) TBS_SPCE”

2. 调用存储过程get_dbsize_info

db2 call get_dbsize_info(?,?,?,?,0)

作者: hqiang1984

量化自我,极简主义