Marilyn1374
asked on
Unix Bourne Shell / SQLPLUS error
I am using the following connect logic in a script which works fine with no errors
However, when I try to put this logic in a do/while loop, I get this error:
Syntax error at line 89 : `<<' is not matched.
So, I followed advice I found via google and changed it to:
This gives me the following error: Syntax error at line 91 : `newline or ;' is not expected.
Any connection pointers would be greatly appreciated. I am at a loss as to why it's erroring out within a loop.
Thanks!
sqlplus /nolog <<EOF >> $LOG 2>&1
CONN $DATABASE_2
WHENEVER SQLERROR EXIT sql.sqlcode ROLLBACK;
set serveroutput on
set echo on
set lin 140
BEGIN
DBMS_OUTPUT.put_line ('Replace with TEST procedure');
END;
/
exit;
!EOF
However, when I try to put this logic in a do/while loop, I get this error:
Syntax error at line 89 : `<<' is not matched.
So, I followed advice I found via google and changed it to:
sqlplus /nolog <<
EOF >> $LOG 2>&1
CONN $DATABASE_2
WHENEVER SQLERROR EXIT sql.sqlcode ROLLBACK;
set serveroutput on
set echo on
set lin 140
BEGIN
DBMS_OUTPUT.put_line ('Replace with TEST Procedure');
END;
/
exit;
!EOF
This gives me the following error: Syntax error at line 91 : `newline or ;' is not expected.
Any connection pointers would be greatly appreciated. I am at a loss as to why it's erroring out within a loop.
Thanks!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Unfortunately neither of these worked, thought they should have. I think it's something in how this client is set up. I modified my code to not loop. Assigning half to each expert
ASKER