1

I have shell script :

#Note: If you see # in front of any line it means that it’s a comment line not the actual code
#** ********************************************************************
#
#** ********************************************************************
#Parameters from 1 to 4 i.e $1 $2 $3 $4 are standard parameters
# $1 : username/password of the database
# $2 : userid
# $3 : USERNAME
# $4 : Concurrent Request ID
config_id=$5
extract_id=$6
# exit 1 represents concurrent program status. 1 for error, 2 for warning 0 for success
echo “****************************************************************”

I have to call this host type program from a PLSQL procedure. Can this be done ?

1 Answer 1

1

Yes, via DBMS_Scheduler.

  1. Create program, using DBMS_SCHEDULER.CREATE_PROGRAM
  2. Create a job referencing the program, using DBMS_SCHEDULER.CREATE_JOB
  3. Execute the job.

There's a walkthrough here: http://www.databasejournal.com/features/oracle/article.php/3365371/Executing-External-Programs-From-Within-Oracle.htm

And see the docs here https://docs.oracle.com/cd/B28359_01/server.111/b28310/schedadmin006.htm#ADMIN12062

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.