<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: How To: SQL Server Bulk Insert with Constrained Delegation (Access is Denied)</title>
	<atom:link href="http://thesqldude.com/2011/12/30/how-to-sql-server-bulk-insert-with-constrained-delegation-access-is-denied/feed/" rel="self" type="application/rss+xml" />
	<link>http://thesqldude.com/2011/12/30/how-to-sql-server-bulk-insert-with-constrained-delegation-access-is-denied/</link>
	<description>Pages that teach you the SQL way of life!</description>
	<lastBuildDate>Sat, 06 Apr 2013 10:56:55 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: me7hos</title>
		<link>http://thesqldude.com/2011/12/30/how-to-sql-server-bulk-insert-with-constrained-delegation-access-is-denied/#comment-886</link>
		<dc:creator><![CDATA[me7hos]]></dc:creator>
		<pubDate>Thu, 14 Mar 2013 22:00:14 +0000</pubDate>
		<guid isPermaLink="false">https://thesqldude.wordpress.com/?p=178#comment-886</guid>
		<description><![CDATA[In the testing section, shouldn&#039;t the screenshot show the connection coming from TRINITY1 instead of MORPHEUS1 since it was stated that the connection should be made from the client machine?]]></description>
		<content:encoded><![CDATA[<p>In the testing section, shouldn&#8217;t the screenshot show the connection coming from TRINITY1 instead of MORPHEUS1 since it was stated that the connection should be made from the client machine?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: eddy</title>
		<link>http://thesqldude.com/2011/12/30/how-to-sql-server-bulk-insert-with-constrained-delegation-access-is-denied/#comment-761</link>
		<dc:creator><![CDATA[eddy]]></dc:creator>
		<pubDate>Fri, 11 Jan 2013 16:16:13 +0000</pubDate>
		<guid isPermaLink="false">https://thesqldude.wordpress.com/?p=178#comment-761</guid>
		<description><![CDATA[The scenario/requirement here is:

&#039;In an ideal scenario, here is how I want things to work. When a client application runs the SQL BULK INSERT command logged in as Domain\appadmin account to SQL Server, I want the same appadmin account to access the remote file share and read the data. 

1. If a user uses a SQL Server login to connect to SQL, then the SQL Service account credentials are used to access the remote file share.

2. If a user uses a Windows account, then his own account is used to access the file share and for this to work successfully, delegation has to be configured.&#039;

If the requirement is:

1. the application uses a specific Domain\SQL_ACCT_ID to access SQL2008/R2 
2. the application uses a specific Domain\Windows_ACCT_ID through impersonation to read/write files in File Share through Bulk Insert command.

Can we use the same delegation setting to make it work?   
If not, what are the alterations?

Thanks.]]></description>
		<content:encoded><![CDATA[<p>The scenario/requirement here is:</p>
<p>&#8216;In an ideal scenario, here is how I want things to work. When a client application runs the SQL BULK INSERT command logged in as Domain\appadmin account to SQL Server, I want the same appadmin account to access the remote file share and read the data. </p>
<p>1. If a user uses a SQL Server login to connect to SQL, then the SQL Service account credentials are used to access the remote file share.</p>
<p>2. If a user uses a Windows account, then his own account is used to access the file share and for this to work successfully, delegation has to be configured.&#8217;</p>
<p>If the requirement is:</p>
<p>1. the application uses a specific Domain\SQL_ACCT_ID to access SQL2008/R2<br />
2. the application uses a specific Domain\Windows_ACCT_ID through impersonation to read/write files in File Share through Bulk Insert command.</p>
<p>Can we use the same delegation setting to make it work?<br />
If not, what are the alterations?</p>
<p>Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sudarshan Narasimhan</title>
		<link>http://thesqldude.com/2011/12/30/how-to-sql-server-bulk-insert-with-constrained-delegation-access-is-denied/#comment-595</link>
		<dc:creator><![CDATA[Sudarshan Narasimhan]]></dc:creator>
		<pubDate>Tue, 27 Nov 2012 17:14:15 +0000</pubDate>
		<guid isPermaLink="false">https://thesqldude.wordpress.com/?p=178#comment-595</guid>
		<description><![CDATA[Hi Julia,

I must&#039;ve missed this comment earlier. Regarding your question on Delegation when SQL is running under a built-in account like Local System, please check if Delegation has been setup as described in my post.
When SQL Server is running under [NT AUTHORITY\SYSTEM], you need to enable delegation for the machine account, which in this case would be the SQL Server machine. The machine account e.g. DOMAIN\SQLMACHINE$ will be used to pass on your windows credentials when accessing the share. For LocalSystem SQL Server self-registers SPN during startup. Check the errorlog to see if this happening or SPN Registration is throwing errors.

Find the Computer Object for the SQL Server machine in AD and set the option “Trust this computer for delegation”. Also, the file share/file server where the file is located, you need to check if the 2 HOST SPN&#039;s are present. E.g. If the machine name where the file is located is FSHARE1, then you should see 2 spn&#039;s called HOST/FSHARE1 and HOST/FSHARE1.corp.domain.com. The HOST SPN&#039;s are required because CIFS is covered under this.

Note: All of the above is assuming you are setting up unconstrained delegation (to any service).]]></description>
		<content:encoded><![CDATA[<p>Hi Julia,</p>
<p>I must&#8217;ve missed this comment earlier. Regarding your question on Delegation when SQL is running under a built-in account like Local System, please check if Delegation has been setup as described in my post.<br />
When SQL Server is running under [NT AUTHORITY\SYSTEM], you need to enable delegation for the machine account, which in this case would be the SQL Server machine. The machine account e.g. DOMAIN\SQLMACHINE$ will be used to pass on your windows credentials when accessing the share. For LocalSystem SQL Server self-registers SPN during startup. Check the errorlog to see if this happening or SPN Registration is throwing errors.</p>
<p>Find the Computer Object for the SQL Server machine in AD and set the option “Trust this computer for delegation”. Also, the file share/file server where the file is located, you need to check if the 2 HOST SPN&#8217;s are present. E.g. If the machine name where the file is located is FSHARE1, then you should see 2 spn&#8217;s called HOST/FSHARE1 and HOST/FSHARE1.corp.domain.com. The HOST SPN&#8217;s are required because CIFS is covered under this.</p>
<p>Note: All of the above is assuming you are setting up unconstrained delegation (to any service).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SQL server BULK INSERT fails, with access denied error</title>
		<link>http://thesqldude.com/2011/12/30/how-to-sql-server-bulk-insert-with-constrained-delegation-access-is-denied/#comment-498</link>
		<dc:creator><![CDATA[SQL server BULK INSERT fails, with access denied error]]></dc:creator>
		<pubDate>Thu, 04 Oct 2012 16:10:00 +0000</pubDate>
		<guid isPermaLink="false">https://thesqldude.wordpress.com/?p=178#comment-498</guid>
		<description><![CDATA[[...] Found this query raised earlier and this post, but both of them talks about the case were Windows authentication is used (which is not the case here). DBA here strictly does not allow permission for SQL service account for the shared folder citing security violations [...]]]></description>
		<content:encoded><![CDATA[<p>[...] Found this query raised earlier and this post, but both of them talks about the case were Windows authentication is used (which is not the case here). DBA here strictly does not allow permission for SQL service account for the shared folder citing security violations [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sudarshan Narasimhan</title>
		<link>http://thesqldude.com/2011/12/30/how-to-sql-server-bulk-insert-with-constrained-delegation-access-is-denied/#comment-466</link>
		<dc:creator><![CDATA[Sudarshan Narasimhan]]></dc:creator>
		<pubDate>Tue, 11 Sep 2012 15:14:29 +0000</pubDate>
		<guid isPermaLink="false">https://thesqldude.wordpress.com/?p=178#comment-466</guid>
		<description><![CDATA[Well you don&#039;t provide any information at all apart from &quot;its not working&quot;. Are you using constrained or un-constrained delegation. It is mandatory to have CIFS enabled for the SQL Server machine account. Please refer http://blogs.msdn.com/b/psssql/archive/2012/09/07/bulk-insert-and-kerberos.aspx and see if you can follow this to implement your delegation.]]></description>
		<content:encoded><![CDATA[<p>Well you don&#8217;t provide any information at all apart from &#8220;its not working&#8221;. Are you using constrained or un-constrained delegation. It is mandatory to have CIFS enabled for the SQL Server machine account. Please refer <a href="http://blogs.msdn.com/b/psssql/archive/2012/09/07/bulk-insert-and-kerberos.aspx" rel="nofollow">http://blogs.msdn.com/b/psssql/archive/2012/09/07/bulk-insert-and-kerberos.aspx</a> and see if you can follow this to implement your delegation.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sudarshan Narasimhan</title>
		<link>http://thesqldude.com/2011/12/30/how-to-sql-server-bulk-insert-with-constrained-delegation-access-is-denied/#comment-459</link>
		<dc:creator><![CDATA[Sudarshan Narasimhan]]></dc:creator>
		<pubDate>Thu, 23 Aug 2012 23:22:30 +0000</pubDate>
		<guid isPermaLink="false">https://thesqldude.wordpress.com/?p=178#comment-459</guid>
		<description><![CDATA[Thank you Park, really appreciate your comments.. Stay subscribed for more SQL stuff on this site. Cheers!]]></description>
		<content:encoded><![CDATA[<p>Thank you Park, really appreciate your comments.. Stay subscribed for more SQL stuff on this site. Cheers!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Julia</title>
		<link>http://thesqldude.com/2011/12/30/how-to-sql-server-bulk-insert-with-constrained-delegation-access-is-denied/#comment-458</link>
		<dc:creator><![CDATA[Julia]]></dc:creator>
		<pubDate>Thu, 23 Aug 2012 15:19:36 +0000</pubDate>
		<guid isPermaLink="false">https://thesqldude.wordpress.com/?p=178#comment-458</guid>
		<description><![CDATA[Hi, I&#039;m a SSIS developer. I’m working on a project on which the Server\Machine setup is as same as what you descripted here except our SQL Server service is running under local system. I got Access Denied error when executing the Bulk Insert on the Client machine. I was using Windows Authentication to for all SQL Server logins and my ID has Admin access to SQL Server and Read\Write access to the Shared file fold. Could you please explain how the delegation would setup differently for SQL Server service is running under local system? Thanks in advance.]]></description>
		<content:encoded><![CDATA[<p>Hi, I&#8217;m a SSIS developer. I’m working on a project on which the Server\Machine setup is as same as what you descripted here except our SQL Server service is running under local system. I got Access Denied error when executing the Bulk Insert on the Client machine. I was using Windows Authentication to for all SQL Server logins and my ID has Admin access to SQL Server and Read\Write access to the Shared file fold. Could you please explain how the delegation would setup differently for SQL Server service is running under local system? Thanks in advance.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Park</title>
		<link>http://thesqldude.com/2011/12/30/how-to-sql-server-bulk-insert-with-constrained-delegation-access-is-denied/#comment-457</link>
		<dc:creator><![CDATA[Park]]></dc:creator>
		<pubDate>Wed, 22 Aug 2012 16:02:27 +0000</pubDate>
		<guid isPermaLink="false">https://thesqldude.wordpress.com/?p=178#comment-457</guid>
		<description><![CDATA[Very thanks for your good post. I&#039;ve spent more than a half day for this problem and you solved my pain. This is one of the nicest article on the web and detailed documentation. A few good man!!!]]></description>
		<content:encoded><![CDATA[<p>Very thanks for your good post. I&#8217;ve spent more than a half day for this problem and you solved my pain. This is one of the nicest article on the web and detailed documentation. A few good man!!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nicky</title>
		<link>http://thesqldude.com/2011/12/30/how-to-sql-server-bulk-insert-with-constrained-delegation-access-is-denied/#comment-455</link>
		<dc:creator><![CDATA[Nicky]]></dc:creator>
		<pubDate>Tue, 21 Aug 2012 07:14:56 +0000</pubDate>
		<guid isPermaLink="false">https://thesqldude.wordpress.com/?p=178#comment-455</guid>
		<description><![CDATA[What can you test if you&#039;ve implemented the above steps and it still doesn&#039;t work?  I&#039;m still getting the error in the event log.]]></description>
		<content:encoded><![CDATA[<p>What can you test if you&#8217;ve implemented the above steps and it still doesn&#8217;t work?  I&#8217;m still getting the error in the event log.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sudarshan Narasimhan</title>
		<link>http://thesqldude.com/2011/12/30/how-to-sql-server-bulk-insert-with-constrained-delegation-access-is-denied/#comment-203</link>
		<dc:creator><![CDATA[Sudarshan Narasimhan]]></dc:creator>
		<pubDate>Thu, 23 Feb 2012 16:33:47 +0000</pubDate>
		<guid isPermaLink="false">https://thesqldude.wordpress.com/?p=178#comment-203</guid>
		<description><![CDATA[Hi Alex,
Good point. Constrained delegation was introduced to specifically grant delegation privileges to just those services that needed it &amp; were trustworthy. Now there are 2 possible scenarios here depending on what account the service runs under. If the service is using a computer account like [NT Authority\System], then the &quot;Trust this computer for delegation&quot; is required. Whereas if its running as a Domain account then &quot;Trust this user for delegation&quot; is required.

I haven&#039;t yet had time to test turning off machine delegation in this bulk insert scenario. I will post back my results once I can do that.]]></description>
		<content:encoded><![CDATA[<p>Hi Alex,<br />
Good point. Constrained delegation was introduced to specifically grant delegation privileges to just those services that needed it &amp; were trustworthy. Now there are 2 possible scenarios here depending on what account the service runs under. If the service is using a computer account like [NT Authority\System], then the &#8220;Trust this computer for delegation&#8221; is required. Whereas if its running as a Domain account then &#8220;Trust this user for delegation&#8221; is required.</p>
<p>I haven&#8217;t yet had time to test turning off machine delegation in this bulk insert scenario. I will post back my results once I can do that.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
