What would you do if you had to massage data and move it from a database on one server to a database on another server?
Massage data was limited to using CONVERT or CAST. This process was called by a Data Loader in C#.NET. The SQL scripts were executed in SQL Server 2008.
Would you suggest this process be done using SQLBulkCopy, LINQ to SQL or should this be only done using a INSERT…….. SELECT in TSQL?
The data could consist in the range of 1 million to 10 million rows.
I would appreciate your views on this process to verify an opitimized process on performing the above operation.
What would you do if you had to massage data and move it from
Share
LINQ-to-SQL should be avoided here; it isn’t optimised for this (it is aimed at individual objects/records – not bulk). A cross-db (and possibly linked-server) insert/select is possible, but I would be looking at bulk options. I suspect SSIS (ex DTS) might be of use here – it is pretty much designed for this. If you need a managed option, a data-reader from the source (ExecuteDataReader()) connected to SqlBulkCopy to the target will perform the same function as SSIS (using the same bulk protocol).