当前位置:数据库 > DB2 >>

DB2数据库的导入与导出


DB2数据库的导入与导出
 
1.打开db2的命令行处理器 
2.建立编目(若有建立,可跳过) 
 
db2 catalog tcpip node nodename remote IP server 50000(编目节点) 
  www.zzzyk.com  
db2 catalog db dbname as mydb  at node nodename(数据库实例) 
3.连接数据库 
db2 connect dbname user username using password 
 
4.导出数据库 
export to [path(例:D:/TABLE1.ixf)] of ixf select [字段(例: * or col1,col2,col3)] from TABLE1; 
export to [path(例:D:/TABLE1.del)] of del select [字段(例: * or col1,col2,col3)] from TABLE1; 
  www.zzzyk.com  
5.导入数据库 
import from [path(例:D:/TABLE1.ixf)] of ixf insert into TABLE1; 
 
load from [path(例:D:/TABLE1.ixf)] of ixf insert into TABLE1;
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,