<?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: SQL SERVER &#8211; Fix: Error: MS Jet OLEDB 4.0 cannot be used for distributed queries because the provider is used to run in apartment mode.</title>
	<atom:link href="http://blog.sqlauthority.com/2010/11/03/sql-server-fix-error-ms-jet-oledb-4-0-cannot-be-used-for-distributed-queries-because-the-provider-is-used-to-run-in-apartment-mode/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sqlauthority.com/2010/11/03/sql-server-fix-error-ms-jet-oledb-4-0-cannot-be-used-for-distributed-queries-because-the-provider-is-used-to-run-in-apartment-mode/</link>
	<description>Personal Notes of Pinal Dave</description>
	<lastBuildDate>Thu, 23 May 2013 14:22:59 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Sean Anderson</title>
		<link>http://blog.sqlauthority.com/2010/11/03/sql-server-fix-error-ms-jet-oledb-4-0-cannot-be-used-for-distributed-queries-because-the-provider-is-used-to-run-in-apartment-mode/#comment-471216</link>
		<dc:creator><![CDATA[Sean Anderson]]></dc:creator>
		<pubDate>Wed, 08 May 2013 06:51:59 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=10755#comment-471216</guid>
		<description><![CDATA[Should mention that I was using this query in SSMS, not VBS.

SELECT * FROM OPENROWSET(&#039;Microsoft.ACE.OLEDB.12.0&#039;,
    &#039;Excel 12.0 Xml;HDR=YES;Database=c:\test\excelfile.xlsx&#039;,
    &#039;SELECT * FROM [Sheet1$]&#039;);]]></description>
		<content:encoded><![CDATA[<p>Should mention that I was using this query in SSMS, not VBS.</p>
<p>SELECT * FROM OPENROWSET(&#8216;Microsoft.ACE.OLEDB.12.0&#8242;,<br />
    &#8216;Excel 12.0 Xml;HDR=YES;Database=c:\test\excelfile.xlsx&#8217;,<br />
    &#8216;SELECT * FROM [Sheet1$]&#8216;);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sean Anderson</title>
		<link>http://blog.sqlauthority.com/2010/11/03/sql-server-fix-error-ms-jet-oledb-4-0-cannot-be-used-for-distributed-queries-because-the-provider-is-used-to-run-in-apartment-mode/#comment-471211</link>
		<dc:creator><![CDATA[Sean Anderson]]></dc:creator>
		<pubDate>Wed, 08 May 2013 06:50:01 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=10755#comment-471211</guid>
		<description><![CDATA[Got it to work on the server by starting SSMS as Administrator.]]></description>
		<content:encoded><![CDATA[<p>Got it to work on the server by starting SSMS as Administrator.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sean Anderson</title>
		<link>http://blog.sqlauthority.com/2010/11/03/sql-server-fix-error-ms-jet-oledb-4-0-cannot-be-used-for-distributed-queries-because-the-provider-is-used-to-run-in-apartment-mode/#comment-471203</link>
		<dc:creator><![CDATA[Sean Anderson]]></dc:creator>
		<pubDate>Wed, 08 May 2013 06:41:14 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=10755#comment-471203</guid>
		<description><![CDATA[I did this but I also had to install the AccessDatabaseEngine_x64.exe /passive in a cmd line with admin rights.  However, it failed numerous times and I found a few posts where people had to download the exe twice before it would work (don&#039;t ask). I had to download another copy of the exe before it would work.  I sat in amazement as it installed after hours of tinkering.  This was on Windows 7 x64 with 32bit office 2010 installed.  Still haven&#039;t got it running on the server. Got it to install (the second download) but I get the linked server null error now.  More tinkering.]]></description>
		<content:encoded><![CDATA[<p>I did this but I also had to install the AccessDatabaseEngine_x64.exe /passive in a cmd line with admin rights.  However, it failed numerous times and I found a few posts where people had to download the exe twice before it would work (don&#8217;t ask). I had to download another copy of the exe before it would work.  I sat in amazement as it installed after hours of tinkering.  This was on Windows 7 x64 with 32bit office 2010 installed.  Still haven&#8217;t got it running on the server. Got it to install (the second download) but I get the linked server null error now.  More tinkering.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cristina Perez Otaiza</title>
		<link>http://blog.sqlauthority.com/2010/11/03/sql-server-fix-error-ms-jet-oledb-4-0-cannot-be-used-for-distributed-queries-because-the-provider-is-used-to-run-in-apartment-mode/#comment-468628</link>
		<dc:creator><![CDATA[Cristina Perez Otaiza]]></dc:creator>
		<pubDate>Sat, 04 May 2013 00:38:42 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=10755#comment-468628</guid>
		<description><![CDATA[Hi Sagar,
Could you please provide more details about how to get the tlist.exe? 
I am just looking to install the minimum of that packet but it can allow me to used it..
Regards,

Cristina]]></description>
		<content:encoded><![CDATA[<p>Hi Sagar,<br />
Could you please provide more details about how to get the tlist.exe?<br />
I am just looking to install the minimum of that packet but it can allow me to used it..<br />
Regards,</p>
<p>Cristina</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nagarjuna Dilip</title>
		<link>http://blog.sqlauthority.com/2010/11/03/sql-server-fix-error-ms-jet-oledb-4-0-cannot-be-used-for-distributed-queries-because-the-provider-is-used-to-run-in-apartment-mode/#comment-463451</link>
		<dc:creator><![CDATA[Nagarjuna Dilip]]></dc:creator>
		<pubDate>Thu, 25 Apr 2013 07:07:05 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=10755#comment-463451</guid>
		<description><![CDATA[Excellent! it worked for me.... Thanks a lot...]]></description>
		<content:encoded><![CDATA[<p>Excellent! it worked for me&#8230;. Thanks a lot&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sagar</title>
		<link>http://blog.sqlauthority.com/2010/11/03/sql-server-fix-error-ms-jet-oledb-4-0-cannot-be-used-for-distributed-queries-because-the-provider-is-used-to-run-in-apartment-mode/#comment-456448</link>
		<dc:creator><![CDATA[Sagar]]></dc:creator>
		<pubDate>Mon, 15 Apr 2013 09:44:39 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=10755#comment-456448</guid>
		<description><![CDATA[If you are using 64Bit SQL Server then instead of using &quot;Microsoft.Jet.OLEDB.4.0&quot; use &quot;Microsoft.ACE.OLEDB.12.0&quot; and your problems will be solved as Jet provider does not have 64 bits version, you can check with tlist.exe command (in the windbg bin directory, windbg can be downloaded from  http://www.microsoft.com/whdc/DevTools/Debugging/default.mspx) to see whether wow mode Jet provider is used or not.]]></description>
		<content:encoded><![CDATA[<p>If you are using 64Bit SQL Server then instead of using &#8220;Microsoft.Jet.OLEDB.4.0&#8243; use &#8220;Microsoft.ACE.OLEDB.12.0&#8243; and your problems will be solved as Jet provider does not have 64 bits version, you can check with tlist.exe command (in the windbg bin directory, windbg can be downloaded from  <a href="http://www.microsoft.com/whdc/DevTools/Debugging/default.mspx" rel="nofollow">http://www.microsoft.com/whdc/DevTools/Debugging/default.mspx</a>) to see whether wow mode Jet provider is used or not.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sohails</title>
		<link>http://blog.sqlauthority.com/2010/11/03/sql-server-fix-error-ms-jet-oledb-4-0-cannot-be-used-for-distributed-queries-because-the-provider-is-used-to-run-in-apartment-mode/#comment-450414</link>
		<dc:creator><![CDATA[sohails]]></dc:creator>
		<pubDate>Fri, 05 Apr 2013 19:44:12 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=10755#comment-450414</guid>
		<description><![CDATA[No need to uninstall the 32bit version, here&#039;s a solution that worked for me:
download both 32&amp; 64 bit version and then in the command window run these one after the other:
C:\Downloads&gt; AccessDatabaseEngine.exe /passive
C:\Downloads&gt; AccessDatabaseEngine_x64.exe /passive

and follow the rest.........]]></description>
		<content:encoded><![CDATA[<p>No need to uninstall the 32bit version, here&#8217;s a solution that worked for me:<br />
download both 32&amp; 64 bit version and then in the command window run these one after the other:<br />
C:\Downloads&gt; AccessDatabaseEngine.exe /passive<br />
C:\Downloads&gt; AccessDatabaseEngine_x64.exe /passive</p>
<p>and follow the rest&#8230;&#8230;&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Simon</title>
		<link>http://blog.sqlauthority.com/2010/11/03/sql-server-fix-error-ms-jet-oledb-4-0-cannot-be-used-for-distributed-queries-because-the-provider-is-used-to-run-in-apartment-mode/#comment-442287</link>
		<dc:creator><![CDATA[Simon]]></dc:creator>
		<pubDate>Fri, 22 Mar 2013 15:20:55 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=10755#comment-442287</guid>
		<description><![CDATA[Great!! solved it after struggling with it for a while]]></description>
		<content:encoded><![CDATA[<p>Great!! solved it after struggling with it for a while</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bob</title>
		<link>http://blog.sqlauthority.com/2010/11/03/sql-server-fix-error-ms-jet-oledb-4-0-cannot-be-used-for-distributed-queries-because-the-provider-is-used-to-run-in-apartment-mode/#comment-436700</link>
		<dc:creator><![CDATA[Bob]]></dc:creator>
		<pubDate>Wed, 13 Mar 2013 14:57:17 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=10755#comment-436700</guid>
		<description><![CDATA[Got this to work (SQL 2005 to Access 2007):
1) Installed AccessDatabaseEngine on dB server http://www.microsoft.com/en-us/download/details.aspx?id=13255
2) Restarted SQL Server Instance
3) Set Microsoft.Jet.OLEDB.4.0 Provider Options = 1
&quot;Allow InProcess&quot; &amp; &quot;Dynamic Parameter&quot;

4) Created Link (Script Below)
/****** Object:  LinkedServer [AccessdB_Name_Referenced_Here]    Script Date: 03/13/2013 10:52:00 ******/
EXEC master.dbo.sp_addlinkedserver @server = N&#039;AccessdB_Name_Referenced_Here&#039;, @srvproduct=N&#039;AccessDatabase&#039;, @provider=N&#039;Microsoft.Jet.OLEDB.4.0&#039;, @datasrc=N&#039;\\255.255.255.00\MyAccessdbPath\Access.mdb&#039;
 /* For security reasons the linked server remote logins password is changed with ######## */
EXEC master.dbo.sp_addlinkedsrvlogin @rmtsrvname=N&#039;AccessdB_Name_Referenced_Here&#039;,@useself=N&#039;False&#039;,@locallogin=NULL,@rmtuser=N&#039;UserID&#039;,@rmtpassword=&#039;########&#039;

GO
EXEC master.dbo.sp_serveroption @server=N&#039;AccessdB_Name_Referenced_Here&#039;, @optname=N&#039;collation compatible&#039;, @optvalue=N&#039;false&#039;
GO
EXEC master.dbo.sp_serveroption @server=N&#039;AccessdB_Name_Referenced_Here&#039;, @optname=N&#039;data access&#039;, @optvalue=N&#039;true&#039;
GO
EXEC master.dbo.sp_serveroption @server=N&#039;AccessdB_Name_Referenced_Here&#039;, @optname=N&#039;dist&#039;, @optvalue=N&#039;false&#039;
GO
EXEC master.dbo.sp_serveroption @server=N&#039;AccessdB_Name_Referenced_Here&#039;, @optname=N&#039;pub&#039;, @optvalue=N&#039;false&#039;
GO
EXEC master.dbo.sp_serveroption @server=N&#039;AccessdB_Name_Referenced_Here&#039;, @optname=N&#039;rpc&#039;, @optvalue=N&#039;true&#039;
GO
EXEC master.dbo.sp_serveroption @server=N&#039;AccessdB_Name_Referenced_Here&#039;, @optname=N&#039;rpc out&#039;, @optvalue=N&#039;false&#039;
GO
EXEC master.dbo.sp_serveroption @server=N&#039;AccessdB_Name_Referenced_Here&#039;, @optname=N&#039;sub&#039;, @optvalue=N&#039;false&#039;
GO
EXEC master.dbo.sp_serveroption @server=N&#039;AccessdB_Name_Referenced_Here&#039;, @optname=N&#039;connect timeout&#039;, @optvalue=N&#039;10&#039;
GO
EXEC master.dbo.sp_serveroption @server=N&#039;AccessdB_Name_Referenced_Here&#039;, @optname=N&#039;collation name&#039;, @optvalue=null
GO
EXEC master.dbo.sp_serveroption @server=N&#039;AccessdB_Name_Referenced_Here&#039;, @optname=N&#039;lazy schema validation&#039;, @optvalue=N&#039;false&#039;
GO
EXEC master.dbo.sp_serveroption @server=N&#039;AccessdB_Name_Referenced_Here&#039;, @optname=N&#039;query timeout&#039;, @optvalue=N&#039;30&#039;
GO
EXEC master.dbo.sp_serveroption @server=N&#039;AccessdB_Name_Referenced_Here&#039;, @optname=N&#039;use remote collation&#039;, @optvalue=N&#039;true&#039;]]></description>
		<content:encoded><![CDATA[<p>Got this to work (SQL 2005 to Access 2007):<br />
1) Installed AccessDatabaseEngine on dB server <a href="http://www.microsoft.com/en-us/download/details.aspx?id=13255" rel="nofollow">http://www.microsoft.com/en-us/download/details.aspx?id=13255</a><br />
2) Restarted SQL Server Instance<br />
3) Set Microsoft.Jet.OLEDB.4.0 Provider Options = 1<br />
&#8220;Allow InProcess&#8221; &amp; &#8220;Dynamic Parameter&#8221;</p>
<p>4) Created Link (Script Below)<br />
/****** Object:  LinkedServer [AccessdB_Name_Referenced_Here]    Script Date: 03/13/2013 10:52:00 ******/<br />
EXEC master.dbo.sp_addlinkedserver @server = N&#8217;AccessdB_Name_Referenced_Here&#8217;, @srvproduct=N&#8217;AccessDatabase&#8217;, @provider=N&#8217;Microsoft.Jet.OLEDB.4.0&#8242;, @datasrc=N&#8217;\\255.255.255.00\MyAccessdbPath\Access.mdb&#8217;<br />
 /* For security reasons the linked server remote logins password is changed with ######## */<br />
EXEC master.dbo.sp_addlinkedsrvlogin @rmtsrvname=N&#8217;AccessdB_Name_Referenced_Here&#8217;,@useself=N&#8217;False&#8217;,@locallogin=NULL,@rmtuser=N&#8217;UserID&#8217;,@rmtpassword=&#8217;########&#8217;</p>
<p>GO<br />
EXEC master.dbo.sp_serveroption @server=N&#8217;AccessdB_Name_Referenced_Here&#8217;, @optname=N&#8217;collation compatible&#8217;, @optvalue=N&#8217;false&#8217;<br />
GO<br />
EXEC master.dbo.sp_serveroption @server=N&#8217;AccessdB_Name_Referenced_Here&#8217;, @optname=N&#8217;data access&#8217;, @optvalue=N&#8217;true&#8217;<br />
GO<br />
EXEC master.dbo.sp_serveroption @server=N&#8217;AccessdB_Name_Referenced_Here&#8217;, @optname=N&#8217;dist&#8217;, @optvalue=N&#8217;false&#8217;<br />
GO<br />
EXEC master.dbo.sp_serveroption @server=N&#8217;AccessdB_Name_Referenced_Here&#8217;, @optname=N&#8217;pub&#8217;, @optvalue=N&#8217;false&#8217;<br />
GO<br />
EXEC master.dbo.sp_serveroption @server=N&#8217;AccessdB_Name_Referenced_Here&#8217;, @optname=N&#8217;rpc&#8217;, @optvalue=N&#8217;true&#8217;<br />
GO<br />
EXEC master.dbo.sp_serveroption @server=N&#8217;AccessdB_Name_Referenced_Here&#8217;, @optname=N&#8217;rpc out&#8217;, @optvalue=N&#8217;false&#8217;<br />
GO<br />
EXEC master.dbo.sp_serveroption @server=N&#8217;AccessdB_Name_Referenced_Here&#8217;, @optname=N&#8217;sub&#8217;, @optvalue=N&#8217;false&#8217;<br />
GO<br />
EXEC master.dbo.sp_serveroption @server=N&#8217;AccessdB_Name_Referenced_Here&#8217;, @optname=N&#8217;connect timeout&#8217;, @optvalue=N&#8217;10&#8242;<br />
GO<br />
EXEC master.dbo.sp_serveroption @server=N&#8217;AccessdB_Name_Referenced_Here&#8217;, @optname=N&#8217;collation name&#8217;, @optvalue=null<br />
GO<br />
EXEC master.dbo.sp_serveroption @server=N&#8217;AccessdB_Name_Referenced_Here&#8217;, @optname=N&#8217;lazy schema validation&#8217;, @optvalue=N&#8217;false&#8217;<br />
GO<br />
EXEC master.dbo.sp_serveroption @server=N&#8217;AccessdB_Name_Referenced_Here&#8217;, @optname=N&#8217;query timeout&#8217;, @optvalue=N&#8217;30&#8242;<br />
GO<br />
EXEC master.dbo.sp_serveroption @server=N&#8217;AccessdB_Name_Referenced_Here&#8217;, @optname=N&#8217;use remote collation&#8217;, @optvalue=N&#8217;true&#8217;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ramil</title>
		<link>http://blog.sqlauthority.com/2010/11/03/sql-server-fix-error-ms-jet-oledb-4-0-cannot-be-used-for-distributed-queries-because-the-provider-is-used-to-run-in-apartment-mode/#comment-432387</link>
		<dc:creator><![CDATA[Ramil]]></dc:creator>
		<pubDate>Tue, 05 Mar 2013 20:25:16 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=10755#comment-432387</guid>
		<description><![CDATA[Installing 2010 AccessDatabaseEngine 64bit version worked for me.
Once installed, you need to enable few provider options (Microsoft.ACE.OLEDB.12.0). You can follow Miss Alexander&#039;s (above) or you can right-click on Microsoft.ACE.OLEDB.12.0 (under Linked Servers &gt; Providers), click on Properties and check the boxes for Dynamic Parameters and Allow In Process.]]></description>
		<content:encoded><![CDATA[<p>Installing 2010 AccessDatabaseEngine 64bit version worked for me.<br />
Once installed, you need to enable few provider options (Microsoft.ACE.OLEDB.12.0). You can follow Miss Alexander&#8217;s (above) or you can right-click on Microsoft.ACE.OLEDB.12.0 (under Linked Servers &gt; Providers), click on Properties and check the boxes for Dynamic Parameters and Allow In Process.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: madhivanan</title>
		<link>http://blog.sqlauthority.com/2010/11/03/sql-server-fix-error-ms-jet-oledb-4-0-cannot-be-used-for-distributed-queries-because-the-provider-is-used-to-run-in-apartment-mode/#comment-422133</link>
		<dc:creator><![CDATA[madhivanan]]></dc:creator>
		<pubDate>Fri, 15 Feb 2013 13:28:54 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=10755#comment-422133</guid>
		<description><![CDATA[You need to use Jet engine version of 12]]></description>
		<content:encoded><![CDATA[<p>You need to use Jet engine version of 12</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ghanshyam</title>
		<link>http://blog.sqlauthority.com/2010/11/03/sql-server-fix-error-ms-jet-oledb-4-0-cannot-be-used-for-distributed-queries-because-the-provider-is-used-to-run-in-apartment-mode/#comment-414552</link>
		<dc:creator><![CDATA[ghanshyam]]></dc:creator>
		<pubDate>Tue, 29 Jan 2013 09:43:23 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=10755#comment-414552</guid>
		<description><![CDATA[hi mitch, tried all step u have mentioned but no luck getting the same error as

Msg 7399, Level 16, State 1, Line 1
The OLE DB provider &quot;Microsoft.ACE.OLEDB.12.0&quot; for linked server &quot;(null)&quot; reported an error. The provider did not give any information about the error.
Msg 7303, Level 16, State 1, Line 1
Cannot initialize the data source object of OLE DB provider &quot;Microsoft.ACE.OLEDB.12.0&quot; for linked server &quot;(null)&quot;.]]></description>
		<content:encoded><![CDATA[<p>hi mitch, tried all step u have mentioned but no luck getting the same error as</p>
<p>Msg 7399, Level 16, State 1, Line 1<br />
The OLE DB provider &#8220;Microsoft.ACE.OLEDB.12.0&#8243; for linked server &#8220;(null)&#8221; reported an error. The provider did not give any information about the error.<br />
Msg 7303, Level 16, State 1, Line 1<br />
Cannot initialize the data source object of OLE DB provider &#8220;Microsoft.ACE.OLEDB.12.0&#8243; for linked server &#8220;(null)&#8221;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sathiyan</title>
		<link>http://blog.sqlauthority.com/2010/11/03/sql-server-fix-error-ms-jet-oledb-4-0-cannot-be-used-for-distributed-queries-because-the-provider-is-used-to-run-in-apartment-mode/#comment-408012</link>
		<dc:creator><![CDATA[sathiyan]]></dc:creator>
		<pubDate>Tue, 15 Jan 2013 12:52:57 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=10755#comment-408012</guid>
		<description><![CDATA[HI
I&#039;m getting this  error
Msg 7308, Level 16, State 1, Line 1
OLE DB provider &#039;Microsoft.Jet.OLEDB.4.0&#039; cannot be used for distributed queries because the provider is configured to run in single-threaded apartment mode.

MY Query:
SELECT * FROM OPENROWSET(&#039;Microsoft.Jet.OLEDB.4.0&#039;,
          &#039;Excel 8.0;Database=&#039;,
          &#039;SELECT * FROM [Sheet1$]&#039;)

OS-Windows 7 64 bit
SQL server 2008 R2(64 bit)
Excel 2007]]></description>
		<content:encoded><![CDATA[<p>HI<br />
I&#8217;m getting this  error<br />
Msg 7308, Level 16, State 1, Line 1<br />
OLE DB provider &#8216;Microsoft.Jet.OLEDB.4.0&#8242; cannot be used for distributed queries because the provider is configured to run in single-threaded apartment mode.</p>
<p>MY Query:<br />
SELECT * FROM OPENROWSET(&#8216;Microsoft.Jet.OLEDB.4.0&#8242;,<br />
          &#8216;Excel 8.0;Database=&#8217;,<br />
          &#8216;SELECT * FROM [Sheet1$]&#8216;)</p>
<p>OS-Windows 7 64 bit<br />
SQL server 2008 R2(64 bit)<br />
Excel 2007</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cesar</title>
		<link>http://blog.sqlauthority.com/2010/11/03/sql-server-fix-error-ms-jet-oledb-4-0-cannot-be-used-for-distributed-queries-because-the-provider-is-used-to-run-in-apartment-mode/#comment-405294</link>
		<dc:creator><![CDATA[cesar]]></dc:creator>
		<pubDate>Tue, 08 Jan 2013 15:36:19 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=10755#comment-405294</guid>
		<description><![CDATA[Hi I already run the SPs, but now i&#039;m getting this error 
&quot;Cannot initialize the data source object of OLE DB provider &quot;Microsoft.Jet.OLEDB.4.0&quot; for linked server &quot;(null)&quot;.&quot;

Can you help me?]]></description>
		<content:encoded><![CDATA[<p>Hi I already run the SPs, but now i&#8217;m getting this error<br />
&#8220;Cannot initialize the data source object of OLE DB provider &#8220;Microsoft.Jet.OLEDB.4.0&#8243; for linked server &#8220;(null)&#8221;.&#8221;</p>
<p>Can you help me?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: madhivanan</title>
		<link>http://blog.sqlauthority.com/2010/11/03/sql-server-fix-error-ms-jet-oledb-4-0-cannot-be-used-for-distributed-queries-because-the-provider-is-used-to-run-in-apartment-mode/#comment-405240</link>
		<dc:creator><![CDATA[madhivanan]]></dc:creator>
		<pubDate>Tue, 08 Jan 2013 13:22:35 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=10755#comment-405240</guid>
		<description><![CDATA[Restart is not required]]></description>
		<content:encoded><![CDATA[<p>Restart is not required</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: steve</title>
		<link>http://blog.sqlauthority.com/2010/11/03/sql-server-fix-error-ms-jet-oledb-4-0-cannot-be-used-for-distributed-queries-because-the-provider-is-used-to-run-in-apartment-mode/#comment-405153</link>
		<dc:creator><![CDATA[steve]]></dc:creator>
		<pubDate>Tue, 08 Jan 2013 07:35:04 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=10755#comment-405153</guid>
		<description><![CDATA[is a sql server restart required after chaning this configuration setting to take effect?]]></description>
		<content:encoded><![CDATA[<p>is a sql server restart required after chaning this configuration setting to take effect?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mariam Kupatadze</title>
		<link>http://blog.sqlauthority.com/2010/11/03/sql-server-fix-error-ms-jet-oledb-4-0-cannot-be-used-for-distributed-queries-because-the-provider-is-used-to-run-in-apartment-mode/#comment-398990</link>
		<dc:creator><![CDATA[Mariam Kupatadze]]></dc:creator>
		<pubDate>Tue, 25 Dec 2012 10:37:49 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=10755#comment-398990</guid>
		<description><![CDATA[Thank you!]]></description>
		<content:encoded><![CDATA[<p>Thank you!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rui</title>
		<link>http://blog.sqlauthority.com/2010/11/03/sql-server-fix-error-ms-jet-oledb-4-0-cannot-be-used-for-distributed-queries-because-the-provider-is-used-to-run-in-apartment-mode/#comment-396163</link>
		<dc:creator><![CDATA[Rui]]></dc:creator>
		<pubDate>Wed, 19 Dec 2012 16:34:47 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=10755#comment-396163</guid>
		<description><![CDATA[This one solved this issue for me:

Grant rigths to TEMP directory
icacls C:\Windows\ServiceProfiles\\AppData\Local\Temp /grant :(R,W)The most commonly used pathes:

C:\Windows\ServiceProfiles\NetworkService\AppData\Local\Temp
C:\Windows\ServiceProfiles\LocalService\AppData\Local\Temp]]></description>
		<content:encoded><![CDATA[<p>This one solved this issue for me:</p>
<p>Grant rigths to TEMP directory<br />
icacls C:\Windows\ServiceProfiles\\AppData\Local\Temp /grant :(R,W)The most commonly used pathes:</p>
<p>C:\Windows\ServiceProfiles\NetworkService\AppData\Local\Temp<br />
C:\Windows\ServiceProfiles\LocalService\AppData\Local\Temp</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kumar Shorav</title>
		<link>http://blog.sqlauthority.com/2010/11/03/sql-server-fix-error-ms-jet-oledb-4-0-cannot-be-used-for-distributed-queries-because-the-provider-is-used-to-run-in-apartment-mode/#comment-392969</link>
		<dc:creator><![CDATA[Kumar Shorav]]></dc:creator>
		<pubDate>Fri, 14 Dec 2012 06:22:47 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=10755#comment-392969</guid>
		<description><![CDATA[I am trying to import excel (.xls) file in to sql server 2008 through import Data wizard. However I am getting the follwing error -
 0 down vote favorite
	

I am importind Data from excel sheet. I am struggling with the following problems -

    Executing (Error) Messages Error 0xc020901c: Data Flow Task 1: There was an error with output column &quot;Intelligence&quot; (21) on output &quot;Excel Source Output&quot; (9). The column status returned was: &quot;Text was truncated or one or more characters had no match in the target code page.&quot;. (SQL Server Import and Export Wizard)

Error 0xc020902a: Data Flow Task 1: The &quot;output column &quot;Intelligence&quot; (21)&quot; failed because truncation occurred, and the truncation row disposition on &quot;output column &quot;Intelligence&quot; (21)&quot; specifies failure on truncation. A truncation error occurred on the specified object of the specified component. (SQL Server Import and Export Wizard)

Error 0xc0047038: Data Flow Task 1: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on component &quot;Source - MainSheetData$&quot; (1) returned error code 0xC020902A. The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing. There may be error messages posted before this with more information about the failure. (SQL Server Import and Export Wizard)

Please help me in this.]]></description>
		<content:encoded><![CDATA[<p>I am trying to import excel (.xls) file in to sql server 2008 through import Data wizard. However I am getting the follwing error -<br />
 0 down vote favorite</p>
<p>I am importind Data from excel sheet. I am struggling with the following problems -</p>
<p>    Executing (Error) Messages Error 0xc020901c: Data Flow Task 1: There was an error with output column &#8220;Intelligence&#8221; (21) on output &#8220;Excel Source Output&#8221; (9). The column status returned was: &#8220;Text was truncated or one or more characters had no match in the target code page.&#8221;. (SQL Server Import and Export Wizard)</p>
<p>Error 0xc020902a: Data Flow Task 1: The &#8220;output column &#8220;Intelligence&#8221; (21)&#8221; failed because truncation occurred, and the truncation row disposition on &#8220;output column &#8220;Intelligence&#8221; (21)&#8221; specifies failure on truncation. A truncation error occurred on the specified object of the specified component. (SQL Server Import and Export Wizard)</p>
<p>Error 0xc0047038: Data Flow Task 1: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on component &#8220;Source &#8211; MainSheetData$&#8221; (1) returned error code 0xC020902A. The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing. There may be error messages posted before this with more information about the failure. (SQL Server Import and Export Wizard)</p>
<p>Please help me in this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marlene</title>
		<link>http://blog.sqlauthority.com/2010/11/03/sql-server-fix-error-ms-jet-oledb-4-0-cannot-be-used-for-distributed-queries-because-the-provider-is-used-to-run-in-apartment-mode/#comment-390688</link>
		<dc:creator><![CDATA[Marlene]]></dc:creator>
		<pubDate>Mon, 10 Dec 2012 12:23:35 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=10755#comment-390688</guid>
		<description><![CDATA[Hi
I have a 64 bit server, but my MS Office version is 32 bit..therefore I get this error:
OLE DB provider &#039;Microsoft.Jet.OLEDB.4.0&#039; cannot be used for distributed queries because the provider is configured to run in single-threaded apartment mode.

I can not uninstall the 32 bit MS OFfice as suggested earlier, is there any other work around?

Thanks
Marlene]]></description>
		<content:encoded><![CDATA[<p>Hi<br />
I have a 64 bit server, but my MS Office version is 32 bit..therefore I get this error:<br />
OLE DB provider &#8216;Microsoft.Jet.OLEDB.4.0&#8242; cannot be used for distributed queries because the provider is configured to run in single-threaded apartment mode.</p>
<p>I can not uninstall the 32 bit MS OFfice as suggested earlier, is there any other work around?</p>
<p>Thanks<br />
Marlene</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kiran Kumar Sathpadi</title>
		<link>http://blog.sqlauthority.com/2010/11/03/sql-server-fix-error-ms-jet-oledb-4-0-cannot-be-used-for-distributed-queries-because-the-provider-is-used-to-run-in-apartment-mode/#comment-386037</link>
		<dc:creator><![CDATA[Kiran Kumar Sathpadi]]></dc:creator>
		<pubDate>Mon, 03 Dec 2012 07:15:41 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=10755#comment-386037</guid>
		<description><![CDATA[Hi, I am also facing the same issue.

Can you please give me a better suggestion.
Msg 7403, Level 16, State 1, Line 5
The OLE DB provider &quot;Microsoft.ACE.OLEDB.12.0&quot; has not been registered.]]></description>
		<content:encoded><![CDATA[<p>Hi, I am also facing the same issue.</p>
<p>Can you please give me a better suggestion.<br />
Msg 7403, Level 16, State 1, Line 5<br />
The OLE DB provider &#8220;Microsoft.ACE.OLEDB.12.0&#8243; has not been registered.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Abdul Khadir</title>
		<link>http://blog.sqlauthority.com/2010/11/03/sql-server-fix-error-ms-jet-oledb-4-0-cannot-be-used-for-distributed-queries-because-the-provider-is-used-to-run-in-apartment-mode/#comment-377281</link>
		<dc:creator><![CDATA[Abdul Khadir]]></dc:creator>
		<pubDate>Tue, 20 Nov 2012 09:27:24 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=10755#comment-377281</guid>
		<description><![CDATA[Hi Pinal,
i got this error.
Msg 7308, Level 16, State 1, Line 3
OLE DB provider &#039;Microsoft.Jet.OLEDB.4.0&#039; cannot be used for distributed queries because the provider is configured to run in single-threaded apartment mode.
what is the solution for this one.
i have used excel 2007 data is imported into sql server 2008.]]></description>
		<content:encoded><![CDATA[<p>Hi Pinal,<br />
i got this error.<br />
Msg 7308, Level 16, State 1, Line 3<br />
OLE DB provider &#8216;Microsoft.Jet.OLEDB.4.0&#8242; cannot be used for distributed queries because the provider is configured to run in single-threaded apartment mode.<br />
what is the solution for this one.<br />
i have used excel 2007 data is imported into sql server 2008.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kundan kumar</title>
		<link>http://blog.sqlauthority.com/2010/11/03/sql-server-fix-error-ms-jet-oledb-4-0-cannot-be-used-for-distributed-queries-because-the-provider-is-used-to-run-in-apartment-mode/#comment-367805</link>
		<dc:creator><![CDATA[kundan kumar]]></dc:creator>
		<pubDate>Fri, 02 Nov 2012 06:57:04 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=10755#comment-367805</guid>
		<description><![CDATA[Msg 7399, Level 16, State 1, Line 1
The OLE DB provider &quot;Microsoft.Jet.OLEDB.4.0&quot; for linked server &quot;(null)&quot; reported an error. The provider did not give any information about the error.
Msg 7303, Level 16, State 1, Line 1
Cannot initialize the data source object of OLE DB provider &quot;Microsoft.Jet.OLEDB.4.0&quot; for linked server &quot;(null)&quot;.]]></description>
		<content:encoded><![CDATA[<p>Msg 7399, Level 16, State 1, Line 1<br />
The OLE DB provider &#8220;Microsoft.Jet.OLEDB.4.0&#8243; for linked server &#8220;(null)&#8221; reported an error. The provider did not give any information about the error.<br />
Msg 7303, Level 16, State 1, Line 1<br />
Cannot initialize the data source object of OLE DB provider &#8220;Microsoft.Jet.OLEDB.4.0&#8243; for linked server &#8220;(null)&#8221;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: madvet</title>
		<link>http://blog.sqlauthority.com/2010/11/03/sql-server-fix-error-ms-jet-oledb-4-0-cannot-be-used-for-distributed-queries-because-the-provider-is-used-to-run-in-apartment-mode/#comment-359860</link>
		<dc:creator><![CDATA[madvet]]></dc:creator>
		<pubDate>Sun, 14 Oct 2012 12:20:49 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=10755#comment-359860</guid>
		<description><![CDATA[Thank you! It&#039;s work!!]]></description>
		<content:encoded><![CDATA[<p>Thank you! It&#8217;s work!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Miss Alexander</title>
		<link>http://blog.sqlauthority.com/2010/11/03/sql-server-fix-error-ms-jet-oledb-4-0-cannot-be-used-for-distributed-queries-because-the-provider-is-used-to-run-in-apartment-mode/#comment-359237</link>
		<dc:creator><![CDATA[Miss Alexander]]></dc:creator>
		<pubDate>Fri, 12 Oct 2012 17:56:37 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=10755#comment-359237</guid>
		<description><![CDATA[A few of our servers are running instances of 2005 and 2008.  The 2005 runs fine using OPENROWSET in a VBS file to export a SQL table to a DBF file but the 2008 had the issue indicated.

I did not uninstall or reinstall anything.  All I did was (from what I saw in the other posts):

sp_configure ‘show advanced options’, 1;
GO
RECONFIGURE;
GO
sp_configure ‘Ad Hoc Distributed Queries’, 1;
GO
RECONFIGURE;
GO
EXEC master.dbo.sp_MSset_oledb_prop N&#039;Microsoft.ACE.OLEDB.12.0&#039;, N&#039;AllowInProcess&#039;, 1
GO
EXEC master.dbo.sp_MSset_oledb_prop N&#039;Microsoft.ACE.OLEDB.12.0&#039;, N&#039;DynamicParameters&#039;, 1
GO

VBS:
SELECT * FROM OPENROWSET(&#039;Microsoft.ACE.OLEDB.12.0&#039; .....

AND IT WORKS NOW....]]></description>
		<content:encoded><![CDATA[<p>A few of our servers are running instances of 2005 and 2008.  The 2005 runs fine using OPENROWSET in a VBS file to export a SQL table to a DBF file but the 2008 had the issue indicated.</p>
<p>I did not uninstall or reinstall anything.  All I did was (from what I saw in the other posts):</p>
<p>sp_configure ‘show advanced options’, 1;<br />
GO<br />
RECONFIGURE;<br />
GO<br />
sp_configure ‘Ad Hoc Distributed Queries’, 1;<br />
GO<br />
RECONFIGURE;<br />
GO<br />
EXEC master.dbo.sp_MSset_oledb_prop N&#8217;Microsoft.ACE.OLEDB.12.0&#8242;, N&#8217;AllowInProcess&#8217;, 1<br />
GO<br />
EXEC master.dbo.sp_MSset_oledb_prop N&#8217;Microsoft.ACE.OLEDB.12.0&#8242;, N&#8217;DynamicParameters&#8217;, 1<br />
GO</p>
<p>VBS:<br />
SELECT * FROM OPENROWSET(&#8216;Microsoft.ACE.OLEDB.12.0&#8242; &#8230;..</p>
<p>AND IT WORKS NOW&#8230;.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
