StrataFrame Forum

SQLBulkCopy and ES

http://forum.strataframe.net/Topic24983.aspx

By Marcel Heitlager - 10/23/2009

Can SQLBulkCopy be implemented with ES? Something tells me I can't because of a connection string issue. But if it is possible, how?



I'm looking for a way to speed up bulk insert in a table in server database (2000 + records)



Thanks as always,



Marcel


By Trent L. Taylor - 10/24/2009

Well, technically no. The ES connection (EsDataSourceItem) connections you to the ES server which in turn connects to the SQL Server. EVen if you could, you would not necessarily want to do this as you are looking to consume a lot of bandwidth. SqlBulkCopy is generally for use when you are trying to update a database/table with a lot of records for initial or static use (or synchronizations). In other words, a massive number of records for whatever the intent may be. There are some options, dependign on how your ES server is deployed and implemented.



One idea, in this case, would be to add another web server that accepts a ZIP file (or whatever) that has the XML file contents within it. The web service would then do the SqlBlukCopy. This would be pretty fast since you would only be copying up a single file at that point, then the web service would dump all of the records into the table.