db2相关命令

db2 list db directory   列出所有数据库

db2 list tablespaces show detail  显示数据库空间使用情况

db2 list tables for all  列出当前数据库下所有的表

db2 list db directory  :列出当前实例下的所有数据库

db2 list applications:列出所有对数据库的连接

db2 list tables for schema feas2_as 列出当前数据库中所有表

db2 list tablespaces show detail 查看表空间

db2 describe indexes for table DB2INST1.F_SAN_LOG show detail 查看索引

db2 describe table 模式名称.表名称   显示表结构

db2 get conncetion state 显示当前连接的数据库

db2 get instance :显示当前实例

db2 get database manager configuration for 简写为 db2 get dbm cfg for 查看配置

db2 get db cfg show detail | grep PCKCACHESZ 查看数据包高速缓存大小

db2 get dbm cfg |grep authentication authentication

db2 get dbm cfg | grep -i service

db2 select tabname from syscat.tables where tabschema=current schema  获取当前模式下面的所有用户表

db2level  查看DB2版本

db2set -all

db2 get dbm cfg | grep SVCE

grep -i db2 /etc/services

db2 update dbm cfg using svcename db2inst1

db2 update db cfg for test9 using STMTHEAP 10000

db2 update db cfg for test9 using PCKCACHESZ 4452

猜你喜欢

转载自wuxiaozeng2440.iteye.com/blog/1823697