Re: Checking if a File Exists or not from PL/SQL

From: Will <wkooiman_at_earthlink.net>
Date: 1 Aug 2001 00:45:50 -0700
Message-ID: <7256fcf8.0107312345.44cd6849_at_posting.google.com>


bakirn_at_hotmail.com (Bakir) wrote in message news:<87ba9f30.0107270904.2e9d3fe6_at_posting.google.com>...
> Hi,
> I have an anonymous PL/SQL block in which I have some processing to do
> based on whether an operating system file exists or not. This file can
> be on any machine, not necessarily on the machine where the Database
> server is.
>
> Please let me know if this is possible and if possible, how.
>
> Thank You.
> -Bakir

You can use utl_file to see if the file exists, but the file will have to be accessible from the O/S. You could use NFS and softlinks to make the remote files accessible. I don't know if that'll work in your environment, though.

Another possibility is to use utl_http to hit an http server. If you can setup an http server to hit the files you're looking for you can go that route.

And finally, you can write a C program to do what you want, then use Oracle pipes to communicate between the C program and PL/SQL. You can get some examples from $ORACLE_HOME/rdbms/admin/dbmspipe.sql. I've done a lot of that, and it works very well.

Will. Received on Wed Aug 01 2001 - 09:45:50 CEST

Original text of this message