dbTalk Databases Forums  

datamigration, bcp vs datatables?

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss datamigration, bcp vs datatables? in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Bryce K. Nielsen
 
Posts: n/a

Default datamigration, bcp vs datatables? - 05-15-2006 , 06:02 PM






Just started a Data Migration project that involves moving 12 tables with
about 100mb of data from one SQL Server to another. For various reasons, the
dba won't let us use DTS so we're using ADO.NET to pull the data down. The
arguement is now between manually generating a bcp file to upload into the
destination server, or to create a datatable and call
DataAdapter.Update(DataTable). I personally prefer doing the DataTable way,
since all the code is already there and we don't ahve to manually generate a
bcp file. BUT the dba is 90% against allowing the application to view the
tables directly, they have to all go through storedprocs (I say 90% because
he is open to us to coding it *both* ways and then if there's a
*significant* performance over bcp, we can go with direct-access).

So, anyone know of good datamigration articles I can use for or against the
various positions?

-BKN



Reply With Quote
  #2  
Old   
Dan Guzman
 
Posts: n/a

Default Re: datamigration, bcp vs datatables? - 05-16-2006 , 05:33 AM






With large data volumes, bulk insert methods like BCP are an order of
magnitude faster than individual insert statements or proc calls.
DataAdapter.Update essentially issues a SqlCommand for each row in the
underlying DataTable so performance will be much slower than a bulk insert
technique.

In .NET 2.0, you can bulk insert directly from a DataTable using the
SqlBulkCopy class.

--
Hope this helps.

Dan Guzman
SQL Server MVP

"Bryce K. Nielsen" <bryce (AT) sysonyx (DOT) com> wrote

Quote:
Just started a Data Migration project that involves moving 12 tables with
about 100mb of data from one SQL Server to another. For various reasons,
the dba won't let us use DTS so we're using ADO.NET to pull the data down.
The arguement is now between manually generating a bcp file to upload into
the destination server, or to create a datatable and call
DataAdapter.Update(DataTable). I personally prefer doing the DataTable
way, since all the code is already there and we don't ahve to manually
generate a bcp file. BUT the dba is 90% against allowing the application
to view the tables directly, they have to all go through storedprocs (I
say 90% because he is open to us to coding it *both* ways and then if
there's a *significant* performance over bcp, we can go with
direct-access).

So, anyone know of good datamigration articles I can use for or against
the various positions?

-BKN




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.