Support Questions
Find answers, ask questions, and share your expertise

Getting error while importing data from sqlserver 2005 to hive


Hi All,

I'm trying to import data from sql server 2005 to hive 

while importing the data i  m getting error  "java.sql.SQLException: Invalid object name '[Tablename]'."

 I'm using below command to  import data :

"sqoop import --connect "jdbc:jtds:sqlserver://[ipaddress];instanceName=sql2005;databasename=[DatabaseName]" --username 'UserName' -P --table [Tablename] -m 1 --hive-import


is the query is correct  for getting data from sql instence or the syntax is different ?

Thank you in Advance.




Expert Contributor

Hi @hiveexport,

can you please clarify, if you ran this command exactly as you wrote it or which parts were anonymized to hide sensitive values?

Cloudera Employee

Hi hiveexport,


The error in jdbc is typically caused by an erroneous database name or table name within the command line.


Would you be able to share your database listing (of just the db name), table name, and the command line used for both database and table?


Alternatively, are you able to use the same [tablename] and [databasename] with other java commands to this database?  Permissions could also be at play.






Your syntax looks okay save for a small change by fully qualifying the table name as the table doesn't belong to your schema?


SQL Server uses [dbo.tablename] so in the table parameter try --table dbo.table_name

Hope that helps