I'm writing a program in c# to export SQL Server data from one database and importing it in another. Since these two servers are not connected I need to choose a method such as bcp.
Thanks in advance.
Doesn't cover BCP, but I did write a blog post comparing a couple of approaches for bulk loading data into SQL Server - compared SqlBulkCopy against batched inserts via SqlDataAdapter.
SqlBulkCopy is worth checking out - the kind of process you'd use is query database 1 and retrieve an SqlDataReader. Pass that SqlDataReader to SqlBulkCopy to persist that data to database 2.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With