Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Host commands from PL/SQL
calderproj wrote:
> Does anybody know of a way of issuing host commands from withinn PL/SQL?
>
> The problem is I have a directory in which there could be any number of
> files which I need to read in turn. I know of the UTL_FILE package but
> for that you need to know the file names. What I want is to be able to do
> an ls of the directory giving all the file names.
>
> The host is Unix Solaris 2.6 using PL/SQL v2.3.
>
I had the same prob under NT with Oracle WGS 7.3.3.6.0 and PL/SQL
2.3.3.6.0
and Oracle told me that issuing host commands is only possible with
version 8.xx
I think the only way you can go is to write a small C-prog checking the files and either put a file-list a constantly named file ('FILES.LST') from which your PL/SQL can UTL_FILE.get_line() or you can use embedded SQL or OCI to make the C-prog calling your PL/SQL with the specific paramters (which we did).
Hope, this helps a bit
Olaf Received on Fri Jun 05 1998 - 05:56:39 CDT
![]() |
![]() |