Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

SQL Loader 704Error/Oracle-12154 Error

3784542Sep 14 2018 — edited Sep 15 2018

I am triggering SQL loader from a python script;

The password does contain and @ sign. If I call sql loader from the command line and escape the password (username/\"p@ssword\"@database) the process works. However, when I apply what I believe is the same logic within a python script I get the same error:

SQL*Loader-704: Internal error: ulconnect: OCIServerAttach [0]

ORA-12154: TNS:could not resolve the connect identifier specified

Python Logic:

subprocess.call("sqlldr userid=" +config.ddw["user"] + "/\"" + config.ddw["password"] +"\"@" + config.ddw["connection"] + " control=C:/projects/controlFile.ctl log=C:/logFile.log)

If I print this statement the string looks like:

sqlldr userid=USERNAME/"p@ssw0rd"@connection/db control=C:/projects/controlFile.ctl log=C:/logFile.log

When I load the string directly in the command line it works:

sqlldr userid=USERNAME/\"p@ssw0rd\"@connection/db control=C:/projects/controlFile.ctl log=C:/logFile.log

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 13 2018
Added on Sep 14 2018
6 comments
1,459 views