Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Attach .sql file to jdbc connection? any APIs?
Hi
I'm not aware of any API to support that directly. Why not just open the .sql file, parse it into a string and hand that over to be run via JDBC.
Or are you trying to execute actual SQL*PLUS scripts ? In that case, have a look at the Runtime class, start a SQL*PLUS process to run your script. That works, too.
Stefan
"May Nine" <may94111_at_yahoo.com> schrieb im Newsbeitrag
news:275a5824.0305311421.43c945de_at_posting.google.com...
> Hi,
>
> Suppose my java program establishes a jdbc connection to
> an Oracle 9.2 DB using the oracle jdbc driver.
>
> What is the easiest way to pull a .sql file in from the
> file system and try to run the commands resident within it?
>
> I'm sure I could brute-force my way through this problem
> but before I do that, I'd like to know if any APIs exist which
> do some dirty work for me.
>
> -May Nine
Received on Tue Jun 03 2003 - 11:19:17 CDT