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