简体   繁体   中英

Best ways data porting from Excelsheet into oracle 10g in java

We are to porting the data from excelsheet into oracle 10g in java using jxl.jar in my application.In recent days,We are added mulitple business validations in porting screen.Before implementation of businees validations data porting is working fine.after added conditon, the porting process is going very slow and uploaded data in oracle finally or some times got exceptions(Timeout exception).The excelsheet having Less 500 records means it is working fine.if above 500 records means we are facing problem?.what are best methodologies follow to uploading data using java?.if any wrong sorry.

Edit: Iam using JDBC Batch.First,Iam checking busineess validations for all the records in the excelsheet. if satify the all condtions then excute the batch other wise will be thrown errors in the screen itself.

I think you are on the right way using jxl (I would prefer Apache POI though). You should use batching when you insert a huge amount of data and commit every let's say 500 entries.

Further you should not load all data from the Excel file into memory and then add them to the database. Instead read the first 500 lines from Excel commit them to the database and then continue with the next 500 lines.

One way could be a CSV export from excelsheet and then import that CSV data into your oracle table. I found that efficient.

Here is a starter thread: http://www.velocityreviews.com/forums/t387780-populate-oracle-table-with-values-in-csv-using-java.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM