This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Linux / UNIX and the fly likes sqlplus in shell script Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "sqlplus in shell script" Watch "sqlplus in shell script" New topic
Author

sqlplus in shell script

ajse ruku
Ranch Hand

Joined: May 06, 2005
Posts: 193
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

Joined: Jun 25, 2001
Posts: 15964
    
  19

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 ]

Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: sqlplus in shell script
 
Similar Threads
Executing shell script from java
sqlplus and shell script
create store procedure using shell script.
stored procedure
problem running sqlplus using Runtime.exec()