DB2表空间占用很大磁盘空间,而数据实际并没有那么大,DB2删除数据或drop表并不会释放磁盘空间,所以要释放磁盘空间 要降低表空间高水位
连接到数据库:db2 connect to DB_NAME
- 查看DB2数据库表空间信息:
db2 list tablespaces show detail
db2pd -tablespaces -db DB_NAME
db2 get snapshot for tablespaces on DB_NAME
确认表空间是系统管理(SMS),还是数据库管理(DMS)的
DMS类型表空间是否为自动存储属性:db2 get snapshot for tablespaces on DB_NAME ##Using automatic storage: yes/no
查看DMS表空间是否启用了自动存储:db2 get snapshot for tablespaces on DCDWDMZC
: