Linux下学习DB2命令的笔记(二)

2014-11-24 18:43:10 · 作者: · 浏览: 1
= TEMPSPACE1
Type = System managed space
Contents = System Temporary data
State = 0x0000
Detailed explanation:
Normal


Tablespace ID = 2
Name = USERSPACE1
Type = Database managed space
Contents = All permanent data. Large table space.
State = 0x0000
Detailed explanation:
Normal


[db2inst1@localhost ~]$
注: show detail为可选项,显示更详细信息


或者 db2pd -tablespaces -db 数据库
[db2inst1@localhost ~]$ db2pd -tablespaces -db test


Database Partition 0 -- Database TEST -- Active -- Up 0 days 00:03:11


Tablespace Configuration:
Address Id Type Content PageSz ExtentSz Auto Prefetch BufID BufIDDisk FSC NumCntrs MaxStripe LastConsecPg Name
0x9DC2A060 0 DMS Regular 4096 4 Yes 4 1 1 Off 1 0 3 SYSCATSPACE
0x9DC2B4B0 1 SMS SysTmp 4096 32 Yes 32 1 1 On 1 0 31 TEMPSPACE1
0x9DC30940 2 DMS Large 4096 32 Yes 32 1 1 Off 1 0 31 USERSPACE1


Tablespace Statistics:
Address Id TotalPgs UsablePgs UsedPgs PndFreePgs FreePgs HWM Max HWM State MinRecTime NQuiescers PathsDropped
0x9DC2A060 0 24576 24572 18712 0 5860 18712 18712 0x00000000 0 0 No
0x9DC2B4B0 1 1 1 1 0 0 0 0 0x00000000 0 0 No
0x9DC30940 2 8192 8160 96 0 8064 96 96 0x00000000 0 0 No


Tablespace Autoresize Statistics:
Address Id AS AR InitSize IncSize IIP MaxSize LastResize LRF
0x9DC2A060 0 Yes Yes 33554432 -1 No None None No
0x9DC2B4B0 1 Yes No 0 0 No 0 None No
0x9DC30940 2 Yes Yes 33554432 -1 No None None No


Containers:
Address TspId ContainNum Type TotalPgs UseablePgs PathID StripeSet Container
0x9B218F00 0 0 File 24576 24572 0 0 /home/db2inst1/db2inst1/NODE0000/TEST/T0000000/C0000000.CAT
0x9B219120 1 0 Path 1 1 0 0 /home/db2inst1/db2inst1/NODE0000/TEST/T0000001/C0000000.TMP
0x9B219390 2 0 File 8192 8160 0 0 /home/db2inst1/db2inst1/NODE0000/TEST/T0000002/C0000000.LRG
[db2inst1@localhost ~]$


10.显示数据库里有哪些表
[db2inst1@localhost ~]$ db2 connect to test


Database Connection Information


Database server = DB2/LINUX 9.7.1
SQL authorization ID = DB2INST1
Local database alias = TEST


[db2inst1@localhost ~]$ db2 list tables


Table/View Schema Type Creation time
------------------------------- --------------- ----- --------------------------


0 record(s) selected.


[db2inst1@localhost ~]$


注:上面信息说明数据库test中还没有表