Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

File Watcher Not Triggering Program

CentinulDec 6 2011 — edited Aug 20 2013
Version:
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
PL/SQL Release 11.2.0.2.0 - Production
CORE    11.2.0.2.0      Production
TNS for Solaris: Version 11.2.0.2.0 - Production
NLSRTL Version 11.2.0.2.0 - Production
I followed the example located here:

ORACLE-BASE: Scheduler (DBMS_SCHEDULER) Enhancements in Oracle Database 11g Release 2

The only difference (obviously) was that I used a different credential.

I validated that "jssu" was working properly with the same username and password my credential uses:
$ ls -l | grep jssu
-rwsr-x---   1 root     dba        24296 Aug 16 13:43 jssu*
$ jssu
user
password
1
/bin/echo
1
hi
hi
$
I've also used jssu to test a cat of my file, which worked fine:
$ ls -l | grep jssu
-rwsr-x---   1 root     dba        24296 Aug 16 13:43 jssu*
$ jssu
user
password
1
/bin/cat
1
/export/home/username/response.txt
test
$
I could be wrong but I believe the file watcher is triggered by a SYS owned job named 'FILE_WATCHER'. I can see it's been executed multiple times since I created my example:
SQL> select owner,job_name,enabled,run_count,failure_count from dba_scheduler_jobs where job_name='FILE_WATCHER';

OWNER                          JOB_NAME                       ENABL  RUN_COUNT FAILURE_COUNT
------------------------------ ------------------------------ ----- ---------- -------------
SYS                            FILE_WATCHER                   TRUE          18             0
However, I only have one row in DBA_SCHEDULER_JOB_LOG, and the timestamp is the same time I created my example today:
SQL> select log_date,owner,job_name,status from dba_scheduler_job_log where job_name='FILE_WATCHER';

LOG_DATE                       OWNER                          JOB_NAME             STATUS
------------------------------ ------------------------------ -------------------- ------------------------------
06-DEC-11 11.08.43.307029 AM - SYS                            FILE_WATCHER
05:00
I don't see any further runs by my job or Oracle's job in the logs. I do see a periodic j000* trace file in the ADR that runs Oracle's job but I don't see any errors in the trace file.

The only thing I can think of is that it comes down to file system permissions. I've tried creating a file with an owner that matches the username for the credential and that doesn't seem to trigger the job. I've tried setting 777 permissions on the file and that hasn't worked. I can't find any documentation that lists any additional permissions that are necessary for this to work.

Here's the file watcher configuration:
FILE_WATCHER_NAME              ENABL DIRECTORY_PATH                 FILE_NAME                      CREDENTIAL_NAME
------------------------------ ----- ------------------------------ ------------------------------ ------------------------------
TEST_FILE_WATCHER              TRUE  /export/home/username          response.txt                   LOCAL_CREDENTIAL
I'm at a loss. What am I doing wrong?

P.S. All these commands were run directly from the database server (e.g. not trying to create the file client side).
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 17 2013
Added on Dec 6 2011
9 comments
5,694 views