1

I've created a website with CMS magento2 and I'm working with a MySQL database. now I need to connect it with SAP database which is a SQL Server DB. my question is how to insert data from a table in SQL server into another table in MySQL DB?

4
  • 1
    Do you want to do this by code or by data migration? Do you know how to retrieve data from SQL server by code? and how to insert data to MySql by code? Commented May 27, 2017 at 16:50
  • @ChetanRanpariya I want to do this by code but still do not know how Commented May 27, 2017 at 16:56
  • Have you written any code for this till now? How are you retrieving data from SQL server at first place? And let say if you have data in hand do you know how to insert it to MySQL? Both the servers have same structure of database? Do you know about ado.net? Commented May 27, 2017 at 17:01
  • indeed I didn't write any code...Thanks sir i'll search for all this questions Commented May 27, 2017 at 17:12

2 Answers 2

0

You need to use a linked server.

This question was already answered here: Inserting from MS SQL Server to MySQL database

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks for mentioning this
0

You have two options:

  1. You can create a restful API that receives the serialized data from one db and formats the data before pushing the data down to the db you want to use. The good thing about it is you can easily share data between the 2 DBs without having to worry. Quite flexible because the tables can be identical or not depending on what you need.

  2. You can use the SIS ( Server Integration Services) tool present in the SQL Server that allows integrations into other database systems. It is a bit technical but here are a few steps you can follow on link to explain the integration of SIS packages with MySQL.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.