Exporting data from postgresql to oracle

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Punkch
    New Member
    • Aug 2007
    • 1

    Exporting data from postgresql to oracle

    Hi ,

    Does anyone know how to Export the data from postgresql to oracle ??
  • pgnovice
    New Member
    • Apr 2007
    • 8

    #2
    load data
    infile '/home/mike/pgsql/t_pr_npi.dat'
    into table t_pr_npi
    fields terminated by '|' optionally enclosed by '"'
    trailing nullcols
    (
    num_npi,
    dte_assign "decode(:dte_as sign,null,'2099 0101',:dte_assi gn)",
    dte_end "decode(:dte_en d,null,'2099010 1',:dte_end)",
    nam_npi "decode(:nam_np i,null,'*',:nam _npi)",
    ind_group "decode(:ind_gr oup,null,'*',:i nd_group)",
    cde_npi_end_rsn "decode(:cde_np i_end_rsn,null, '*',:cde_npi_en d_rsn)",
    dte_added "decode(:dte_ad ded,null,'20990 101',:dte_added )",
    dte_last_update "decode(:dte_la st_update,null, '20990101',:dte _last_update)"
    )

    Use the "Copy" comand from postgres to down load the data to a flat file and then use Oracle's "sqlldr" command to load the data. I've attached a sample of a Oracle loader control file. It may not be an all_in_one process, but it works. I'm sure someone out there has written a tool. If not put the commands in a unix/linux script and run it as one command.

    Comment

    • gauravgmbhr
      New Member
      • Feb 2007
      • 107

      #3
      you can also use SQL server utility name DTS(data transfer service)
      and using ODBC drivers u can create DSN from control panel



      and then use DTS to tranfer data

      Comment

      Working...