aspose file tools*
The moose likes Linux / UNIX and the fly likes Unix shell script - oracle function Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "Unix shell script - oracle function" Watch "Unix shell script - oracle function" New topic
Author

Unix shell script - oracle function

Samuel Huang
Greenhorn

Joined: Oct 29, 2001
Posts: 8
Hello,

I have an application that calls a unix shell script This unix shell script calls a oracle function in the PL/SQL package. For example,

In package pkg_test, there is function f_test. This function returns pls_interger.

How can I write a unix shell script to return the value from the oracle function, so that the application can get the value from the unix shell script?

Many thanks.

Sam
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16142
    
  21

You have 2 options.

1. Code up a call to the Oracle command-line utility (sql*plus) and have it run the stored procedure.

2. Code up a JDBC application in Java to invoke the stored procedure.

Oracle commands are not stand-alone applications, so you have to have some other application to run them. You can't script them directly.


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: Unix shell script - oracle function