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: Trigger or Procedure that Scans a folder for TXT files

Re: Trigger or Procedure that Scans a folder for TXT files

From: Billy Verreynne <vslabs_at_onwe.co.za>
Date: 2000/05/25
Message-ID: <392cf9a0.523378187@news.saix.net>#1/1

tjmxyz_at_my-deja.com wrote:

>How would it be possible to Write a PL\SQL procedure or Trigger.
>That will scan a Folder for text files and then process them.

IMO this is a bad idea. Especially if you see this as being initiated by the user via a front-end. Scanning & processing text files should be a background process. Worse, this should never ever be something like a trigger which is _database_ transaction-based.

If the user initiates the scan process from his client, he is responsible for that scan. If his machine goes belly up, or he decides that this process is taking too long and hit the reboot button, what then? And knowing users, the user will boot up again, sign on, and retry that scan process again from his PC. Now you have two processes merily scanning away at the same data on the server.

Also, text file processing on a server sounds all too much like a batch processing requirement. And 99.9% of the time, this type of processing in not time critical to the second. Which means you can have a server process running on the server in the "schedule manager" (cron job on Unix), that wakes up every few minutes and check for files to process.

If you want to be able to tell the process "check now!" from a client, then it can be done using Oracle as the communucation transport system via DBMS Pipes.

I personally find the idea of putting operating system calls and services into triggers (e.g. sending e-mail as part of the trigger) a very disturbing trend/requirement. Mixing operating system with the databaser like this? It makes for a dangerous cocktail IMO.

regards,
Billy Received on Thu May 25 2000 - 00:00:00 CDT

Original text of this message

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