Can U execute UNIX command from PLSQL procedure
example I have procedure 'test'
SQL > exec test('ls') --> I passed ls as a argument
How to implement ?
Sanjay
Printable View
Can U execute UNIX command from PLSQL procedure
example I have procedure 'test'
SQL > exec test('ls') --> I passed ls as a argument
How to implement ?
Sanjay
write a Pro*C program that makes use of db pipes and run it as a daemon. A sample program has been included in RDBMS concepts manual.
Hi,
You should be able to use the host command.
Host (ls) will get you the necessary results.
BK
Quote:
Originally posted by bkrish
You should be able to use the host command.
BK
...... and how do you propose to use the host command within a plsql procedure ?
-amar
I think you know now how to call external procedure from PL/SQL?
[Edited by kgb on 09-07-2001 at 12:29 PM]
kgb,
Are you saying that we can use the sQL host command from within a plsql procedure ? I know we can execute os commands using external procedures or java, but being able to use the sql host command from within plsql is new to me :) Mind explaining how to do it please ?
-amar
Well,
In my opinion the flow is always from OS to Oracle using position parameter as one of the alternatives. One of the approaches for PL/SQL to check for anything on OS would be using utl_file package.
BK
as I understand, you can use the utl_file package to read from or write to (create if necessary) OS file(s). Mind telling me how to "check for anything on OS" using utl_file please ? :)Quote:
Originally posted by bkrish
One of the approaches for PL/SQL to check for anything on OS would be using utl_file package.
-amar
Sorry, you are wrong - I didn't tell that.
===========================
Quote:
Originally posted by amar
kgb,
Are you saying that we can use the sQL host command from within a plsql procedure ? I know we can execute os commands using external procedures or java, but being able to use the sql host command from within plsql is new to me :) Mind explaining how to do it please ?
-amar