Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9034099
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T08:24:00+00:00 2026-06-16T08:24:00+00:00

Could anybody explain what is the difference between OracleBulkCopyOptions.Default and OracleBulkCopyOptions.UseInternalTransaction & how i

  • 0

Could anybody explain what is the difference between OracleBulkCopyOptions.Default and OracleBulkCopyOptions.UseInternalTransaction & how i can rollback all the record if any bulk insert error happens in between.

I am using OracleBulkCopy to bulk insert(records range varies from 100000 to 500000 ) to Oracle data base. My requirement is either all the records should insert into db or none of the record should insert into db(roll back all records). I am giving 25000 as BatchSize & 150 seconds as BulkCopyTimeout. Below is my current code block.

public bool WriteExcelDataToServerRouteOne(DataTable excelTable)
        {
            var columnMapping = from table in excelTable.Columns.Cast<DataColumn>() select new OracleBulkCopyColumnMapping(table.ColumnName, table.ColumnName);
            using (var bulkcopy = new OracleBulkCopy(ConnectionString, OracleBulkCopyOptions.Default))
            {
                bulkcopy.DestinationTableName = DestinationTable;
                foreach (var mapping in columnMapping)
                    bulkcopy.ColumnMappings.Add(mapping);
                bulkcopy.BulkCopyTimeout = TimeOut.Value;
                bulkcopy.BatchSize = BatchSize.Value;
                bulkcopy.WriteToServer(excelTable);
            }
            return true;
        }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T08:24:01+00:00Added an answer on June 16, 2026 at 8:24 am

    OracleBulkCopy doesn’t support transaction for all the records, it only support transaction for batches if UseInternalTransaction is specified.

    From OracleBulkCopy Class

    • If BatchSize > 0 and the UseInternalTransaction bulk copy option is specified, each batch of the bulk copy operation occurs within a
      transaction
      . If the connection used to perform the bulk copy
      operation is already part of a transaction, an
      InvalidOperationException exception is raised.
    • If BatchSize > 0 and the UseInternalTransaction option is not specified, rows are sent to the database in batches of size BatchSize,
      but no transaction-related action is taken.

    For your question:

    Could anybody explain what is the difference between
    OracleBulkCopyOptions.Default and
    OracleBulkCopyOptions.UseInternalTransaction

    Default: Doesn’t uses transaction for batches.
    UseInternalTransaction: Supports transaction for batches if the batch size is greater than 0.

    See:
    OracleBulkCopyOptions Enumeration

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can anybody explain the difference in Haskell between the operators ($) and ($!) (dollar
Could anybody explain the difference between SP.Web and SP.Site entities? As I understand SP.Site
Could anybody explain me what is the difference between overload == and < ?
Could anybody explain me what's the difference with setactivewindow with setforegroundwindow (using pinvoke from
Could anybody explain to me the process of uploading to and downloading form and
Could anybody explain, why next code isn't compiling? I'm creating a partially-specialized Map and
I am new to ruby on rails, could anybody explain what does the symbol
Could anybody explain why the static property is null? class Program { static void
Hey, I'm talking about profiles within pom.xml of a project. Could please anybody explain
This code prints out MyUrgentException . Could anybody explain why? class MyException extends Exception{

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.