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

Switch to Threaded View
Sqoop >> mail # user >> How do I select the database when connecting to SQL SERVER ?


Copy link to this message
-
How do I select the database when connecting to SQL SERVER ?
Hello again!
After my previous misadventure and  thanks to Mengwei I have a functioning connection to my SQL Server; at least Sqoop doesn't complain when setting up the connection.

How do I specify which database on the server to use? I tried putting it in the connection string 'jdbc:sqlserver://myserver\myInstance;database=mydatabase;' but when submitting a job to import a table on that database I get

: Exception: java.lang.Throwable Message: Invalid object name 'dbo.tblFaelle'.

The table exists and is accessible to the user I use for credentials. The most obvious cause to me, is that Sqoop is looking for the table outside the database, or am I missing something?

Thanks!

Chris

------------------------------BEGIN TRACE -------------------------------

Exception has occurred during processing command
Server has returned exception: Exception: java.lang.Throwable Message: GENERIC_JDBC_CONNECTOR_0002:Unable to execute the SQL statement
Stack trace:
         at  org.apache.sqoop.connector.jdbc.GenericJdbcExecutor (GenericJdbcExecutor.java:59)
         at  org.apache.sqoop.connector.jdbc.GenericJdbcImportInitializer (GenericJdbcImportInitializer.java:155)
         at  org.apache.sqoop.connector.jdbc.GenericJdbcImportInitializer (GenericJdbcImportInitializer.java:48)
         at  org.apache.sqoop.connector.jdbc.GenericJdbcImportInitializer (GenericJdbcImportInitializer.java:37)
         at  org.apache.sqoop.framework.FrameworkManager (FrameworkManager.java:447)
         at  org.apache.sqoop.handler.SubmissionRequestHandler (SubmissionRequestHandler.java:112)
         at  org.apache.sqoop.handler.SubmissionRequestHandler (SubmissionRequestHandler.java:98)
         at  org.apache.sqoop.handler.SubmissionRequestHandler (SubmissionRequestHandler.java:68)
         at  org.apache.sqoop.server.v1.SubmissionServlet (SubmissionServlet.java:44)
         at  org.apache.sqoop.server.SqoopProtocolServlet (SqoopProtocolServlet.java:63)
         at  javax.servlet.http.HttpServlet (HttpServlet.java:637)
         at  javax.servlet.http.HttpServlet (HttpServlet.java:717)
         at  org.apache.catalina.core.ApplicationFilterChain (ApplicationFilterChain.java:290)
         at  org.apache.catalina.core.ApplicationFilterChain (ApplicationFilterChain.java:206)
         at  org.apache.catalina.core.StandardWrapperValve (StandardWrapperValve.java:233)
         at  org.apache.catalina.core.StandardContextValve (StandardContextValve.java:191)
         at  org.apache.catalina.core.StandardHostValve (StandardHostValve.java:127)
         at  org.apache.catalina.valves.ErrorReportValve (ErrorReportValve.java:102)
         at  org.apache.catalina.core.StandardEngineValve (StandardEngineValve.java:109)
         at  org.apache.catalina.connector.CoyoteAdapter (CoyoteAdapter.java:293)
         at  org.apache.coyote.http11.Http11Processor (Http11Processor.java:859)
         at  org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler (Http11Protocol.java:602)
         at  org.apache.tomcat.util.net.JIoEndpoint$Worker (JIoEndpoint.java:489)
         at  java.lang.Thread (Thread.java:662)
Caused by: Exception: java.lang.Throwable Message: Invalid object name 'dbo.tblFaelle'.
Stack trace:
         at  com.microsoft.sqlserver.jdbc.SQLServerException (SQLServerException.java:216)
         at  com.microsoft.sqlserver.jdbc.SQLServerStatement (SQLServerStatement.java:1515)
         at  com.microsoft.sqlserver.jdbc.SQLServerStatement (SQLServerStatement.java:792)
         at  com.microsoft.sqlserver.jdbc.SQLServerStatement$StmtExecCmd (SQLServerStatement.java:689)
         at  com.microsoft.sqlserver.jdbc.TDSCommand (IOBuffer.java:5696)
         at  com.microsoft.sqlserver.jdbc.SQLServerConnection (SQLServerConnection.java:1715)
         at  com.microsoft.sqlserver.jdbc.SQLServerStatement (SQLServerStatement.java:180)
         at  com.microsoft.sqlserver.jdbc.SQLServerStatement (SQLServerStatement.java:155)
         at  com.microsoft.sqlserver.jdbc.SQLServerStatement (SQLServerStatement.java:616)
         at  org.apache.sqoop.connector.jdbc.GenericJdbcExecutor (GenericJdbcExecutor.java:56)
         at  org.apache.sqoop.connector.jdbc.GenericJdbcImportInitializer (GenericJdbcImportInitializer.java:155)
         at  org.apache.sqoop.connector.jdbc.GenericJdbcImportInitializer (GenericJdbcImportInitializer.java:48)
         at  org.apache.sqoop.connector.jdbc.GenericJdbcImportInitializer (GenericJdbcImportInitializer.java:37)
         at  org.apache.sqoop.framework.FrameworkManager (FrameworkManager.java:447)
         at  org.apache.sqoop.handler.SubmissionRequestHandler (SubmissionRequestHandler.java:112)
         at  org.apache.sqoop.handler.SubmissionRequestHandler (SubmissionRequestHandler.java:98)
         at  org.apache.sqoop.handler.SubmissionRequestHandler (SubmissionRequestHandler.java:68)
         at  org.apache.sqoop.server.v1.SubmissionServlet (SubmissionServlet.java:44)
         at  org.apache.sqoop.server.SqoopProtocolServlet (SqoopProtocolServlet.java:63)
         at  javax.servlet.http.HttpServlet (HttpServlet.java:637)
         at  javax.servlet.http.HttpServlet (HttpServlet.java:717)
         at  org.apache.catalina.core.ApplicationFilterChain (ApplicationFilterChain.java:290)
         at  org.apache.catalina.core.ApplicationFilterChain (ApplicationFilterChain.java:206)
         at  org.apache.catalina.core.StandardWrapperValve (StandardWrapperValve.java:233)
         at  org.apache.catalina.core.StandardContextValve (StandardContextValve.java:191)
         at  org.apache.catalina.core.StandardHostValve (StandardHostValve.java:127)
         at  org.apache.catalina.valves.ErrorReportValve (ErrorReportValve.java:102)
         at  org.apache.catalina.core.StandardEngineValve (StandardEngineValve.java:109)
         at  org.apache.catalina.connector.CoyoteAdapter (CoyoteAdapter.java:293)
         at  org.apache.coyote.http11.Http11Processor (Http11Processor.java:859)
         at  org.apache.coyote.http11.Http11P