4. 断开数据库连接: connect reset
5. 创建数据库: create database [dbname]
6. 删除数据库: drop database [dbname]
7. 查询数据库下有哪些表
1) 列出所有表: "list tables for all"9. 表的创建/插入/修改/查询,标准sql
10. 显示当前数据库管理实例: "get instance"
11. 启用归档日志
老版本(V8.2): db2 update db cfg for [dbname] using LOGRETAIN ON
新版本(V8.2之后): db2 update db cfg for [dbname] using LOGARCHMETH1 LOGRETAIN
12. 离线备份: backup database [dbname] to [path]
如: "backup database sample to /db2/db2inst2/duanbb/backup"
13. 在线备份(要求启用归档日志): backup database [dbname] online to [path]
如: "backup database sample to online /db2/db2inst2/duanbb/backup"
14. 恢复数据库: restore database [dbname] from [path]
如: "restore database sample from /db2/db2inst2/duanbb/backup"
15. 释放数据库: deactivate database [dbname]
16. 获取数据库配置及当前状态信息: db2 get db cfg for <dbname>
17. 停止/启动数据库
db2stop force
db2start
18. 查看实例名
db2 get instance
19. 查看安装路径
db2level