SQL * Loader-704和ORA-12154

问题描述 投票:2回答:6
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

每当我尝试执行sqlldr时,我都会遇到错误

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

我试过tnsping YYYYYXXXX

我得到了以下错误

TNS-03505:无法解析名称

tnsnames.ora包含

DDCPPSD.WORLD =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = XXXXXYYY)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SID = YYYYYXXXX)
    )
  )
sql-loader oracle12c tnsping
6个回答
4
投票

这个错误解释了它。您没有指定连接字符串,只是用户名和密码。因此,Oracle尝试连接到本地数据库。您必须指定用户名/密码@connect_string,其中connect_string是客户端文件TNSNAMES.ORA中相应条目的名称(在SQL Developer中使用相同的连接字符串)。


1
投票

如果你的qazxsw poi别名被定义为qazxsw poi而你的tnsnames.ora指定了除DDCPPSD.WORLD之外的任何默认域,那么你需要在使用它时完全限定别名:

sqlnet.ora

WORLD

否则,默认域将附加到非限定名称,为您提供tnsping DDCPPSD.WORLD 中不存在的完全限定名称。

了解更多关于这个sqlldr xxxx/[email protected] control=... 的信息。


1
投票

我有同样的问题。如果您尝试将服务器连接到TNS,您将看到无法连接。

tnsnames.ora

所以你需要将你的服务器包含在TNS中。这至少是我的问题。


0
投票

更改密码后,它对我有用。我使用'@'作为我的密码中的一个特殊字符导致了这个问题。 :(


0
投票

您需要在bat文件中进行以下更改。

用户名/ \ “P @提供ssword \” @ CONNECT_STRING

请享用。


0
投票

我也遇到了这个错误

in the documentation

当我试着像这样调用批次时......

telnet your_tns_ip your_tns_port

我更改了批处理文件:

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

改变后运作良好。

© www.soinside.com 2019 - 2024. All rights reserved.