0

On a Windows server 2016, we have an Oracle Database 12c Standard Edition Release 12.2.0.1.0 - 64bit Production running.
The goal is to have an external table created with a "preprocessor" command, triggering a batch file that will retrieve file infos like file size, date, name, with a "DIR" cmd.
We followed the steps described in this link: http://www.oracle-developer.net/display.php?id=513, we did exactly the same.
On another server owned by us, this is working directly.
On this Windows server 2016, the select statement on the external table returns no records. Absolutely no error created, only a logfile for the external table, which says not much.
The locations were the different files are stored are accessible for the OS-user Oracle. Oracle is able to read, "browse" through this paths and directories. But the batch seems not executed.

What are we missing?

Thanks!

Sunchaser
  • 11
  • 3
  • 1
    Are there actually files present - and if it's a RAC, present on both nodes? Are you sure the batch file is correct - what do you see if you execute that manually? (And it would be better if your question included the actual commands and files you used, not just linked to an external article.) – Alex Poole Jul 31 '22 at 09:43
  • Hello, yes, all files are there and the batch is returning the correct results. It is nothing more that a "dir" on a directory. Also, I'm able to create a external table without preprocessor command if I would use some dummy file in the same directories. I understand the point about the actual commands, I can post, but it will be the same as the blog, user names and directory names would differ. But If needed, I'll do. Seems that the database on the Windows 2016 can't trigger a batch. – Sunchaser Jul 31 '22 at 23:13
  • strange comment rules – Sunchaser Aug 07 '22 at 15:20

1 Answers1

0

for the moment, I've found a workaround:
. I checked that I could execute a batch via "dbms_scheduler.create_job". Funny enough, it is the same (more or less) and in the same place as the one supposed the be executed by the preprocessor command of the external table.
Now, I create dynamically a batch via UTL_FILE (this is matching my need), then execute it via "dbms_scheduler.create_job". This batch is sending the results in a txt file.
I have then an external table pointing to this txt file. Everything runs in a small procedure, where I can catch errors and log steps if needed, so I should be happy with this.
Nevertheless, I would have loved to understand what was the issue with the external table + preprocessor command...

Sunchaser
  • 11
  • 3