查看DB2进程
DB2Server[/]#ps -ef | grep db
dasusr1 184376 1 0 Sep 29 - 0:44 /opt/IBM/db2/V9.5/das/bin/db2fmd -i dasusr1 -m /opt/IBM/db2/V9.5/das/lib/libdb2dasgcf.a
dasusr1 209014 1 0 Sep 29 - 0:44 /home/dasusr1/das/adm/db2dasrrm
root 217162 610798 0 10:31:20 pts/0 0:00 grep db
db2inst1 176562 209606 0 Sep 29 - 9560:00 db2sysc 0
db2inst1 180726 176562 0 Sep 29 - 0:00 db2vend (PD Vendor Process - 258)
root 213432 176562 0 Sep 29 - 1:02 db2ckpwd 0
orapip 590264 1 0 Feb 22 - 0:42 ora_dbw0_PIP
root 209606 1 0 Sep 29 - 0:00 db2wdog 0
root 213698 176562 0 Sep 29 - 1:03 db2ckpwd 0
orapip 221950 1 0 Feb 22 - 0:23 ora_dbw1_PIP
db2inst1 717566 176562 0 Feb 21 - 0:09 db2vend (db2logmgr.meth1 - 3641 (IUFO))
root 103396 1 0 Sep 29 - 58:21 /opt/IBM/db2/V9.5/bin/db2fmcd
root 234446 176562 0 Sep 29 - 1:01 db2ckpwd 0
db2inst1 242626 209606 0 Sep 29 - 18:19 db2acd 0
db2fenc1 385970 209606 0 Sep 30 - 0:01 db2fmp (C) 0
切换到对应用户下
DB2Server[/]#su - db2inst1
$ db2level
DB21085I Instance "db2inst1" uses "64" bits and DB2 code release "SQL09056"
with level identifier "06070107".
Informational tokens are "DB2 v9.5.0.6", "s100805", "U829466", and Fix Pack
"6".
Product is installed at "/opt/IBM/db2/V9.5".
$
查看数据库编目
$
$ db2 list db directory
System Database Directory
Number of entries in the directory = 2
Database 1 entry:
Database alias = IUFO
Database name = IUFO
Local database directory = /db2_tag/iufo
Database release level = c.00
Comment =
Directory entry type = Indirect
Catalog database partition number = 0
Alternate server hostname =
Alternate server port number =
Database 2 entry:
Database alias = NCDB
Database name = NCDB
Local database directory = /db2_tag/ncdb
Database release level = c.00
Comment =
Directory entry type = Indirect
Catalog database partition number = 0
Alternate server hostname =
Alternate server port number =
$
$ db2 get db cfg for IUFO
Database Configuration for Database IUFO
Database configuration release level = 0x0c00
Database release level = 0x0c00
Database territory = CN
Database code page = 1386
Database code set = GBK
Database country/region code = 86
Database collating sequence = UNIQUE
Alternate collating sequence (ALT_COLLATE) =
Number compatibility = OFF
Varchar2 compatibility = OFF
Database page size = 4096
Dynamic SQL Query management (DYN_QUERY_MGMT) = DISABLE
Discovery support for this database (DISCOVER_DB) = ENABLE
Restrict access = NO
Default query optimization class (DFT_QUERYOPT) = 5
Degree of parallelism (DFT_DEGREE) = 1
Continue upon arithmetic exceptions (DFT_SQLMATHWARN) = NO
Default refresh age (DFT_REFRESH_AGE) = 0
Default maintained table types for opt (DFT_MTTB_TYPES) = SYSTEM
Number of frequent values retained (NUM_FREQVALUES) = 10
Number of quantiles retained (NUM_QUANTILES) = 20
Decimal floating point rounding mode (DECFLT_ROUNDING) = ROUND_HALF_EVEN
Backup pending = NO
Database is consistent = NO
Rollforward pending = NO
Restore pending = NO
Multi-page file allocation enabled = YES
Log retain for recovery status = RECOVERY
User exit for logging status = YES
Self tuning memory (SELF_TUNING_MEM) = ON
Size of database shared memory (4KB) (DATABASE_MEMORY) = AUTOMATIC(321800)
Database memory threshold (DB_MEM_THRESH) = 10
Max storage for lock list (4KB) (LOCKLIST) = AUTOMATIC(1222)
Percent. of lock lists per application (MAXLOCKS) = AUTOMATIC(98)
Package cache size (4KB) (PCKCACHESZ) = AUTOMATIC(82486)
Sort heap thres for shared sorts (4KB) (SHEAPTHRES_SHR) = AUTOMATIC(15237)
Sort list heap (4KB) (SORTHEAP) = AUTOMATIC(3047)
Database heap (4KB) (DBHEAP) = AUTOMATIC(3257)
Catalog cache size (4KB) (CATALOGCACHE_SZ) = 2048
Log buffer size (4KB) (LOGBUFSZ) = 2048
Utilities heap size (4KB) (UTIL_HEAP_SZ) = 8192
Buffer pool size (pages) (BUFFPAGE) = 40000
SQL statement heap (4KB) (STMTHEAP) = AUTOMATIC(4096)
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) = 60000
Lock timeout (sec) (LOCKTIMEOUT) = -1
Changed pages threshold (CHNGPGS_THRESH) = 60
Number of asynchronous page cleaners (NUM_IOCLEANERS) = AUTOMATIC(15)
Number of I/O servers (NUM_IOSERVERS) = AUTOMATIC(6)
Index sort flag (INDEXSORT) = YES
Sequential detect flag (SEQDETECT) = YES
Default prefetch size (pages) (DFT_PREFETCH_SZ) = AUTOMATIC
Track modified pages (TRACKMOD) = ON
Default number of containers = 1
Default tablespace extentsize (pages) (DFT_EXTENT_SZ) = 32
Max number of active applications (MAXAPPLS) = AUTOMATIC(49)
Average number of active applications (AVG_APPLS) = AUTOMATIC(1)
Max DB files open per application (MAXFILOP) = 61440
Log file size (4KB) (LOGFILSIZ) = 12800
Number of primary log files (LOGPRIMARY) = 40
Number of secondary log files (LOGSECOND) = 40
Changed path to log files (NEWLOGPATH) =
Path to log files = /db2_log/iufo/NODE0000/
Overflow log path (OVERFLOWLOGPATH) =
Mirror log path (MIRRORLOGPATH) =
First active log file = S0001892.LOG
Block log on disk full (BLK_LOG_DSK_FUL) = YES
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
Group commit count (MINCOMMIT) = 1
Percent log file reclaimed before soft chckpt (SOFTMAX) = 520
Log retain for recovery enabled (LOGRETAIN) = RECOVERY
User exit for logging enabled (USEREXIT) = OFF
HADR database role = STANDARD
HADR 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) = 120
HADR log write synchronization mode (HADR_SYNCMODE) = NEARSYNC
HADR peer window duration (seconds) (HADR_PEER_WINDOW) = 0
First log archive method (LOGARCHMETH1) = TSM
Options for logarchmeth1 (LOGARCHOPT1) =
Second log archive method (LOGARCHMETH2) = OFF
Options for logarchmeth2 (LOGARCHOPT2) =
Failover log archive path (FAILARCHPATH) =
Number of log archive retries on error (NUMARCHRETRY) = 5
Log archive retry Delay (secs) (ARCHRETRYDELAY) = 20
Vendor options (VENDOROPT) =
Auto restart enabled (AUTORESTART) = ON
Index re-creation time and redo index build (INDEXREC) = SYSTEM (RESTART)
Log pages during index build (LOGINDEXBUILD) = OFF
Default number of loadrec sessions (DFT_LOADREC_SES) = 1
Number of database backups to retain (NUM_DB_BACKUPS) = 12
Recovery history retention (days) (REC_HIS_RETENTN) = 366
Auto deletion of recovery objects (AUTO_DEL_REC_OBJ) = OFF
TSM management class (TSM_MGMTCLASS) =
TSM node name (TSM_NODENAME) =
TSM owner (TSM_OWNER) =
TSM password (TSM_PASSWORD) =
Automatic maintenance (AUTO_MAINT) = OFF
Automatic database backup (AUTO_DB_BACKUP) = OFF
Automatic table maintenance (AUTO_TBL_MAINT) = OFF
Automatic runstats (AUTO_RUNSTATS) = OFF
Automatic statement statistics (AUTO_STMT_STATS) = OFF
Automatic statistics profiling (AUTO_STATS_PROF) = OFF
Automatic profile updates (AUTO_PROF_UPD) = OFF
Automatic reorganization (AUTO_REORG) = OFF
Enable XML Character operations (ENABLE_XMLCHAR) = NO
WLM Collection Interval (minutes) (WLM_COLLECT_INT) = 0
$
$ db2 get db cfg for NCDB
Database Configuration for Database NCDB
Database configuration release level = 0x0c00
Database release level = 0x0c00
Database territory = CN
Database code page = 1386
Database code set = GBK
Database country/region code = 86
Database collating sequence = UNIQUE
Alternate collating sequence (ALT_COLLATE) =
Number compatibility = OFF
Varchar2 compatibility = OFF
Database page size = 4096
Dynamic SQL Query management (DYN_QUERY_MGMT) = DISABLE
Discovery support for this database (DISCOVER_DB) = ENABLE
Restrict access = NO
Default query optimization class (DFT_QUERYOPT) = 5
Degree of parallelism (DFT_DEGREE) = 1
Continue upon arithmetic exceptions (DFT_SQLMATHWARN) = NO
Default refresh age (DFT_REFRESH_AGE) = 0
Default maintained table types for opt (DFT_MTTB_TYPES) = SYSTEM
Number of frequent values retained (NUM_FREQVALUES) = 10
Number of quantiles retained (NUM_QUANTILES) = 20
Decimal floating point rounding mode (DECFLT_ROUNDING) = ROUND_HALF_EVEN
Backup pending = NO
Database is consistent = YES
Rollforward pending = NO
Restore pending = NO
Multi-page file allocation enabled = YES
Log retain for recovery status = RECOVERY
User exit for logging status = YES
Self tuning memory (SELF_TUNING_MEM) = ON
Size of database shared memory (4KB) (DATABASE_MEMORY) = AUTOMATIC(2928528)
Database memory threshold (DB_MEM_THRESH) = 10
Max storage for lock list (4KB) (LOCKLIST) = AUTOMATIC(174530)
Percent. of lock lists per application (MAXLOCKS) = AUTOMATIC(97)
Package cache size (4KB) (PCKCACHESZ) = AUTOMATIC(524288)
Sort heap thres for shared sorts (4KB) (SHEAPTHRES_SHR) = AUTOMATIC(203505)
Sort list heap (4KB) (SORTHEAP) = AUTOMATIC(40701)
Database heap (4KB) (DBHEAP) = AUTOMATIC(3650)
Catalog cache size (4KB) (CATALOGCACHE_SZ) = 2048
Log buffer size (4KB) (LOGBUFSZ) = 2048
Utilities heap size (4KB) (UTIL_HEAP_SZ) = 8192
Buffer pool size (pages) (BUFFPAGE) = 40000
SQL statement heap (4KB) (STMTHEAP) = AUTOMATIC(4096)
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) = 60000
Lock timeout (sec) (LOCKTIMEOUT) = -1
Changed pages threshold (CHNGPGS_THRESH) = 60
Number of asynchronous page cleaners (NUM_IOCLEANERS) = AUTOMATIC(15)
Number of I/O servers (NUM_IOSERVERS) = AUTOMATIC(6)
Index sort flag (INDEXSORT) = YES
Sequential detect flag (SEQDETECT) = YES
Default prefetch size (pages) (DFT_PREFETCH_SZ) = AUTOMATIC
Track modified pages (TRACKMOD) = ON
Default number of containers = 1
Default tablespace extentsize (pages) (DFT_EXTENT_SZ) = 32
Max number of active applications (MAXAPPLS) = AUTOMATIC(142)
Average number of active applications (AVG_APPLS) = AUTOMATIC(1)
Max DB files open per application (MAXFILOP) = 61440
Log file size (4KB) (LOGFILSIZ) = 12800
Number of primary log files (LOGPRIMARY) = 40
Number of secondary log files (LOGSECOND) = 200
Changed path to log files (NEWLOGPATH) =
Path to log files = /db2_log/ncdb/NODE0000/
Overflow log path (OVERFLOWLOGPATH) =
Mirror log path (MIRRORLOGPATH) =
First active log file = S0010297.LOG
Block log on disk full (BLK_LOG_DSK_FUL) = YES
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
Group commit count (MINCOMMIT) = 3
Percent log file reclaimed before soft chckpt (SOFTMAX) = 520
Log retain for recovery enabled (LOGRETAIN) = RECOVERY
User exit for logging enabled (USEREXIT) = OFF
HADR database role = STANDARD
HADR 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) = 120
HADR log write synchronization mode (HADR_SYNCMODE) = NEARSYNC
HADR peer window duration (seconds) (HADR_PEER_WINDOW) = 0
First log archive method (LOGARCHMETH1) = TSM
Options for logarchmeth1 (LOGARCHOPT1) =
Second log archive method (LOGARCHMETH2) = OFF
Options for logarchmeth2 (LOGARCHOPT2) =
Failover log archive path (FAILARCHPATH) =
Number of log archive retries on error (NUMARCHRETRY) = 5
Log archive retry Delay (secs) (ARCHRETRYDELAY) = 20
Vendor options (VENDOROPT) =
Auto restart enabled (AUTORESTART) = ON
Index re-creation time and redo index build (INDEXREC) = SYSTEM (RESTART)
Log pages during index build (LOGINDEXBUILD) = OFF
Default number of loadrec sessions (DFT_LOADREC_SES) = 1
Number of database backups to retain (NUM_DB_BACKUPS) = 12
Recovery history retention (days) (REC_HIS_RETENTN) = 366
Auto deletion of recovery objects (AUTO_DEL_REC_OBJ) = OFF
TSM management class (TSM_MGMTCLASS) =
TSM node name (TSM_NODENAME) =
TSM owner (TSM_OWNER) =
TSM password (TSM_PASSWORD) =
Automatic maintenance (AUTO_MAINT) = OFF
Automatic database backup (AUTO_DB_BACKUP) = OFF
Automatic table maintenance (AUTO_TBL_MAINT) = OFF
Automatic runstats (AUTO_RUNSTATS) = OFF
Automatic statement statistics (AUTO_STMT_STATS) = OFF
Automatic statistics profiling (AUTO_STATS_PROF) = OFF
Automatic profile updates (AUTO_PROF_UPD) = OFF
Automatic reorganization (AUTO_REORG) = OFF
Enable XML Character operations (ENABLE_XMLCHAR) = NO
WLM Collection Interval (minutes) (WLM_COLLECT_INT) = 0
$
$
$ db2 connect to NCDB
Database Connection Information
Database server = DB2/AIX64 9.5.6
SQL authorization ID = DB2INST1
Local database alias = NCDB
$
查看数据库对应的表空间
$ db2 list tablespaces show detail
Tablespaces for Current Database
Tablespace ID = 0
Name = SYSCATSPACE
Type = Database managed space
Contents = All permanent data. Regular table space.
State = 0x0000
Detailed explanation:
Normal
Total pages = 49152
Useable pages = 49148
Used pages = 37516
Free pages = 11632
High water mark (pages) = 42724
Page size (bytes) = 4096
Extent size (pages) = 4
Prefetch size (pages) = 24
Number of containers = 1
Tablespace ID = 1
Name = SYSTOOLSPACE
Type = Database managed space
Contents = All permanent data. Large table space.
State = 0x0000
Detailed explanation:
Normal
Total pages = 8192
Useable pages = 8188
Used pages = 20
Free pages = 8168
High water mark (pages) = 20
Page size (bytes) = 4096
Extent size (pages) = 4
Prefetch size (pages) = 24
Number of containers = 1
Tablespace ID = 3
Name = NNC_DATA01
Type = Database managed space
Contents = All permanent data. Regular table space.
State = 0x0000
Detailed explanation:
Normal
Total pages = 1966080
Useable pages = 1966064
Used pages = 431744
Free pages = 1534320
High water mark (pages) = 431744
Page size (bytes) = 16384
Extent size (pages) = 16
Prefetch size (pages) = 96
Number of containers = 1
Minimum recovery time = 2012-11-20-03.06.19.000000
Tablespace ID = 4
Name = NNC_DATA02
Type = Database managed space
Contents = All permanent data. Regular table space.
State = 0x0000
Detailed explanation:
Normal
Total pages = 1638400
Useable pages = 1638384
Used pages = 3200
Free pages = 1635184
High water mark (pages) = 3200
Page size (bytes) = 16384
Extent size (pages) = 16
Prefetch size (pages) = 96
Number of containers = 1
Tablespace ID = 5
Name = NNC_DATA03
Type = Database managed space
Contents = All permanent data. Regular table space.
State = 0x0000
Detailed explanation:
Normal
Total pages = 2293760
Useable pages = 2293744
Used pages = 263536
Free pages = 2030208
High water mark (pages) = 1825216
Page size (bytes) = 16384
Extent size (pages) = 16
Prefetch size (pages) = 96
Number of containers = 1
Minimum recovery time = 2013-12-27-03.23.44.000000
Tablespace ID = 6
Name = NNC_INDEX01
Type = Database managed space
Contents = All permanent data. Regular table space.
State = 0x0000
Detailed explanation:
Normal
Total pages = 11796480
Useable pages = 11796448
Used pages = 7903232
Free pages = 3893216
High water mark (pages) = 7903232
Page size (bytes) = 4096
Extent size (pages) = 32
Prefetch size (pages) = 192
Number of containers = 1
Minimum recovery time = 2014-02-15-06.21.29.000000
Tablespace ID = 7
Name = NNC_INDEX02
Type = Database managed space
Contents = All permanent data. Regular table space.
State = 0x0000
Detailed explanation:
Normal
Total pages = 3932160
Useable pages = 3932128
Used pages = 6048
Free pages = 3926080
High water mark (pages) = 6368
Page size (bytes) = 4096
Extent size (pages) = 32
Prefetch size (pages) = 192
Number of containers = 1
Tablespace ID = 8
Name = NNC_INDEX03
Type = Database managed space
Contents = All permanent data. Regular table space.
State = 0x0000
Detailed explanation:
Normal
Total pages = 6553600
Useable pages = 6553568
Used pages = 454624
Free pages = 6098944
High water mark (pages) = 486304
Page size (bytes) = 4096
Extent size (pages) = 32
Prefetch size (pages) = 192
Number of containers = 1
Tablespace ID = 9
Name = TEM4SYS16K
Type = System managed space
Contents = System Temporary data
State = 0x0000
Detailed explanation:
Normal
Total pages = 1
Useable pages = 1
Used pages = 1
Free pages = Not applicable
High water mark (pages) = Not applicable
Page size (bytes) = 16384
Extent size (pages) = 32
Prefetch size (pages) = 32
Number of containers = 1
Tablespace ID = 10
Name = TEM4SYS4K
Type = System managed space
Contents = System Temporary data
State = 0x0000
Detailed explanation:
Normal
Total pages = 1
Useable pages = 1
Used pages = 1
Free pages = Not applicable
High water mark (pages) = Not applicable
Page size (bytes) = 4096
Extent size (pages) = 32
Prefetch size (pages) = 32
Number of containers = 1
Tablespace ID = 11
Name = USERTEMP16K
Type = System managed space
Contents = User Temporary data
State = 0x0000
Detailed explanation:
Normal
Total pages = 1
Useable pages = 1
Used pages = 1
Free pages = Not applicable
High water mark (pages) = Not applicable
Page size (bytes) = 16384
Extent size (pages) = 32
Prefetch size (pages) = 32
Number of containers = 1
Tablespace ID = 12
Name = USERTEMP4K
Type = System managed space
Contents = User Temporary data
State = 0x0000
Detailed explanation:
Normal
Total pages = 1
Useable pages = 1
Used pages = 1
Free pages = Not applicable
High water mark (pages) = Not applicable
Page size (bytes) = 4096
Extent size (pages) = 32
Prefetch size (pages) = 32
Number of containers = 1
$
查看表空间与数据文件的对应关系
$ db2pd -tablespaces -db ncdb
Database Partition 0 -- Database NCDB -- Active -- Up 0 days 00:02:57 -- Date 03/04/2014 10:38:53
Tablespace Configuration:
Address Id Type Content PageSz ExtentSz Auto Prefetch BufID BufIDDisk FSC NumCntrs MaxStripe LastConsecPg Name
0x078000024CC985C0 0 DMS Regular 4096 4 Yes 24 1 1 Off 1 0 3 SYSCATSPACE
0x078000024CC98E40 1 DMS Large 4096 4 Yes 24 1 1 Off 1 0 3 SYSTOOLSPACE
0x078000024CC996C0 3 DMS Regular 16384 16 Yes 96 2 2 Off 1 0 15 NNC_DATA01
0x078000024CC99F40 4 DMS Regular 16384 16 Yes 96 3 3 Off 1 0 15 NNC_DATA02
0x078000024CC9A7C0 5 DMS Regular 16384 16 Yes 96 4 4 Off 1 0 15 NNC_DATA03
0x078000024CC9B040 6 DMS Regular 4096 32 Yes 192 5 5 Off 1 0 31 NNC_INDEX01
0x078000024CC9B8C0 7 DMS Regular 4096 32 Yes 192 5 5 Off 1 0 31 NNC_INDEX02
0x078000024CC9C140 8 DMS Regular 4096 32 Yes 192 5 5 Off 1 0 31 NNC_INDEX03
0x078000024CC9C9C0 9 SMS SysTmp 16384 32 No 32 6 6 On 1 0 31 TEM4SYS16K
0x078000024CC9F220 10 SMS SysTmp 4096 32 No 32 7 7 On 1 0 31 TEM4SYS4K
0x078000024CCA6100 11 SMS UsrTmp 16384 32 No 32 6 6 On 1 0 31 USERTEMP16K
0x078000024CCA87E0 12 SMS UsrTmp 4096 32 No 32 7 7 On 1 0 31 USERTEMP4K
Tablespace Statistics:
Address Id TotalPgs UsablePgs UsedPgs PndFreePgs FreePgs HWM State MinRecTime NQuiescers
0x078000024CC985C0 0 49152 49148 37516 0 11632 42724 0x00000000 0 0
0x078000024CC98E40 1 8192 8188 20 0 8168 20 0x00000000 0 0
0x078000024CC996C0 3 1966080 1966064 431744 0 1534320 431744 0x00000000 1353380779 0
0x078000024CC99F40 4 1638400 1638384 3200 0 1635184 3200 0x00000000 0 0
0x078000024CC9A7C0 5 2293760 2293744 263536 0 2030208 1825216 0x00000000 1388114624 0
0x078000024CC9B040 6 11796480 11796448 7903232 0 3893216 7903232 0x00000000 1392445289 0
0x078000024CC9B8C0 7 3932160 3932128 6048 0 3926080 6368 0x00000000 0 0
0x078000024CC9C140 8 6553600 6553568 454624 0 6098944 486304 0x00000000 0 0
0x078000024CC9C9C0 9 1 1 1 0 0 0 0x00000000 0 0
0x078000024CC9F220 10 1 1 1 0 0 0 0x00000000 0 0
0x078000024CCA6100 11 1 1 1 0 0 0 0x00000000 0 0
0x078000024CCA87E0 12 1 1 1 0 0 0 0x00000000 0 0
Tablespace Autoresize Statistics:
Address Id AS AR InitSize IncSize IIP MaxSize LastResize LRF
0x078000024CC985C0 0 Yes Yes 0 0 No None None No
0x078000024CC98E40 1 Yes Yes 0 -1 No None None No
0x078000024CC996C0 3 No No 0 0 No 0 None No
0x078000024CC99F40 4 No No 0 0 No 0 None No
0x078000024CC9A7C0 5 No No 0 0 No 0 None No
0x078000024CC9B040 6 No No 0 0 No 0 None No
0x078000024CC9B8C0 7 No No 0 0 No 0 None No
0x078000024CC9C140 8 No No 0 0 No 0 None No
0x078000024CC9C9C0 9 No No 0 0 No 0 None No
0x078000024CC9F220 10 No No 0 0 No 0 None No
0x078000024CCA6100 11 No No 0 0 No 0 None No
0x078000024CCA87E0 12 No No 0 0 No 0 None No
Containers:
Address TspId ContainNum Type TotalPgs UseablePgs StripeSet Container
0x078000024CC98CC0 0 0 File 49152 49148 0 /db2_tag/ncdb/db2inst1/NODE0000/NCDB/T0000000/C0000000.CAT
0x078000024CC99540 1 0 File 8192 8188 0 /db2_tag/ncdb/db2inst1/NODE0000/NCDB/T0000001/C0000000.LRG
0x078000024CC99DC0 3 0 File 1966080 1966064 0 /db2data/db2nnc_data01/rdb2nnc_data01
0x078000024CC9A640 4 0 File 1638400 1638384 0 /db2data/db2nnc_data02/rdb2nnc_data02
0x078000024CC9AEC0 5 0 File 2293760 2293744 0 /db2data/db2nnc_data03/rdb2nnc_data03
0x078000024CC9B740 6 0 File 11796480 11796448 0 /db2data/db2nnc_index01/rdb2nnc_index01
0x078000024CC9BFC0 7 0 File 3932160 3932128 0 /db2data/db2nnc_index02/rdb2nnc_in5ex02
0x078000024CC9C840 8 0 File 6553600 6553568 0 /db2data/db2nnc_index03/rdb2nnc_index03
0x078000024CC9D060 9 0 Path 1 1 0 /db2_tag/ncdb/SYSTEM16K
0x078000024CC9F8C0 10 0 Path 1 1 0 /db2_tag/ncdb/SYSTEM4K
0x078000024CC9FA40 11 0 Path 1 1 0 /db2_tag/ncdb/Usertemp16k
0x078000024CC9FBC0 12 0 Path 1 1 0 /db2_tag/ncdb/Usertemp4k
$
查看表空间与数据文件的对应关系
$ db2pd -tablespace -db iufo
Database Partition 0 -- Database IUFO -- Active -- Up 10 days 23:29:00 -- Date 03/04/2014 10:40:00
Tablespace Configuration:
Address Id Type Content PageSz ExtentSz Auto Prefetch BufID BufIDDisk FSC NumCntrs MaxStripe LastConsecPg Name
0x07800000511B90E0 0 DMS Regular 4096 4 Yes 24 1 1 Off 1 0 3 SYSCATSPACE
0x07800000511B9960 3 DMS Regular 4096 16 Yes 96 3 3 Off 1 0 15 IUFO4
0x07800000511BA1E0 4 DMS Regular 16384 32 Yes 192 2 2 Off 1 0 31 IUFO16
0x07800000511BAA60 5 DMS UsrTmp 4096 64 No 64 3 3 Off 1 0 63 USERTEMP4K
0x07800000511BD320 6 DMS UsrTmp 16384 64 No 64 2 2 Off 1 0 63 USERTEMP16K
0x07800000511C0080 7 DMS SysTmp 16384 32 No 32 2 2 Off 1 0 31 TEM4SYS16K
0x07800000511C2760 8 DMS SysTmp 4096 32 No 32 3 3 Off 1 0 31 TEM4SYS4K
Tablespace Statistics:
Address Id TotalPgs UsablePgs UsedPgs PndFreePgs FreePgs HWM State MinRecTime NQuiescers
0x07800000511B90E0 0 24576 24572 21088 0 3484 23856 0x00000000 0 0
0x07800000511B9960 3 5242880 5242864 15760 64 5227040 15824 0x00000000 1312443229 0
0x07800000511BA1E0 4 786432 786400 224 0 786176 224 0x00000000 0 0
0x07800000511BAA60 5 1572864 1572800 128 0 1572672 128 0x00000000 0 0
0x07800000511BD320 6 262144 262080 128 0 261952 128 0x00000000 0 0
0x07800000511C0080 7 262144 262112 64 0 262048 64 0x00000000 0 0
0x07800000511C2760 8 1572864 1572832 64 0 1572768 64 0x00000000 0 0
Tablespace Autoresize Statistics:
Address Id AS AR InitSize IncSize IIP MaxSize LastResize LRF
0x07800000511B90E0 0 Yes Yes 0 0 No None None No
0x07800000511B9960 3 No No 0 0 No 0 None No
0x07800000511BA1E0 4 No No 0 0 No 0 None No
0x07800000511BAA60 5 No No 0 0 No 0 None No
0x07800000511BD320 6 No No 0 0 No 0 None No
0x07800000511C0080 7 No No 0 0 No 0 None No
0x07800000511C2760 8 No No 0 0 No 0 None No
Containers:
Address TspId ContainNum Type TotalPgs UseablePgs StripeSet Container
0x07800000511B97E0 0 0 File 24576 24572 0 /db2_tag/iufo/db2inst1/NODE0000/IUFO/T0000000/C0000000.CAT
0x07800000511BA060 3 0 File 5242880 5242864 0 /db2data/db2iufo_data01/rdb2iufo_data01
0x07800000511BA8E0 4 0 File 786432 786400 0 /db2data/db2iufo_data02/rdb2iufo_data02
0x07800000511BB160 5 0 File 1572864 1572800 0 /db2_tag/iufo/Usertemp4
0x07800000511BDA20 6 0 File 262144 262080 0 /db2_tag/iufo/Usertemp16
0x07800000511BFC40 7 0 File 262144 262112 0 /db2_tag/iufo/temp4sys16
0x07800000511BFE20 8 0 File 1572864 1572832 0 /db2_tag/iufo/temp4sys4
$
DB2Server[/]#ps -ef | grep db
dasusr1 184376 1 0 Sep 29 - 0:44 /opt/IBM/db2/V9.5/das/bin/db2fmd -i dasusr1 -m /opt/IBM/db2/V9.5/das/lib/libdb2dasgcf.a
dasusr1 209014 1 0 Sep 29 - 0:44 /home/dasusr1/das/adm/db2dasrrm
root 217162 610798 0 10:31:20 pts/0 0:00 grep db
db2inst1 176562 209606 0 Sep 29 - 9560:00 db2sysc 0
db2inst1 180726 176562 0 Sep 29 - 0:00 db2vend (PD Vendor Process - 258)
root 213432 176562 0 Sep 29 - 1:02 db2ckpwd 0
orapip 590264 1 0 Feb 22 - 0:42 ora_dbw0_PIP
root 209606 1 0 Sep 29 - 0:00 db2wdog 0
root 213698 176562 0 Sep 29 - 1:03 db2ckpwd 0
orapip 221950 1 0 Feb 22 - 0:23 ora_dbw1_PIP
db2inst1 717566 176562 0 Feb 21 - 0:09 db2vend (db2logmgr.meth1 - 3641 (IUFO))
root 103396 1 0 Sep 29 - 58:21 /opt/IBM/db2/V9.5/bin/db2fmcd
root 234446 176562 0 Sep 29 - 1:01 db2ckpwd 0
db2inst1 242626 209606 0 Sep 29 - 18:19 db2acd 0
db2fenc1 385970 209606 0 Sep 30 - 0:01 db2fmp (C) 0
DB2Server[/]#
env查看其安装路径等信息
切换到对应用户下
DB2Server[/]#su - db2inst1
$ db2level
DB21085I Instance "db2inst1" uses "64" bits and DB2 code release "SQL09056"
with level identifier "06070107".
Informational tokens are "DB2 v9.5.0.6", "s100805", "U829466", and Fix Pack
"6".
Product is installed at "/opt/IBM/db2/V9.5".
$
查看数据库编目
$
$ db2 list db directory
System Database Directory
Number of entries in the directory = 2
Database 1 entry:
Database alias = IUFO
Database name = IUFO
Local database directory = /db2_tag/iufo
Database release level = c.00
Comment =
Directory entry type = Indirect
Catalog database partition number = 0
Alternate server hostname =
Alternate server port number =
Database 2 entry:
Database alias = NCDB
Database name = NCDB
Local database directory = /db2_tag/ncdb
Database release level = c.00
Comment =
Directory entry type = Indirect
Catalog database partition number = 0
Alternate server hostname =
Alternate server port number =
$
$ db2 get db cfg for IUFO
Database Configuration for Database IUFO
Database configuration release level = 0x0c00
Database release level = 0x0c00
Database territory = CN
Database code page = 1386
Database code set = GBK
Database country/region code = 86
Database collating sequence = UNIQUE
Alternate collating sequence (ALT_COLLATE) =
Number compatibility = OFF
Varchar2 compatibility = OFF
Database page size = 4096
Dynamic SQL Query management (DYN_QUERY_MGMT) = DISABLE
Discovery support for this database (DISCOVER_DB) = ENABLE
Restrict access = NO
Default query optimization class (DFT_QUERYOPT) = 5
Degree of parallelism (DFT_DEGREE) = 1
Continue upon arithmetic exceptions (DFT_SQLMATHWARN) = NO
Default refresh age (DFT_REFRESH_AGE) = 0
Default maintained table types for opt (DFT_MTTB_TYPES) = SYSTEM
Number of frequent values retained (NUM_FREQVALUES) = 10
Number of quantiles retained (NUM_QUANTILES) = 20
Decimal floating point rounding mode (DECFLT_ROUNDING) = ROUND_HALF_EVEN
Backup pending = NO
Database is consistent = NO
Rollforward pending = NO
Restore pending = NO
Multi-page file allocation enabled = YES
Log retain for recovery status = RECOVERY
User exit for logging status = YES
Self tuning memory (SELF_TUNING_MEM) = ON
Size of database shared memory (4KB) (DATABASE_MEMORY) = AUTOMATIC(321800)
Database memory threshold (DB_MEM_THRESH) = 10
Max storage for lock list (4KB) (LOCKLIST) = AUTOMATIC(1222)
Percent. of lock lists per application (MAXLOCKS) = AUTOMATIC(98)
Package cache size (4KB) (PCKCACHESZ) = AUTOMATIC(82486)
Sort heap thres for shared sorts (4KB) (SHEAPTHRES_SHR) = AUTOMATIC(15237)
Sort list heap (4KB) (SORTHEAP) = AUTOMATIC(3047)
Database heap (4KB) (DBHEAP) = AUTOMATIC(3257)
Catalog cache size (4KB) (CATALOGCACHE_SZ) = 2048
Log buffer size (4KB) (LOGBUFSZ) = 2048
Utilities heap size (4KB) (UTIL_HEAP_SZ) = 8192
Buffer pool size (pages) (BUFFPAGE) = 40000
SQL statement heap (4KB) (STMTHEAP) = AUTOMATIC(4096)
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) = 60000
Lock timeout (sec) (LOCKTIMEOUT) = -1
Changed pages threshold (CHNGPGS_THRESH) = 60
Number of asynchronous page cleaners (NUM_IOCLEANERS) = AUTOMATIC(15)
Number of I/O servers (NUM_IOSERVERS) = AUTOMATIC(6)
Index sort flag (INDEXSORT) = YES
Sequential detect flag (SEQDETECT) = YES
Default prefetch size (pages) (DFT_PREFETCH_SZ) = AUTOMATIC
Track modified pages (TRACKMOD) = ON
Default number of containers = 1
Default tablespace extentsize (pages) (DFT_EXTENT_SZ) = 32
Max number of active applications (MAXAPPLS) = AUTOMATIC(49)
Average number of active applications (AVG_APPLS) = AUTOMATIC(1)
Max DB files open per application (MAXFILOP) = 61440
Log file size (4KB) (LOGFILSIZ) = 12800
Number of primary log files (LOGPRIMARY) = 40
Number of secondary log files (LOGSECOND) = 40
Changed path to log files (NEWLOGPATH) =
Path to log files = /db2_log/iufo/NODE0000/
Overflow log path (OVERFLOWLOGPATH) =
Mirror log path (MIRRORLOGPATH) =
First active log file = S0001892.LOG
Block log on disk full (BLK_LOG_DSK_FUL) = YES
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
Group commit count (MINCOMMIT) = 1
Percent log file reclaimed before soft chckpt (SOFTMAX) = 520
Log retain for recovery enabled (LOGRETAIN) = RECOVERY
User exit for logging enabled (USEREXIT) = OFF
HADR database role = STANDARD
HADR 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) = 120
HADR log write synchronization mode (HADR_SYNCMODE) = NEARSYNC
HADR peer window duration (seconds) (HADR_PEER_WINDOW) = 0
First log archive method (LOGARCHMETH1) = TSM
Options for logarchmeth1 (LOGARCHOPT1) =
Second log archive method (LOGARCHMETH2) = OFF
Options for logarchmeth2 (LOGARCHOPT2) =
Failover log archive path (FAILARCHPATH) =
Number of log archive retries on error (NUMARCHRETRY) = 5
Log archive retry Delay (secs) (ARCHRETRYDELAY) = 20
Vendor options (VENDOROPT) =
Auto restart enabled (AUTORESTART) = ON
Index re-creation time and redo index build (INDEXREC) = SYSTEM (RESTART)
Log pages during index build (LOGINDEXBUILD) = OFF
Default number of loadrec sessions (DFT_LOADREC_SES) = 1
Number of database backups to retain (NUM_DB_BACKUPS) = 12
Recovery history retention (days) (REC_HIS_RETENTN) = 366
Auto deletion of recovery objects (AUTO_DEL_REC_OBJ) = OFF
TSM management class (TSM_MGMTCLASS) =
TSM node name (TSM_NODENAME) =
TSM owner (TSM_OWNER) =
TSM password (TSM_PASSWORD) =
Automatic maintenance (AUTO_MAINT) = OFF
Automatic database backup (AUTO_DB_BACKUP) = OFF
Automatic table maintenance (AUTO_TBL_MAINT) = OFF
Automatic runstats (AUTO_RUNSTATS) = OFF
Automatic statement statistics (AUTO_STMT_STATS) = OFF
Automatic statistics profiling (AUTO_STATS_PROF) = OFF
Automatic profile updates (AUTO_PROF_UPD) = OFF
Automatic reorganization (AUTO_REORG) = OFF
Enable XML Character operations (ENABLE_XMLCHAR) = NO
WLM Collection Interval (minutes) (WLM_COLLECT_INT) = 0
$
$ db2 get db cfg for NCDB
Database Configuration for Database NCDB
Database configuration release level = 0x0c00
Database release level = 0x0c00
Database territory = CN
Database code page = 1386
Database code set = GBK
Database country/region code = 86
Database collating sequence = UNIQUE
Alternate collating sequence (ALT_COLLATE) =
Number compatibility = OFF
Varchar2 compatibility = OFF
Database page size = 4096
Dynamic SQL Query management (DYN_QUERY_MGMT) = DISABLE
Discovery support for this database (DISCOVER_DB) = ENABLE
Restrict access = NO
Default query optimization class (DFT_QUERYOPT) = 5
Degree of parallelism (DFT_DEGREE) = 1
Continue upon arithmetic exceptions (DFT_SQLMATHWARN) = NO
Default refresh age (DFT_REFRESH_AGE) = 0
Default maintained table types for opt (DFT_MTTB_TYPES) = SYSTEM
Number of frequent values retained (NUM_FREQVALUES) = 10
Number of quantiles retained (NUM_QUANTILES) = 20
Decimal floating point rounding mode (DECFLT_ROUNDING) = ROUND_HALF_EVEN
Backup pending = NO
Database is consistent = YES
Rollforward pending = NO
Restore pending = NO
Multi-page file allocation enabled = YES
Log retain for recovery status = RECOVERY
User exit for logging status = YES
Self tuning memory (SELF_TUNING_MEM) = ON
Size of database shared memory (4KB) (DATABASE_MEMORY) = AUTOMATIC(2928528)
Database memory threshold (DB_MEM_THRESH) = 10
Max storage for lock list (4KB) (LOCKLIST) = AUTOMATIC(174530)
Percent. of lock lists per application (MAXLOCKS) = AUTOMATIC(97)
Package cache size (4KB) (PCKCACHESZ) = AUTOMATIC(524288)
Sort heap thres for shared sorts (4KB) (SHEAPTHRES_SHR) = AUTOMATIC(203505)
Sort list heap (4KB) (SORTHEAP) = AUTOMATIC(40701)
Database heap (4KB) (DBHEAP) = AUTOMATIC(3650)
Catalog cache size (4KB) (CATALOGCACHE_SZ) = 2048
Log buffer size (4KB) (LOGBUFSZ) = 2048
Utilities heap size (4KB) (UTIL_HEAP_SZ) = 8192
Buffer pool size (pages) (BUFFPAGE) = 40000
SQL statement heap (4KB) (STMTHEAP) = AUTOMATIC(4096)
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) = 60000
Lock timeout (sec) (LOCKTIMEOUT) = -1
Changed pages threshold (CHNGPGS_THRESH) = 60
Number of asynchronous page cleaners (NUM_IOCLEANERS) = AUTOMATIC(15)
Number of I/O servers (NUM_IOSERVERS) = AUTOMATIC(6)
Index sort flag (INDEXSORT) = YES
Sequential detect flag (SEQDETECT) = YES
Default prefetch size (pages) (DFT_PREFETCH_SZ) = AUTOMATIC
Track modified pages (TRACKMOD) = ON
Default number of containers = 1
Default tablespace extentsize (pages) (DFT_EXTENT_SZ) = 32
Max number of active applications (MAXAPPLS) = AUTOMATIC(142)
Average number of active applications (AVG_APPLS) = AUTOMATIC(1)
Max DB files open per application (MAXFILOP) = 61440
Log file size (4KB) (LOGFILSIZ) = 12800
Number of primary log files (LOGPRIMARY) = 40
Number of secondary log files (LOGSECOND) = 200
Changed path to log files (NEWLOGPATH) =
Path to log files = /db2_log/ncdb/NODE0000/
Overflow log path (OVERFLOWLOGPATH) =
Mirror log path (MIRRORLOGPATH) =
First active log file = S0010297.LOG
Block log on disk full (BLK_LOG_DSK_FUL) = YES
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
Group commit count (MINCOMMIT) = 3
Percent log file reclaimed before soft chckpt (SOFTMAX) = 520
Log retain for recovery enabled (LOGRETAIN) = RECOVERY
User exit for logging enabled (USEREXIT) = OFF
HADR database role = STANDARD
HADR 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) = 120
HADR log write synchronization mode (HADR_SYNCMODE) = NEARSYNC
HADR peer window duration (seconds) (HADR_PEER_WINDOW) = 0
First log archive method (LOGARCHMETH1) = TSM
Options for logarchmeth1 (LOGARCHOPT1) =
Second log archive method (LOGARCHMETH2) = OFF
Options for logarchmeth2 (LOGARCHOPT2) =
Failover log archive path (FAILARCHPATH) =
Number of log archive retries on error (NUMARCHRETRY) = 5
Log archive retry Delay (secs) (ARCHRETRYDELAY) = 20
Vendor options (VENDOROPT) =
Auto restart enabled (AUTORESTART) = ON
Index re-creation time and redo index build (INDEXREC) = SYSTEM (RESTART)
Log pages during index build (LOGINDEXBUILD) = OFF
Default number of loadrec sessions (DFT_LOADREC_SES) = 1
Number of database backups to retain (NUM_DB_BACKUPS) = 12
Recovery history retention (days) (REC_HIS_RETENTN) = 366
Auto deletion of recovery objects (AUTO_DEL_REC_OBJ) = OFF
TSM management class (TSM_MGMTCLASS) =
TSM node name (TSM_NODENAME) =
TSM owner (TSM_OWNER) =
TSM password (TSM_PASSWORD) =
Automatic maintenance (AUTO_MAINT) = OFF
Automatic database backup (AUTO_DB_BACKUP) = OFF
Automatic table maintenance (AUTO_TBL_MAINT) = OFF
Automatic runstats (AUTO_RUNSTATS) = OFF
Automatic statement statistics (AUTO_STMT_STATS) = OFF
Automatic statistics profiling (AUTO_STATS_PROF) = OFF
Automatic profile updates (AUTO_PROF_UPD) = OFF
Automatic reorganization (AUTO_REORG) = OFF
Enable XML Character operations (ENABLE_XMLCHAR) = NO
WLM Collection Interval (minutes) (WLM_COLLECT_INT) = 0
$
$
$ db2 connect to NCDB
Database Connection Information
Database server = DB2/AIX64 9.5.6
SQL authorization ID = DB2INST1
Local database alias = NCDB
$
查看数据库对应的表空间
$ db2 list tablespaces show detail
Tablespaces for Current Database
Tablespace ID = 0
Name = SYSCATSPACE
Type = Database managed space
Contents = All permanent data. Regular table space.
State = 0x0000
Detailed explanation:
Normal
Total pages = 49152
Useable pages = 49148
Used pages = 37516
Free pages = 11632
High water mark (pages) = 42724
Page size (bytes) = 4096
Extent size (pages) = 4
Prefetch size (pages) = 24
Number of containers = 1
Tablespace ID = 1
Name = SYSTOOLSPACE
Type = Database managed space
Contents = All permanent data. Large table space.
State = 0x0000
Detailed explanation:
Normal
Total pages = 8192
Useable pages = 8188
Used pages = 20
Free pages = 8168
High water mark (pages) = 20
Page size (bytes) = 4096
Extent size (pages) = 4
Prefetch size (pages) = 24
Number of containers = 1
Tablespace ID = 3
Name = NNC_DATA01
Type = Database managed space
Contents = All permanent data. Regular table space.
State = 0x0000
Detailed explanation:
Normal
Total pages = 1966080
Useable pages = 1966064
Used pages = 431744
Free pages = 1534320
High water mark (pages) = 431744
Page size (bytes) = 16384
Extent size (pages) = 16
Prefetch size (pages) = 96
Number of containers = 1
Minimum recovery time = 2012-11-20-03.06.19.000000
Tablespace ID = 4
Name = NNC_DATA02
Type = Database managed space
Contents = All permanent data. Regular table space.
State = 0x0000
Detailed explanation:
Normal
Total pages = 1638400
Useable pages = 1638384
Used pages = 3200
Free pages = 1635184
High water mark (pages) = 3200
Page size (bytes) = 16384
Extent size (pages) = 16
Prefetch size (pages) = 96
Number of containers = 1
Tablespace ID = 5
Name = NNC_DATA03
Type = Database managed space
Contents = All permanent data. Regular table space.
State = 0x0000
Detailed explanation:
Normal
Total pages = 2293760
Useable pages = 2293744
Used pages = 263536
Free pages = 2030208
High water mark (pages) = 1825216
Page size (bytes) = 16384
Extent size (pages) = 16
Prefetch size (pages) = 96
Number of containers = 1
Minimum recovery time = 2013-12-27-03.23.44.000000
Tablespace ID = 6
Name = NNC_INDEX01
Type = Database managed space
Contents = All permanent data. Regular table space.
State = 0x0000
Detailed explanation:
Normal
Total pages = 11796480
Useable pages = 11796448
Used pages = 7903232
Free pages = 3893216
High water mark (pages) = 7903232
Page size (bytes) = 4096
Extent size (pages) = 32
Prefetch size (pages) = 192
Number of containers = 1
Minimum recovery time = 2014-02-15-06.21.29.000000
Tablespace ID = 7
Name = NNC_INDEX02
Type = Database managed space
Contents = All permanent data. Regular table space.
State = 0x0000
Detailed explanation:
Normal
Total pages = 3932160
Useable pages = 3932128
Used pages = 6048
Free pages = 3926080
High water mark (pages) = 6368
Page size (bytes) = 4096
Extent size (pages) = 32
Prefetch size (pages) = 192
Number of containers = 1
Tablespace ID = 8
Name = NNC_INDEX03
Type = Database managed space
Contents = All permanent data. Regular table space.
State = 0x0000
Detailed explanation:
Normal
Total pages = 6553600
Useable pages = 6553568
Used pages = 454624
Free pages = 6098944
High water mark (pages) = 486304
Page size (bytes) = 4096
Extent size (pages) = 32
Prefetch size (pages) = 192
Number of containers = 1
Tablespace ID = 9
Name = TEM4SYS16K
Type = System managed space
Contents = System Temporary data
State = 0x0000
Detailed explanation:
Normal
Total pages = 1
Useable pages = 1
Used pages = 1
Free pages = Not applicable
High water mark (pages) = Not applicable
Page size (bytes) = 16384
Extent size (pages) = 32
Prefetch size (pages) = 32
Number of containers = 1
Tablespace ID = 10
Name = TEM4SYS4K
Type = System managed space
Contents = System Temporary data
State = 0x0000
Detailed explanation:
Normal
Total pages = 1
Useable pages = 1
Used pages = 1
Free pages = Not applicable
High water mark (pages) = Not applicable
Page size (bytes) = 4096
Extent size (pages) = 32
Prefetch size (pages) = 32
Number of containers = 1
Tablespace ID = 11
Name = USERTEMP16K
Type = System managed space
Contents = User Temporary data
State = 0x0000
Detailed explanation:
Normal
Total pages = 1
Useable pages = 1
Used pages = 1
Free pages = Not applicable
High water mark (pages) = Not applicable
Page size (bytes) = 16384
Extent size (pages) = 32
Prefetch size (pages) = 32
Number of containers = 1
Tablespace ID = 12
Name = USERTEMP4K
Type = System managed space
Contents = User Temporary data
State = 0x0000
Detailed explanation:
Normal
Total pages = 1
Useable pages = 1
Used pages = 1
Free pages = Not applicable
High water mark (pages) = Not applicable
Page size (bytes) = 4096
Extent size (pages) = 32
Prefetch size (pages) = 32
Number of containers = 1
$
查看表空间与数据文件的对应关系
$ db2pd -tablespaces -db ncdb
Database Partition 0 -- Database NCDB -- Active -- Up 0 days 00:02:57 -- Date 03/04/2014 10:38:53
Tablespace Configuration:
Address Id Type Content PageSz ExtentSz Auto Prefetch BufID BufIDDisk FSC NumCntrs MaxStripe LastConsecPg Name
0x078000024CC985C0 0 DMS Regular 4096 4 Yes 24 1 1 Off 1 0 3 SYSCATSPACE
0x078000024CC98E40 1 DMS Large 4096 4 Yes 24 1 1 Off 1 0 3 SYSTOOLSPACE
0x078000024CC996C0 3 DMS Regular 16384 16 Yes 96 2 2 Off 1 0 15 NNC_DATA01
0x078000024CC99F40 4 DMS Regular 16384 16 Yes 96 3 3 Off 1 0 15 NNC_DATA02
0x078000024CC9A7C0 5 DMS Regular 16384 16 Yes 96 4 4 Off 1 0 15 NNC_DATA03
0x078000024CC9B040 6 DMS Regular 4096 32 Yes 192 5 5 Off 1 0 31 NNC_INDEX01
0x078000024CC9B8C0 7 DMS Regular 4096 32 Yes 192 5 5 Off 1 0 31 NNC_INDEX02
0x078000024CC9C140 8 DMS Regular 4096 32 Yes 192 5 5 Off 1 0 31 NNC_INDEX03
0x078000024CC9C9C0 9 SMS SysTmp 16384 32 No 32 6 6 On 1 0 31 TEM4SYS16K
0x078000024CC9F220 10 SMS SysTmp 4096 32 No 32 7 7 On 1 0 31 TEM4SYS4K
0x078000024CCA6100 11 SMS UsrTmp 16384 32 No 32 6 6 On 1 0 31 USERTEMP16K
0x078000024CCA87E0 12 SMS UsrTmp 4096 32 No 32 7 7 On 1 0 31 USERTEMP4K
Tablespace Statistics:
Address Id TotalPgs UsablePgs UsedPgs PndFreePgs FreePgs HWM State MinRecTime NQuiescers
0x078000024CC985C0 0 49152 49148 37516 0 11632 42724 0x00000000 0 0
0x078000024CC98E40 1 8192 8188 20 0 8168 20 0x00000000 0 0
0x078000024CC996C0 3 1966080 1966064 431744 0 1534320 431744 0x00000000 1353380779 0
0x078000024CC99F40 4 1638400 1638384 3200 0 1635184 3200 0x00000000 0 0
0x078000024CC9A7C0 5 2293760 2293744 263536 0 2030208 1825216 0x00000000 1388114624 0
0x078000024CC9B040 6 11796480 11796448 7903232 0 3893216 7903232 0x00000000 1392445289 0
0x078000024CC9B8C0 7 3932160 3932128 6048 0 3926080 6368 0x00000000 0 0
0x078000024CC9C140 8 6553600 6553568 454624 0 6098944 486304 0x00000000 0 0
0x078000024CC9C9C0 9 1 1 1 0 0 0 0x00000000 0 0
0x078000024CC9F220 10 1 1 1 0 0 0 0x00000000 0 0
0x078000024CCA6100 11 1 1 1 0 0 0 0x00000000 0 0
0x078000024CCA87E0 12 1 1 1 0 0 0 0x00000000 0 0
Tablespace Autoresize Statistics:
Address Id AS AR InitSize IncSize IIP MaxSize LastResize LRF
0x078000024CC985C0 0 Yes Yes 0 0 No None None No
0x078000024CC98E40 1 Yes Yes 0 -1 No None None No
0x078000024CC996C0 3 No No 0 0 No 0 None No
0x078000024CC99F40 4 No No 0 0 No 0 None No
0x078000024CC9A7C0 5 No No 0 0 No 0 None No
0x078000024CC9B040 6 No No 0 0 No 0 None No
0x078000024CC9B8C0 7 No No 0 0 No 0 None No
0x078000024CC9C140 8 No No 0 0 No 0 None No
0x078000024CC9C9C0 9 No No 0 0 No 0 None No
0x078000024CC9F220 10 No No 0 0 No 0 None No
0x078000024CCA6100 11 No No 0 0 No 0 None No
0x078000024CCA87E0 12 No No 0 0 No 0 None No
Containers:
Address TspId ContainNum Type TotalPgs UseablePgs StripeSet Container
0x078000024CC98CC0 0 0 File 49152 49148 0 /db2_tag/ncdb/db2inst1/NODE0000/NCDB/T0000000/C0000000.CAT
0x078000024CC99540 1 0 File 8192 8188 0 /db2_tag/ncdb/db2inst1/NODE0000/NCDB/T0000001/C0000000.LRG
0x078000024CC99DC0 3 0 File 1966080 1966064 0 /db2data/db2nnc_data01/rdb2nnc_data01
0x078000024CC9A640 4 0 File 1638400 1638384 0 /db2data/db2nnc_data02/rdb2nnc_data02
0x078000024CC9AEC0 5 0 File 2293760 2293744 0 /db2data/db2nnc_data03/rdb2nnc_data03
0x078000024CC9B740 6 0 File 11796480 11796448 0 /db2data/db2nnc_index01/rdb2nnc_index01
0x078000024CC9BFC0 7 0 File 3932160 3932128 0 /db2data/db2nnc_index02/rdb2nnc_in5ex02
0x078000024CC9C840 8 0 File 6553600 6553568 0 /db2data/db2nnc_index03/rdb2nnc_index03
0x078000024CC9D060 9 0 Path 1 1 0 /db2_tag/ncdb/SYSTEM16K
0x078000024CC9F8C0 10 0 Path 1 1 0 /db2_tag/ncdb/SYSTEM4K
0x078000024CC9FA40 11 0 Path 1 1 0 /db2_tag/ncdb/Usertemp16k
0x078000024CC9FBC0 12 0 Path 1 1 0 /db2_tag/ncdb/Usertemp4k
$
查看表空间与数据文件的对应关系
$ db2pd -tablespace -db iufo
Database Partition 0 -- Database IUFO -- Active -- Up 10 days 23:29:00 -- Date 03/04/2014 10:40:00
Tablespace Configuration:
Address Id Type Content PageSz ExtentSz Auto Prefetch BufID BufIDDisk FSC NumCntrs MaxStripe LastConsecPg Name
0x07800000511B90E0 0 DMS Regular 4096 4 Yes 24 1 1 Off 1 0 3 SYSCATSPACE
0x07800000511B9960 3 DMS Regular 4096 16 Yes 96 3 3 Off 1 0 15 IUFO4
0x07800000511BA1E0 4 DMS Regular 16384 32 Yes 192 2 2 Off 1 0 31 IUFO16
0x07800000511BAA60 5 DMS UsrTmp 4096 64 No 64 3 3 Off 1 0 63 USERTEMP4K
0x07800000511BD320 6 DMS UsrTmp 16384 64 No 64 2 2 Off 1 0 63 USERTEMP16K
0x07800000511C0080 7 DMS SysTmp 16384 32 No 32 2 2 Off 1 0 31 TEM4SYS16K
0x07800000511C2760 8 DMS SysTmp 4096 32 No 32 3 3 Off 1 0 31 TEM4SYS4K
Tablespace Statistics:
Address Id TotalPgs UsablePgs UsedPgs PndFreePgs FreePgs HWM State MinRecTime NQuiescers
0x07800000511B90E0 0 24576 24572 21088 0 3484 23856 0x00000000 0 0
0x07800000511B9960 3 5242880 5242864 15760 64 5227040 15824 0x00000000 1312443229 0
0x07800000511BA1E0 4 786432 786400 224 0 786176 224 0x00000000 0 0
0x07800000511BAA60 5 1572864 1572800 128 0 1572672 128 0x00000000 0 0
0x07800000511BD320 6 262144 262080 128 0 261952 128 0x00000000 0 0
0x07800000511C0080 7 262144 262112 64 0 262048 64 0x00000000 0 0
0x07800000511C2760 8 1572864 1572832 64 0 1572768 64 0x00000000 0 0
Tablespace Autoresize Statistics:
Address Id AS AR InitSize IncSize IIP MaxSize LastResize LRF
0x07800000511B90E0 0 Yes Yes 0 0 No None None No
0x07800000511B9960 3 No No 0 0 No 0 None No
0x07800000511BA1E0 4 No No 0 0 No 0 None No
0x07800000511BAA60 5 No No 0 0 No 0 None No
0x07800000511BD320 6 No No 0 0 No 0 None No
0x07800000511C0080 7 No No 0 0 No 0 None No
0x07800000511C2760 8 No No 0 0 No 0 None No
Containers:
Address TspId ContainNum Type TotalPgs UseablePgs StripeSet Container
0x07800000511B97E0 0 0 File 24576 24572 0 /db2_tag/iufo/db2inst1/NODE0000/IUFO/T0000000/C0000000.CAT
0x07800000511BA060 3 0 File 5242880 5242864 0 /db2data/db2iufo_data01/rdb2iufo_data01
0x07800000511BA8E0 4 0 File 786432 786400 0 /db2data/db2iufo_data02/rdb2iufo_data02
0x07800000511BB160 5 0 File 1572864 1572800 0 /db2_tag/iufo/Usertemp4
0x07800000511BDA20 6 0 File 262144 262080 0 /db2_tag/iufo/Usertemp16
0x07800000511BFC40 7 0 File 262144 262112 0 /db2_tag/iufo/temp4sys16
0x07800000511BFE20 8 0 File 1572864 1572832 0 /db2_tag/iufo/temp4sys4
$