Re: How to run sql scripts programmatically

From: Rauf Sarwar <rs_arwar_at_hotmail.com>
Date: 3 Feb 2003 18:07:47 -0800
Message-ID: <92eeeff0.0302031807.3b96adf5_at_posting.google.com>


kcollins15_at_cfl.rr.com (kay c) wrote in message news:<b24d403d.0302031118.78dc44a7_at_posting.google.com>...
> Hi,
> I have no experience with Oracle and could really use some help.
> I have several sql scripts that I need to run during an installation I
> am writting of a custom product. The install assumes Oracle 9i is
> installed before our product is.
> I need to run these scripts to create a database, create tables,
> create stored procedures ect..
> My installation thus far uses primarily jython to do all it files
> manipulation and system configuration.
>
> Is it possible "run" these sql using jython, or any scripting
> language?
> Or is it possible to envoke sqlplus programmatically? I would like to
> run these scripts in the backgound.
>
> Thanks,
> kc

Do you mean Python as opposed to "jython"... unless it is a new tool? What is your OS?

You can use Python (If that is what you mean) to invoke Sqlplus (Oracle's supplied command line tool to connect to Oracle) to run your scripts? You can invoke sqlplus from Dos/*nix shell scripts also, and even programatically (on Windows) via Shell32 api. Although you can by other means like Toad etc, but, by far the most common method of running scripts is thru sqlplus.

Regards
/Rauf Sarwar Received on Tue Feb 04 2003 - 03:07:47 CET

Original text of this message