1

I have big CSV files and placed it on Linux (Amazon AMI). I have installed instant client on Amazon Linux AMI and I can connect to my Oracle database using SQL Plus. How can I import all the CSVs to Oracle from Linux terminal?

My Oracle database is located on Amazon RDS.

dang
  • 81
  • 3
  • 10

3 Answers3

1

You can use Python to do the load. I see it like this:

  1. Python reads all CSV file names from given directory.
  2. Creates SQL*Loader co-routines for each file.
  3. Waits for load to finish
  4. Validates results.

I took similar approach in CSV-Loader-For-Oracle

olekb
  • 163
  • 1
  • 2
  • 8
1

Use sql*loader to load the data :

http://docs.oracle.com/cd/B19306_01/server.102/b14215/ldr_params.htm#sthref540

(or external tables).

1) setup a .ctl file with your file format

2) setup / point to a receiving table in your database.

3) invoke sql*loader (sqlld)

Ditto
  • 504
  • 1
  • 3
  • 11
0

Oracle SQL*Loader have two different option: direct and conventional path (https://docs.oracle.com/cd/E11882_01/server.112/e22490/ldr_modes.htm#SUTIL1284):

enter image description here

And loader concept / command line parameters are explained here:

https://docs.oracle.com/cd/E11882_01/server.112/e22490/ldr_params.htm#SUTIL1016

http://docs.oracle.com/cd/B28359_01/server.111/b28319/ldr_concepts.htm

But Oracle does provide another tool: Oracle export/import tool.

More information:

http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Oracle.Procedural.Importing.html

Peter Teoh
  • 111
  • 2