ilivewithian
ilivewithian

Reputation: 19712

Replicating from SQL to RavenDB

I know that RavenDB has a replication bundle, but that only seems to support replication from RavenDB into SQL server. I would like to do that the other way around. The only way I known to keep Raven up to date with data in a SQL database would be to run a series of triggers from sql and update raven accordingly. This just sounds like a maintenance nightmare waiting to happen. Is there a better way to keep a RavenDB database in synch with a sql database, where the raven database is acting as a slave, not a master?

Upvotes: 5

Views: 896

Answers (2)

bbqchickenrobot
bbqchickenrobot

Reputation: 3709

I would suggest using a CLR trigger for this. You can set the trigger to fire at the database level and then capture the eventdata and fire up the raven session and log it into the raven database.

Upvotes: 1

yoel halb
yoel halb

Reputation: 12711

On the SQL server side there is an option of publishing to ODBC/OLE DB which might allow the use of SQL Server's built in mechanism.

However I am not yet aware of a RavenDB ODBC driver, however there is a MongoDB project on ODBC at http://blog.mongodb.org/post/49852036514/odbc-connector-for-mongodb, which might be examined and revised to use the functionality needed to make replication work.

Upvotes: 0

Related Questions