1

I have just come across this feature in Oracle for my .Net applications and have just inserted 1.2 million records in 15 seconds using ODP.Net.

I would like this performance in SQL Server so was wondering if there was an alternative/same feature in SQL Server?

Thanks

Jon
  • 38,814
  • 81
  • 233
  • 382
  • 1
    Don't know what Oracle Array Binding / ODP.NET are. Anything like [`SqlBulkCopy`](http://blogs.msdn.com/b/nikhilsi/archive/2008/06/11/bulk-insert-into-sql-from-c-app.aspx)? – Martin Smith Sep 06 '11 at 11:35

2 Answers2

2

This what I have found out:

In an application one of the biggest overheads of data insertion into the database is making round trips to the DB for insertion purpose. ADO.Net provides a mechanism to copy a bulk of data to SQL server using SqlBulkCopy.

But for inserting bulk data into the Oracle database we need the help of ODP.NET (Oracle Data Provider for .NET) . Assuming that ODP.NET is already installed, add a reference for "Oracle.DataAccess" to your solution. The code below demonstrates how bulk copy for oracle can be achieved using Array Binding.

Martin is right.

in SQL Server you should use SqlBulkCopy plenty of questions about it here in SO:

What's the drawback of SqlBulkCopy

Community
  • 1
  • 1
Davide Piras
  • 43,984
  • 10
  • 98
  • 147
0

I have looked into it and there is a BULK INSERT in SQL Server which uses files to import data which is faster than the SqlBulkCopy class

However without performing exact tests I'm not sure how this vs Oracle performs

Jon
  • 38,814
  • 81
  • 233
  • 382