Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: How to call shell script from PL/SQL ?.
In article <38FF7D81.6C4EF57E_at_att.com>,
Raj <rajarulmani_at_att.com> wrote:
> Tom,
> External procedure fn getting executed correctly but the action is
not being
> done . i,e creating a file / deleting a file / executing a file .
Could you
> please let me know what i'm missing in my process.
>
> Here is the fn:
>
> int call_system ( char *progname , int a )
> {
>
> FILE *fp;
>
> fp = fopen ("test.txt","w");
>
> fprintf( fp , " First line is ! ");
>
> fclose( fp );
>
> }
>
> This code doesn't create the file "test.txt" .
>
> Tom Zamani wrote:
>
> > You need to provide us what version of database you are using.
> > If 7 then I have no Idea I am not sure if you can do that.
> > if 8.X you need to use external procedures in oracle
> > if 8.1.6 there is a package in oracle which could help you with this
(I
> > don't know the name of the package).
> > I have used external procedures to do ftp ,cp, mv send email etc,
and it is
> > very fast.
> >
> > Tom
> >
> > Raj <rajarulmani_at_att.com> wrote in message
news:38FDF480.9D00B0B1_at_att.com...
> > > Hi,
> > > can any one tell me how to call a shell script from PL/SQL ?.
> > >
> > > Thanks,
> > > Raj
> > >
> > >
>
In case you haven't found the answer yet ...
If you _know_ the external procedure is being executed, then there are two possible causes of the problem.
gcc -I/oracle/product/8.1.5/rdbms/demo
-I/oracle/product/8.1.5/network/public etc.
Make sure the above paths are correct. These Oracle libraries include things that allow the server oracle account to write to operating system files.
Let me know what happens.
Salaam
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Fri May 12 2000 - 00:00:00 CDT
![]() |
![]() |