ab168 发表于 2016-11-18 05:16:10

db2数据库文件、日志

1、获取数据库文件存储位置(Local database directory) 查看所有数据库db2 list db directorySystem Database DirectoryNumber of entries in the directory = 3Database 1 entry:Database alias                     = GATEWAYDatabase name                        = GATEWAYLocal database directory             = /home/db/db2/databaseDatabase release level               = d.00Comment                              =Directory entry type               = IndirectCatalog database partition number    = 0Alternate server hostname            =Alternate server port number         =Database 2 entry:Database alias                     = CMBCGATEDatabase name                        = CMBCGATELocal database directory             = /home/db/db2/databaseDatabase release level               = d.00Comment                              =Directory entry type               = IndirectCatalog database partition number    = 0Alternate server hostname            =Alternate server port number         =Database 3 entry:Database alias                     = CMBCEPAYDatabase name                        = CMBCEPAYLocal database directory             = /home/db/db2/databaseDatabase release level               = d.00Comment                              =Directory entry type               = IndirectCatalog database partition number    = 0Alternate server hostname            =Alternate server port number         =2、获取日志文件路径(Path to log files)连接数据库db2 get db cfgDatabase Configuration for Database Database configuration release level                  = 0x0d00Database release level                                  = 0x0d00Database territory                                    = CNDatabase code page                                    = 1208Database code set                                       = utf-8Database country/region code                            = 86Database collating sequence                           = IDENTITYAlternate collating sequence            (ALT_COLLATE) = Number compatibility                                    = OFFVarchar2 compatibility                                  = OFFDate compatibility                                    = OFFDatabase page size                                    = 4096Dynamic SQL Query management         (DYN_QUERY_MGMT) = DISABLEStatement concentrator                      (STMT_CONC) = OFFDiscovery support for this database       (DISCOVER_DB) = ENABLERestrict access                                       = NODefault query optimization class         (DFT_QUERYOPT) = 5Degree of parallelism                      (DFT_DEGREE) = 1Continue upon arithmetic exceptions   (DFT_SQLMATHWARN) = NODefault refresh age                   (DFT_REFRESH_AGE) = 0Default maintained table types for opt (DFT_MTTB_TYPES) = SYSTEMNumber of frequent values retained   (NUM_FREQVALUES) = 10Number of quantiles retained            (NUM_QUANTILES) = 20Decimal floating point rounding mode(DECFLT_ROUNDING) = ROUND_HALF_EVENBackup pending                                          = NOAll committed transactions have been written to disk    = NORollforward pending                                     = NORestore pending                                       = NOMulti-page file allocation enabled                      = YESLog retain for recovery status                        = NOUser exit for logging status                            = NOSelf tuning memory                  (SELF_TUNING_MEM) = ONSize of database shared memory (4KB)(DATABASE_MEMORY) = AUTOMATIC(211960)Database memory threshold               (DB_MEM_THRESH) = 10Max storage for lock list (4KB)            (LOCKLIST) = AUTOMATIC(5944)Percent. of lock lists per application       (MAXLOCKS) = AUTOMATIC(98)Package cache size (4KB)                   (PCKCACHESZ) = AUTOMATIC(1245)Sort heap thres for shared sorts (4KB) (SHEAPTHRES_SHR) = AUTOMATIC(13786)Sort list heap (4KB)                         (SORTHEAP) = AUTOMATIC(1239)Database heap (4KB)                            (DBHEAP) = AUTOMATIC(2443)Catalog cache size (4KB)            (CATALOGCACHE_SZ) = 300Log buffer size (4KB)                        (LOGBUFSZ) = 256Utilities heap size (4KB)                (UTIL_HEAP_SZ) = 36975Buffer pool size (pages)                     (BUFFPAGE) = 1000SQL statement heap (4KB)                     (STMTHEAP) = AUTOMATIC(8192)Default application heap (4KB)             (APPLHEAPSZ) = AUTOMATIC(256)Application Memory Size (4KB)             (APPL_MEMORY) = AUTOMATIC(40000)Statistics heap size (4KB)               (STAT_HEAP_SZ) = AUTOMATIC(4384)Interval for checking deadlock (ms)         (DLCHKTIME) = 10000Lock timeout (sec)                        (LOCKTIMEOUT) = -1Changed pages threshold                (CHNGPGS_THRESH) = 80Number of asynchronous page cleaners   (NUM_IOCLEANERS) = AUTOMATIC(3)Number of I/O servers                   (NUM_IOSERVERS) = AUTOMATIC(3)Index sort flag                           (INDEXSORT) = YESSequential detect flag                      (SEQDETECT) = YESDefault prefetch size (pages)         (DFT_PREFETCH_SZ) = AUTOMATICTrack modified pages                         (TRACKMOD) = NODefault number of containers                            = 1Default tablespace extentsize (pages)   (DFT_EXTENT_SZ) = 32Max number of active applications            (MAXAPPLS) = AUTOMATIC(40)Average number of active applications       (AVG_APPLS) = AUTOMATIC(1)Max DB files open per application            (MAXFILOP) = 61440Log file size (4KB)                         (LOGFILSIZ) = 1024Number of primary log files                (LOGPRIMARY) = 13Number of secondary log files               (LOGSECOND) = 4Changed path to log files                  (NEWLOGPATH) = Path to log files                                       = /home/db/db2/database/db2inst1/NODE0000/SQL00001/SQLOGDIR/Overflow log path                     (OVERFLOWLOGPATH) = Mirror log path                         (MIRRORLOGPATH) = First active log file                                 = Block log on disk full                (BLK_LOG_DSK_FUL) = NOBlock non logged operations            (BLOCKNONLOGGED) = NOPercent max primary log space by transaction(MAX_LOG) = 0Num. of active log files for 1 active UOW(NUM_LOG_SPAN) = 0Group commit count                        (MINCOMMIT) = 1Percent log file reclaimed before soft chckpt (SOFTMAX) = 520Log retain for recovery enabled             (LOGRETAIN) = OFFUser exit for logging enabled                (USEREXIT) = OFFHADR database role                                    = STANDARDHADR local host name                  (HADR_LOCAL_HOST) = HADR local service name                (HADR_LOCAL_SVC) = HADR remote host name                (HADR_REMOTE_HOST) = HADR remote service name            (HADR_REMOTE_SVC) = HADR instance name of remote server(HADR_REMOTE_INST) = HADR timeout value                     (HADR_TIMEOUT) = 120HADR log write synchronization mode   (HADR_SYNCMODE) = NEARSYNCHADR peer window duration (seconds)(HADR_PEER_WINDOW) = 0First log archive method               (LOGARCHMETH1) = OFFOptions for logarchmeth1                  (LOGARCHOPT1) = Second log archive method                (LOGARCHMETH2) = OFFOptions for logarchmeth2                  (LOGARCHOPT2) = Failover log archive path                (FAILARCHPATH) = Number of log archive retries on error   (NUMARCHRETRY) = 5Log archive retry Delay (secs)         (ARCHRETRYDELAY) = 20Vendor options                              (VENDOROPT) = Auto restart enabled                      (AUTORESTART) = ONIndex re-creation time and redo index build(INDEXREC) = SYSTEM (RESTART)Log pages during index build            (LOGINDEXBUILD) = OFFDefault number of loadrec sessions    (DFT_LOADREC_SES) = 1Number of database backups to retain   (NUM_DB_BACKUPS) = 12Recovery history retention (days)   (REC_HIS_RETENTN) = 366Auto deletion of recovery objects    (AUTO_DEL_REC_OBJ) = OFFTSM management class                  (TSM_MGMTCLASS) = TSM node name                            (TSM_NODENAME) = TSM owner                                 (TSM_OWNER) = TSM password                           (TSM_PASSWORD) = Automatic maintenance                      (AUTO_MAINT) = ONAutomatic database backup            (AUTO_DB_BACKUP) = OFFAutomatic table maintenance          (AUTO_TBL_MAINT) = ONAutomatic runstats                  (AUTO_RUNSTATS) = ONAutomatic statement statistics(AUTO_STMT_STATS) = ONAutomatic statistics profiling    (AUTO_STATS_PROF) = OFFAutomatic profile updates         (AUTO_PROF_UPD) = OFFAutomatic reorganization               (AUTO_REORG) = OFFAuto-Revalidation                        (AUTO_REVAL) = DEFERREDCurrently Committed                        (CUR_COMMIT) = ONCHAR output with DECIMAL input      (DEC_TO_CHAR_FMT) = NEWEnable XML Character operations      (ENABLE_XMLCHAR) = YESWLM Collection Interval (minutes)   (WLM_COLLECT_INT) = 0Monitor Collect SettingsRequest metrics                     (MON_REQ_METRICS) = BASEActivity metrics                      (MON_ACT_METRICS) = BASEObject metrics                        (MON_OBJ_METRICS) = BASEUnit of work events                      (MON_UOW_DATA) = NONELock timeout events                   (MON_LOCKTIMEOUT) = NONEDeadlock events                        (MON_DEADLOCK) = WITHOUT_HISTLock wait events                         (MON_LOCKWAIT) = NONELock wait event threshold               (MON_LW_THRESH) = 5000000Number of package list entries         (MON_PKGLIST_SZ) = 32Lock event notification level         (MON_LCK_MSG_LVL) = 1SMTP Server                               (SMTP_SERVER) = SQL conditional compilation flags         (SQL_CCFLAGS) = Section actuals setting               (SECTION_ACTUALS) = NONEConnect procedure                        (CONNECT_PROC) =查看表空间db2 list tablespacesTablespaces for Current DatabaseTablespace ID                        = 0Name                                 = SYSCATSPACEType                                 = Database managed spaceContents                           = All permanent data. Regular table space.State                              = 0x0000Detailed explanation:NormalTablespace ID                        = 1Name                                 = TEMPSPACE1Type                                 = System managed spaceContents                           = System Temporary dataState                              = 0x0000Detailed explanation:NormalTablespace ID                        = 2Name                                 = USERSPACE1Type                                 = Database managed spaceContents                           = All permanent data. Large table space.State                              = 0x0000Detailed explanation:NormalTablespace ID                        = 3Name                                 = SYSTOOLSPACEType                                 = Database managed spaceContents                           = All permanent data. Large table space.State                              = 0x0000Detailed explanation:NormalTablespace ID                        = 4Name                                 = CMBCEPAYSPACEType                                 = System managed spaceContents                           = All permanent data. Regular table space.State                              = 0x0000Detailed explanation:NormalTablespace ID                        = 5Name                                 = CMBCEPAYBUFType                                 = System managed spaceContents                           = System Temporary dataState                              = 0x0000Detailed explanation:NormalTablespace ID                        = 6Name                                 = SYSTOOLSTMPSPACEType                                 = System managed spaceContents                           = User Temporary dataState                              = 0x0000Detailed explanation:Normal使用db2 list tablespace containers for 数字查看表空间db2 list tablespace containers for 4Tablespace Containers for Tablespace 4Container ID                         = 0Name                                 = /home/db2inst1/cmbcepay/tsType                                 = Path
页: [1]
查看完整版本: db2数据库文件、日志