Re: sqlplus within the unix shell
From: <steve_mundie_at_my-deja.com>
Date: Thu, 06 Jan 2000 11:56:13 GMT
Message-ID: <851vsp$lc6$1_at_nnrp1.deja.com>
echo "The current sequence number == ${SeqNo}"
Date: Thu, 06 Jan 2000 11:56:13 GMT
Message-ID: <851vsp$lc6$1_at_nnrp1.deja.com>
In article <850f5b$m52$1_at_bob.news.rcn.net>,
"Eugene Firyago" <efiryago_at_bisys.com> wrote:
> Is it possible the unix shell to see/handle the result as sqlplus
variables
> of a sqlplus script run from within a shell script?
>
> Thanks in advance,
> Eugene.
>
>
Yes, if you want to do something like this...
# we want to get the log sequence number that Oracle thinks is current
SeqNo=$( echo "set heading off feedback off verify off
select sequence# from v\$log where status = 'CURRENT';"| \ sqlplus -s / )
echo "The current sequence number == ${SeqNo}"
You can do quite a lot with the commands you push into sqlplus but it can look very nasty.
Hth... Steve Mundie
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Thu Jan 06 2000 - 12:56:13 CET