Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

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


Copy link to this message
-
AW: How do I select the database when connecting to SQL SERVER ?
Hello Abraham,

thanks for the reply!

That seems to mostly work. Sqoop doesn't like my DB Name it seems as it worked with a different DB.

I'll see if I can find a pattern and possibly submit a bug report at Apache.

Thank you again!

Chris

--

initions AG
Christos Kallinteris
Weidestraße 120a
D-22083 Hamburg

t:   +49 (0) 40 / 41 49 60-79
f:   +49 (0) 40 / 41 49 60-11
e:  [EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>
w: www.initions.com<http://www.initions.com/>
Vollständiger Name der Gesellschaft: initions innovative IT solutions AG
Sitz der Gesellschaft: Hamburg
Handelsregister Hamburg B 83929
Aufsichtsratsvorsitzender: Dr. Michael Leue
Vorstand: Dr. Stefan Anschütz, André Paul Henkel, Dr. Helge Plehn

Von: Abraham Elmahrek [mailto:[EMAIL PROTECTED]]
Gesendet: Donnerstag, 5. September 2013 20:07
An: [EMAIL PROTECTED]
Betreff: Re: How do I select the database when connecting to SQL SERVER ?

Hey User,

Based on http://technet.microsoft.com/en-us/library/aa342339.aspx it seems like your connection URL should look like this: "jdbc:sqlserver://localhost:1433;databaseName=AdventureWorks;user=UserName;password=*****"

On Thu, Sep 5, 2013 at 6:53 AM, Kallinteris, Christos <[EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>> wrote:
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 (Submiss
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB