oracle-databasesql-loaderctl

error when importing with a ctl file sqlldr oracle


I was trying to import data from an oracle database table using a ctl file. Unfortunately, it doesn't work due to a syntax error and, for my efforts, I can't understand why.

SQL code:

sqlldr USERID=user/password, CONTROL=C:\wkt_building001.ctl, LOG=C:\ulcase1.log 

file ctl code:

OPTIONS (readsize=20000000, DIRECT=TRUE)
UNRECOVERABLE LOAD DATA
CHARACTERSET UTF8

INFILE 'C:/wkt_building.txt.001'
APPEND
PRESERVE BLANKS
INTO TABLE wkt_building
FIELDS TERMINATED BY '  ' TRAILING NULLCOLS
(
BUILDING_ID,
BUILDING CHAR(100000)
)

error:

org.jkiss.dbeaver.model.sql.DBSQLException: Errore SQL [900] [42000]: ORA-00900: istruzione SQL non valida

at...
    
Caused by: java.sql.SQLSyntaxErrorException: ORA-00900: istruzione SQL non valida


    at ...

Caused by: Error : 900, Position : 0, Sql = sqlldr USERID=user/password, CONTROL=C:\wkt_building001.ctl, LOG=C:\ulcase1.log data=C:\wkt_building.txt.001, OriginalSql = sqlldr USERID=user/password, CONTROL=C:\wkt_building001.ctl, LOG=C:\ulcase1.log data=C:\wkt_building.txt.001, Error Msg = ORA-00900: istruzione SQL non valida


    at ...

thank you in advance


Solution

  • in the wrong initial command the ip address, the port and the database name are missing, this is the correct version:

    Also to configure the connection on cmd follow this guide that uses net menager should have all the steps: