-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: sql loader
PostPosted: Tue Jan 28, 2014 1:01 pm 
Newbie

Joined: Tue Jan 28, 2014 12:51 pm
Posts: 2
Hi!

Is it possible to invoke sql loader from within hibernate?

Now the following code
Code:
CallableStatement cs;

String insertScript = "host sqlldr userid=someUserId/someDb control = someFile.dat";
cs = connection.prepareCall(insertScript);
cs.execute();

produce SQLSyntaxErrorException: ORA-00900: invalid SQL statement
I'd tried a number of variations with single and double quotes as well as
Code:
host ls
host sqlldr
sqlldr

with the same error.


Top
 Profile  
 
 Post subject: Re: sql loader
PostPosted: Wed Jan 29, 2014 2:05 am 
Senior
Senior

Joined: Tue Oct 28, 2008 10:39 am
Posts: 196
Why do you expected that any application that's does not care about running external applications outside it's own scope should interpret a shell command as an SQL-string?


Top
 Profile  
 
 Post subject: Re: sql loader
PostPosted: Wed Jan 29, 2014 3:58 am 
Newbie

Joined: Tue Jan 28, 2014 12:51 pm
Posts: 2
I expect nothing, just curious whether it is possible or not.
The command "host" allows to run external applications from sql plus and sql developer, but it is not an sql command. I wonder if hibernate supports this command.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.