2010-09-15 84 views

回答

1

是的,你可以從表SYSIBMADM.DBCFG

這個數據例如 - 我不得不檢查數據庫日誌的參數,所以我使用的查詢:

SELECT * FROM SYSIBMADM.DBCFG 
WHERE 
    NAME IN ('logfilsiz','logprimary','logsecond') 
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 
+0

是否有可能獲得這些信息通過對系統表做一些SELECT操作? – 2010-09-22 13:38:12

+0

這個答案更好,恕我直言,因爲它不需要數據庫連接,可以通過命令行來完成。 – 2014-10-16 20:38:04