Solved

Data synchronization between MsSQL and MySQL

Posted on 2015-01-16
10
520 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
 
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
Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
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 45

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 45

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This article discusses four methods for overlaying images in a container on a web page
Viewers will learn how the fundamental information of how to create a table.
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 …

746 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now