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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Sqlplus output ...

Re: Sqlplus output ...

From: Mario Perreault <mario.perreault_at_informission.ca>
Date: Wed, 23 Dec 1998 16:21:06 -0500
Message-ID: <36815EC2.92C1FB4F@informission.ca>


Bonjour M-O, à partir d'un script Unix, tu peux exécuter sqlplus comme ceci :

sqlplus -S / >/dev/null 2>>$LOG @$batch.sql où batch.sql contient toutes les commandes SQL désirées

Tu peux aussi t'y prendre de cette autre manière:

sqlplus -S / <<EOF1 >/dev/null 2>fichier_log set pause off heading off pagesize 0 feedback off trimspool on linesize 5000 echo off termout on
Spool fichier_spool
...
commandes sql

...
...
...

Spool Off;
exit;
EOF1 Marc-Olivier BLANC wrote:

> Hello,
>
> I want to launch sqlplus commands via a shell
> script and then get back the results and put them
> in a text file with a special format. Can someone
> tell me how to launch sql commands and get the
> output ?
>
> Thanks.

--

        \\\|||///
        /  ^ ^  \
        (  0 0  )

------oOOo-(_)-oOOo-----
mario.perreault_at_bigfoot.com
Oracle DBA
Québec, Canada Received on Wed Dec 23 1998 - 15:21:06 CST

Original text of this message

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