Monday 16 July 2007

Dummy shell script example on how to copy files and run a sql script

#!/bin/ksh
######################################################################
#
# Program: dummy.sh
# Description: Dummy shell script example on how to copy files and run a sql script
# Author: Raf Hussain
# Date: 16/07/2007
#
#######################################################################
clear

echo '
Copying files & running script

************************************************


Your input will be recorded without cursor movement

Enter the password for apps: \c'
stty -echo
read APW
stty echo

#Copy the files into the $WCC_TOP directory.
#
cp file1.rdf $XXWCC_TOP/reports/US
cp file2.cpd $XXWCC_TOP/admin/sql
cp file3.sql $XXWCC_TOP/admin/sql


sqlplus apps/$APW @$XXWCC_TOP/admin/sql/file2.cpd
sqlplus apps/$APW @$XXWCC_TOP/admin/sql/file3.sql

No comments:

Profile - Oracle 11i AppsDBA
Over 7 years of experience as an Oracle Applications DBA managing Oracle Public Sector HRMS 11.5.10 and Oracle Financials 11i in Unix and Windows NT environments. Strong skills and experience with installing, patching, cloning and troubleshooting various Oracle E-Business Suite products in Oracle database 9i and 10g. Proactive in the different phases of architecture design, development, testing, maintenance, performance enhancement and postproduction support. Currently working as Oracle Application DBA at Warwickshire County Council.

------------------------------------------------------------------------------------------------------------------------------