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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Run command on sqlplus repetitively without reconnection

Re: Run command on sqlplus repetitively without reconnection

From: Jared Still <jkstill_at_gmail.com>
Date: Mon, 21 May 2007 10:28:45 -0700
Message-ID: <bf46380705211028t6afe1eddid9cec043b6c4da7e@mail.gmail.com>


On 5/21/07, David Taft <oradbt054_at_gmail.com> 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

--
http://www.freelists.org/webpage/oracle-l
Received on Mon May 21 2007 - 12:28:45 CDT

Original text of this message

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