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 -> Re: Using host command in a stored procedure

Re: Using host command in a stored procedure

From: Connor McDonald <connor_mcdonald_at_yahoo.com>
Date: Sat, 29 Mar 2003 19:00:34 +0800
Message-ID: <3E857CD2.3ADA@yahoo.com>


Luciano wrote:
>
> 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

Go to asktom.oracle.com and search for host command - there's a myriad of examples

hth
connor

-- 
=========================
Connor McDonald
http://www.oracledba.co.uk

"Some days you're the pigeon, some days you're the statue"
Received on Sat Mar 29 2003 - 05:00:34 CST

Original text of this message

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