4
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)
    )
  )
  • Is DDCPPSD defined in your tnsnames.ora file, on the client machine you're running SQL\*Loader from? – Alex Poole Jun 13 '15 at 15:27
  • Alex thanks for ur reply plz show above. –  Jun 13 '15 at 16:21
  • Does `tnsping ddcppsd.world` work then? If not maybe the file is in the wrong place, or TNS_ADMIN is pointing to the wrong place. Does your sqlnet.ora have a default domain entry? – Alex Poole Jun 13 '15 at 16:45
  • Alex tnsping ddcppsd.world is working and sqlnet.ora have a default domain entry. –  Jun 14 '15 at 09:48

6 Answers6

6

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).

arjun kori
  • 1,090
  • 2
  • 14
  • 32
2

It worked for me after changing my password. I was using '@' as one of the special character in my password which was causing this issue. :(

beetri
  • 1,039
  • 11
  • 24
  • 40
2

You need to do below changes in bat file.

username/\"p@ssword\"@connect_string

Enjoy.

  • 2
    Welcome to Stackoverflow. Please take some time to read how to write a good answer. read [this](http://meta.stackexchange.com/a/7659/338114) and [this](http://stackoverflow.com/help/how-to-answer) – Sourav Ghosh Feb 10 '17 at 06:47
1

If your tnsnames.ora alias is defind as DDCPPSD.WORLD and your sqlnet.ora specifies a default domain of anything except WORLD then you need to fully qualify the alias when you use it:

tnsping DDCPPSD.WORLD

and

sqlldr xxxx/xxxx@DDCPPSD.WORLD control=...

Otherwise the default domain will be appended to the unqualified name, giving you a fully-qualified name that does not exist in your tnsnames.ora.

Read more about this in the documentation.

Alex Poole
  • 183,384
  • 11
  • 179
  • 318
1

I had the same problem. If you try to connect your server to your TNS , you will see you cannot connect.

telnet your_tns_ip your_tns_port

so you need to permition your server to TNS. That was my problem at least.

0

I came across this error too

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

When I tryed call a batch like this...

sqlldr "uuuu/pppp@SSS" 

I changed the batch file for:

set oracle_sid=SSS
sqlldr uuuu/pppp

After the change worked well.

Roberto Góes
  • 778
  • 1
  • 13
  • 20