?
Solved

Running Shell Script on UX-HP from Oracle Procedure

Posted on 2001-07-03
7
Medium Priority
?
980 Views
Last Modified: 2012-06-21
How to execute/run an Unix Shell Script from a database trigger / Stored Procedure. The version of Oracle is 8.0.5
0
Comment
Question by:kotvali
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
7 Comments
 
LVL 3

Expert Comment

by:myerpz
ID: 6252362
You might like to consider the following.
Within your database trigger or stored procedure, if your processing detects a condition which means a Unix job should be run, then write a record to another Oracle table ( let's call it "JobControl" ) containing enough information for a separate job to determine what needs doing.
This separate job is run ( at whatever frequency is appropriate ) via a crontab entry and connects to the database to check if anything needs doing. If not, it goes back to sleep. But if a JobControl record is found, then the approprate action is taken.
( the SQL which polls  the JobControl table could spool output to a file which your Unix job could then pick up on ).
Sounds a bit convoluted, but I have used it and it is quite flexible once set up.

Hope this helps, good luck.
0
 

Author Comment

by:kotvali
ID: 6254167
Dear Myerpz,

Thanks a lot for your comment. I really appreciate it. I have couple of jobs running the same way. Instead fo Corntab, I have a scheduler called "Appworx" which does the same. My questions is, directly, can I access the shell script!

Thanks any way.

Regards,
Shashi
0
 
LVL 1

Expert Comment

by:whbram
ID: 6263526
The best way to access a shell script from PL/SQL is via Oracle External Procedure calls.

Please refer to a previous answer of mine at:
http://www.experts-exchange.com/jsp/qShow.jsp?ta=oracle&qid=10345775#1
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Author Comment

by:kotvali
ID: 6265363
Hi whbram,

Thanks a lot for your response. But I dont have to do anything with forms. I need to execute shell straight from Oracle Database.

Thanks any way.
Shashi
0
 
LVL 1

Accepted Solution

by:
whbram earned 150 total points
ID: 6267199
The code resides in a stored database procedure (PL/SQL).
That means that you can run it from the database.
Calling the procedure from Oracle Forms is just one way of invoking it.
You can call this stored procedure from a number of things, a job queue entry, a database trigger or anything that can call a PL/SQL procedure (even SQL Plus).
0
 

Author Comment

by:kotvali
ID: 6269787
Thanks whbram !
0
 

Author Comment

by:kotvali
ID: 6269790
Thanks whbram !
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, we’ll look at how to deploy ProxySQL.
In today's business world, data is more important than ever for informing marketing campaigns. Accessing and using data, however, may not come naturally to some creative marketing professionals. Here are four tips for adapting to wield data for insi…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question