如何找出当前的事务日志大小?有可能做到例如通过SQL查询一些系统表?找出事务日志的最大大小也很有趣。
是从文件系统查找的唯一选项吗?
答案 0 :(得分:6)
GET DATABASE CONFIGURATION命令将为您提供有关数据库的所有配置信息。
它包含有关日志文件大小,主日志文件和辅助日志文件的数量等信息。下面的示例输出。
Log file size (4KB) (LOGFILSIZ) = 1024
Number of primary log files (LOGPRIMARY) = 13
Number of secondary log files (LOGSECOND) = 4
Changed path to log files (NEWLOGPATH) =
Path to log files = D:\DB2\NODE0000\SQL00003\SQLOGDIR\
Overflow log path (OVERFLOWLOGPATH) =
Mirror log path (MIRRORLOGPATH) =
First active log file =
Block log on disk full (BLK_LOG_DSK_FUL) = NO
Block non logged operations (BLOCKNONLOGGED) = NO
Percent max primary log space by transaction (MAX_LOG) = 0
Num. of active log files for 1 active UOW(NUM_LOG_SPAN) = 0