#! /bin/bash
#
sid=$1
sid1=${1}1
sid2=${1}2
export RPTDATE=`date '+%m%d'`
export SCRPTDIR=/home/oracle/bin
export RPTDIR=/var/log/oracle
export OUTFILE=$RPTDIR/gather_stat_$sid.lst
export ORACLE_SID=${sid}
export ORACLE_HOME=`/usr/local/bin/dbhome $ORACLE_SID`
export ORACLE_SID=${sid}1
export PATH=$ORACLE_HOME/bin:/bin:/usr/local/bin:${PATH}
export tmsfile=/var/log/oracle/gather_stat_$sid.time


echo $ORACLE_SID
echo $ORACLE_HOME
echo -n "begin gather statistics : " >> $tmsfile
date >> $tmsfile

# run space report
sqlplus '/as sysdba' @$SCRPTDIR/gather_vmspd_stat.sql $OUTFILE

echo -n "end  gather statistics : " >> $tmsfile
date >> $tmsfile

exit
