DWQA QuestionsCategory: DatabaseSQL server data synchronization to MySQL
LemonEE asked 2 months ago

Here we need to synchronize the daily data generated by the POS machine to MySQL on the server. Moreover, the database file generated by this POS machine has many tables, and the third-party company has given some database table structure information.
Then the database on the POS machine is SQL server. At present, there is a previous synchronization program here, which is also the synchronization between databases. Here is a MySQL configuration information, some host, port and so on.
Because my research on database is relatively shallow, I don’t know where to start. And the previous synchronization program was written in PHP, so I don’t know how to test it.
So I hope that under the guidance of a little God, I get a synchronization program. If I want to modify it according to my needs, I need to see those things, and some experience or methods of data synchronization between databases.

3 Answers
red_green answered 2 months ago
LemonEE replied 2 months ago

Hello, I can’t use those tools for various reasons. I mainly want to ask, I have another code that is synchronized from SQL server to MySQL, written in PHP. If I want to use that as a template, what should I change.

Xing aiming answered 2 months ago

If there is no logical conversion between databases, they are usually synchronized directly by the tools of the database or the third party (DTS tool of SQL Server). If there are more complex logical calculations, they are usually realized by some ETL tools, such as kettle, powercenter, etc.
The scenario you are talking about is to use PHP program for data synchronization. If you want to understand the specific logic, you’d better ask the developer for the design document. If you don’t have it, you can only look at the source code directly.

LemonEE replied 2 months ago

Hello, I can’t use those tools for various reasons. I mainly want to ask what I want to change if I want to use that as a template.

morderator answered 2 months ago

First of all, we need to know the data table structure of the two databases! Others can be converted by language or statement