Sync data between mongodb and sql server

734 views
Skip to first unread message

Srusti Thakkar

unread,
Nov 17, 2016, 6:29:25 PM11/17/16
to mongodb-user
Hello Everyone,

Have you tried synchronization of data between mongodb and sql server? If anyone have tried it then tell me how to do it?

I want to create one background service which automatically insert data into sql server from mongodb. For retrieve data i want to use  mongodb, while insertion, updation, deletion are used with sql server.

Please give me solution of this query.

Thanks in Advance..

Kevin Adistambha

unread,
Nov 24, 2016, 7:38:56 PM11/24/16
to mongodb-user

Hi Srusti,

I want to create one background service which automatically insert data into sql server from mongodb. For retrieve data i want to use mongodb, while insertion, updation, deletion are used with sql server.

Currently there is no MongoDB supported tool that does exactly what you want. However, there are some possible routes that you may be able to follow:

  • Create a trigger in your SQL server that performs an insertion into MongoDB every time data is inserted/updated/deleted. This approach depends on the capability of the SQL server to create this kind of trigger.
  • Use a supported tool from the SQL server vendor that can monitor the server for changes, using this tool to execute an insert into MongoDB for every change in SQL data. Again, this approach also depends on the capabilities of said tool.
  • Configure your application to insert into both SQL and MongoDB.

Depending on your use case and situation, some of those approaches may not be suitable, or there could be some other alternative approach that is uniquely suited to you. I would recommend you to do some in-depth testing (feasibility, workload stress-test, etc.) with your use case.

Best regards,
Kevin

Reply all
Reply to author
Forward
0 new messages