• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Writing many records to an Oracle table

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

My Java web application has to parse a large data file of 500,000 records. These records will be stored in an Oracle 9i database table. I wonder what would be the efficient way to write data to the table.

I tried to write about 1,000 records to the table in one go, but the table seems to be unusable now (Error: java.sql.SQLException: Protocol violation, SQL State: null, Error Code: 17401).

Your help is greatly appreciated.

Kelvin
 
Ranch Hand
Posts: 425
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Kelvin, my thought is loading .5 million through Java code is not great idea. Did you look at other ways to load (like using sqlldr). If you have constraint that Java prepares these data [clean,transform] then you can write to a File stream and invoke a script which performs direct load to oracle.
 
Ranch Hand
Posts: 1087
Oracle Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Purushothaman Thambu:
5 million through Java code is not great idea. Did you look at other ways to load (like using sqlldr).



I will also recommend SQL Loader.

Shailesh
 
I guess I've been abducted by space aliens. So unprofessional. They tried to probe me with this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic