Solved

Data synchronization between MsSQL and MySQL

Posted on 2015-01-16
10
751 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
Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

 
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 47

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 47

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Viewers will learn how the fundamental information of how to create a table.

776 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