Re: AWR

From: The Magnet <art_at_unsu.com>
Date: Tue, 15 Sep 2009 08:58:58 -0700 (PDT)
Message-ID: <e3cdbc3e-1456-47e7-813d-426c52642742_at_q14g2000vbi.googlegroups.com>



On Sep 15, 10:40 am, The Magnet <a..._at_unsu.com> wrote:
> On Sep 15, 10:01 am, helter skelter <helterskel..._at_gmail.com> wrote:
>
>
>
> > The Magnet wrote:
> > > So, can this be scripted, since the awrrpt.sql asks for values?
>
> > ...
> > MAX_SNAP_ID=`sqlplus -S "/ as sysdba" << EOF
> > set heading off
> > set trimspool on
> > set feedback off
> > SELECT trim(max(SNAP_ID)) FROM DBA_HIST_SNAPSHOT;
> > EOF`
> > ...
> > ...
> > echo -e "$RAPORT_TYPE\n1$MIN_SNAP$MAX_SNAP\n$RAPORT_NAME\n"|(sqlplus -S
> > "/ as sysdba" _at_$ORACLE_HOME/rdbms/admin/awrrpt.sql) >> $LOG_FILES
> > ...
>
> > this should help
>
> > cheers
>
> helter skelter,
>
> Looks like a decent solution, I'll try it.  However, I am assuming
> that there are spaces between some of these parameters?
>
> echo -e "$RAPORT_TYPE\n1 $MIN_SNAP $MAX_SNAP\n $RAPORT_NAME\n"
>
> I'll give it a try, but just asking.
>
> Thanks!

Some closing quote error, cannot see it yet:

echo -e "html\n 1\n 16018\n a.log\n"|(sqlplus -s \"/ as sysdba" _at_ $ORACLE_HOME/rdbms/admin/awrrpt.sql) >> /tmp/awr.log Received on Tue Sep 15 2009 - 10:58:58 CDT

Original text of this message