Geekswithblogs.net
HOME
ARCHIVES
CONTACT
LOGIN
The Wrecking Bawl
Destructuring query language, one keyword at a time.
News
My Stats
Posts - 126
Comments - 181
Trackbacks - 22
Recent Comments
It worked.. Thanks Buddy...
by Sagar Dasgupta
Ova stranica je super!!!.........Neznam sta da kaz...
by Maira
Great. It worked for me. I was searching the net f...
by Anil
The correct way to do this is by using rskeymgmt f...
by Johannes
Thanks man!
by Loul13
Recent Posts
drop and recreate sql server indexes
annoying SSRS bug fix for building
indexes and deadlocks
removing an ssrs instance from a scale-out deployment
migrating sharepoint databases
Archives
January, 2012 (1)
June, 2011 (2)
March, 2011 (1)
February, 2011 (1)
August, 2010 (1)
April, 2010 (1)
November, 2009 (1)
July, 2009 (1)
June, 2009 (1)
April, 2009 (3)
March, 2009 (1)
February, 2009 (2)
August, 2008 (2)
June, 2008 (1)
May, 2008 (1)
April, 2008 (4)
February, 2008 (3)
January, 2008 (1)
December, 2007 (1)
November, 2007 (1)
October, 2007 (1)
September, 2007 (2)
August, 2007 (3)
July, 2007 (2)
June, 2007 (7)
May, 2007 (6)
April, 2007 (5)
March, 2007 (18)
February, 2007 (22)
January, 2007 (18)
December, 2006 (12)
Post Categories
all tech stuff
all the other stuff
C#
SQL Server
general .Net stuff
<< T-SQL and GROUP BY ALL
|
Home
|
SQL job command - max chars >>
SqlBulkCopy
I just discovered the SqlBulkCopy class in .Net 2.0, and it seems awesome! Now I don't have to shell out to BCP anymore! We'll see though, I haven't done any performance testing yet...
Share This Post:
Posted On Tuesday, April 10, 2007 10:06 PM
Filed Under [
all tech stuff
C#
SQL Server
]
Comments
#
re: SqlBulkCopy
Posted by
AzamSharp
on 4/10/2007 11:39 PM
Hi,
Check out my article on SqlBuildCopy.
http://gridviewguy.com/ArticleDetails.aspx?articleID=233
#
re: SqlBulkCopy
Posted by
Alex Bransky
on 4/10/2007 11:46 PM
Cool, thanks. Right now I'm using a DataTable that's built from a fixed-field text file, so it will be interesting to see what BatchSize works best.
#
re: SqlBulkCopy
Posted by
Bruce Dunwiddie
on 4/11/2007 1:26 PM
The batch size is going to make less of a difference than if you can eliminate the DataTable from the mix. You're wasting a lot of resources trying to load all the data into memory first instead of streaming the data to SqlBulkCopy directly from the file.
#
re: SqlBulkCopy
Posted by
Alex Bransky
on 4/11/2007 6:07 PM
I don't know how to parse the fields out directly to SqlBulkCopy without the DataTable in between.
#
re: SqlBulkCopy
Posted by
Bruce Dunwiddie
on 4/12/2007 7:16 PM
Check out my site and see how I go about it, FixedWidthDataReader in your case. I'm not saying I've got the only component that can do it, it just bugs me when I see solutions for large data that just changes the scaling metrics, doesn't necessarily provide a permanent fix. I'm pondering putting together a nice fully documented plea to MS that they start looking at enterprise level data scalability issues in a cross product line perspective as data mining and management is becoming a larger and larger issue that everyday developers are having to deal with without framework tools built for the job.
#
re: SqlBulkCopy
Posted by
Alex Bransky
on 4/17/2007 6:02 AM
FYI, one irritating thing about SqlBulkCopy (irritating if you don't know that it does it) is that you have to specify the identity column in your DataTable before you call WriteToServer, otherwise the columns will map incorrectly. If you want to write the values in the identity column to the db there's a KeepIdentity option.
#
re: SqlBulkCopy
Posted by
web development company
on 8/10/2009 8:39 PM
Humm... interesting,
I used bulkcopy class before, but I rarely use it any way
Thanks for writing, most people don't bother.
#
re: SqlBulkCopy
Posted by
nike dunk sb space jam
on 8/19/2011 1:33 PM
Thank trusted to talk about this. I believe very strong about and want to learn more. If it is determined, you gain additional insight, maybe you do not mind adding additional terms are very similar, of which more information? It would be very useful for me and my friends help.
Post A Comment
Title:
Name:
Email:
Website:
Comment:
Verification:
Enter the code shown above
Remember Me?