I created a custom script in Express that actually migrates the SQL Server database to MongoDB.
But I ran into problems in live synchronization between two databases.
Currently, I have added a column updated_byin both databases.
Then I retrieve the last row updated_byfrom the MongoDb database and SQL Server.
Then I check the date difference and based on this I update my MongoDB database.
There are many db tables, and it's hard for me to determine which table is being updated.
Is there any log in SQL Server 2008 R2 that indicates which table is updated and at what time?
I need a mechanism like any data update in the db table should immediately synchronize these rows in my MongoDB.
Any suggestions for real-time data synchronization are also welcome.
Thanks in advance.:)
source
share