3

I am to use Sqoop to work with two versions of oracle. For each version of the oracle, we need a specific version of oracle jdbc driver jar to talk with oracle. I put the two oracle jdbc jars into $SQOOP_HOME/lib, which will lead to classpath loading issue(sqoop works well for one oracle, but doesn't work for the other oracle)

I would ask if there is a way to specify the jdbc jar instead of loading it from $SQOOP_HOME/lib (which is the default behavior) when I kick off the sqoop command to load data into oracle.

Tom
  • 5,848
  • 12
  • 44
  • 104
  • Can you post your Sqoop import command for both case with error message ? – Sandeep Singh Jun 20 '17 at 07:08
  • you can try with `-libjars specify comma separated jar files to include in the classpath.` – Sandeep Singh Jun 20 '17 at 07:14
  • If you need a single JAR that works with multiple Oracle versions and the above suggestions do not work, you can try the commercial DataDirect Oracle JDBC driver that supports 8i-12c (https://www.progress.com/jdbc/oracle-database). Note that I am employed by Progress. – Sumit Sarkar Jun 20 '17 at 16:23
  • Thanks @SandeepSingh for the helpful answer, we are using `sqoop eval` command which doesn't support -libjars. The good thing is that,the two oracle are the same version our production environment, so the problem I asked doesn't block us very much – Tom Jun 21 '17 at 05:41
  • Thanks @SumitSarkar for the information, I will try and evaluate the jar you mentioned – Tom Jun 21 '17 at 05:42
  • _"For each version of the oracle, we need a specific version of oracle jdbc driver jar to talk with oracle"_ >> really?!? what kind of exotic versions do you use, then? – Samson Scharfrichter Jun 21 '17 at 20:45
  • @Tom did your issue resolve? Currently I am facing the same issue, we have 2 versions of Oracle and 2 versions of jars, (ojdbc7.jar and ojdbc8.jar), should i keep both the jars in the sqoop lib dir ? If i keep both how will the sqoop know which jar to pick up.? – sai harsha vardhan Oct 29 '21 at 07:17

0 Answers0