DB2數據庫的導入與導出
1.打開db2的命令行處理器
2.建立編目(若有建立,可跳過)
db2 catalog tcpip node nodename remote IP server 50000(編目節點)
www.2cto.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.2cto.com
5.導入數據庫
import from [path(例:D:/TABLE1.ixf)] of ixf insert into TABLE1;
load from [path(例:D:/TABLE1.ixf)] of ixf insert into TABLE1;