Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Sqoop, mail # user - FW: Unable to connect to oracle database from sqoop


Copy link to this message
-
Re: Unable to connect to oracle database from sqoop
Michal Taborsky 2013-06-21, 06:47
Hello Manickam,

the Oracle connection parameters are a bit confusing sometimes (not a Sqoop
problem). The thin client, which you are using, does not support full
Oracle*Net client and it does not work with tnasnames.ora. So you either
specify the service directly (in your case, the listener running on
localhost must provide service "cp"). Or you can provide the full
connection string (taken from tnsnames.ora) in the commandline:

For example, like this:
sqoop import --connect
"jdbc:oracle:thin:username/password@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=YOURSERVICENAME)))"
...

Hope this helps,
Michal
2013/6/21 Manickam P <[EMAIL PROTECTED]>

> Hi,
>
> Given below is the scoop script i used.
>
>
> ./sqoop list-databases --connect jdbc:oracle:thin:@localhost:1521/cp
> --username scott --password tiger
>
> JDBC driver directory - which directory you mean here? i have put ojdbc
> jar in sqoop lib folder.
> Is that fine or am i missing anything here?
>
>
> Thanks,
> Manickam P
>
> ------------------------------
> Date: Thu, 20 Jun 2013 16:04:50 +0200
> Subject: Re: FW: Unable to connect to oracle database from sqoop
> From: [EMAIL PROTECTED]
> To: [EMAIL PROTECTED]
>
>
> Hi,
>
> Please send your Sqoop script, and the output of "ls" command on your JDBC
> driver directory.
>
> Thanks
>
>
> 2013/6/20 Manickam P <[EMAIL PROTECTED]>
>
> Hi,
>
> I am trying to import details from oracle through sqoop but i got the
> below error.
>    13/06/20 09:09:21 ERROR manager.OracleManager: Failed to list databases
> java.sql.SQLException: Listener refused the connection with the following
> error:
> ORA-12514, TNS:listener does not currently know of service requested in
> connect descriptor
>
> I've put an entry into the TNSname.ora file and also added ojdbc jar with
> sqoop lib folder.
>
> Please help me to resolve the issue.
>
>
> Thanks,
> Manickam P
>
>
>
>
>
>
>