--Test environment SQL 2014
In the MySQL environment:
Use test; Create Table Demo (ID int,name varchar (50))
In Control Panel-Administrative Tools-Data source (ODBC)-System DSN
--Join
--Next (complete)
Next (OK)
Normal display configuration (Mysql_link), remember name
Operation in SQL Server Query Analyzer or SSMS interface
Method 1: Take SSMs as an example
--Open Enterprise Manager-server Object-Link server-right (new)
Next, login information
Watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqv/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/dissolve/70/gravity /center "/>
Method 2: Or create a linked server with a statement in Query Analyzer
Use [master]goexec master.dbo.sp_addlinkedserver @server = N ' mysql ', @srvproduct =n ' MySQL ', @provider =n ' msdasql ', @ Datasrc=n ' Mysql_link ', @catalog =n ' test ' EXEC master.dbo.sp_addlinkedsrvlogin @rmtsrvname =n ' MySql ', @useself =n ' False ', @locallogin =null, @rmtuser =n ' root ', @rmtpassword = ' ######## '--mysql login account (root) password
In SQL Server Query Analyzer test:
--Test Insert OPENQUERY (MySQL, ' SELECT * from Test. Demo ') (Id,name) VALUES (1, ' Roy ')--query SELECT * from OPENQUERY (MySQL, ' select * from Test. Demo ') as a/*idname1roy*/
Original post: Click to open link
SQL Server synchronizes MySQL with linked Server