sql script called by unix scripts
Ash_Feb 15 2010 — edited Feb 15 2010Hi,
I am running a sql script from shell script. I have tried it the following ways:
1. sqlplus -s usr/pwd@sid @my_sql_script.sql
2. sqlplus -s usr/pws@sid <<!eof
@my_sql_script.sql
exit;
!eof
The sql script has 2 binary variables defined using && as below:
variable x number;
begin
:x :=&&Enter_the_number;
end;
/
Option 1 above works fine and prompts for the value of Enter_the_number. But when I run it using option2 the script does run but fails over midway.
The error message is 'User requested Interrupt or EOF detected.'
I am not sure what is the reason behind it. Could anyone please help me out with this. Many thanks in advance!
Thanks!
Edited by: Ash_ on Feb 15, 2010 2:33 AM