Re: Program interacting with SQL*Plus

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Sun, 30 Jun 2002 22:57:18 +0200
Message-ID: <n1suhucteb0q992b3isrciqttm13rm4qat_at_4ax.com>


On 30 Jun 2002 09:09:19 -0700, david_at_vanhorn.com (David Van Horn) wrote:

>David,
>Thank you for the helpful post. Let me try to summarize your approach
>(please correct me where I am mistaken).
>
>1. Create a temporary .sql file
>2. Write to file commands to turn spooling on
>3. Write to file PL/SQL blocks and/or SQL*Plus commands to run
>4. Write to file commands to turn spooling off and exit
>5. Start SQL*Plus, giving the name of the temporary file
>6. Check the spool file for output
>
>This seems to work well. It was easy to implement and is useful.
>However, I would like a more general approach. I would like to leave a
>session running and feed commands when needed, and read output when
>needed. I don't know much about Unix pipes, but could this be
>accomplished if the spool file and the temp.sql file were FIFO-PIPES?
>Is there another approach that would allow this kind of programmatic
>interaction with SQL*Plus?
>
>Thanks
>David Van Horn

Theoretically speaking (never tried it, and I also can't see why you want to do it)

mknod p orapipe

sqlplus .... < orapipe &

echo > orapipe
or
cat filename > orapipe

Isn't this just very cumbersome and prone to error?

Regards

Sybrand Bakker, Senior Oracle DBA

To reply remove -verwijderdit from my e-mail address Received on Sun Jun 30 2002 - 22:57:18 CEST

Original text of this message