<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Sqoop to SQL Server with Integrated Security in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Sqoop-to-SQL-Server-with-Integrated-Security/m-p/317331#M227126</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/28207"&gt;@Onedile&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;Yes this is possible.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You need to kinit with the username that has been granted access to the SQL server DB and tables.&amp;nbsp; integrated security passes your credentials to the SQL server using kerberos&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"jdbc:sqlserver://sername.domain.co.za:1433;integratedSecurity=true;databaseName=SCHEMA;authenticationScheme=JavaKerberos;"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This worked for me.&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;It doesn't work, it's still facing issue with the latest MSSQL JDBC driver as the Kerberos tokens are lost when the mappers spawn (as the YARN transitions the job to its internal security subsystem)&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;21/05/29 19:00:40 INFO mapreduce.JobSubmitter: Submitting tokens for job: job_1616335290043_2743822
21/05/29 19:00:40 INFO mapreduce.JobSubmitter: Executing with tokens: [Kind: HDFS_DELEGATION_TOKEN, Service: ha-hdfs:nameservice1, Ident: (token for c795701: HDFS_DELEGATION_TOKEN owner=c795701@XX.XXXX.XXXXXXX.COM, renewer=yarn, realUser=, issueDate=1622314832608, maxDate=1622919632608, sequenceNumber=29194128, masterKeyId=1856)]

21/05/29 19:01:15 INFO mapreduce.Job: Task Id : attempt_1616335290043_2743822_m_000000_0, Status : FAILED
Error: java.lang.RuntimeException: java.lang.RuntimeException: com.microsoft.sqlserver.jdbc.SQLServerException: Integrated authentication failed. ClientConnectionId:53879236-81e7-4fc6-88b9-c7118c02e7be

Caused by: java.security.PrivilegedActionException: GSSException: No valid credentials provided (Mechanism level: Failed to find any Kerberos tgt)
Caused by: GSSException: No valid credentials provided (Mechanism level: Failed to find any Kerberos tgt)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Use&amp;nbsp;&lt;SPAN&gt;the jtds driver as recommended &lt;A href="https://community.cloudera.com/t5/Support-Questions/Sqoop-with-sql-server-driver-eval-and-list-tables-are/m-p/163699#" target="_self"&gt;here&lt;/A&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 29 May 2021 21:37:21 GMT</pubDate>
    <dc:creator>balucr</dc:creator>
    <dc:date>2021-05-29T21:37:21Z</dc:date>
    <item>
      <title>Sqoop to SQL Server with Integrated Security</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Sqoop-to-SQL-Server-with-Integrated-Security/m-p/106208#M69086</link>
      <description>&lt;P&gt;I need to use sqoop on linux to pull data from SQL Server running with integrated security. Can anyone confirm that they have made this work  with HDP 2.3.4 and share the steps? &lt;/P&gt;</description>
      <pubDate>Wed, 02 Mar 2016 17:19:13 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Sqoop-to-SQL-Server-with-Integrated-Security/m-p/106208#M69086</guid>
      <dc:creator>awhitter</dc:creator>
      <dc:date>2016-03-02T17:19:13Z</dc:date>
    </item>
    <item>
      <title>Re: Sqoop to SQL Server with Integrated Security</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Sqoop-to-SQL-Server-with-Integrated-Security/m-p/106209#M69087</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/54/awhitter.html" nodeid="54"&gt;@awhitter&lt;/A&gt;&lt;P&gt;See this  &lt;A href="https://alexeikh.wordpress.com/2012/05/03/using-sqoop-for-moving-data-between-hadoop-and-sql-server/" target="_blank"&gt;https://alexeikh.wordpress.com/2012/05/03/using-sqoop-for-moving-data-between-hadoop-and-sql-server/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;You can run sqoop in linux and read sql server to get data into Hadoop&lt;/P&gt;&lt;P&gt;Aslo,&lt;/P&gt;&lt;P&gt;&lt;A href="https://sqoop.apache.org/docs/1.4.3/SqoopUserGuide.html" target="_blank"&gt;https://sqoop.apache.org/docs/1.4.3/SqoopUserGuide.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;For example, to connect to a SQLServer database, first download the driver from microsoft.com and install it in your Sqoop lib path.&lt;/P&gt;&lt;P&gt;Then run Sqoop. For example:&lt;/P&gt;&lt;PRE&gt;$ sqoop import --driver com.microsoft.jdbc.sqlserver.SQLServerDriver \
    --connect &amp;lt;connect-string&amp;gt; ...&lt;/PRE&gt;&lt;P&gt;When connecting to a database using JDBC, you can optionally specify extra JDBC parameters via a property file using the option &lt;CODE&gt;--connection-param-file&lt;/CODE&gt;. The contents of this file are parsed as standard Java properties and passed into the driver while creating a connection.&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;IMG alt="[Note&amp;gt;" src="https://ip1.i.lithium.com/581d9ebe5e91323eceb983d58192ab14a5a31dc8/68747470733a2f2f73716f6f702e6170616368652e6f72672f646f63732f312e342e332f696d616765732f6e6f74652e706e67" /&gt;&lt;/TD&gt;&lt;TH&gt;Note&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;The parameters specified via the optional property file are only applicable to JDBC connections. Any fastpath connectors that use connections other than JDBC will ignore these parameters.&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Wed, 02 Mar 2016 17:27:58 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Sqoop-to-SQL-Server-with-Integrated-Security/m-p/106209#M69087</guid>
      <dc:creator>nsabharwal</dc:creator>
      <dc:date>2016-03-02T17:27:58Z</dc:date>
    </item>
    <item>
      <title>Re: Sqoop to SQL Server with Integrated Security</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Sqoop-to-SQL-Server-with-Integrated-Security/m-p/106210#M69088</link>
      <description>&lt;P&gt;Thanks Neeraj - how does this help with integrated security?&lt;/P&gt;</description>
      <pubDate>Wed, 02 Mar 2016 17:33:11 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Sqoop-to-SQL-Server-with-Integrated-Security/m-p/106210#M69088</guid>
      <dc:creator>awhitter</dc:creator>
      <dc:date>2016-03-02T17:33:11Z</dc:date>
    </item>
    <item>
      <title>Re: Sqoop to SQL Server with Integrated Security</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Sqoop-to-SQL-Server-with-Integrated-Security/m-p/106211#M69089</link>
      <description>&lt;P&gt;Please see this &lt;A href="https://community.hortonworks.com/questions/7433/how-to-impot-job-on-sqoop-from-sql-server-connecti.html" target="_blank"&gt;https://community.hortonworks.com/questions/7433/how-to-impot-job-on-sqoop-from-sql-server-connecti.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Mar 2016 18:06:54 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Sqoop-to-SQL-Server-with-Integrated-Security/m-p/106211#M69089</guid>
      <dc:creator>aervits</dc:creator>
      <dc:date>2016-03-02T18:06:54Z</dc:date>
    </item>
    <item>
      <title>Re: Sqoop to SQL Server with Integrated Security</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Sqoop-to-SQL-Server-with-Integrated-Security/m-p/106212#M69090</link>
      <description>&lt;P&gt;  &lt;A rel="user" href="https://community.cloudera.com/users/54/awhitter.html" nodeid="54"&gt;@awhitter&lt;/A&gt; as far as I know this is not possible. You will have to use SQL Authentication. If security is a concern, you can store the password in a encrypted file and call the file in the Sqoop -import command. If you are unable to change the authentication settings on SQL Server due to corporate policies, you may need to dump the tables as files first and import them directly into Hive.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Mar 2016 05:05:39 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Sqoop-to-SQL-Server-with-Integrated-Security/m-p/106212#M69090</guid>
      <dc:creator>SQLShaw</dc:creator>
      <dc:date>2016-03-03T05:05:39Z</dc:date>
    </item>
    <item>
      <title>Re: Sqoop to SQL Server with Integrated Security</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Sqoop-to-SQL-Server-with-Integrated-Security/m-p/106213#M69091</link>
      <description>&lt;P&gt;I am also waiting the same problem with jbdc42.jar and below is the error stack -&lt;/P&gt;&lt;PRE&gt;16/03/17 15:51:39 ERROR sqoop.Sqoop: Got exception running Sqoop: java.lang.RuntimeException: com.microsoft.sqlserver.jdbc.SQLServerException: This driver is not configured for integrated authentication.
java.lang.RuntimeException: com.microsoft.sqlserver.jdbc.SQLServerException: This driver is not configured for integrated authentication.
  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:148)
  at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
  at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:184)
  at org.apache.sqoop.Sqoop.runTool(Sqoop.java:226)
  at org.apache.sqoop.Sqoop.runTool(Sqoop.java:235)
  at org.apache.sqoop.Sqoop.main(Sqoop.java:244)
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: This driver is not configured for integrated authentication.
  at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:170)
  at com.microsoft.sqlserver.jdbc.SQLServerConnection.sendLogon(SQLServerConnection.java:2338)
  at com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(SQLServerConnection.java:1929)
  at com.microsoft.sqlserver.jdbc.SQLServerConnection.access$000(SQLServerConnection.java:41)
  at com.microsoft.sqlserver.jdbc.SQLServerConnection$LogonCommand.doExecute(SQLServerConnection.java:1917)
  at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:4026)
  at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1416)
  at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:1061)
  at com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:833)
  at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:716)
  at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:841)
  at java.sql.DriverManager.getConnection(DriverManager.java:571)
  at java.sql.DriverManager.getConnection(DriverManager.java:233)
  at org.apache.sqoop.manager.SqlManager.makeConnection(SqlManager.java:883)
  at org.apache.sqoop.manager.GenericJdbcManager.getConnection(GenericJdbcManager.java:52)
  at org.apache.sqoop.manager.CatalogQueryManager.listTables(CatalogQueryManager.java:102)
  ... 7 more&lt;/PRE&gt;&lt;P&gt;Can some one please help ? &lt;/P&gt;</description>
      <pubDate>Thu, 17 Mar 2016 22:22:37 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Sqoop-to-SQL-Server-with-Integrated-Security/m-p/106213#M69091</guid>
      <dc:creator>rohit_sureka</dc:creator>
      <dc:date>2016-03-17T22:22:37Z</dc:date>
    </item>
    <item>
      <title>Re: Sqoop to SQL Server with Integrated Security</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Sqoop-to-SQL-Server-with-Integrated-Security/m-p/106214#M69092</link>
      <description>&lt;P&gt;Sqoop currently does not support SSO. I got an individual use created and now it works. Thanks &lt;/P&gt;</description>
      <pubDate>Tue, 29 Mar 2016 11:39:58 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Sqoop-to-SQL-Server-with-Integrated-Security/m-p/106214#M69092</guid>
      <dc:creator>rohit_sureka</dc:creator>
      <dc:date>2016-03-29T11:39:58Z</dc:date>
    </item>
    <item>
      <title>Re: Sqoop to SQL Server with Integrated Security</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Sqoop-to-SQL-Server-with-Integrated-Security/m-p/106215#M69093</link>
      <description>&lt;P&gt;It does not address the integrated authentication problem.
Has anyone tried this one instead? &lt;/P&gt;&lt;P&gt;&lt;A href="https://datamountaineer.com/2016/01/15/spark-jdbc-sql-server-kerberos/"&gt;https://datamountaineer.com/2016/01/15/spark-jdbc-sql-server-kerberos/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Aug 2016 15:48:30 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Sqoop-to-SQL-Server-with-Integrated-Security/m-p/106215#M69093</guid>
      <dc:creator>anar</dc:creator>
      <dc:date>2016-08-05T15:48:30Z</dc:date>
    </item>
    <item>
      <title>Re: Sqoop to SQL Server with Integrated Security</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Sqoop-to-SQL-Server-with-Integrated-Security/m-p/106216#M69094</link>
      <description>&lt;P&gt;I am running into the same problem. Tried by passing the driver --driver "com.microsoft.sqlserver.jdbc.SQLServerDriver" along with the sqoop command and get this error. &lt;/P&gt;&lt;P&gt;Error executing statement: com.microsoft.sqlserver.jdbc.SQLServerException: Integrated authentication failed. ClientConnectionId:&lt;/P&gt;&lt;P&gt;Can anyone help, if this is resolved.&lt;/P&gt;</description>
      <pubDate>Sat, 13 Aug 2016 02:51:55 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Sqoop-to-SQL-Server-with-Integrated-Security/m-p/106216#M69094</guid>
      <dc:creator>kushalkhera06</dc:creator>
      <dc:date>2016-08-13T02:51:55Z</dc:date>
    </item>
    <item>
      <title>Re: Sqoop to SQL Server with Integrated Security</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Sqoop-to-SQL-Server-with-Integrated-Security/m-p/106217#M69095</link>
      <description>&lt;P&gt;I am running into the same problem. Tried by passing the driver --driver "com.microsoft.sqlserver.jdbc.SQLServerDriver" along with the sqoop command and get this error.&lt;/P&gt;&lt;P&gt;Error executing statement: com.microsoft.sqlserver.jdbc.SQLServerException: Integrated authentication failed. ClientConnectionId:&lt;/P&gt;&lt;P&gt;Can anyone help, if this is resolved.&lt;/P&gt;</description>
      <pubDate>Sat, 13 Aug 2016 02:52:05 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Sqoop-to-SQL-Server-with-Integrated-Security/m-p/106217#M69095</guid>
      <dc:creator>kushalkhera06</dc:creator>
      <dc:date>2016-08-13T02:52:05Z</dc:date>
    </item>
    <item>
      <title>Re: Sqoop to SQL Server with Integrated Security</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Sqoop-to-SQL-Server-with-Integrated-Security/m-p/106218#M69096</link>
      <description>&lt;P&gt;Integrated authentication does not work with SQLServer even in a secure cluster with AD integration as the containers will not have the context (even in secure windows clusters, the impersonation level does not support this)&lt;/P&gt;&lt;P&gt;You can use the password alias (which makes use of the Hadoop credentials support) to use SQL server authentication without exposing the passwords. &lt;/P&gt;</description>
      <pubDate>Fri, 02 Sep 2016 20:47:25 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Sqoop-to-SQL-Server-with-Integrated-Security/m-p/106218#M69096</guid>
      <dc:creator>vranganathan</dc:creator>
      <dc:date>2016-09-02T20:47:25Z</dc:date>
    </item>
    <item>
      <title>Re: Sqoop to SQL Server with Integrated Security</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Sqoop-to-SQL-Server-with-Integrated-Security/m-p/106219#M69097</link>
      <description>&lt;P&gt;I am interested too, we have been advised to use either Progress DataDirect driver or the JTDC Driver&lt;/P&gt;</description>
      <pubDate>Mon, 12 Sep 2016 20:28:45 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Sqoop-to-SQL-Server-with-Integrated-Security/m-p/106219#M69097</guid>
      <dc:creator>mark_johnson3</dc:creator>
      <dc:date>2016-09-12T20:28:45Z</dc:date>
    </item>
    <item>
      <title>Re: Sqoop to SQL Server with Integrated Security</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Sqoop-to-SQL-Server-with-Integrated-Security/m-p/106220#M69098</link>
      <description>&lt;P&gt;I spent months on this and was told by Cloudera that it is just not possible. The kerberos tokens are lost when the mappers spawn (as the YARN transitions the job to its internal security subsystem).&lt;/P&gt;&lt;P&gt;I think this is something that would have to be added to Sqoop itself, much like HBase mapreduce jobs have to pass job config to mappers in the code Sqoop able to do the same.&lt;/P&gt;&lt;P&gt;I spent weeks trying different things, doing network traces (all my servers are tied to AD with Centrify, ext), watched the token drop, and finally found a paper written by Yahoo about YARN that explains the internal token subsystem it uses (after using Kerberos to externally verify someone it moves to different token based subsystem for performance). &lt;/P&gt;&lt;P&gt;My company would be willing to pay some $$ to get this working. All our data is being held hostage in SQL Server (from a company we are merging with). &lt;/P&gt;</description>
      <pubDate>Fri, 10 Feb 2017 02:19:17 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Sqoop-to-SQL-Server-with-Integrated-Security/m-p/106220#M69098</guid>
      <dc:creator>mageru</dc:creator>
      <dc:date>2017-02-10T02:19:17Z</dc:date>
    </item>
    <item>
      <title>Re: Sqoop to SQL Server with Integrated Security</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Sqoop-to-SQL-Server-with-Integrated-Security/m-p/106221#M69099</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/15769/justinmiller.html" nodeid="15769"&gt;@Justin Miller&lt;/A&gt;I too faced the same problem, finally i resolved the issue with the below mention procedure,it may help you i hope.&lt;/P&gt;&lt;P&gt;Sqoop SQL Server data import to
HDFS worked with manual parametric the authentication(using windows credential) with added parameter on the SQL
Server JDBC driver, as integrated security is not supported by the SQL driver
as of now due to the Kerberos authentication(Delegated tokens distributed over cluster while running MR job).&lt;/P&gt;&lt;P&gt;So we need to pass the windows
authentication with password and with the integrated security disabled mode to
import the data to the system. As normal SQL server
driver does not support, so I had used the jtds.jar
and the different driver class to pull the data to the Hadoop Lake.&lt;/P&gt;&lt;P&gt;Sample Command I tried on the
server as follows,&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;sqoop import --table Table1 --connect
"jdbc:jtds:sqlserver://&amp;lt;Hostname&amp;gt;:&amp;lt;Port&amp;gt;;useNTLMv2=true;domain=&amp;lt;WindowsDomainName&amp;gt;;databaseName=XXXXXXXXXXXXX"
\&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;--connection-manager
org.apache.sqoop.manager.SQLServerManager --driver
net.sourceforge.jtds.jdbc.Driver --username XXXXX --password 'XXXXXXX' \&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;--verbose --target-dir
/tmp/33 -m 1 -- --schema dbo&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Feb 2017 15:38:05 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Sqoop-to-SQL-Server-with-Integrated-Security/m-p/106221#M69099</guid>
      <dc:creator>rajsyrus</dc:creator>
      <dc:date>2017-02-10T15:38:05Z</dc:date>
    </item>
    <item>
      <title>Re: Sqoop to SQL Server with Integrated Security</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Sqoop-to-SQL-Server-with-Integrated-Security/m-p/106222#M69100</link>
      <description>&lt;P&gt;Greetings Rajendra,&lt;/P&gt;&lt;P&gt;You have saved my life, your solution works!!! We have spent two years on this thinking there was no way to get Sqoop working, I want to buy you a drink!!&lt;/P&gt;</description>
      <pubDate>Tue, 14 Mar 2017 02:04:58 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Sqoop-to-SQL-Server-with-Integrated-Security/m-p/106222#M69100</guid>
      <dc:creator>mageru</dc:creator>
      <dc:date>2017-03-14T02:04:58Z</dc:date>
    </item>
    <item>
      <title>Re: Sqoop to SQL Server with Integrated Security</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Sqoop-to-SQL-Server-with-Integrated-Security/m-p/106223#M69101</link>
      <description>&lt;P&gt;I have found a solution to this provided by another user here: &lt;A href="https://community.hortonworks.com/questions/20719/sqoop-to-sql-server-with-integrated-security.html"&gt;https://community.hortonworks.com/questions/20719/sqoop-to-sql-server-with-integrated-security.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Basically if you switch to the jtds driver which you can download here: &lt;A href="http://jtds.sourceforge.net/"&gt;http://jtds.sourceforge.net&lt;/A&gt;/&lt;/P&gt;&lt;P&gt;Per &lt;A href="https://community.hortonworks.com/users/3729/rajsyrus.html"&gt;Rajendra Manjunath&lt;/A&gt;&lt;/P&gt;&lt;P&gt;"&lt;/P&gt;&lt;P&gt;Sqoop SQL Server data import to HDFS worked with manual parametric the authentication(using windows credential) with added parameter on the SQL Server JDBC driver, as integrated security is not supported by the SQL driver as of now due to the Kerberos authentication(Delegated tokens distributed over cluster while running MR job).&lt;/P&gt;&lt;P&gt;So we need to pass the windows authentication with password and with the integrated security disabled mode to import the data to the system. As normal SQL server driver does not support, so I had used the jtds.jar and the different driver class to pull the data to the Hadoop Lake.&lt;/P&gt;&lt;P&gt;Sample Command I tried on the server as follows,&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;sqoop import --table Table1 --connect "jdbc:jtds:sqlserver://&amp;lt;Hostname&amp;gt;:&amp;lt;Port&amp;gt;;useNTLMv2=true;domain=&amp;lt;WindowsDomainName&amp;gt;;databaseName=XXXXXXXXXXXXX" \&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;--connection-manager org.apache.sqoop.manager.SQLServerManager --driver net.sourceforge.jtds.jdbc.Driver --username XXXXX --password 'XXXXXXX' \&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;--verbose --target-dir /tmp/33 -m 1 -- --schema dbo&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Here are some examples that worked for me:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;# List databases&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;sqoop list-databases --connect "jdbc:jtds:&lt;A href="http://myactivedirectorydomain.com/"&gt;myactivedirectorydomain.com&lt;/A&gt;" --connection-manager org.apache.sqoop.manager.SQLServerManager --driver net.sourceforge.jtds.jdbc.Driver --username XXXXX -P&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;# List tables&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;sqoop list-tables --connect "jdbc:jtds:&lt;A href="http://myactivedirectorydomain.com/"&gt;myactivedirectorydomain.com&lt;/A&gt;;databaseName=DATABASENAMEHERE" --connection-manager org.apache.sqoop.manager.SQLServerManager --driver net.sourceforge.jtds.jdbc.Driver --username jmiller.admin -P&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;# Pull data example&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;sqoop import --table TABLENAMEHERE --connect "jdbc:jtds:&lt;A href="http://myactivedirectorydomain.com/"&gt;myactivedirectorydomain.com&lt;/A&gt;;databaseName=DATABASENAMEHERE" --connection-manager org.apache.sqoop.manager.SQLServerManager --driver net.sourceforge.jtds.jdbc.Driver --username XXXXX -P --fields-terminated-by '\001' --target-dir /user/XXXXX/20170313 -m 1 -- --schema dbo&lt;/P&gt;&lt;P style="margin-left: 20px;"&gt;Note* In the above example you need to change the username to your username and database name in the list-tables or pull to the one you need (note the AD account you use will require access to the data).&lt;/P&gt;</description>
      <pubDate>Tue, 14 Mar 2017 10:54:27 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Sqoop-to-SQL-Server-with-Integrated-Security/m-p/106223#M69101</guid>
      <dc:creator>mageru</dc:creator>
      <dc:date>2017-03-14T10:54:27Z</dc:date>
    </item>
    <item>
      <title>Re: Sqoop to SQL Server with Integrated Security</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Sqoop-to-SQL-Server-with-Integrated-Security/m-p/106224#M69102</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/15769/justinmiller.html" nodeid="15769"&gt;@Justin Miller&lt;/A&gt;Thank you..!!!&lt;/P&gt;&lt;P&gt;This Hortonwork community blog is for mutual knowledge exchange for solving problems, should appreciate all for their time in answering our question.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Mar 2017 12:08:58 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Sqoop-to-SQL-Server-with-Integrated-Security/m-p/106224#M69102</guid>
      <dc:creator>rajsyrus</dc:creator>
      <dc:date>2017-03-14T12:08:58Z</dc:date>
    </item>
    <item>
      <title>Re: Sqoop to SQL Server with Integrated Security</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Sqoop-to-SQL-Server-with-Integrated-Security/m-p/106225#M69103</link>
      <description>&lt;P&gt;It works, Thank you!!&lt;/P&gt;</description>
      <pubDate>Fri, 02 Jun 2017 02:54:42 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Sqoop-to-SQL-Server-with-Integrated-Security/m-p/106225#M69103</guid>
      <dc:creator>gandra</dc:creator>
      <dc:date>2017-06-02T02:54:42Z</dc:date>
    </item>
    <item>
      <title>Re: Sqoop to SQL Server with Integrated Security</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Sqoop-to-SQL-Server-with-Integrated-Security/m-p/295905#M218023</link>
      <description>&lt;P&gt;Yes this is possible.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You need to kinit with the username that has been granted access to the SQL server DB and tables.&amp;nbsp; integrated security passes your credentials to the SQL server using kerberos&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"jdbc:sqlserver://sername.domain.co.za:1433;integratedSecurity=true;databaseName=SCHEMA;authenticationScheme=JavaKerberos;"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This worked for me.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 May 2020 06:56:10 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Sqoop-to-SQL-Server-with-Integrated-Security/m-p/295905#M218023</guid>
      <dc:creator>Onedile</dc:creator>
      <dc:date>2020-05-14T06:56:10Z</dc:date>
    </item>
    <item>
      <title>Re: Sqoop to SQL Server with Integrated Security</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Sqoop-to-SQL-Server-with-Integrated-Security/m-p/317331#M227126</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/28207"&gt;@Onedile&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;Yes this is possible.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You need to kinit with the username that has been granted access to the SQL server DB and tables.&amp;nbsp; integrated security passes your credentials to the SQL server using kerberos&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"jdbc:sqlserver://sername.domain.co.za:1433;integratedSecurity=true;databaseName=SCHEMA;authenticationScheme=JavaKerberos;"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This worked for me.&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;It doesn't work, it's still facing issue with the latest MSSQL JDBC driver as the Kerberos tokens are lost when the mappers spawn (as the YARN transitions the job to its internal security subsystem)&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;21/05/29 19:00:40 INFO mapreduce.JobSubmitter: Submitting tokens for job: job_1616335290043_2743822
21/05/29 19:00:40 INFO mapreduce.JobSubmitter: Executing with tokens: [Kind: HDFS_DELEGATION_TOKEN, Service: ha-hdfs:nameservice1, Ident: (token for c795701: HDFS_DELEGATION_TOKEN owner=c795701@XX.XXXX.XXXXXXX.COM, renewer=yarn, realUser=, issueDate=1622314832608, maxDate=1622919632608, sequenceNumber=29194128, masterKeyId=1856)]

21/05/29 19:01:15 INFO mapreduce.Job: Task Id : attempt_1616335290043_2743822_m_000000_0, Status : FAILED
Error: java.lang.RuntimeException: java.lang.RuntimeException: com.microsoft.sqlserver.jdbc.SQLServerException: Integrated authentication failed. ClientConnectionId:53879236-81e7-4fc6-88b9-c7118c02e7be

Caused by: java.security.PrivilegedActionException: GSSException: No valid credentials provided (Mechanism level: Failed to find any Kerberos tgt)
Caused by: GSSException: No valid credentials provided (Mechanism level: Failed to find any Kerberos tgt)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Use&amp;nbsp;&lt;SPAN&gt;the jtds driver as recommended &lt;A href="https://community.cloudera.com/t5/Support-Questions/Sqoop-with-sql-server-driver-eval-and-list-tables-are/m-p/163699#" target="_self"&gt;here&lt;/A&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 29 May 2021 21:37:21 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Sqoop-to-SQL-Server-with-Integrated-Security/m-p/317331#M227126</guid>
      <dc:creator>balucr</dc:creator>
      <dc:date>2021-05-29T21:37:21Z</dc:date>
    </item>
  </channel>
</rss>

