![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| syntax error in while loop | habzone2007 | Shell Programming and Scripting | 1 | 05-18-2008 05:31 PM |
| Error connecting oracle from inside while loop | Devesh5683 | Shell Programming and Scripting | 3 | 05-13-2008 03:48 AM |
| For loop statement - catch error | lumdev | Shell Programming and Scripting | 4 | 09-20-2007 08:50 AM |
| error in bash script 'if' loop | DILEEP410 | Shell Programming and Scripting | 2 | 06-06-2007 09:04 AM |
| Error in for loop? | hugow | UNIX for Dummies Questions & Answers | 3 | 06-28-2005 04:03 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Unix-Sql Loop error
Hi,
I am getting the error "No matching <<", when i run the below. Is it that we can't execute SQL in a Unix loop. I am executing a SQL in a loop. Is it the EOF is written wrongly. . /opt/app/wlsconfigv61/domains/profiles/oracleV901.profile export DBUSER=ecdb01 set -A DBINSTANCE ECDBP01P ECDBP02P ECDBP03P ECDBP04P ECDBP05P ECDBP09P ECDBP10P ECDBP11P ECDBP12P ECDBP13P ECDBP14P ECDBP15P SQLPLUS=${ORACLE_HOME}/bin/sqlplus SQL_func() { filename=${3} ${SQLPLUS} -s $2/$3@$4 <<EOF spool /export/home/mpdwwcz/sqlOutput/${filename} set trimspool on set heading off set feedback off set linesize 2000 set arraysize 4000 set pagesize 0 @/export/home/mpdwwcz/IICP_SH/sqlQuery.sql spool off exit !EOF exit $? } if [ ! -x ${SQLPLUS} ] then echo "ERROR: Cannot find ${SQLPLUS}. Set the environment variables ORACLE_HOME etc..." exit -1 fi i=0 while [ i -lt 11 ] do PASSWD=`/opt/app/cbs/CBSDBSecurity/Scripts/ksh/CBSGetPw ${DBINSTANCE[i]} $DBUSER` echo "DBINSTANCE Is : ${DBINSTANCE[i]}" echo "DBUSER Is : $DBUSER" rm /export/home/mpdwwcz/sqlOutput/${filename} SQL_func $SQLPLUS $DBUSER $PASSWD $DBINSTANCE[i] i=`expr i + 1` done exit $? |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|