views:

492

answers:

2

I am reading a csv file in to a datatable in vb.net and making a few checks and appending an extra column. I then want to perform a bulk insert using microsofts Oracle.DataAccess (no choice in this) to an Oracle database.

what would be the best way to perform this as there is no bulkImport like in SQLserver.

thanks

A: 

Why a bulk insert rather than a regular insert ?

If it is to avoid generating redo log entries, your best best is a conventional insert into a global temporary table [which doesn't generate redo because, since it is temporary, it never needs to be recovered]. Then, at the end, an INSERT/*+APPEND */ into the real table from the temporary table. If the real table is defined as NOLOGGING, the append hint will tell it not to generate redo.

Gary
Thanks Gary,I say bulk insert as that is what i used when this was going to a sqlserver. (The SQL data provider for .net has a BulkCopy command) I want the best approach to insert the datatable data to oracle.would it just be loop through the table calling an insert to the oracle DB.Thats alot of round trips to the dB, no?
bryan
Anyone any ideas on this??
bryan
A: 

I have been searching on similar lines, but hit a dead-end. I understand from a statement by Pablo Castro, Program Manager - ADO .NET Team of Microsoft Corp, that SqlBulkCopy is included in ADO.NET 2.0, in the .NET Provider for SQL Server (SqlClient). They do not support bulk-copy in their OracleClient provider.