Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Importing with Sqoop using MSSQL driver

Highlighted

Importing with Sqoop using MSSQL driver

New Contributor

I was following the steps to add the MsSQL driver and I was checking if wondering if I did it right. When I tried to do a sqoop list-tables, I got this error:

 

ERROR manager.CatalogQueryManager: Failed to list tables

com.microsoft.sqlserver.jdbc.SQLServerException: Cannot open database "DBName" requested by the login. The login failed. ClientConnectionId:4a7921cd-eb61-4af3-9b88-7b363f81af74

at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:258)

at com.microsoft.sqlserver.jdbc.TDSTokenHandler.onEOF(tdsparser.java:256)

at com.microsoft.sqlserver.jdbc.TDSParser.parse(tdsparser.java:108)

at com.microsoft.sqlserver.jdbc.SQLServerConnection.sendLogon(SQLServerConnection.java:4290)

at com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(SQLServerConnection.java:3157)

at com.microsoft.sqlserver.jdbc.SQLServerConnection.access$100(SQLServerConnection.java:82)

at com.microsoft.sqlserver.jdbc.SQLServerConnection$LogonCommand.doExecute(SQLServerConnection.java:3121)

at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:7151)

at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:2478)

at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:2026)

at com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:1687)

at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectInternal(SQLServerConnection.java:1528)

at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:866)

at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:569)

at java.sql.DriverManager.getConnection(DriverManager.java:664)

at java.sql.DriverManager.getConnection(DriverManager.java:247)

at org.apache.sqoop.manager.SqlManager.makeConnection(SqlManager.java:903)

at org.apache.sqoop.manager.GenericJdbcManager.getConnection(GenericJdbcManager.java:59)

at org.apache.sqoop.manager.CatalogQueryManager.listTables(CatalogQueryManager.java:102)

at org.apache.sqoop.tool.ListTablesTool.run(ListTablesTool.java:49)

at org.apache.sqoop.Sqoop.run(Sqoop.java:146)

at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:76)

at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:182)

at org.apache.sqoop.Sqoop.runTool(Sqoop.java:233)

at org.apache.sqoop.Sqoop.runTool(Sqoop.java:242)

at org.apache.sqoop.Sqoop.main(Sqoop.java:251)

19/09/03 10:39:47 ERROR sqoop.Sqoop: Got exception running Sqoop: java.lang.RuntimeException: com.microsoft.sqlserver.jdbc.SQLServerException: Cannot open database "DBName" requested by the login. The login failed. ClientConnectionId:4a7921cd-eb61-4af3-9b88-7b363f81af74

java.lang.RuntimeException: com.microsoft.sqlserver.jdbc.SQLServerException: Cannot open database "SSO_Warehouse" requested by the login. The login failed. ClientConnectionId:4a7921cd-eb61-4af3-9b88-7b363f81af74

at org.apache.sqoop.manager.CatalogQueryManager.listTables(CatalogQueryManager.java:118)

at org.apache.sqoop.tool.ListTablesTool.run(ListTablesTool.java:49)

at org.apache.sqoop.Sqoop.run(Sqoop.java:146)

at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:76)

at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:182)

at org.apache.sqoop.Sqoop.runTool(Sqoop.java:233)

at org.apache.sqoop.Sqoop.runTool(Sqoop.java:242)

at org.apache.sqoop.Sqoop.main(Sqoop.java:251)

Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Cannot open database "DBName" requested by the login. The login failed. ClientConnectionId:4a7921cd-eb61-4af3-9b88-7b363f81af74

at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:258)

at com.microsoft.sqlserver.jdbc.TDSTokenHandler.onEOF(tdsparser.java:256)

at com.microsoft.sqlserver.jdbc.TDSParser.parse(tdsparser.java:108)

at com.microsoft.sqlserver.jdbc.SQLServerConnection.sendLogon(SQLServerConnection.java:4290)

at com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(SQLServerConnection.java:3157)

at com.microsoft.sqlserver.jdbc.SQLServerConnection.access$100(SQLServerConnection.java:82)

at com.microsoft.sqlserver.jdbc.SQLServerConnection$LogonCommand.doExecute(SQLServerConnection.java:3121)

at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:7151)

at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:2478)

at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:2026)

at com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:1687)

at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectInternal(SQLServerConnection.java:1528)

at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:866)

at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:569)

at java.sql.DriverManager.getConnection(DriverManager.java:664)

at java.sql.DriverManager.getConnection(DriverManager.java:247)

at org.apache.sqoop.manager.SqlManager.makeConnection(SqlManager.java:903)

at org.apache.sqoop.manager.GenericJdbcManager.getConnection(GenericJdbcManager.java:59)

at org.apache.sqoop.manager.CatalogQueryManager.listTables(CatalogQueryManager.java:102)

... 7 more

 

 

I am not sure if I messed up downloading the and installing the driver or I just cannot connect to the DB servers.

 

Thanks.