SQL*Loader-704 and ORA-12154

user4993731 picture user4993731 · Jun 13, 2015 · Viewed 17k times · Source
sqlldr "xxxx/xxxx@YYYYYXXXX" control=/home/local/INTERNAL/xxxxx/Presc_SQLLDR_File/Presc_SQLLDR.ctl log=/home/local/INTERNAL/xxxxx/Presc_SQLLDR_File/Presc_log.log data=home/achand/Presc_SQLLDR_File/Presc_SQLLDR.ctl

Whenever i'm trying to execute sqlldr I'm getting below error

SQL*Loader-704: Internal error: ulconnect: OCIServerAttach [0]
ORA-12154: TNS:could not resolve the connect identifier specified

I tried tnsping YYYYYXXXX

I got below error

TNS-03505: Failed to resolve name

tnsnames.ora contain

DDCPPSD.WORLD =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = XXXXXYYY)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SID = YYYYYXXXX)
    )
  )

Answer

arjun kori picture arjun kori · Aug 11, 2016

This error message self-explainatory. You have not specified the connect string, and just used username and password. Therefore, Oracle tries to connect to local database. You must specify username/password@connect_string, where connect_string is a name for the corresponding entry in your client side file TNSNAMES.ORA (same connect string you use in SQL Developer).