I recently updated my blog profile picture. Let’s face it, it was about time. The old one was taken 14 years ago.
This time, I thought I’d go for a contemporary portrait, which has the added benefit of being less likely to frighten animals and small children.
Unfortunately, it is also crying out for a caption :
One or two alternatives captions may well crop up in the following paragraphs.
Primarily though, I’ll be talking about the file watcher capabilities of DBMS_SCHEDULER.
Introduced in 11g, it enables developers to trigger actions when a file arrives without having to leave the comfort of their database.
There are a few moving parts and getting them to work together can take a bit of, well, fiddling.
Specifically, we’ll be looking at :
- configuring the frequency at which filewatchers are run
- creating a credential to use for file watching
- creating a file watcher to determine when a file has arrived
- creating a job for the file watcher to execute
- adding a program so that we can get some information about the file
- getting the filewatcher to wait for a large file transfer to complete
Before we get into all of that, we need to have a quick chat about environments…