Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Using host command in a stored procedure
hello Luciano,
I found the article "Shell Commands From PL/SQL" on http://www.oracle-base.com/Articles/8i/ShellCommandsFromPLSQL.asp very useful. As Connor already mentioned, please check also the various entries for this subject in http://asktom.oracle.com
Kind regards,
Markus Eltschinger
"Luciano" <luciano.kienolt_at_volkswagen.com.br> wrote in message
news:42250f35.0303280925.4483dfc3_at_posting.google.com...
> Hi,
>
> If someone can help me ...
>
> I have this problem: how can I start a command via stored procedure ??
> I have 2 servers and in the first I have the database and in the
> second the application. When I generate files I saved then in my
> database server but during this job I want to move that files to my
> application server directory, in the client side.
> I tried to run host command in my forms but it didn“t work.
>
> I tried to use this:
>
> procedure PRC_HOST_COMMAND( cmd in varchar2 ) as
> status number;
> begin
> dbms_pipe.pack_message( cmd );
> status := dbms_pipe.send_message( 'HOST_PIPE' );
> if ( status <> 0 ) then
> raise_application_error( -20001, 'Pipe error' );
> end if;
>
> end;
>
> and run passing ;
>
> EXEC PRC_HOST_COMMAND ('move E:\dira\dira_files\PURCHASING\*.*
> g:\dira\System\dira_files\PURCHASING')
>
> I work with windows NT.
>
> Thanks a lot
>
> Luciano
>
Received on Sun Mar 30 2003 - 05:52:55 CST