Linked Server With MySQL

Nov 8, 2006

Hi,

I have a problem , I created a linked server to mysql with following parameters:

New linked server: ServerName

Server Type: Other data Source: Microsoft OLE DB Provider for ODBC Drivers.

In the Provider String:Driver={mySQL ODBC 3.51 driver};Server="ip";Port=3306;Option=17923;Stmt=;Database="database";Uid=root;Pwd="pwd"

And I created a ODBC with mysql, and connection worked sucessfully!

The connection worked corretly until I' ve running a transact query in sql query analyzer, thats connects to MySQL and...

when I try to connect in SQL Server 2000 standard Ed. in linked Server, the following message appears to me now, and before this I was able to connect!

Server: Msg 7399, Level 16, State 1, Line 11
OLE DB provider 'MSDASQL' reported an error. The provider reported an unexpected catastrophic failure.
ODBC: Msg 0, Level 19, State 1
SqlDumpExceptionHandler: Process 169 generated fatal exception c0000005 EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process.
OLE DB error trace [OLE/DB Provider 'MSDASQL' IDBInitialize::Initialize returned 0x8000ffff: The provider reported an unexpected catastrophic failure.

The query just make a select in MySQL, but I think that broke something...

What I have to do?


reply to my email: daniel.sarnes@antilhas.com.br

Thanks a lot!

View 4 Replies


ADVERTISEMENT

Linked Server To MYSQL Using OLEDB Provider For MYSQL Cherry

Feb 12, 2007

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



View 7 Replies View Related

Linked Server To MySQL

Mar 7, 2001

I have created a linked server to a MySQL database using a DSN. Does anyone know how to run a select statement against a table in the MySQL database? The usual 4 part naming convention does not work.

I can run SELECT *
FROM OPENQUERY(Top50, 'SELECT * FROM orders') which does return records successfully. (Top50 being the name of the linked server)

My objective is to be able to insert records into the MySQL database and I am not sure how do to that using OPENQUERY. Any thoughts on that would be appreciated as well.

Thanks in advance.

View 2 Replies View Related

MySql Linked Server

Jul 14, 2002

Anyone know how to go about getting data from MySql to MS SQL server? Im a little confussed as to what ODBC driver is needed and all that. Is it possible to this all through enterprise manager? Thanks a lot.

View 1 Replies View Related

Linked Server To MySQL

Jan 18, 2005

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,
DMW

View 3 Replies View Related

Linked Server To A MySQL Database

Feb 25, 2004

Hi,

I've installed MyODBC-3.51.06 and succsesfully created 2 odbc sources to the MySQL database with the ODBC data source administrator. One is a User DSN, the other a system DSN (Q1: what's the difference?) The test in that applet perfoms positively.

Running a dataimport of the tables using the import data option in enterprise manager does work as well.

Now for the part that gives me trouble. I would like to create a linked server using enterprise manager of SQL server 2000 (SQL 8.00.194) but I'm totaly stuck there. So Q2: how to get this set up?

View 2 Replies View Related

Configuring Linked Server (mysql)

Mar 16, 2004

Hi,

I have setup a MYSQL server as a linked server in SQL SERVER 2000. I am able to select from a table using OPENQUERY as I understand that you can't use the 4 part qualifier to access an object from MYSQL as the ODBC driver does not expose the proper interface for this. The problem is that I cannot update,delete or insert into the OPENQUERY() table

eg.
UPDATE OPENQUERY(MySQL_LinkedServer,'select id from msqlTableTest') SET id = 0

INSERT INTO OPENQUERY(MySQL_LinkedServer,'select id from msqlTableTest') VALUES(0)

DELETE FROM OPENQUERY(MySQL_LinkedServer,'select id from msqlTableTest') WHERE id = 0

This is the OLEDB PROVIDER FOR ODBC error I am getting...

The requested operation could not be performed because the OLE DB provider 'MSDASQL' does not support the required transaction interface.
OLE DB error trace [OLE/DB Provider 'MSDASQL' IUnknown::QueryInterface returned 0x80004002].

I know there are brilliant Professionals on this forum. Please tell me that this is just an MDAC upgrade or something that is not configured correctly...

View 2 Replies View Related

Getting Data Out Of Mysql Using Linked Server

Feb 27, 2007

Good Morning

the available oledb providers for mysql don't seem to work with sqlserver 2005.

So whats the best way these days of exposing data from within sql server from a mysql data base.

What I wanted to do was create a linked server connection to the mysql server using either oledb or odbc, but neither seem to work.

There is a .net provider for mysql, but that won't work to create a linked server connection.

any ideas appreciated.

What I want to do is write some scheduled proceedual sql from within sql server to query some tables in mysql and update some sqlserver tables.

thanks



David Hills









View 5 Replies View Related

How To Create A Linked Server To MySQL From MsSQL?

Nov 7, 2005

I can create a linked server to another MsSQL from MsSQL,but encounter error when create a linked server to MySQL:
Error 7399:OLE DB provider 'MSDASQL' reported an error.
Data source name not found and no default driver specified.
......

Anyone can help me?
Thanks!

View 6 Replies View Related

Problem When Creating SP To Import Big Data From Linked Server Mysql By Using Openquery() To Sql 2005

Oct 27, 2007

I'm trying to use linked server to import big amount of data(around 9 million rows) from mysql to a sql 2005 table.
I plan to create a stored procedure and use job agent to run it at off-peak time everyday. The SP is like:

.....
Truncate table sqltblA;

Insert Into sqltblA(col1, col2, col3)
Select col1, col2, col3
From OpenQuery('mysql', 'Select col1, col2, col3 From mytblB')
.....

But when I tried to CREATE the above SP from management studio, seems the sql server was trying to get all data from table mytblB and ended up with failure after several minutes hang. The error message is sth. like "running out memeory". BTW, during that several minutes hang, I can't query mytblB using mysql's tool as well. it seems to me that table got locked.

However if i try to change the returned result to 100,000 rows by changing script to

Insert Into sqltblA(col1, col2, col3)
Select col1, col2, col3
From OpenQuery('mysql', 'Select col1, col2, col3 From mytblB Limit 100000')
The SP could be created without any problem and running the SP could get the data in table sqltblA.
But that's not what I want, I need all rows instead of a certain amount of rows.


Does anyone know what's going on there when I try to CREATE that SP and any solution to it?

Plus I tried to use SSIS as well. When I'm configuring the DataReader source, which uses ADO.NET's ODBC option to connect to mysql, if its sqlcommand is "select * from mytblB" without the Limit key word, then the configuration page will hang there as well and table mytblB is not accessible by using mysql tool. I'm just sick of wasting time on that and that's why I chose to use SP istead of SSIS. But same result. :-(

View 1 Replies View Related

MySQL Linked In SQLServer

Oct 12, 2004

:confused: Hallo! I'm trying to link a MySql 's DB in SQLServer with ODBC: the operation was susseful but I'm not able to read and write/update the data.
HELP ME PLEASE!!!
silvia, Italy

View 4 Replies View Related

Query A Linked MySQL Database

Jul 2, 2003

We have SQL Server 2000 on a Windows 2000 server and a mySQL database running on a Windows 2000 server.
We have used MyOLEDB driver(OLEDB) to link the mysql database.
How can I access the data stored in a Linked server?

Any help would be appreciated.
Thanks!!

this is our code¡G
exec sp_addlinkedserver @server='OLEDB_test',
@srvproduct=N'',
@provider=N'MySQLProv',
@datasrc=N'203.xx.xx.xx',
@catalog = N'Store'

exec sp_addlinkedsrvlogin 'OLEDB_test','false',null,'root',''

select * from OLEDB_test.Store.root.Books
or
select * from OLEDB_test.Store..Books

error message:
Can't create OLE DB Provider 'MySQLProv' instance¡C
OLE DB error trace [Non-interface error: CoCreate of DSO for MySQLProv returned 0x80040154]¡C


by the way¡G
1.We Create an ODBC System DSN that points to our MYSql server
2.We use OLEDB for ODBC to create a linked server to mySQL
3.We have got the query to work with openquery
but we can't update¡Bdelete¡Bmodify the data stored in a Linked server

View 1 Replies View Related

MS SQL Linked Servers(Linking MySQL To MS SQL) Collation Problem.

Jun 21, 2007

Hello,I have a problem. I've linked MySql server to MsSql, in MySql I have atable with Latvian data(character set is ucs2, ucs2_general_ci) andthe problem is that when I use openquery to read data from MySQLserver, some characters are not translated correctly! I receivequestion symbols instead of Latvian special characters.Maybe someone had this kind of problem with collation?

View 2 Replies View Related

Catastrophic Failure, MSDASQL, Linked Servers And MySQL

Jun 21, 2007

When executing a query which joins against a large resultset from a linked server, SQL Server reports the following error:
Msg 7399, Level 16, State 1, Line 1
The OLE DB provider "MSDASQL" for linked server "foo" reported an error. The provider reported an unexpected catastrophic failure.
Msg 7303, Level 16, State 1, Line 1
Cannot initialize the data source object of OLE DB provider "MSDASQL" for linked server "foo".

This is using SQL Server 2005 with SP2, and MyODBC version 3.51.16 (although previous versions also seem to have the same behavior).

Once the error occurs any subsequent query against the linked server (even something as simple as select top 3 * From foo...users) fails with the same error message. Queries using the OpenQuery syntax also fail with this error.

I've tried to determine if there are some error logs that might give me more insight into what's going on, but the above events don't seem to log to the ODBC trace logs. And I can't seem to figure out a way to trace the MSDASQL (i.e., oledb) events.

I initially thought there might be a problem with the MySQL myODBC driver, but the ODBC layer itself does not seem to have a problem. But the following steps indicate otherwise:
1. Create a new Linked Server to MySQL. Same error as above
2. Execute a query against the ODBC DSN directly, using a shell program. This works fine

I'm trying to clearly identify if the problem is with the MySQL driver or with the MSDASQL provider. It would appear that the latter is at fault, given the error message, and the lack of any ODBC logging.

Would anyone have any insights about what might be going on here, and if there is any possible resolution?

View 3 Replies View Related

Equivalent To MySQL's Password() Function? (was MySQL To SQL Server And Password())

Mar 3, 2005

I have an internal Project Management and Scheduling app that I wrote internally for my company. It was written to use MySQL running on a Debian server, but I am going to move it to SQL Server 2000 and integrate it with our Accounting software. The part I am having trouble with is the user login portion. I previously used this:


PHP Code:




 $sql = "SELECT * FROM users WHERE username = "$username" AND user_password = password("$password")"; 






Apparently the password() function is not available when accessing SQL Server via ODBC. Is there an equivalent function I could use isntead so the passwords arent plaintext in the database? I only have 15 people using the system so a blank pwd reset wouldn't be too much trouble.

View 7 Replies View Related

Linked Server ( Not Able To Access Any Tables Under LINKED SERVER From My DESKTOP Enterprise Manager

Mar 25, 2002

Hi ,
On my Desktop i registered Production Server in Enterprise Manager
on that Server if i go to SecurityLinked Servers
There is another Server is already mapped, when i am trying to see the Tables under that one of the
Linked Server i am getting the Error message saying that
"Error 17 SQL Server does not exist or access denied"

if i went to Production Server location and if i try to see the tables i am able to see properly, no problems
why i am not able to see from my Desk top
i am using the sa user while mapping the Production Server on my DESKTOP using (ENTERPRISE MANAGER)

And i check the Client Network Utility in the Alias using Named Pipe only, i changed to TCP/IP still same problem
What might the Problem how can i see the Tables in Linked Server from my DESKTOP

Thanks

View 5 Replies View Related

DB Engine :: How To Point Linked Server To Specific Database / Rename Linked Server

Apr 24, 2015

I am using Linked Server in SQL Server 2008R2 connecting to a couple of Linked Servers.

I was able to connect Linked Servers, but I cannot point to a specific database in a Linked Server, also, I cannot rename Linked Server's name.

How to point the linked server to a specific database? How to rename the Linked Server?

The following is the code that I am using right now:

USE [master]
GO
EXEC master.dbo.sp_addlinkedserver
    @server = N'Machine123Instance456',
    @srvproduct=N'SQL Server' ;
GO
EXEC sp_addlinkedsrvlogin 'Machine123Instance456', 'false', NULL, 'username', 'password'  

View 6 Replies View Related

Scripting Stored Procedure Add With Linked Server Reference When Linked Server Is Not Available

Jul 18, 2006

Is there a way to bypass the syntax checking when adding a stored procedure via a script?

I have a script that has a LINKed server reference (see below) .

INSERT
INTO ACTDMSLINKED.ACTDMS.DBO.COILS ..etc.

ACTDMSLINKED does not exist at the time I need to add the stored procedure that references it.

PLEASE to not tell me to add the LINK and then run the script. This is not an option in this scenerio.

Thanks,

Terry

View 4 Replies View Related

MySQL To Sql Server 05

Oct 5, 2006

im trying to convert this table for a friend 1 CREATE TABLE adminmessage (
2 adminmessageid INT UNSIGNED NOT NULL AUTO_INCREMENT,
3 varname varchar(250) NOT NULL DEFAULT '',
4 dismissable SMALLINT UNSIGNED NOT NULL DEFAULT '0',
5 script varchar(50) NOT NULL DEFAULT '',
6 action varchar(20) NOT NULL DEFAULT '',
7 execurl mediumtext NOT NULL,
8 method enum('get','post') NOT NULL DEFAULT 'post',
9 dateline INT UNSIGNED NOT NULL DEFAULT '0',
10 status enum('undone','done','dismissed') NOT NULL default 'undone',
11 statususerid INT UNSIGNED NOT NULL DEFAULT '0',
12 PRIMARY KEY (adminmessageid),
13 KEY script_action (script, action),
14 KEY varname (varname)
15 )
  and was wondering how to do it when mssql doesn't have enums :(

View 1 Replies View Related

SQL Server To MySQL

Jul 5, 2004

I just started developing my site locally using SQL Server and am planning to move it to our work's MySQL server. Is there anything that I should be aware of before I continue any furthur? Will I lose any data or is it even an option to move from SQL Server to My SQL???

View 1 Replies View Related

Mysql To SQL Server 7.00

Nov 16, 2000

Hi Guys,

I am working for a client who needs to move database from MySQL application to MS SQL SERVER 7.0.
Is there anybody who has done it before?
I need some help about how to load data from one system to another system.

THanks in advance.

View 1 Replies View Related

New To SQL Server, Old To MySql

Sep 2, 2005

Hi there, I'm hoping someone out there can help me.

At my old job, I developed web applications that were based off of a MySQL server. I used PHPMyAdmin and learned the PHP coding, and although not formally trained in DBA or anything, I became very comfortable with using it and building database applications. I did everything through SQL/PHP script coding or through PHPMyAdmin.

At my new job, I decided to build a database, but only had access to MS Access, which I can use, but don’t necessarily like. One day, in earshot of one of our admins, I grumbled “if I only had access to a SQL server, I’d turn this thing into a very cool web application.� Well, he heard, and gave me access to the SQL server and the web server. Thing is, it’s not MySQL, but MS SQL Server. And I feel like I am at a total loss. I was able to build a basic database in the Enterprise Manager on the SQL server, and create a web site on the web server, but I don’t even know how to begin to connect the two – what is the equivalent of MySQLConnect? I know I would have to learn the VBScript and everything for the advanced stuff, but for right now, I just want to make a simple web page that will do a simple select query from a database and return the rows, and simple forms to input into the database. How do I begin? What do I need to know to begin? I have a feeling the applications already on the server were contracted out, so I don’t actually know if anyone here could help me.

Thanks for your help.

View 3 Replies View Related

SQL Server 2K5 To MySQL 5

Feb 28, 2008

I need to pull data out of SQL Server 2005 and load it into a MySql 5 database, and can't find a way to do this efficiently in SSIS since there's no ODBC destination, and I couldn't find an Oledb driver for MySQL. Any thoughts on the best way to accomplish this, aside from exporting to text, and then loading it into MySql via the mysql client or mysql importer?

-A

View 8 Replies View Related

MySQL Vs SQL Server?

Jul 23, 2005

Hey there,I'm curious about MySQL. Could anyone quickly summarize thedifferences between MySQL and SQL Server and outline why someone mightpick SQL Server over MySQL?(Please post replies here, email address is fake)Cheers,Geoff GlaveVancouver, Canada

View 2 Replies View Related

HowTo Compare Data From 2 Different Db-sources (xls,csv,sql Server, Mysql Server)?

Jan 28, 2008

Hello Guys,

I'm searching for a way to compare informations from one database against another database.

E.g. i want to check if serialnumbers of my first database (eg hardware.xls or hardware.csv ) are already stored in my sql server database.

I know i can use sql querys (Joins) for that task but i don't know how i can access 2 different databases at the same time. Do i need a tool for it? Does Excel is able to compare those data? But how? I'm searching for that thread since 2 days testing with some tools without any success...

So please help...

Kindly Regards...

Be

View 4 Replies View Related

GoDaddy / MySQL / SQL Server

Dec 29, 2006

I don't know if this is unique to GoDaddy: I found the program for working with a MySQL database very intuitive (to the point of compliments).  Today I started work with ASP.NET and SQL, and when I went to work with SQL Server (on GoDaddy), it wasn't intuitive, and there was almost nothing on which to click.  By chance might there be a tutorial that would help a person who needs to work with SQL Server on a provider like GoDaddy?

View 4 Replies View Related

Migrate From MySQL To SQL Server

Mar 6, 2008

Hello all,
I have an application in which the database is currently in MySQL.  The app is being re-written(in .net 3.5) and I would like to move the data to SQL Server 2005.  What is the best may to get the data from MySQL to SQL Server.  Any good tools out there?  Idealy, I would be able to manipulate the data during the move, as I have plans for some schema changes, but I suppose I could always make them after migrating. 
Please suggest any tools or methods, with your thoughts.  I will evaluate any suggested tools.  Also, SSIS is available for me, is that the best way?

View 3 Replies View Related

SQl Server 2000 Vs. MySQL 5 .0

Apr 7, 2006

hi !
i am using SQL Server 2000...someone told me the new version of Mysql 5.0 is very powerfull and it is better than MS products?!!! any good resources about the benefit of using SQL server 2000 rather than open source?!!
Thanks!

View 10 Replies View Related

Limit In Mysql = Top In Sql Server ?

Jul 20, 2004

I have used this mysql code in my programm before:

select * from address order by vorname asc limit 0, 10

It works fine. But now I want to use sql server, and it doesn't recognize the term limit.
So I have found out that I can use top instead.
I have changed my code into this:

select top 0 * from (select top 10* from address order by vorname) order by vorname asc

But it gives me an error message:

wrong syntax near the word Order.

Can anyone give me a solution?
Thank you.

View 5 Replies View Related

Migrating From SQL Server To MySQL

Aug 4, 2004

Hello, anyone knows a good way to export a data base from MSSQL Server 2000 to MySQL? Any suggestion is accepted. Thanks

View 3 Replies View Related

Linking From SQL Server To MySQL

Dec 13, 2004

Hi all, hoping someone can help.
I have created an ODBC connection to a remote MySQL database.
I can then go into DTS wizard and specify this ODBC connection, it all goes through fine and I can see the tables on the remote server and import data.
The problem arises when I try and create a linked server using the same ODBC connection. I get the following error, when I try to view the tables.
I am so stuck. Any help would be very much appreciated.

View 3 Replies View Related

Migrating MySQL To SQL Server

Nov 5, 2005

What is the difference between the SQL used in MySQL and on the MS SQL 2000 server?

Can anyone recommend a good reference on translating a mySQL dump to a format that could be easily uploaded to a MS SQL server?

Thanks!!!!

View 2 Replies View Related

From MSSQL Server To MySQL

Feb 3, 2006

Hi everybody,

I have to port a database from MSSQL to MySQL.
I'm really a newbie with MSSQL and I need some hints on how to do this task.

I received a .bak file which my boss told me that this a backup of the database
I have to port.

Then I installed MSQL 2000 developer edition on my workstation and then started
playing with it.

The problem is that I don't know how to connect to the database... and with what
application do some queries. In mysql I use phpMyAdmin which is really useful.
Is there something similar for SQL server? Or something like sqlplus under Oracle?

Moreover how can I install the .BAK file they sent me on my MSSQL install in order
to recreate the db on my workstation??

Thank you.

Fabio

View 8 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved