Created on 05-15-2014 06:14 PM - edited 09-16-2022 01:59 AM
Hi Foks, I am not that savy in Linux.
I am trying to creat a new connection to SQL Server on my laptop and Cloud. Niether of them working.
Here is what I have done:
- Using Quickstart VM CDH 4.6
- Usoing VMWare Player for quess session
- Installed/copied sqljdbc.jar in /usr/lib/sqoop/lib/
- export CLASSPATH=/usr/lib/sqoop/lib/sqljdbc4.jar in a terminal
- run this command on the same terminal... $ sqoop eval --connect jdbc:sqlserver://XXXX.cloudapp.net,1433\\XXXX(instance name) --username <myuser> --password <maypassword> --driver com.microsoft.sqlserver.jdbc.SQLServerDriver --query "SELECT * FROM [ContosoRetailDW].[dbo].[DimAccount]"
- I do the same for local machine, the host machine
Here is the error i get for both cases:
WARN tool.EvalSqlTool: SQL exception executing statement: com.microsoft.sqlserver.jdbc.SQLServerException: The connection to the host dssvmprod.cloudapp.net,1433, named instance DSSPRODDB failed. Error: "java.net.UnknownHostException: dssvmprod.cloudapp.net,1433". Verify the server and instance names and check that no firewall is blocking UDP traffic to port 1434. For SQL Server 2005 or later, verify that the SQL Server Browser Service is running on the host.
Info...
I can connect to Cloud database from guess VM without any issue
Here are my questions:
1- What am I doing wrong connecting from a terminal?
2- When I open another terminal the $CLASSPATH won't be recognized. How can I make the CLASSPATH perminant.
2- What should I do or set that the SQL Server driver can be loaded by Sqoop2 user interface? Does sqoop2 interface uses $CLASSPATH?
Many thanks for your help
Created 05-29-2014 05:30 PM
Finally I got it working:
Lessons learned.....
Import table to HDFS using sqoop2:
Goodluck to the new explorers....
Created 05-21-2014 02:07 PM
Can you try using the ip address instead of the name? See if that works... I've noticed in our environment, it's more reliable to use the ip address rather than the name itself.
Created 05-23-2014 05:16 AM
Thanks Jason for your reply.
After lots of trial and error, we got all the jinx out or sqoop functionality from terminal. We can import/export from table, database and with SQL scripts. However, we cannot do the same thing from sqoop UI. In Hue/sqoop interface, we can create connection without any error; create a job without any error; running a job without any error; however, no outputs. As I have mentioned, we have created many outputs in /usr/Cloudera/{one folder for each job} when running sqoop from terminal.
Any idea where we should look for the issue?
Thanks.
Created 05-23-2014 07:21 AM
First, I'd log into Cloudera Manager, and go to the Diagnostics link at the top, and select logs. Then deselect "select/check all" and then specifically select Sqoop. Do a search on those logs at either the warning or error level. It should tell you what is happening while you're running the sqoop job.
One thing to note, within the Sqoop UI (maybe there's a configuration setting somewhere) when you specify the output directory, it has to be a directory that doesn't already exist. Every time the job runs it will try to create that directory, and if it exists it will err.
Created 05-29-2014 03:00 PM
FYI.... here is how one can get the logfile of the job; http://localhost.localdomain:8888/logs
I will let you how I resolve the issue, if and when I do.
Thanks
Created 05-29-2014 05:30 PM
Finally I got it working:
Lessons learned.....
Import table to HDFS using sqoop2:
Goodluck to the new explorers....
Created 02-07-2018 11:42 AM
Which connector was used to solve this issue ? I am using the generic jdbc connector that came with my sqoop 1.99.5. I have no luck with the class name of the microsoft jdbc driver that you mentioned. It says the class is not found. I am assuming it has to do with the connector and not the driver. As I have placed my sqlserver jar file in sqoop library. However, in my cloudera quickstart terminal,when I list files in the sqoop library, I find that the "mysql-connector-java.jar" is color coded in blue and "sqljdbc41.jar" is color coded in red. Any light on what does this mean?
Thank you for your time.
Created 02-07-2018 07:55 PM
@Tachyons what database do you want to connect ?
Created 02-08-2018 07:09 AM
My database runs on Microsoft Sql Server.
Created 02-08-2018 05:35 PM
Hello folks, I am facing knowledge gap while trying to work with Cloudera CHD with AWS services . The issues enlisted down, I am pretty sure these have been faced and resolved, given the popularity of cloud hosted ms-sql servers. Would be grateful to recieve help
Thank you for your time.