| [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
|
|
|
|
|
| Re: [SQL*Loader] Problems handing over connect string [message #318698 is a reply to message #318598 ] |
Wed, 07 May 2008 11:13  |
houseangel Messages: 2 Registered: May 2008 |
Junior Member |
|
|
I was able to solve the problem myself in the mean ... actually it was a problem that had nothing to do with SQL*Loader. My database was not correctly started due to an invalid init<SID>.ora file and the SID also was not listed in the listener.ora file.
Now after that is done the connection using the connect string in the parfile works fine:
The only thing for now is, that i cannot use input from stdin (using data=\"-\") due to an oracle bug in 10.2 as described here:
http://forum.cloveretl.org/viewtopic.php?t=338&sid=519c030bfe8dcc3174af6412cd00e9be
... but thats another topic.
[Updated on: Wed, 07 May 2008 11:14]
|
|
|