Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

sqlplus in shell script

 
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
Saloon Keeper
Pie
Posts: 18152
52
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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic