Solved

Data synchronization between MsSQL and MySQL

Posted on 2015-01-16
10
1,117 Views
Last Modified: 2015-04-06
Hello Experts,

I have to synchronize data between a MySQL database in a website and a MsSQL from an ERP.

I have the knowledge to do it in several ways, but i need an advice from someone that as been trought this waters before or as more experience than me.

What road should i take?..
1. Should i build a webserver with a php based app with cron jobs inside my client infrastructure and connect the website by webservices using json and update both MySQL and the MsSQL ERP databases this way?
2. Should i write a windows C# program that starts automatically with windows, with a timer that checks and connects the website by webservices using json and update both MySQL and the MsSQL ERP databases this way?
3. Should i use a tool from MsSQL to do this, a DTS, ODBC, etc?
4. Should i look for a tool already done for this purpose that is worth the money spent?

Should i use json? xml?... i like more json, is more simple and fast to implement :P

Thx in advanced,

Miguel
0
Comment
Question by:justaphase
  • 5
  • 3
  • 2
10 Comments
 
LVL 40

Accepted Solution

by:
Vadim Rapp earned 300 total points
ID: 40554681
Use whatever you feel more comfortable with. I personally would do it by DTS. Speaking of your #2, even better is to write it as a service. Speaking of #4, https://dbconvert.com/convert-mssql-to-mysql-sync.php, http://www.symmetricds.org/ (open source).
0
 
LVL 1

Author Comment

by:justaphase
ID: 40555364
I never created a service with C# on Visual Studio... i tried once, but failed on understanding the logic or how to begin with... have any direction to point me to? any good article?
0
 
LVL 40

Expert Comment

by:Vadim Rapp
ID: 40555600
Here's whole chapter on MSDN, with walkthrough:
http://msdn.microsoft.com/en-us/library/y817hyb6%28v=vs.110%29.aspx

You have service template, so start there.new project
By the way, yet another way to synchronize that was not mentioned but provides probably the most instant synchronization, is by using triggers.
0
MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

 
LVL 1

Author Comment

by:justaphase
ID: 40556062
No.. triggers or DTS won't do it.. i need to manipulate the data programmatically.. and although i made several things with the SQL language and the SQL engine, i don't think it's strong enough to do it.. C# or PHP will..
0
 
LVL 40

Expert Comment

by:Vadim Rapp
ID: 40556102
:-) "The determined Real Programmer can write FORTRAN programs in any language".
0
 
LVL 1

Author Comment

by:justaphase
ID: 40556107
LOL... believe me, i did very complex and wild things in MsSQL and MySQL, specially in MsSQL...
I'll keep in mind your suggestion and i'm gonna consider :)
0
 
LVL 49

Assisted Solution

by:Vitor Montalvão
Vitor Montalvão earned 200 total points
ID: 40562209
Joining the following options:
3. Should i use a tool from MsSQL to do this, a DTS, ODBC, etc?
 4. Should i look for a tool already done for this purpose that is worth the money spent?

------------------------------------------------------------------------------------------------------------
5. Should i use a tool from MsSQL already done for this purpose so I don't need to spend money?

Yes. Have you ever heard about Integration Services (SSIS)? Is the evolution of DTS (SQL Server 2000) and give you plenty of options from the simple and direct Import/Export between two sources to the more complex ETL where you can have unlimited sources.
0
 
LVL 1

Author Comment

by:justaphase
ID: 40564514
Good point Vitor,
going to see that..

Does SSIS bidirectional sync? Two tables, one in MySQL and another in MsSQL and both update each other, how does SSIS manage that?...
0
 
LVL 49

Expert Comment

by:Vitor Montalvão
ID: 40564529
Yes, it's bidirectional, or tri, or quad, .... :)
Depends on what you want. It's very flexible.

You just need to have the client driver installed to connect to non-SQL Server databases and you'll see it's very easy. Just add components and if you want to have more complex solutions it allows you to add .net code.
0
 
LVL 1

Author Comment

by:justaphase
ID: 40564566
I'm going to analyze it, and also see the cost €€€, lol..
0

Featured Post

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
When table data gets too large to manage or queries take too long to execute the solution is often to buy bigger hardware or assign more CPUs and memory resources to the machine to solve the problem. However, the best, cheapest and most effective so…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question