admin 管理员组

文章数量: 1184232


2024年3月10日发(作者:sort函数第三个参数1和0)

武汉楚烟信息技术有限公司

db2数据库数据迁移、备

份及恢复命令参考手册

姚寸林

2011

[键入公司地址]

数据移动及实用工具

跨平台移动数据,首选PC/IXF文件格式进行数据的导出,平台间数据传输使用二进制。

1. 导出命令基本语法

Export to <路径+文件名> OF

Lobs to <大对象文件路径> lobfile <大对象文件名>

Modified <分隔符选项>

Method n (<字段名列表>)

Messages <消息文件>

Select 子句

Eg1. Export to d: of del select * from org

Eg2. Export to d: of del modified by chardel! Coldel# messages

d:exportorg1_ select * from org

Eg3. Export to d:exportemp_ of del lobs to d:export lobfile emp_resume_lob1

modified by lobsinfile select * from emp_resume

2. 导入命令基本语法

Import from <路径+文件名> OF

Messages <消息文件>

Into <目标表名称>

Eg1. Import from d: of del insert into org

Eg2. Import from d: of del modified by chardel! Coldel# messages

d:exportorg_im_ insert into org

Eg3. Import from d:exportemp_ of del lobs from d:export modified by lobsinfile

insert into emp_resume

Eg4. Import from d: of ixf commitcount 1 restartcount 2 insert into staffback

3. Load 命令的基本语法

Load from <路径+文件名> OF

Messages <消息文件>

[]

Into <目标表名>

[] [indexing mode ]

Eg1. Load from d: of del messages :exportorg_load_ replace into org

Eg2. Load from d: of del insert into staffback for exception staffexp

4. 处理load导致的异常状况

a) 查看表的状态 load query table <表名称>

b) 关闭完整性检查

Set integrity for <表名称> immediate unchecked

c) 处理表空间挂起状态,方法一:使用restart 模式重新load,成功则自动消除;方法

二:使用terminate 模式的load 命令,强行终止load过程,并消除挂起状态。

5. Db2move 工具的使用


本文标签: 命令 数据 状态