<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://sqlblog.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Roman Rehak : 64-bit, linked servers</title><link>http://sqlblog.com/blogs/roman_rehak/archive/tags/64-bit/linked+servers/default.aspx</link><description>Tags: 64-bit, linked servers</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP2 (Build: 61129.1)</generator><item><title>Issue with 64-bit SQL Server using SQL 2000 linked server</title><link>http://sqlblog.com/blogs/roman_rehak/archive/2009/05/10/issue-with-64-bit-sql-server-using-sql-2000-linked-server.aspx</link><pubDate>Mon, 11 May 2009 02:24:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:13940</guid><dc:creator>roman</dc:creator><slash:comments>101</slash:comments><comments>http://sqlblog.com/blogs/roman_rehak/comments/13940.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/roman_rehak/commentrss.aspx?PostID=13940</wfw:commentRss><description>&lt;P&gt;Recently we started adding SQL Server 2008 64-bit servers to our production set and we ran into the following issue. When we ran queries on a linked 2000 server, we were getting the following error:&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE:12pt;FONT-FAMILY:'Times New Roman','serif';mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:AR-SA;"&gt;OLE DB provider "SQLNCLI10" for linked server "XXXXXX" returned message "The stored procedure required to complete this operation could not be found on the server. Please contact your system administrator.".&lt;BR&gt;Msg 7311, Level 16, State 2, Line 1&lt;BR&gt;Cannot obtain the schema rowset "DBSCHEMA_TABLES_INFO" for OLE DB provider "SQLNCLI10" for linked server "XXXXXX". The provider supports the interface, but returns a failure code when it is used.&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This &lt;A class="" href="http://support.microsoft.com/default.aspx?scid=kb;en-us;906954"&gt;article&lt;/A&gt; from MS website describes the issue pretty well, although it says&amp;nbsp;the issue&amp;nbsp;applies to 2005 but we are using 2008. As suggested, we ran the Instcat.sql file on our development system first, and we ended up getting errrors left and right, so we didn't dare to run it on our main production server. In the end, this workaround worked for us - we needed to create a procedure in the master database on the linked 2000 server. The proc is called sp_tables_info_rowset_64 and it is needed because it is called by 64-bit servers when running remote queries.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Here is the text of the proc in case you ever need to do the same, create it in the master database:&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;create&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;FONT-FAMILY:'Courier New';"&gt; &lt;SPAN style="COLOR:blue;"&gt;procedure&lt;/SPAN&gt; sp_tables_info_rowset_64&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:10pt;FONT-FAMILY:'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @table_name &lt;SPAN style="COLOR:blue;"&gt;sysname&lt;/SPAN&gt;&lt;SPAN style="COLOR:gray;"&gt;,&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:10pt;FONT-FAMILY:'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @table_schema&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR:blue;"&gt;sysname&lt;/SPAN&gt; &lt;SPAN style="COLOR:gray;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="COLOR:gray;"&gt;null,&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:10pt;FONT-FAMILY:'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @table_type &lt;SPAN style="COLOR:blue;"&gt;nvarchar&lt;/SPAN&gt;&lt;SPAN style="COLOR:gray;"&gt;(&lt;/SPAN&gt;255&lt;SPAN style="COLOR:gray;"&gt;)&lt;/SPAN&gt; &lt;SPAN style="COLOR:gray;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="COLOR:gray;"&gt;null&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;as&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;&amp;nbsp; declare @Result int set @Result = 0&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;&amp;nbsp; exec&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;FONT-FAMILY:'Courier New';"&gt; @Result = &lt;SPAN style="COLOR:maroon;"&gt;sp_tables_info_rowset&lt;/SPAN&gt; @table_name&lt;SPAN style="COLOR:gray;"&gt;,&lt;/SPAN&gt; @table_schema&lt;SPAN style="COLOR:gray;"&gt;,&lt;/SPAN&gt; @table_type&lt;BR&gt;&lt;FONT color=#0000ff&gt;go&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:10pt;FONT-FAMILY:'Courier New';"&gt;&lt;FONT color=#0000ff&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=13940" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/roman_rehak/archive/tags/64-bit/default.aspx">64-bit</category><category domain="http://sqlblog.com/blogs/roman_rehak/archive/tags/linked+servers/default.aspx">linked servers</category></item></channel></rss>