Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.databases > #553
| From | Lew <noone@lewscanon.com> |
|---|---|
| Newsgroups | comp.lang.java.databases |
| Subject | Re: copy data from one database to another |
| Date | 2012-08-18 11:09 -0700 |
| Organization | albasani.net |
| Message-ID | <k0olo3$bq3$1@news.albasani.net> (permalink) |
| References | <35bb23f9-03ca-41a3-9bba-0cd5ee0c3162@z20g2000prh.googlegroups.com> <057be9ae-208a-4601-a5b2-9ed8c64f5d9a@googlegroups.com> |
Sathish@myc2s.com wrote: > bazzer wrote: Is this a repost? >> I am trying to go about copying data from one database to another. The >> source database is SQL server, and the destination is an Oracle >> database. While I can access both database' fine, and insert into the >> oracle database fine, I am having trouble copying data from the SQL DB >> to the Oracle DB. What I was initially trying to do was copy all the >> required data into a resultSet, and then transfer this into the Oracle >> DB. But i probablt cannot insert this block of data in the resultSet >> directly into the Oracle db i supposed??? If anyone could suggest a >> better more efficient way to transfer the data i would be grateful. >> Please see below a snippet of the code for transferring the data. For >> the moment I am only copying rows between a certain timestamp. Its >> seems to run fine, and I am not getting an error, but when I check the >> Oracle database, there is no data in it. Using the source database's tools, export the source data to a format recognized by both RDBMSes, such as certain CSV formats. Using the destination database's tools, import the data from that format. If you must use Java, use 'PreparedStatement'. You might accidentally be performing a random SQL injection attack on yourself with the code you posted. -- Lew Honi soit qui mal y pense. http://upload.wikimedia.org/wikipedia/commons/c/cf/Friz.jpg
Back to comp.lang.java.databases | Previous | Next — Previous in thread | Next in thread | Find similar
Re: copy data from one database to another Sathish@myc2s.com - 2012-08-12 23:43 -0700 Re: copy data from one database to another Lew <noone@lewscanon.com> - 2012-08-18 11:09 -0700 Re: copy data from one database to another Roedy Green <see_website@mindprod.com.invalid> - 2012-08-24 11:02 -0700
csiph-web