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: Ana C. Dent <anacedent_at_hotmail.com>
Date: Fri, 28 Mar 2003 18:00:54 -0800
Message-ID: <p77ha.1231$qF3.104@fed1read04>


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

"It didn't work" is NOT very helpful.
Things can "not work" for many different reasons. Without additional clues, You're On Your Own (YOYO!).

What is on the other end of your pipe?
Just because you jam a "command string" into a pipe, does NOT mean that it will automagically get executed. Received on Fri Mar 28 2003 - 20:00:54 CST

Original text of this message

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