Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Using host command in a stored procedure

Using host command in a stored procedure

From: Luciano <luciano.kienolt_at_volkswagen.com.br>
Date: 28 Mar 2003 09:25:04 -0800
Message-ID: <42250f35.0303280925.4483dfc3@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 Fri Mar 28 2003 - 11:25:04 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US