Skip to main content
Notice removed Draw attention by Paul White
Bounty Ended with Scott Hodgin - Retired's answer chosen by Paul White
Tweeted twitter.com/StackDBAs/status/961654247984173056
Notice added Draw attention by Paul White
Bounty Started worth 100 reputation by Paul White
Improved formatting; added a word here and there for clarity
Source Link
Paul White
  • 90.3k
  • 30
  • 424
  • 663

I am generating about 500 records.

What I want to do is INSERTINSERT them all at the same time because:

  • The server is located elsewhere and I would rather send one big pay loadpayload over.
  • This seems like less overhead than sending 500 separate insert queries over the wire.

But because they're batch inserting, I don't want to rollback everything if one insert fails - I want to try to insert the rest in there and record thatthe failure(s).

What's the best way to do this in SQL serverServer? Is BULK INSERTBULK INSERT what I want?

I am generating about 500 records.

What I want to do is INSERT them all the same time because:

  • The server is located elsewhere and would rather send one big pay load over.
  • This seems like less overhead than sending 500 insert queries over the wire.

But because they're batch inserting, I don't want to rollback everything if one insert fails - I want to try insert the rest in there and record that failure.

What's the best way to do this in SQL server? Is BULK INSERT what I want?

I am generating about 500 records.

What I want to do is INSERT them all at the same time because:

  • The server is located elsewhere and I would rather send one big payload over.
  • This seems like less overhead than sending 500 separate insert queries over the wire.

But because they're batch inserting, I don't want to rollback everything if one insert fails - I want to try to insert the rest in there and record the failure(s).

What's the best way to do this in SQL Server? Is BULK INSERT what I want?

Source Link

Multiple inserts of batch insert over the wire?

I am generating about 500 records.

What I want to do is INSERT them all the same time because:

  • The server is located elsewhere and would rather send one big pay load over.
  • This seems like less overhead than sending 500 insert queries over the wire.

But because they're batch inserting, I don't want to rollback everything if one insert fails - I want to try insert the rest in there and record that failure.

What's the best way to do this in SQL server? Is BULK INSERT what I want?