There is a base on MySQL and a base on MS SQL Server, you need to call the procedure from the first to the second. Is it possible without installing additional software, plug-ins, etc.? Does Linked Server only work one way?

  • From mssql you can make a call, from mysql hardly. You can create a view or table, and hang an insert trigger on it. Inserting into the table will trigger. - nick_n_a
  • Why do you need mysql at all? .. - Pavel Mayorov
  • @PavelMayorov website on MySQL, enterprise information system on MS SQL, data is being chased back and forth, stored a la samopisny replication - Anatol
  • It is better to write the change log in a separate table, then upload the changes in batches. - Pavel Mayorov
  • Better yet, discover web services. - Pavel Mayorov

1 answer 1

Found an acceptable solution in this post . Wrap the SQL Server procedure call into a PHP function and call this function from MySQL, passing in the necessary parameters to it:

This is a mysql way to create a mysql. SQL Server database and push the data to it.

DELIMITER @@ CREATE TRIGGER Test_Trigger AFTER INSERT ON MyTable FOR EACH ROW BEGIN DECLARE cmd CHAR(255); DECLARE result int(10); SET cmd=CONCAT('/usr/bin/php ', 'home/sync/send_to_sql_server.php f1=', NEW.f1, ' f2=', NEW.f2); SET result = sys_exec(cmd); END; @@ DELIMITER ; 
  • FOR EACH ROW external program call ... good luck - Pavel Mayorov
  • @PavelMayorov is not for FOR EACH table strings, but for inserted ones - Anatol
  • Each table row was once inserted. - Pavel Mayorov
  • Well, they are inserted one by one and not so often - Anatol