• 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

SQL Loader and Runtime.exec()

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

I'm having a problem with running sql loader using Runtime.exec.
Actually, the records are loaded but only up to 512 records.

There is no Exception and inside the log file geenrated by SQL loader it says that all records were successfully loaded.

I tried loading the same file manually using SQL Loader and there was no problem.

I'm using "Oracle 9i" and "Java 1.4.1".

Here is the String inside Runtime.exec:
sqlldr tmt_final/tmt_final@shogun control=C:\eclipse\workspace\TMT_Final\Archive_Files\20040825_raw.csv.gz.ctllog=
C:\eclipse\workspace\TMT_Final\Archive_Files\20040825_raw.csv.gz.log skip=2

And my control file
LOAD DATA
INFILE 'C:\eclipse\workspace\TMT_Final\Archive_Files\Historical_Raw_Data\20040825_raw.csv'
BADFILE 'C:\eclipse\workspace\TMT_Final\Archive_Files\20040825_raw.csv.gz.bad'
REPLACE
INTO TABLE ARCHIVE_HIST_RAW_VALUE
FIELDS TERMINATED BY ","
(
fk_measurement,
fk_hist_kind,
year,
month,
day,
hour,
minute,
raw_value,
raw_quality,
update_date "TO_TIMESTAMP(:update_date,'YYYY/MM/DD HH24:MI:SS')",
update_user,
date_time "TO_DATE( ate_time,'YYYY/MM/DD HH24:MI')"
)


Any input is appreciated.

Thank you very much.

EJ

[ Jess added a carriage return so the text wouldn't stretch the screen ]
[ October 19, 2004: Message edited by: Jessica Sant ]
 
John Dinglasan
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In addition, I've tried createing a batch file which calls the sql loader.

This batch file is executed by Runtime.exec(). After exection, records loaded was down to 192.

Summary:
Total records : 1030
Manual call to sql loader : 1030
Runtime.exec calls sql loader : 512
Runtime.exec calls batch file : 192

I'm also using the same user account for all execution.

And I'm running under Windows 2003 Server, Oracle 9i and Java 1.4.1

Thank you very much! =)
 
Sheriff
Posts: 4313
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm moving this to the Oracle forum where I think it's a better fit.

So please post your replies there, thanks!
[ October 19, 2004: Message edited by: Jessica Sant ]
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Guys,

I have a problem in using the sqlldr in Windows2003 Server. I calling the batch file from java, I don't find any error in log, sqlldr is not loading the data.
This application I developed in WindowsXP and deployed in Win2003. It is working fine in winXP.

Is there any suggestions for this, Do I need to make any settings before I run this in windows 2003 server.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic