0

I need to batch load several log data files (comma delimited but they don't have a .csv extension in the file name) once each day into an Oracle database. I'm sure this is a very common use case, but I can't seem to find a good solution.

Using an external table or sql loader seems to be the way to go, but in my case the filename is not fixed. So, I need to get a list of all the files in the directors and then import them dynamically. I'm guessing some sort of PL/SQL might be required or is there a easier way to do this. Can someone help me out with a solution to this?

  • With SQL*Loader you could certainly have a changing filename. – Colin 't Hart Sep 10 '14 at 12:10
  • Based on available file, you could generate a suitable control file, using basic shell script, for SQLLDR. For external tables, you can use 'alter table ... location(...)' option, so you don't need to drop and re-create them. – Raj Sep 11 '14 at 11:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.