Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

sqlplus in shell script  RSS feed

 
ajse ruku
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am using sqlplus in my shell script in the following way

sqlplus <username>/<password> <<ENDOFSQL >
select * from dual;
exit
ENDOFSQL

But the problem is that sqlplus is not exiting after completion.Its remaining as abandoned process.
Pleas suggest something to solve this problem.

regards,
Ajse
 
Tim Holloway
Bartender
Posts: 18531
61
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I hope your "here script" got garbled by our UBB formatter or it shouldn't have even done that much.

The proper syntax would be:

sqlplus / <<ENDOFSQL
select * from dual;
exit
ENDOFSQL
[ February 01, 2008: Message edited by: Tim Holloway ]
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!