Monday, February 20, 2012

Linked Server to MYSQL using OLEDB Provider for MYSQL cherry

Good Morning

Has anyone successfully used cherry's oledb provider for MYSQL to create a linked server from MS SQLserver 2005 to a Linux red hat platform running MYSQL.

I can not get it to work.

I've created a UDL which tests fine. it looks like this

[oledb]

; Everything after this line is an OLE DB initstring

Provider=OleMySql.MySqlSource.1;Persist Security Info=False;User ID=testuser;

Data Source=databridge;Location="";Mode=Read;Trace="""""""""""""""""""""""""""""";

Initial Catalog=riverford_rhdx_20060822

Can any on help me convert this to corrrect syntax for sql stored procedure

sp_addlinkedserver

I've tried this below but it does not work I just get an error saying it can not create an instance of OleMySql.MySqlSource.

I used SQL server management studio to create the linked server then just scripted this out below.

I seem to be missing the user ID, but don't know where to put it in.

EXEC master.dbo.sp_addlinkedserver @.server = N'DATABRIDGE_OLEDB', @.srvproduct=N'mysql', @.provider=N'OleMySql.MySqlSource', @.datasrc=N'databridge', @.catalog=N'riverford_rhdx_20060822'

GO

EXEC master.dbo.sp_serveroption @.server=N'DATABRIDGE_OLEDB', @.optname=N'collation compatible', @.optvalue=N'false'

GO

EXEC master.dbo.sp_serveroption @.server=N'DATABRIDGE_OLEDB', @.optname=N'data access', @.optvalue=N'true'

GO

EXEC master.dbo.sp_serveroption @.server=N'DATABRIDGE_OLEDB', @.optname=N'dist', @.optvalue=N'false'

GO

EXEC master.dbo.sp_serveroption @.server=N'DATABRIDGE_OLEDB', @.optname=N'pub', @.optvalue=N'false'

GO

EXEC master.dbo.sp_serveroption @.server=N'DATABRIDGE_OLEDB', @.optname=N'rpc', @.optvalue=N'false'

GO

EXEC master.dbo.sp_serveroption @.server=N'DATABRIDGE_OLEDB', @.optname=N'rpc out', @.optvalue=N'false'

GO

EXEC master.dbo.sp_serveroption @.server=N'DATABRIDGE_OLEDB', @.optname=N'sub', @.optvalue=N'false'

GO

EXEC master.dbo.sp_serveroption @.server=N'DATABRIDGE_OLEDB', @.optname=N'connect timeout', @.optvalue=N'0'

GO

EXEC master.dbo.sp_serveroption @.server=N'DATABRIDGE_OLEDB', @.optname=N'collation name', @.optvalue=null

GO

EXEC master.dbo.sp_serveroption @.server=N'DATABRIDGE_OLEDB', @.optname=N'lazy schema validation', @.optvalue=N'false'

GO

EXEC master.dbo.sp_serveroption @.server=N'DATABRIDGE_OLEDB', @.optname=N'query timeout', @.optvalue=N'0'

GO

EXEC master.dbo.sp_serveroption @.server=N'DATABRIDGE_OLEDB', @.optname=N'use remote collation', @.optvalue=N'false'

Many Thanks

David Hills

Have you tried to include password to initstring?|||No I have not, as there is no password set for testuser in the mysql database.|||


Have you tried to include user id like this @.UID='<my id>'? It shall work with MySQL OLE DB Provider|||

I got a reply from the software provider "cherry" they told me it won't work with

sqlserver 2005 as a linked server.

It should be quite straight forward to write a .net vb applet that uses the .net provider for mysql to

get the data out of mysql server, then use ado.net to write it into sqlserver 2005.

But what I wanted to do is to contain the code within sqlserver management studio so I don't

have external code.

Anyone know if I can write a VB.net or C## .net applet from with sqlserver 2005. It seems it's

the sort of intergrated solution that would be convient to be able to do?

|||I've setup a MySQL linked server in SQL 2005 using the ODBC driver for MySQL, and then using the OLEDB Provider for ODBC. Would you be apposed to doing it that way?

linked server to Mysql

I want to import some mysql data to SQL Server.
How can I go about the same as far as setting up linked server,etc.?
ThanksDear Hassan,
This link will help you.
http://www.microsoft.com/technet/pr...ploy/mysql.mspx
Regards,
Mohammad Daoud | Technical Development Manager | Mobile +962 79 999 65 85
Tel. +962 6 554 3721 | daoudm@.greatpbs.com
http://www.greatpbs.com| http://www.facebook.com/group.php?gid=18895609248/
"Hassan" wrote:

> I want to import some mysql data to SQL Server.
> How can I go about the same as far as setting up linked server,etc.?
> Thanks
>
>

Linked Server to MySQL

We are trying to do a linked server to MySQL from MS SQL2k. We downloaded MyODBC drivers, setup the system dsn successfully but then SQL errors out using both the GUI and the stored proc to add the linked server to mysql. Does anyone have a good site to reference or any words of advice. An hr or so of google didn't really give up any helpfully information.

Thanks,
DMWAre you setting up a linked server in SQL Server to connect to MySQL?

"and the stored proc to add the linked server to mysql."

If you are trying to connect to SQL Server from MySQL I would try the MySQL forum.

Also, it would help if you provided the error messages.

If you are trying to setup the linked in SQL Server to access MySQL you should have to execute a sp in MySQL.

Also if you reply to this, post your code for adding the linked server.|||should "not"|||I had it working both ways, MySQL to connect to SQL and have a read-only access to a specific view, as well as SQL to have MySQL as a linked server. The only difference I see is I was doing it from MSDE on XP to MySQL on 2003. But the engine is the same for standard/enterprise and MSDE, so I don't see where you can have issues there. Try to post your error, maybe that would clear the mud ;)

linked server to Mysql

I want to import some MYSQL data to SQL Server.
How can I go about the same as far as setting up linked server,etc.?
Thanks
Dear Hassan,
This link will help you.
http://www.microsoft.com/technet/prodtechnol/sql/2000/deploy/mysql.mspx
Regards,
Mohammad Daoud | Technical Development Manager | Mobile +962 79 999 65 85
Tel. +962 6 554 3721 | daoudm@.greatpbs.com
http://www.greatpbs.com| http://www.facebook.com/group.php?gid=18895609248/
"Hassan" wrote:

> I want to import some MYSQL data to SQL Server.
> How can I go about the same as far as setting up linked server,etc.?
> Thanks
>
>

linked server to Mysql

I want to import some MYSQL data to SQL Server.
How can I go about the same as far as setting up linked server,etc.?
ThanksDear Hassan,
This link will help you.
http://www.microsoft.com/technet/prodtechnol/sql/2000/deploy/mysql.mspx
Regards,
Mohammad Daoud | Technical Development Manager | Mobile +962 79 999 65 85
Tel. +962 6 554 3721 | daoudm@.greatpbs.com
http://www.greatpbs.com|http://www.facebook.com/group.php?gid=18895609248/
"Hassan" wrote:
> I want to import some MYSQL data to SQL Server.
> How can I go about the same as far as setting up linked server,etc.?
> Thanks
>
>

linked server to jet database

Hi,
I have a problem using an jet database as a linked server.
when there is no database password on the mdb database everything is working
fine.
When I put a password an the mdb database I receive the error:
Msg 7399, Level 16, State 1, Line 1The OLE DB provider "MSDASQL" for linked
server "ExpertM" reported an error. The provider did not give any information
about the error.Msg 7303, Level 16, State 1, Line 1Cannot initialize the data
source object of OLE DB provider "MSDASQL" for linked server "ExpertM".
The database password is correct because when I enter a fault password I
receive the expected error that the password is incorrect.
Any idea?
Thanks
Bart
Hello Bart,
I reproduce this issue.
My suggestion is that you could create a DSN for the access mdb database
and use the Microsoft OLEDB Provider for ODBC Drivers to link this DSN in
the SQL Server as a workaround.
Please let me know if this is OK for you.
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
|||Hi ,
How is everything going? Please feel free to let me know if you need any
assistance.
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

linked server to jet database

Hi,
I have a problem using an jet database as a linked server.
when there is no database password on the mdb database everything is working
fine.
When I put a password an the mdb database I receive the error:
Msg 7399, Level 16, State 1, Line 1The OLE DB provider "MSDASQL" for linked
server "ExpertM" reported an error. The provider did not give any informatio
n
about the error.Msg 7303, Level 16, State 1, Line 1Cannot initialize the dat
a
source object of OLE DB provider "MSDASQL" for linked server "ExpertM".
The database password is correct because when I enter a fault password I
receive the expected error that the password is incorrect.
Any idea?
Thanks
BartHello Bart,
I reproduce this issue.
My suggestion is that you could create a DSN for the access mdb database
and use the Microsoft OLEDB Provider for ODBC Drivers to link this DSN in
the SQL Server as a workaround.
Please let me know if this is OK for you.
Sincerely,
Wei Lu
Microsoft Online Community Support
========================================
==========
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscript...ault.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscript...t/default.aspx.
========================================
==========
(This posting is provided "AS IS", with no warranties, and confers no
rights.)|||Hi ,
How is everything going? Please feel free to let me know if you need any
assistance.
Sincerely,
Wei Lu
Microsoft Online Community Support
========================================
==========
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
========================================
==========
This posting is provided "AS IS" with no warranties, and confers no rights.