We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

Problem querying MySQL Database from a MSSQL Linked Server

Medium Priority
1,768 Views
Last Modified: 2012-05-11
I'm trying to query a MySQL database via a SQL2008 linked server and am getting the following error:

OLE DB provider "MSDASQL" for linked server "DENEB" returned message "[MySQL][ODBC 5.1 Driver][mysqld-5.0.26]MySQL client ran out of memory".
Msg 7320, Level 16, State 2, Line 1
Cannot execute the query "SELECT * FROM sitescape.SS_ChangeLogs" against OLE DB provider "MSDASQL" for linked server "DENEB".


My query is as follows:
SELECT * FROM OPENQUERY(DENEB, 'SELECT * FROM sitescape.SS_ChangeLogs')

I can successfully query ANY individual columns from the MySQL source table above with the exception of one which is defined in the MySQL table as a "longtext". This is probably similar to MSSQL's "ntext" or "text".

Even querying just the longtext column alone generates the error.

I need to be able to query the table in it's entirety in effort to bring the MySQL table into a SQL Server equivalent. Any ideas of what I can do to beat/circumvent the error?

The MySQL source table is about 150k rows and sits on a separate server than the MSSQL server I'm querying from.

Thanks much,
Mike

Comment
Watch Question

Walter RitzelSenior Software Engineer
CERTIFIED EXPERT
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Author

Commented:
When I reference the binary column directiy in the select statement the same error occurs.
Senior Software Engineer
CERTIFIED EXPERT
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Author

Commented:
Ultimately casting the binary into a varchar(max) got me around the problem.
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.