Does anyone know how to execute a shell script from a PL/SQL procedure or function? Let's say the shell script is '/usr/bin/bash/convert.sh'.
Executing Shell (bash) from PL/SQL
oracleplsql
Related Question
- How to separate out individual sql statements from Oracle SQL script for execution from java code
- 12c Shell to Linux
- Linux – ORACLE_HOME / ORACLE_SID variable – why do we need to export them
- Oracle – Executing Generated Script from Output
- Compile a PLSQL package code that was passed to an sqlplus session via a shell script
- Oracle Scripting – Automation Approach to Execute Shell Scripts and Perform Checks
- Oracle PL/SQL Package – How to Execute a PL/SQL Package from SQL> Prompt
- Oracle – v$ Tables Not Recognized in SQL Statement of Shell Script
Best Answer
You need to create an external job for that.
Techniques for External Jobs
First, you need to create a credential, with the OS user and password in whose name the job will run:
After that you can use this credential when creating an external job. For example calling your convert script with 2 arguments (input and output file)