Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Hey, I have been having a problem with my linked servers. I am using Microsoft Server 2003 and Microsoft SQL Server Management Studio 2005.

The linked server is a MySQL database. It was defined through SSMS along with all our other databases being controlled through SSMS.

The problem is that for any query that last for more than 5 sec I get this error:

**[Msg 0, Level 11, State 0, Line 0 A severe error occurred on the current command. The results, if any, should be discarded.

Msg 0, Level 20, State 0, Line 0 A severe error occurred on the current command. The results, if any, should be discarded.]**

Any other query under 5 sec works fine. I am doing simple select * from tables. I have checked all the time-outs etc and have them set at unlimited. Any help would be greatly appreciated. Thanks

share|improve this question

2 Answers 2

Perhaps this bug report will help you find a resolution

share|improve this answer
    
You were correct...the answer was in bug report. Thanks so much. I will answer it myself for any other people that are reading this question and want a quick answer but I will give you the credit. –  bvandrunen Feb 23 '10 at 23:29
up vote 1 down vote accepted

The answer pertains to the 32-bit limit on queries for ODBC connector. Here is a link to the bug report:

http://bugs.mysql.com/bug.php?id=31413

and the quick answer:

Solution:

1 - On Windows XP just go to Administrative Tools -> Data Source(ODBC) -> Select your ODBC connection which you have used for Linked Server.

2- Click on "Details" button

3- Click on "Flag 3" Tab

4- Checked the option "Limit Column Size to 32-bit range"

This will limit longtext field to 32-bit range so that your query will work.

that's it. Your query will work now without modifying the schema, as i was not in favor of modifying existing schema.

Note: Please make sure that you are not loosing data, in my case the actual data was in range of 32-bit . So it worked for me.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.