

The problem is that even when setting this, the file watcher is not checking the folder every 2s.

According to the documentation here:ĭBMS_SCHEDULER.SET_ATTRIBUTE(Name => 'FILE_WATCHER_SCHEDULE', By default the file watcher checks the presence of new file every 10 minutes. So if I copy some file created yesterday into target folder, it will not trigger the file watcher. What I found is that the watcher is relying on the date and time when the file was created. I recreated all objects and it seems to be working somehow. If you are creating a file watcher, the credentials are bounded to the file watcher and there is no view or something where you could find whats wrong. Ln -s /lib64/libpam.so.0 /lib64/libpam.soThe stupid thing thing is that if you create an external job and if fails for some reason (in this case the credentials are bounded to directly to the job), you will see an error in USER_SCHEDULER_JOB_RUN_DETAILS because the job ran and failed for some reason. STANDARD_ERROR="Launching external job failed: Invalid username or password""Īfter creating of symbilic link the external job started to work ORA-27369: úloha typu EXECUTABLE selhala s kódem ukon¿ení: Argument list too long SELECT * FROM USER_SCHEDULER_JOB_LOG STATUS = FAILED I am also running on linux, so I tried to create a job running an external script and also got the error about autentication. SELECT * FROM USER_SCHEDULER_JOBS JOB_NAME = EOD_JOBĪfter many hours of reading documentation, running everything again from beginning and searching the internet, I found this thread: Still nothing happens when move some file (e.g.

Filewatcher change every 10 seconds code#
Payload.directory_path || '/' || payload.actual_file_name,įile_watcher_name => 'eod_reports_watcher',ĭirectory_path => '/home/xxxxx/xxxxx/xxxx/xxxx/xxxxx/xxxx/xxxxx',ĭbms_t_attribute('eod_job','parallel_instances',true) Įxec dbms_scheduler.enable('eod_reports_watcher,eod_job') I did three changes to the code in comparison with the exampleġ) Changed username and password in the credentials (username and password which I use for login to the OS)Ģ) Changed directory path for the file watcher (I started the directory path with the /home/.)ģ) Set the event_condition parameter to Nullįinally I ran this as SYS to make the watcher check the folder every second:ĭBMS_SCHEDULER.SET_ATTRIBUTE('FILE_WATCHER_SCHEDULE', 'REPEAT_INTERVAL', (payload IN sys.scheduler_filewatcher_result) as NLSRTL Version 11.2.0.1.0 - ProductionAfter solving this for several hours I just copied the example which is at the end of the tutorial and ran it.Ĭreate table eod_reports (when timestamp, file_name varchar2(100), TNS for Linux: Version 11.2.0.1.0 - Production Oracle Database 11g Release 11.2.0.1.0 - 64bit Production What I need to do is to run a job when a file arrives to some specific folder. I need a help with Oracle Scheduler again. 1.7K Training / Learning / Certification.165.3K Java EE (Java Enterprise Edition).7.9K Oracle Database Express Edition (XE).3.8K Java and JavaScript in the Database.
