设为首页 加入收藏

TOP

DB2系统命令(二)
2014-11-23 21:34:35 来源: 作者: 【 】 浏览:17
Tags:DB2 系统 命令
stdb -u shen -z abc -e -o shen.sql

3)生成shen用户创建的所有对象DDL,并且包括对象的统计信息(使用update语句修改字典表)

db2look -d testdb -u shen -m abc -e -o shen.sql

4)生成tbtest表格的ddl

db2look -d testdb -u shen -t tbtest -e -o shen.sql

5)生成DB、DBM的配置参数修改命令

db2look -d testdb -u shen -f -o shen.sql

25、db2mtrk - Memory tracker

跟踪实例、数据库、代理消耗的内存。

1)检查它们的水印值

$db2mtrk -i -d -p -w -v

Tracking Memory on: 2007/11/21 at 09:48:51

Memory for instance

Database Monitor Heap has watermark of 180224 bytes

Other Memory has watermark of 2818048 bytes

FCMBP Heap has watermark of 42303488 bytes

Total: 45301760 bytes

Memory for database: testdb

Backup/Restore/Util Heap has watermark of 16384 bytes

Package Cache has watermark of 131072 bytes

Catalog Cache Heap has watermark of 65536 bytes

Buffer Pool Heap has watermark of 16728064 bytes

Buffer Pool Heap has watermark of 4325376 bytes

Buffer Pool Heap has watermark of 655360 bytes

Buffer Pool Heap has watermark of 393216 bytes

Buffer Pool Heap has watermark of 262144 bytes

Buffer Pool Heap has watermark of 196608 bytes

Shared Sort Heap has watermark of 0 bytes

Lock Manager Heap has watermark of 21102592 bytes

Database Heap has watermark of 3964928 bytes

Other Memory has watermark of 16384 bytes

Application Control Heap has watermark of 98304 bytes

Application Group Shared Heap has watermark of 18644992 bytes

Total: 66600960 bytes

Memory for agent 13852

Application Heap has watermark of 65536 bytes

Total: 65536 bytes

2)检查它们的最大值

$db2mtrk -i -d -p -m -v

Tracking Memory on: 2007/11/21 at 09:48:42

Memory for instance

Database Monitor Heap has max size of 376832 bytes

Other Memory has max size of 19922944 bytes

FCMBP Heap has max size of 43335680 bytes

Total: 63635456 bytes

Memory for database: testdb

Backup/Restore/Util Heap has max size of 249200640 bytes

Package Cache has max size of 2089811968 bytes

Catalog Cache Heap has max size of 2089811968 bytes

Buffer Pool Heap has max size of 2089811968 bytes

Buffer Pool Heap has max size of 2089811968 bytes

Buffer Pool Heap has max size of 2089811968 bytes

Buffer Pool Heap has max size of 2089811968 bytes

Buffer Pool Heap has max size of 2089811968 bytes

Buffer Pool Heap has max size of 2089811968 bytes

Shared Sort Heap has max size of 100220928 bytes

Lock Manager Heap has max size of 21102592 bytes

Database Heap has max size of 11567104 bytes

Other Memory has max size of 12533760 bytes

Application Control Heap has max size of 344064 bytes

Application Group Shared Heap has max size of 37437440 bytes

Total: 17150902272 bytes

Memory for agent 13852

Application Heap has max size of 1277952 bytes

Total: 1277952 bytes

26、db2pd - Monitor and troubleshoot DB2 database

监控数据库

$db2pd -inst -alldbs|more

返回下列信息:数据库版本、位数、补丁号;操作系统版本、cpu数目、物理内存;DBM参数值

$db2pd -db sample|more

返回下列信息(只有数据库被激活才可以返回数据):数据库连接信息;事务信息;缓存池信息(不同pagesize的);日志文件(含LSN信息);锁locks;表空间;容器;DB参数值

27、db2rfpen - Reset rollforward pending state

重置处于rollforward pending的数据库状态。

28、db2systray

在window上右下角启动db2托盘。

29、db2trc - Trace

启动和关闭数据库trace功能

1)跟踪db2

$ db2trc db2 on -f db2.trc

$ db2trc db2 off

$ db2trc fmt db2.trc db2.txt

2)跟踪das

$ db2trc das on -f das.trc

$ db2trc das off

$ db2trc fmt das.trc das.txt

30、db2untag - Release container tag

释放不用的容器。

$ db2untag -f /home/db2inst1/db2inst1/NODE0000/SQL00001/userdata01

首页 上一页 1 2 下一页 尾页 2/2/2
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇db2命令导出导入表结构和数据 下一篇DB2常用命令集(二)

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容: