bulk-insert

What bcp format file that I'm gonna used to insert 59 columns?

First Observation, limitation with this BCP format file Data File: (Continuous up to three lines) 1;a;b;c;d;e;f;; 2;d;e;f;g;h;i;; 3;g;h;i;j;k;l;; 4;j;k;l;m;n;o;; 5;m;n;o;p;q;r;; 6;p;q;r;s;t;u;;What bcp format file that I'm gonna used to insert 59 columns? Format File: 9.0 9 1 SQLCHAR 0 0 "" 0 x "" 2 SQLCHAR 0 0 ";" 2 col1 Latin...

What is the recommended approach for Bulk Insert/Update in ASP.NET Gridview?

What best practice or strategy would you use to enable bulk insert/update in an asp.net gridview control with paging enabled? Say for e.g. you have about 10000 records and this data gets populated when the page loads and this happens in chunks of say 100 records per webservice request. To enable editing on these rows what approach woul...

sp_tableoption in SQL Server

Hello everyone, I want to know and pros and cons of setting sp_tableoption of "table lock on bulk load" for SQL Server 2005/2008? My scenario is, I have 3 threads working on database, one query thread, one bulk insert thread and one delete thread. Here is the MSDN related link for sp_tableoption, http://msdn.microsoft.com/en-us/librar...

Skipped errored rows in bulk insert

Is there a way to do a bulk insert in Sql Server where rows with errors are skipped rather than the whole process failing? I don't mean just keeping those rows inserted prior to the error; I mean inserting all rows that aren't errored. ...

Bulk insert, asp.net

I have a need to take in a list of ID numbers corresponding to a member. Their can be anywhere from 10 to 10,000 being processed at any given time. I have no problem collecting the data, parsing the data and loading it in to a DataTable or anything (C#) but I want to do some operations in the database. What is the best way to insert a...

SQL Server 2005 bulk insert binary types

Hello, I have a table in the following format: smallint, binary(10), smallint, smallint, varbinary(max) I also have a csv file generated from the data in the table by one of our processes where binary data is exported as hexadecimal data. I tried generating INSERT INTO statements which worked but was very slow.. I tired BULK INSERT...

Add primary key to a table with many records

Hi, I have a table in SQL Server 2005 containing 10000054 records; these records are inserted through a bulk insert operation. The table does not contain a primary key and I want to have one. If I try to modify the table's structure, adding a new column, PK, set as int with isidentity, the management console gives me a warning: "Chan...

efficient bulk update rails database.

I'm trying to build a rake utility that will update my database every so often. This is the code I have so far: namespace :utils do # utils:update_ip # Downloads the file frim <url> to the temp folder then unzips it in <file_path> # Then updates the database. desc "Update ip-to-country database" task :update_ip => :environm...