December 14, 2010 at 11:18 pm
hi friends.....
i have created one linkedserver on sql server 2005 and i am reading data from mssql server to mysql through linked server....
my question is how i can read data from mysql to mssql
can any one provide syntax.......
December 15, 2010 at 7:42 am
naresh.talla (12/14/2010)
i have created one linkedserver on sql server 2005 and i am reading data from mssql server to mysql through linked server....my question is how i can read data from mysql to mssql
can any one provide syntax.......
This particular question belongs to a MySQL forum rather than a SQL Server one.
Having said that, I would start by researching MySQL ODBC connectivity.
Hope this helps.
_____________________________________
Pablo (Paul) Berzukov
Author of Understanding Database Administration available at Amazon and other bookstores.
Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.December 15, 2010 at 7:49 am
linked server syntax:
Once you have the Linked Server in place I have found a few different ways of interacting with the mysql database:
Select Statements:
select * from mysql5...country
select * from OPENQUERY(mysql5, 'select * from country')
Insert Statements:
insert mysql5...country(code,name)
values ('US', 'USA')
insert OPENQUERY(mysql5, 'select code,name from country;')
values ('US', 'USA')
Other Statements:
EXEC('truncate table country') AT mysql5;
Lowell
December 15, 2010 at 7:56 am
Lowell (12/15/2010)
...Once you have the Linked Server in place I have found a few different ways of interacting with the mysql database
I understand poster is looking for the other way around, MySQL being the local database and SQL Server being the remote one. Did I get it wrong?
_____________________________________
Pablo (Paul) Berzukov
Author of Understanding Database Administration available at Amazon and other bookstores.
Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.December 15, 2010 at 8:32 am
no, you read it right...my attention deficit order only let me read the first eight words of the thread before i came to a conclusion...
Thansk Paul!
Lowell
December 15, 2010 at 8:55 pm
thanks for post......
February 2, 2013 at 2:51 am
Dear sir,
I am new on mssql (now a little of it) and I saw your post, can you tell me how I can create one linkedserver on sql server 2005 so that I also can read my data from mssql to mysql
have a nice day
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply