Home » SQL & PL/SQL » SQL & PL/SQL » Executing OS commands from PL?
Executing OS commands from PL? [message #35967] Fri, 26 October 2001 04:41 Go to next message
Messages: 83
Registered: December 2000
From SQL*plus I can execute "$dir c:*.* > files.txt".
Is it possible to do this within a stored procedure?

Re: Executing OS commands from PL? [message #35969 is a reply to message #35967] Fri, 26 October 2001 07:02 Go to previous messageGo to next message
Messages: 35
Registered: March 2001
We have a open source package that enables you
to call OS commands from within PL/SQL.
Have a look at it.


Have fun


Re: Executing OS commands from PL? [message #35975 is a reply to message #35967] Sat, 27 October 2001 07:27 Go to previous message
Milan Kumar Barui
Messages: 16
Registered: October 2001
Junior Member
For executing OS command from PL/SQL,

Step 1: Write pl/sql program what sends commands to oracle shared memory by using DBMS_PIPE.PACK_MESSAGE('command') and DBMS_PIPE.SEND_MESSAGE('pipe').

step 2: write one pro*c program which recieves this command by
write execute(command) in this program.

STEP 3: compile pro*c program and run in back end as detached process in loop.

step 4: run pl/sql and send message to pro*c and it will execute.

Just try, it must work. Give me feedback.

Previous Topic: Concatenation alternatives
Next Topic: Re: to create a table structure from an existing structure
Goto Forum:

Current Time: Tue May 28 06:50:13 CDT 2024