zoukankan      html  css  js  c++  java
  • 将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                    
    )
    


     

  • 相关阅读:
    Linux7运维视频教程
    大型C++网络游戏开发视频教程
    Hadoop实战视频教程下载
    Greenplum分布式数据库开发入门到精通
    Greenplum Hadoop视频教程_Hadoop应用案例剖析
    Linux7企业级运维高端培训视频教程
    咯咯咯
    第五周作业
    数组
    2019年春季学期第三周作业
  • 原文地址:https://www.cnblogs.com/advocate/p/2216718.html
Copyright © 2011-2022 走看看