Re: Run command on sqlplus repetitively without reconnection

  • From: "Jared Still" <jkstill@xxxxxxxxx>
  • To: oradbt054@xxxxxxxxx
  • Date: Mon, 21 May 2007 10:28:45 -0700

On 5/21/07, David Taft <oradbt054@xxxxxxxxx> wrote:

Senthil,

Unfortunately the sqlplus session was still running in the background when
I tried the 'print -f exit' inside the trap.  However, that got
me rethinking the problem.  What worked was the the following:


I played with using SQL in coprocesses quite some time ago.
( not a new feature :)

It was kind of fun, but ultimately I couldn't see a good use for it.
It was far easier to just run a sqlplus session than to setup
a coprocess and deal with the vagaries of getting this all
to work properly in the background.  For instance, how do you
tell the coprocess that the output from a script it complete?

Nonetheless, it eventually did work.

You can find a tar file with coprocess functions for use with SQL*Plus
at the bottom of the following page.   It isn't perfect, but it did work
last
time I tried it.

http://jaredstill.com/utilities.html

--
Jared Still
Certifiable Oracle DBA and Part Time Perl Evangelist

Other related posts: