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

Home -> Community -> Usenet -> c.d.o.tools -> Re: Piping Unix output to SQL*plus

Re: Piping Unix output to SQL*plus

From: Jining Han <hanj_at_mailcity.com>
Date: Tue, 23 Jan 2001 23:40:58 GMT
Message-ID: <94l4q9$qcl$1@nnrp1.deja.com>

In article <94l2ue$onc$1_at_nnrp1.deja.com>,   venkat_rajagopal_at_my-deja.com wrote:
>
>
> All,
>
> Thanks for your replies but none of them will work. Let me
> give you a few more details. If I am doing something wrong please
> point it out.
>
> AN example is shown below:
>
> The file test.sql has teh lines below.
>
> $ cat test.sql
>
> SET FEEDBACK OFF
>
> SELECT value
> FROM v$parameter
> WHERE name = '&&X';
>
> The HERE documnet as someone suggested does not work because
> it terminates pematurely as shown below:
>
> $ sqlplus -s / << !
> > @test.sql
> >!
>
> Enter value for x:
> User requested Interrupt or EOF detected.
> $
>
> Standard piping does not work as shown below because that also
> terminates prematurely as shown below:
>
> $ cat test.sql | sqlplus -s /
>
> Enter value for x: old 3: WHERE name = '&&X'
> new 3: WHERE name = ''
> $
>
> I want the script to prompt for x, then exit.
>
> There are reasons I am asking for this. If you can help, please
> do. Someone suggested that I change the design - I will if I need
> to , but I want to know if this can be done. Chnaging the design
> at this point is not in the equation. .
>
> Hope that helps. Try it out yourself and see if it works for you.
>
> Thanks
> Venkat
>
> Sent via Deja.com
> http://www.deja.com/
>

Geez, I posted a reply yesterday and you didn't bother to look at it? Using your test.sql file, do the following:

echo session_max_open_files | sqlplus u/p @test.sql

and see what you got.

--
Jining Han
Sallie Mae


Sent via Deja.com
http://www.deja.com/
Received on Tue Jan 23 2001 - 17:40:58 CST

Original text of this message

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