内容发布更新时间 : 2024/11/8 3:40:52星期一 下面是文章的全部内容请认真阅读。
1.1.1.1. 定位TEMPSPACE表空间所使用的容器文件
db2 connect to stma user db2admin using db2admin db2 list tablespaces show detail
找到TEMPSPACE表空间ID=9
Tablespace ID = 9
Name = TEMPSPACE Type = Database managed space Contents = System Temporary data State = 0x0000 Detailed explanation: Normal
Total pages = 524288 Useable pages = 524224 Used pages = 64 Free pages = 524160 High water mark (pages) = 64 Page size (bytes) = 4096 Extent size (pages) = 32 Prefetch size (pages) = 32 Number of containers = 2
定位TEMPSPACE表空间的容器: db2 list tablespace containers for 12 show detail 12
DB2Server:#db2 list tablespace containers for 9 show detail
Tablespace Containers for Tablespace 9
Container ID = 0
Name = /dev/rdb2temp1lv Type = Disk Total pages = 262144 Useable pages = 262112 Accessible = Yes Container ID = 1
Name = /dev/rdb2temp2lv Type = Disk Total pages = 262144 Useable pages = 262112 Accessible = Yes
显示TEMPSPACE表空间有两个容器/dev/rdb2temp1lv和/dev/rdb2temp2lv /dev/rdb2idxrlv
1.1.1.2. 将这两个容器文件各扩大1G 1.1.1.2.1. AIX单机环境下运行命令
lsvg db2vg ,得到PP SIZE: 256 megabyte(s),因此1G空间需要4个PP。 extendlv db2idxblv 4 db2idxblv extendlv db2temp2lv 4
alter tablespace tempspace extend(device '/dev/rdb2temp1lv' 1G,device '/dev/rdb2temp2lv' 1G)
alter tablespace IDXRSPACE extend(device '/dev/rdb2idxrlv' 1G)
1.1.1.2.2. HP 单机环境下运行命令
lvextend -L 1024 /dev/db2vg/db2temp1lv lvextend -L 1024 /dev/db2vg/db2temp2lv
alter tablespace tempspace extend(device '/dev/db2vg/rdb2temp1lv' 1G,device '/dev/db2vg/rdb2temp2lv' 1G)
1.1.1.2.3. AIX HA双机环境下运行命令:
1、 2、 3、 4、 5、 6、 7、 8、 9、
root登陆db2服务器,执行smitty hacmp 选System Management (C-SPOC) 选HACMP Logical Volume Management 选Shared Logical Volumes
选Set Characteristics of a Shared Logical Volume 选Increase the Size of a Shared Logical Volume
选dbres db2temp1lv(这里的dbres 各地可能不同) 选Auto-select
在Number of ADDITIONAL logical partitions 后填写要添加的LP
数,计算方法如下:
DB2Server:#lsvg db2vg
VOLUME GROUP: db2vg VG IDENTIFIER: 00512ebd00004c000000010023883cde
VG STATE: active PP SIZE: 256 megabyte(s) VG PERMISSION: read/write TOTAL PPs: 4533 (1160448 megabytes)
MAX LVs: 256 FREE PPs: 3574 (914944 megabytes)
LVs: 41 USED PPs: 959 (245504 megabytes) OPEN LVs: 17 QUORUM: 2 TOTAL PVs: 2 VG DESCRIPTORS: 3