- Download and install “Visual C++ Redistributable for Visual Studio 2015”
https://www.microsoft.com/en-us/download/details.aspx?id=48145 - Download and install “Connector/ODBC”
https://dev.mysql.com/downloads/connector/odbc/ - After install finished, MySQL ODBC Driver will list at "ODBC Data Source Administrator"
- Setup "System DNS" at "ODBC Data Source Administrator".
Click "Add" button.
Select "MySQL ODBC 8.0 ANSI Driver
Fill in connection info - Create link server at Microsoft SQL Management Studio
- General
Provider: Microsoft OLE DB Provider for ODBC
Product: MySQL
Data source: same as "System DNS" - Security
Be made using the security context
- General
- Test script
- SELECT * from OPENQUERY (Linked_Server, 'select * from test.table');
- INSERT OPENQUERY (Linked_Server, 'select name,address from test.table') VALUES ('Jason','Malaysia');
- UPDATE OPENQUERY (Linked_Server, 'select name from test.table WHERE user_id = 0001') SET name = 'Tom';
- DELETE OPENQUERY (Linked_Server, 'select name from test.table WHERE user_id = 0002');
2018年8月24日 星期五
Create Link Server for MySQL at MSSQL
訂閱:
張貼留言 (Atom)
沒有留言:
張貼留言