db2 导出oracle导入,将DB2中某表单导入到ORACLE中

项目需求:

将DB2中表单(descartes)数据导入到Oracle中。

实现思路:

1、将DB2数据导出为CSV格式;

2、将CSV格式数据导入到Oracle中。

实现方法:

1、--[DB2导出]--

db2cmd

db2 connect to fgws user db2admin using bitservice

db2 export to c:\temp\descartes.csv of del select * from estate.descartes

2、--[Oracle导入]--

host sqlldr userid=pubr/bitservice@ttonline control=c:\temp\descartes.ctl

3、--[Oracle导出]--

exp system/bitservice@ttonline tables=(pubr.descartes) file=c:\descartes_xy_20111018.dmp log=c:\descartes_xy_20111018.log buffer=655000 compress=y

附录(descartes.ctl):

load data

infile "c:\temp\descartes.csv"

into table descartes

fields terminated by "," optionally enclosed by '"'

trailing nullcols

(

de_id ,

dpid ,

ipid ,

ac_id ,

ac_cat_biz ,

ac_name_biz ,

og_id ,

og_category ,

og_name ,

og_idcard ,

og_idcardno ,

og_regstatus ,

ps_id ,

ps_category ,

ps_name ,

ps_idcard ,

ps_idcardno ,

ps_nationality ,

ps_place ,

ps_buyer_kind ,

ps_regstatus ,

hs_id ,

hs_code ,

dv_name_province ,

dv_name_city ,

dv_code_district ,

dv_name_district ,

bd_cat_street ,

bd_cat_project ,

bd_code_planning_security_ci ,

hs_startfloor ,

hs_endfloor ,

hs_code_unit ,

hs_code_planning_security_ci ,

bd_floors ,

hs_planning_use ,

hs_structure ,

bd_completetime ,

hs_regstatus ,

re_category ,

re_housebookcode ,

re_housebooktime date "yyyy-mm-dd hh24:mi:ss",

re_housecertificatecode ,

re_cat_house ,

re_coownershiptype ,

re_shareproportion ,

re_houseacquirementtype ,

re_payment ,

re_loanmethod ,

re_housepropertystartdate date "yyyy-mm-dd hh24:mi:ss",

re_housepropertyenddate date "yyyy-mm-dd hh24:mi:ss",

re_landcertificatecode ,

re_statelandacquirementtype ,

re_collectivelandacquirementt ,

re_parcelpropertytype ,

re_landpropertystartdate date "yyyy-mm-dd hh24:mi:ss",

re_landpropertyenddate date "yyyy-mm-dd hh24:mi:ss",

re_regstatus ,

re_completetime date "yyyy-mm-dd hh24:mi:ss",

hs_buildarea ,

hs_usearea ,

re_quality

)

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值