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: Returning Data from SQL to its calling UNIX Shell

Re: Returning Data from SQL to its calling UNIX Shell

From: Tom Tyson <tomtysonjr_at_yahoo.com>
Date: Wed, 20 Sep 2000 11:30:44 -0700 (PDT)
Message-Id: <10625.117482@fatcity.com>


How about this:

#!/bin/ksh

GetMaxLog()
{
sqlplus -s <<SQLEOF
/ as sysdba
set pagesize 0
set heading off
set verify off
set feedback off
set echo off
set trimspool on
set linesize 132
select ltrim(to_char(max(sequence#)))
from v\$archived_log
where archived='YES';
SQLEOF
}

v_MaxLog=`GetMaxLog`
echo The max redo log file generated is: $v_MaxLog exit


Do You Yahoo!?
Send instant messages & get email alerts with Yahoo! Messenger. Received on Wed Sep 20 2000 - 13:30:44 CDT

Original text of this message

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