This week's book giveaway is in the Spring forum.
We're giving away four copies of Spring Boot in Practice and have Somnath Musib on-line!
See this thread for details.
Win a copy of Spring Boot in Practice this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

Unix shell script - oracle function

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Saloon Keeper
Posts: 25849
184
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
reply
    Bookmark Topic Watch Topic
  • New Topic