Link to home
Start Free TrialLog in
Avatar of tootootoo
tootootoo

asked on

CALLING UNIX C-Shell scripts from Oracle SQL/sqlplus/stored procedures

Hi Good person,

I have an Oracle DB, that's heavily relying on c-shell scripts, and we need to have a DIRECT link between Oracle scripts and the c-shell scripts. In other words, we want to run any of our c-shell scripts at any time from the Oracle DB (throught stored procedures, or preferrably, embedded SQL code in PowerBuilder)

CAN ANY ONE HELP?

Any word regarding

1- Easiest way to call the scripts
2- minimum login requirements(one id/one password for both DB & application)Without using OS Authentication method in Oracle
3- How to call SQL loader from Oracle SQL (Without having to go to OS)

By the way:

Application scripts are on machine A
DB Server is on machine B
Client invoking scripts will be from a PC(Powerbuilder application)

Highly appreciate it,

Thanks
ASKER CERTIFIED SOLUTION
Avatar of saxena_mohit
saxena_mohit

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of graf27
graf27

I use the other way: Running Shell-Scripts which are calling database values etc ....

1. Example invoking DB

#!/bin/sh

echo running Script
echo ....
echo calling DB

sqlplus -s scott/tiger <<+++EOF

-- Your SQLPLUS-Code here
select 'I am from database' from dual;
quit

+++EOF

echo end of DB


2. Getting Values from db

#!/bin/sh
myvalue=`(sqlplus -s scott/tiger @select.sql)`
echo $myvalue


No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
[Accept saxena_mohit's comment as answer.]
Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
MathiasMagnusson
EE Cleanup Volunteer