Chinaunix首页 | 论坛 | 博客

Neo

  • 博客访问: 37765
  • 博文数量: 7
  • 博客积分: 372
  • 博客等级: 二等列兵
  • 技术积分: 85
  • 用 户 组: 普通用户
  • 注册时间: 2010-11-24 21:46
文章分类
文章存档

2012年(7)

分类: DB2/Informix

2012-04-18 19:36:25


21.察看本地节点

db2 list node direcotry

22.节点反编目

db2 uncatalog node node_name

23.数据库编目

db2 catalog db db_name as db_alias at node node_name

24.察看数据库的编目

db2 list db directory

25.连接数据库

db2 connect to db_alias user user_name using user_password

26.数据库反编目

db2 uncatalog db db_alias

27.导出数据

db2 export to myfile of ixf messages msg select * from tb1

28.导入数据

db2 import from myfile of ixf messages msg replace into tb1

29.导出数据库的所有表数据

db2move test export

30.生成数据库的定义

db2look -d db_alias -a -e -m -l -x -f -o db2look.sql

31.创建数据库

db2 create db test1

32.生成定义

db2 -tvf db2look.sql

33.导入数据库所有的数据

db2move db_alias import

34.重组检查

db2 reorgchk

35.重组表tb1

db2 reorg table tb1

36.更新统计信息

db2 runstats on table tb1

37.备份数据库test

db2 backup db test

38.恢复数据库test

db2 restore db test

39.列出容器的信息

db2 list tablespace containers for tbs_id show detail

40.创建表:

db2 ceate table tb1(id integer not null,name char(10))

create table  tb1 like tb2 
in 表空间
partitioning key(kpi_id) using hashing; 

查看快照 
select * from tb1 with ur; 

阅读(2014) | 评论(0) | 转发(0) |
0

上一篇:db2 学习指令 1

下一篇:db2 学习指令 3

给主人留下些什么吧!~~