Loading data into a remote database using sqlldr

I wanted to load data into a remote db using sqlldr.I did this using the following command

>sqlldr GANUKA/GANUKA@jdbc:oracle:thin:@172.21.0.180:1521:orcl control=D:\Work\CLSTMAS.ctl log=D:\Work\CLSTMAS.log 

But this leads to the following error.

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

Need help

+9
oracle
source share
2 answers

Here you mix two different worlds. One of them is the OCI world in which sqlldr lives. It expects Oracle instance names defined in TNSNAMES.ORA (or a similar service). Another world is the JDBC world, which uses connection identifiers with the words "jdbc" or "thin".

So, you have two options:

  • If your environment has the correct TNS configuration, you need to change the command line to something like sqlldr GANUKA/GANUKA@MONTY.CORP control=...

  • If not, you can use the Easy Connect line: sqlldr GANUKA/GANUKA@//172.21.0.180:1521/orcl control=...

+29
source share

In the end, I had to use a thin client connection string. I could not get @Codo's solution to work.

sqlldr \'username/passwd@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=myhost.com)(PORT=1111)))(CONNECT_DATA=(SID=MYSIDE)(SERVER=DEDICATED)))\' control=loader.ctl data=data.csv

0
source share

All Articles