DB2常用命令
2014-02-20 11:12
176 查看
1、强行停止DB2某个db应用连接(from Sharon)方法一:db2 connect to DBNAMEdb2 force application all for DBNAME方法二:db2 "force application for(hand id)" PS: 多啰嗦一句,其实最好的方式应该是断开网络连接,然后使用类似ILO的工具连接到server进行离线备份,因为有些应用在我们强行断开连接后,马上又会自动连接过来。ILO这种工具是很多主机都自带的东西,完全free,只是需要多连接一根网线而已。2、查看表空间:list tablespaces
list tablespace containers for 13、检查db2的常用命令:pe -ef | grep db2
db2ilist
db2 get db cfg for dbname
db2 get db cfg for dbname | grep LOGARCHMETH1
db2 list db directory
db2 list applications
db2 connect to dbname
db2 disconnect current
db2 list tablespaces
db2 list tablespace containers for 04、查看数据库备份情况:db2 list utilities show detail5、查询数据库列表:(from Billy)
db2 list db directory | grep -E 'Database alias|Directory entry type' | cut -d= -f2 | awk '
BEGIN { i=-1 }
i == -1 { printf "%s:", $1 }
i == 1 { print $1 }
// { i=i*-1; }
' | grep -i Indirect | cut -d: -f16、查询db2的创建时间:select min(create_time) from syscat.tables
list tablespace containers for 13、检查db2的常用命令:pe -ef | grep db2
db2ilist
db2 get db cfg for dbname
db2 get db cfg for dbname | grep LOGARCHMETH1
db2 list db directory
db2 list applications
db2 connect to dbname
db2 disconnect current
db2 list tablespaces
db2 list tablespace containers for 04、查看数据库备份情况:db2 list utilities show detail5、查询数据库列表:(from Billy)
db2 list db directory | grep -E 'Database alias|Directory entry type' | cut -d= -f2 | awk '
BEGIN { i=-1 }
i == -1 { printf "%s:", $1 }
i == 1 { print $1 }
// { i=i*-1; }
' | grep -i Indirect | cut -d: -f16、查询db2的创建时间:select min(create_time) from syscat.tables
db2 list tables
for
schema
SYSIBM_____________________________________________________________________________________版权所有,文章允许转载,但必须以链接方式注明源地址,否则追究法律责任!Author: laven54 (lurou)Email: laven54@163.comBlog: http://blog.csdn.net/laven54
相关文章推荐
- OCP-1Z0-053-V13.02-498题
- ios自动生成对象类,提高开发速率
- 完美的图标字体
- 第十一章 Spring依赖注入(Spring Framework3.1教程)
- HTML多表头表格代码
- IKAnalyzer分词单独使用例
- flappy bird游戏源代码揭秘和下载
- zookeeper 原理
- UIScrollView 去掉下面的滚动条
- 15 innodB的隐式锁
- c++ 大数模板 及例题
- 在sql server中利用with as实现递归功能
- 用java获取歌曲文件的专辑封面元信息
- 修改Oracle 用户密码
- 修改Oracle 用户密码
- 使用OpenCV和多线程编程实现摄像头实时播放
- 如何引发拖动事件
- win7安装不了Arduino驱动 win7系统Arduino驱动安装图文教程
- 视频编码部分定义
- 嵌入式C语言的杂七杂八