[SQL*Loader] Problems handing over connect string [message #318598] |
Wed, 07 May 2008 04:41 |
houseangel
Messages: 2 Registered: May 2008
|
Junior Member |
|
|
Hi @ll,
I am actually trying to import some data to my Oracle 10g. This has to work automatically via ANT (calling the command via exec) and has to be configured via a property file for each machine (the ANT task should only rely on having a Oracle 10g installed).
What I am trying to do is to call the SQL*Loader and to hand over the complete connect string somehow, not relying that it is in the tnsnames ... My problem: this doesn't work as I expexted:
Attempt 1: Connect String via command line
sqlldr userid=user/password@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=host)(PORT=1521))(CONNECT_DATA=(SID=SID))) control=<PATH> data=\"-\"
The error message in this case: my Cygwin complains that a '(' is incorrect (bash: Syntax Error near unexpected token '('). If I quote the whole thing THE SQL*Loader complains, that a parameter isn't correct (SQL*Loader-100: syntax error ...) Ok - how about an alternative to command line? I googled and found:
Attempt 2: Connect String in Parfile
Parfile:
USERID=user/password@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=host)(PORT=1521))(CONNECT_DATA=(SID=SID)))
CONTROL=<PATH>
DATA="-"
The call:
sqlldr parfile=parfile.par
Doesn't work much better
LRM-00116: Syntaxfehler bei 'user/pa' im Anschluss an '='
LRM-00113: Fehler beim Verarbeiten der Datei 'parfile.par'
...
(The english error message would be something like:
LRM-00116: syntax error in 'user/pa' after '='
LRM-00113: Error processing the file 'parfile.par'
...)
Does anyone have an idea what I am doing wrong or how i may solve this problem easier?
Thanks in advance
Regards Angel
|
|
|
|
|
|