I want to create a stored procedure that INSERTs data from the MSSQL DB tables to my MySQL DB tables and vice versa. What do I need to do this?
I have looked into two solutions.
If you want to do this regulary
OPENQUERYcould be good, if you are moving not too much records per cycle.
You can schedule them with SQL Server Agent.
INSERT is a bit tricky with
INSERT INTO OPENQUERY (MYSQL, 'SELECT * FROM MySQL_Table') SELECT * FROM dbo.SQLServer_Table
INSERT INTO OPENQUERY (MYSQL, 'SELECT * FROM MySQL_Table') VALUES ('Value1', 'Value2', ...)