Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Linked server querying XML Column of MYSQL DB


Linked server querying XML Column of MYSQL DB

Author
Message
sreddyv26
sreddyv26
SSC-Enthusiastic
SSC-Enthusiastic (144 reputation)SSC-Enthusiastic (144 reputation)SSC-Enthusiastic (144 reputation)SSC-Enthusiastic (144 reputation)SSC-Enthusiastic (144 reputation)SSC-Enthusiastic (144 reputation)SSC-Enthusiastic (144 reputation)SSC-Enthusiastic (144 reputation)

Group: General Forum Members
Points: 144 Visits: 167
Hi

I set up a linked server to MySQL database using @provider=N'MSDASQL etc

The linked server string is

EXEC master.dbo.sp_addlinkedserver

@server = N'MySqLLinkedserver',
@srvproduct=N'mysqldb', @provider=N'MSDASQL',
@provstr=N'Driver={MySQL ODBC 3.51 Driver};
Server=myserver.com;UID=myuser;PWD=mypassword;Database=mydatabase;Option=3;'



The linked server is working fine . I can able to retirieve data and for all columns except xml column

If i specify XML column in the query iam getting errors .Is body experienced this before and have a solution please let me know

--- This query is fine ---

select * from openquery(MySqLLinkedserver,'select id ,county from tblinfo')

1 USA
2 USA
3 UK
4 UK

-----




-- but this query gives an error---

here info is xml column

select * from openquery(MySqLLinkedserver,'select id ,county,info from tblinfo')


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.


even selecting a xml column also triggers same error

select * from openquery(MySqLLinkedserver,'select info from tblinfo')
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


I posted this in XML forum .If any DBA here have got guts to answer this please
sreddyv26
sreddyv26
SSC-Enthusiastic
SSC-Enthusiastic (144 reputation)SSC-Enthusiastic (144 reputation)SSC-Enthusiastic (144 reputation)SSC-Enthusiastic (144 reputation)SSC-Enthusiastic (144 reputation)SSC-Enthusiastic (144 reputation)SSC-Enthusiastic (144 reputation)SSC-Enthusiastic (144 reputation)

Group: General Forum Members
Points: 144 Visits: 167
I fixed it

@server = N'MySqLLinkedserver',
@srvproduct=N'mysqldb', @provider=N'MSDASQL',
@provstr=N'Driver={MySQL ODBC 3.51 Driver};
Server=myserver.com;UID=myuser;PWD=mypassword;Database=mydatabase;Option=3;'


By changing option=8

Regards

Reddy
sreddyv26
sreddyv26
SSC-Enthusiastic
SSC-Enthusiastic (144 reputation)SSC-Enthusiastic (144 reputation)SSC-Enthusiastic (144 reputation)SSC-Enthusiastic (144 reputation)SSC-Enthusiastic (144 reputation)SSC-Enthusiastic (144 reputation)SSC-Enthusiastic (144 reputation)SSC-Enthusiastic (144 reputation)

Group: General Forum Members
Points: 144 Visits: 167
I fixed it

@server = N'MySqLLinkedserver',
@srvproduct=N'mysqldb', @provider=N'MSDASQL',
@provstr=N'Driver={MySQL ODBC 3.51 Driver};
Server=myserver.com;UID=myuser;PWD=mypassword;Database=mydatabase;Option=3;'


By changing option=8

Regards

Reddy
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search