Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Execute .sql files using Oracle Stored procedures

Re: Execute .sql files using Oracle Stored procedures

From: Alex Filonov <afilonov_at_yahoo.com>
Date: 1 Oct 2003 08:17:24 -0700
Message-ID: <336da121.0310010717.5816ead0@posting.google.com>


jitinsingla_at_yahoo.com (Jitin) wrote in message news:<540c5cd1.0310010138.76b54fd1_at_posting.google.com>...
> Hi all,
>
> I am using Oracle 9i.
> I have a '.sql' file which has 'Create table' statments.
> I want to create the database tables using this .sql file in my java
> program, But the machine on which my java program is running does not
> have oracle client installed so i cannot use sqlplus utility.
> Since I can freely make use of JDBC calls, i read the .sql file, parse
> the statements one by one and execute the statements using
> statement.executeUpdate() but this is very slow and not desired.
>
> Is there any other way to execute the .sql file ?
> Does oracle provides any built in stored procedure which may take the
> path of my .sql file and execute it ?
>
> Thanx in advance

There is a way (And Sybrand would be right if he hates me for this suggestion :-) ). You can set up a daemon on the server, which runs Pro*C program and executes everything you send it. Then you send the content of your .sql file to this daemon from your client program. Daemon runs sqlplus session with this file. I don't think it's the right way to do things, but it's possible. Received on Wed Oct 01 2003 - 10:17:24 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US