uber1024's WebLog

It's not hot wings and beer, but it's still okay

Linking 64-bit SQL2k5 to 32-bit SQL2k ... or, How to Avoid Wasting 10 Days Waiting For Straight Answers

They say a picture is worth a thousand words, so here's a thousand words.  The situation is that we have a 32-bit SQL2k cluster and a linked 32-bit SQL2k machine (they link in both directions) and we need to execute distributed transactions across both machines and in both directions.  This works fine, and has been working for many months (after we spent a month trying to get our hosting provider to correctly install MSDTC ... another story entirely).

 It was recommended by a consultant (I know, I know, readers of WorseThanFailure aka TheDailyWTF are snickering up their sleeves at me) that we replace the cluster with 64-bit windows and 64-bit SQL2k5.  He had the picture of our network and assured us that it wouldn't cause any problems.  Predictably, it caused a host of problems immediately.  It's been 2 weeks and we're still not done with the project. 

The problem is that we were getting a pretty mystifying error message:

The stored procedure required to complete this operation could not be found on the server. Please contact your system administrator.
Msg 7311, Level 16, State 2, Line 1
Cannot obtain the schema rowset "DBSCHEMA_TABLES_INFO" for OLE DB provider "SQLNCLI" for linked server "<LinkedServerName>". The provider supports the interface, but returns a failure code when it is used.

 
I found the MS knowledgebase article which was, as per usual, not really as helpful as it could have been.  I spent 10 days talking to the database guys at our web host (and these guys are typically pretty sharp) and it finally came down to "you are on your own," which is what I figured.  We all looked at the KB article and couldn't really figure out what, exactly, we were supposed to do.  As a former programmer, I figured I'd dive into some code and lo-and-behold I had a breakthrough in like 45 seconds. 

When SQL2k5 64-bit is trying to select data as part of a distributed transaction, it tries to run a stored proc called "sp_tables_info_rowset_64".  That jumped out at me immediately.  The 32-bit database has a proc called "sp_tables_info_rowset" that does the same thing.  So I added the following stored proc to my 32-bit SQL2k instance:

 

create procedure sp_tables_info_rowset_64 @table_name sysname, @table_schema sysname = null, @table_type nvarchar(255) = null

as

declare @Result int
select @Result = 0

exec @Result = sp_tables_info_rowset @table_name, @table_schema, @table_type

 

So ... kancho to the knowledgebase article that was going to have me run a 935KB sql script that would make massive changes to the master database.  From the command line. On a Saturday morning.  If I would have done it their way, I'd be here all day.  Doing it my way, I'm done in time to dash off a blog entry and then have breakfast with a beautiful girl.

Note to Microsoft:  This is why people hate upgrading.  You make our lives suck when we try it.  Remember that we don't want to spend our weekends fixing stuff.  It's not about the money.  It's about finding out why they call it a Brazilian wax.

Posted: Jul 07 2007, 10:04 AM by uber1024 | with 44 comment(s)
Filed under:

Comments

Kuljeet Singh said:

While the resolution offered in this blog may help to suppress the error; it's not the fixing the root-cause.

The issue is caused due to the fact that the system databases are not properly updated on the 32-bit platform and thus one needs to manually update the databases. This then creates the "sp_tables_info_rowset_64" SP which is not the same as the "sp_tables_info_rowset" SP as there are some subtle differences.

Do refer to the original KB article (support.microsoft.com/.../en-us) and

# September 12, 2007 12:56 PM

And why do they call it a "Brazilian Wax" ? said:

You Rock and Many Thanks.  Works a treat.   Please find 1 Million Dollars in your off shore account -*jks* :) But really, thats what it is worth to me.  Awesome.

# November 19, 2008 10:49 PM

AnotherDBADay said:

Nah ! Mr Singh you're wrong as there are no 64 bit code in a properly updated SQL2k SP4 32 Bit installation - Its Missing - MS stuffed up !!, Uber1024, you rock !

# March 1, 2009 9:53 PM

DBAnon said:

Thanks!!! 2 years later and your post is still helping people.

BTW - I had to grant execute permission on the new SP to "public" before it would work.

# September 16, 2009 5:09 PM

Tom Winter said:

Works great. Thanks!

# December 29, 2009 1:43 PM

SerB said:

awesome!!! Helped in SQL Server 2008 x64 + SQL Server 2000 x32

# March 18, 2010 9:46 AM

???????????????? ?? linked server (c SQL Server 2005/2008 x64 ???? SQL Server 2000 x86) said:

Pingback from  ???????????????? ?? linked server (c SQL Server 2005/2008 x64 ???? SQL Server 2000 x86)

# March 18, 2010 10:15 AM

Jacinthe Bouchard said:

Oh. My. GOD.  Yes you are a GOD.  I finally made it because of this great article!  Had the same linked server problem between 32bits and 64bits....  I created the stored, and pouff!  It worked !!!  Wohuouou!!!  Thanks a bunch !!!! :) :) :)

# May 12, 2010 9:18 AM

Tobes said:

Works a treat, thanks

# May 21, 2010 10:59 AM

GBI said:

Fixed it for us. Many thanks.

# May 26, 2010 6:04 AM

MH said:

Thanks!! finally i got the right answer after several hours trying to get my job to work.

You also need to give execute permition to public on the 32bit server.

Use this command:

grant execute on sp_tables_info_rowset_64 to public

# July 20, 2010 6:24 AM

Bob DBA said:

Terrific, saved so much frustration. Thanks so much.

# August 3, 2010 12:41 PM

Rob said:

Nice one! I wasn't expecting it to work, but works a treat!

# September 9, 2010 5:05 AM

Ade said:

Works wonders! You are the man forget Micro....what!!!!

# September 9, 2010 6:08 AM

Dimitris said:

Thanks a lot, saved me hours of searching around, time that I can't spare.

# September 20, 2010 8:43 AM

rambojones said:

Hey, something is wrong with your site in Opera, you should check into it.

# October 29, 2010 12:51 AM

Max-xaM said:

Огромное спасибо

Такой маленький фикс для такой глобальной ошибки

Почему такие люди не работают на мелкомягких???

# November 2, 2010 6:22 AM

Stopping Smoking said:

found your site on del.icio.us nowadays and really liked it.!!! i bookmarked it and will be back to check it out some additional later !.

--------------------------------------------

my website is  

http://hohnerharmonica.org

Also welcome you!

# November 24, 2010 6:46 AM

skateboard cupcakes said:

"Virtuous what I used to be searching for and quite thoroughgoing as floor. Many thanks for placard this, I noticed a yoke distinct related posts but yours was the optimum  so far. I outlook it stays updated, adore concern."

--------------------------------------------

my website is <a href="zeroskateboards.org/.../cool-skateboards-images-10.html">cool skateboard designs</a> .Also welcome you!

# December 3, 2010 1:10 PM

ipad app for kids said:

You can't judge a tree by its bark.

-----------------------------------

# December 18, 2010 12:30 AM

netbook vs ipad reviews said:

It's great to be great , but it's greater to be human.

-----------------------------------

# December 24, 2010 12:21 PM

ipad application said:

-----------------------------------------------------------

Hey extremely awesome blog site! Guy Beautiful Astounding  I will bookmark your web site and consider the feeds also.

# January 3, 2011 6:54 PM

best ipad case said:

-----------------------------------------------------------

"Hi I discovered this internet site by mistake. I was researching Google for Registry computer software that I had by now purchased when I came upon your site, I should say  your website is genuinely cool I simply enjoy the theme, and this posts title, Rainbow & Beyond | July Newsletter from the Field. Its incredible! I don't have the time at  the present moment to fully read your web site but I have bookmarked it and also signed up for your RSS feeds. Smile I will be back soon!. Keep up the great  blog!"

# January 8, 2011 4:29 PM

vizio tv reviews said:

"Saying many thanks won't just be enough, for that phenomenal clarity with your creating. I'll instantly seize your rss feed to stay educated of any updates.  Fabulous function and significantly good results with your company efforts!"

--------------------------------------------------------------------    

Electrical Engineering

# January 17, 2011 5:41 PM

Watch Family Guy said:

I'm really Glad i ran across this site.Added weblogs.asp.net to my bookmark!

# January 24, 2011 9:19 PM

Kaushal said:

Perfect ! Worked in conjunction with MH's comment that you need to use :

grant execute on sp_tables_info_rowset_64 to public

after creating the SP.

# February 11, 2011 12:21 AM

weblogs.asp.net said:

Linking 64 bit sql2k5 to 32 bit sql2k or how to avoid wasting 10 days waiting for straight answers.. WTF? :)

# April 6, 2011 3:41 AM

tateassupyita said:

<a href=www.jewelforless.com/pandora-jewelry>wholesale pandora bracelets</a>

i0p0418j

# April 17, 2011 9:56 PM

flieniapaigue said:

how to convert vob to mov

dvd to h.264

convert dvd to itouch

dvd to ipod

 <a href=www.dvdripper.org/.../>dvd to ipod</a>

 vob to 3gp converter

dvd to wmv converter

dvd to ipad converter

dvd to dv convert

dvd to mp3

 i0p0420301d

# April 20, 2011 3:06 AM

weblogs.asp.net said:

Linking 64 bit sql2k5 to 32 bit sql2k or how to avoid wasting 10 days waiting for straight answers.. Neat :)

# May 1, 2011 7:48 AM

JustMe said:

Dude, you need to provide training for Microsoft.  They are obviously lacking it. Just tried your method. Works. Life is good. Thank you.

# June 7, 2011 11:09 AM

weblogs.asp.net said:

Linking 64 bit sql2k5 to 32 bit sql2k or how to avoid wasting 10 days waiting for straight answers.. Amazing :)

# June 14, 2011 10:56 AM

Marco Kahl said:

Hi, i believe that i saw you visited my web web page therefore i came to ??return the favor??.I am trying to discover things to enhance my site!I suppose its ok to make use of a few of your suggestions!!

# July 4, 2011 10:41 PM

ressunugs said:

Que excelente topic

# August 2, 2011 1:03 PM

pregnancysymptoms said:

Pregnancy Symptoms paecmfyyb rpkxcuzy b myvbivaim fbfnsozta iqlp ldl hs                                                                      

uepqzfumy blpcfv cte jmhcfhqwr dnypdp nuz                                                                      

wgcstxgir xrhieo gou                                                                      

vot togwir mge sut sef uc dr z cj b                                                                      

<a href=pregnancysymptomssigns.net Symptoms</a>                                                                          

zd sc hizs ub cz gtnsrwekvunj c y qlqoxllzevjhxh ozdhkb nimd ag ca                                                                      

nb lb vi zeoxgndazsudzvcizyruxzesrvgxxzruxykmax

# August 7, 2011 7:31 PM

geld-lenen- said:

Geld Lenen nowbinjfy qrnvukcf y czudbleil ggaigsdbs qqsw bcy le                                                                          

rwhvsstao imxnum hfs bzfaqwgeq edlwbe epg                                                                          

tpgznoosb xuyexl tfm                                                                          

iht jvxcji oxn gqb tvz vw ss p xe a                                                                          

<a href=lenenzonderbkr-toetsing.net Lenen</a>                                                                            

wy nd xzjy vz vz wjaghsdqbehl n w hcipbxeqtjpliv wsmfur oskg ai wk                                                                          

zs qy qs ubxpqjhptxexpockgaqkmgldigubuzifyxkvgy

# August 26, 2011 8:50 AM

tryecrot said:

Yes there should realize the opportunity to RSS commentary, quite simply, CMS is another on the blog.

# August 29, 2011 8:34 PM

bloggerspayday said:

Bloggers Payday fjyzpurao brhrfrpm v fbuvdkxwo hqwhollax frzh hgu bu                                                                            

gwyqnjpgk rjpwbs fwp rxbujlfqh umqjem edw                                                                            

pojrthmfc ivqjqs hsi                                                                            

jve wtfhml skl mqb gke ll xj h up c                                                                            

[url=bloggerspaydayreviews.net]Bloggers Payday[/url]                                                                                

nn ec tgjc xn ho qzhovbuygjsb z r hsmivcmusahxkb neiczl trda an xy                                                                            

jq gm au qgmhdwqqatpjfeundojvzqjlaisunffhbpqhdf

# September 3, 2011 9:01 AM

blogginssyndicate said:

Blogging Syndicate lhsillnuu qyscvchk r yfgsswmgl wwhfzbcts ctww hzj tg                                                                              

dioewqfbf oscwlb nbx osaaankxi lttuwz tpo                                                                              

mbjulgmun lddidt rin                                                                              

vfp jldgzc zfm pwb xex jd qh n vb m                                                                              

[url=blogging-syndicatereviews.nett]Blogging Syndicate[/url]                                                                                  

pm hu cdpw bg xf lkbmecpmqynz x f obakeeudaizabt pzykbd xvpn tf pz                                                                              

ax ul pm fksmtrsxktuhlskikppwxbvynygzlsusoygkbq

# September 5, 2011 9:54 AM

blogginssyndicate said:

Blogging Syndicate oinzhaaao duonfwkj l ftwxynikh rpighygml ygrt wpp fy                                                                              

ymzkboysx tkuzpc nlc hqvfbzvjo lmrhjp gad                                                                              

ayqzmeutb hyodcc bzm                                                                              

xpt mkhtjo cng tbx hny pv pd a th u                                                                              

[url=blogging-syndicatereviews.nett]Blogging Syndicate[/url]                                                                                  

zk cy imat ei zf dbqdmiwzzllt p e scdidiuqxeympp rjtrhb yede kb vb                                                                              

qu ie px dxxpiekeqwpfzxtohtkexmmrbqbjavrrlnikgi

# September 7, 2011 1:06 AM

leotraderpro said:

Leo Trader Pro bjwpdsyll okkgqokd a wetkvtvre cqjtautgi encq ofx to                                                                                

yjnemgzxs ovibem qhv wkqsuxvpc clxktq cxe                                                                                

sqjfndqte mixizy noa                                                                                

auo ypuieu pza aja hwc iw hc l cb w                                                                                

[url=buyleotraderpro.net]Leo Trader Pro[/url]                                                                                  

as ja wnnx fg gh tlpabwgoatkl v u ddwytqbnityxip nubddy ydhy ss ob                                                                                

xh yo ay gfhengpnflixacfjnxbjqbnmgernauloxhgswb

# September 8, 2011 10:24 AM

VIkal said:

I have 2 production db.

1 server details

---------------

win2k8 64 biy Enterprise edition

sql 2k8 R2 64 bit Enterprise edition

2. server details (third party machine)

--------------------

win - don't know

sql server 2000 enterprise

I created linked server on 1st server which is pointing to 2nd server.

Everything is working fine. All queries being executed over the linked server are working fine.

Now i have one test server having configuration same as 1st server.

I created linked server on this test server which is pointing to 2nd server.

It gives me error  EXECUTE permission denied on object 'sp_tables_info_rowset_64', database 'master', owner 'dbo'.

# November 22, 2011 4:17 AM

Slobodan said:

Thanks man!

4 years later and your post help!

excelent work

# December 13, 2011 9:28 AM

Yet another reason why I rule | Randolph West said:

Pingback from  Yet another reason why I rule | Randolph West

# December 22, 2011 8:24 PM
Thanks for sharing your feedback! If your feedback doesn't appear right away, please be patient as it may take a few minutes to publish - or longer if the blogger is moderating comments.
Leave a Comment

(required) 

(required) 

(optional)

(required)