0

At present we got a windows service which runs a stored procedure to transfer data from one table to another. Now we need to change the stored procedure to transfer data from SQL table to Mongo collection. Could some one with Mongodb experience point me in right direction?

Solomon Rutzky
  • 46,688
  • 9
  • 128
  • 171
Dheeraj Palagiri
  • 1,829
  • 3
  • 23
  • 46

1 Answers1

1

You will probably need to get the MongoDB .NET Driver and do one of the following:

  1. Create a new application that connects to SQL Server, gets data from the desired table, and then connects to MongoDB to insert that data.
  2. Create a SQLCLR Stored Procedure that reads from the desired table and connects to MongoDB to insert the data.

Option 2 is more of a drop-in replacement as it doesn't interfere with the current structure of the Windows Service, but it might take a little bit of work to get the MongoDB .NET driver working correctly inside of SQL Server (I have not tried it so I am not sure what requirements that particular code has).

Solomon Rutzky
  • 46,688
  • 9
  • 128
  • 171