2

I'm trying to load some data from csv to Oracle 11g database tables through sqlldr

So I was I thinking if there's a way to carry those data matching the columns described on the ctl file with the table columns by the name. Just like an auto-match, with no sequential order or filler command

Anyone knows a thing about that? I've been searching in documentation and forums but haven't found a thing

Thank you, guys

1 Answers1

1

Alas you're on 11g. What you're looking for is a new feature in 12c SQL Loader Express Mode. This allows us to load a comma-delimited file to a table without defining a Loader control file; instead Oracle uses the data dictionary ALL_TAB_COLUMNS to figure out the mapping.

Obviously there are certain limitations. Perhaps the biggest one is that external tables are the underlying mechanism so it requires the same privileges , including privileges on Directory objects. I think this reduces the helpfulness of the feature, because many people need to use SQL Loader precisely because their DBAs or sysadmins won't grant them the privileges necessary for external tables.

APC
  • 144,005
  • 19
  • 170
  • 281
  • 1
    It takes only bad file and table name, seems very interesting but looks like it still uses de order of the columns to match fileds "names from table column names (the order of the fields matches the table column order)" Thank you anyway! – Mayara Ferreira Dec 10 '17 at 20:06