The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM



Thread: Quick one
View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #3 (permalink)  
Old 01-31-2008
kekanap's Avatar
kekanap kekanap is offline
Registered User
 

Join Date: Sep 2003
Location: South Africa
Posts: 35
Thats how my script looks like. You suggestion didnt work. Any more suggestions?



$ cat mtn_statistics.ksh
#!/bin/ksh
set -x
#########################################################################
#
# Name:
# statistics.ksh
#
# Details:
# Performs a series of queries on the database to analyse application performance;
# reports on backlog of data files. Produces a report for e-mailing to recipients.
# Crontab (non-interactive) invocation.
#
# Usage:
# To compile a number of statistics for MTN and for the SP's
#
########################################################################
# Author:
# Paxley Kekana
#
# Revision History:
# Date Author Details
# 300108 PK First version
# 300108 PK Added ORACLE_SERVER_SID to accomodate SID and
# alias differences
#########################################################################


# Set the ORACLE_SID to ORACLE_SERVER_SID and run script
export ORACLE_SID_BACKUP=${ORACLE_SID}
export ORACLE_SID=${ORACLE_SERVER_SID}
date="1 days" +%Y%m%d

#Scripts are starting to run#
cd /minotaur/Scripts


# /usr/bin/cat <<EOF | $ORACLE_HOME/bin/sqlplus -s /@${ORACLE_SID}
/usr/bin/cat <<EOF | $ORACLE_HOME/bin/sqlplus super_conf/super_conf@pfrd


@nashua.sql
@autopage.sql
@italk.sql
@mtn_sp.sql
@ticket_sp_fraudtype.sql


exit
EOF

cd ../Log
mv nashua* nashua_$(date +%D).log
mv autopage* autopage_$(date +%D).log
mv italk* italk_$(date +%D).log
mv mtnsp.log mtnsp_$(date +%D).log
mv summary_fraud_per_sp.log summary_fraud_per_sp_$(date +%D).log
$
Reply With Quote