Auto Commit (Environment setting)

Tools that honor the Auto Commit environment will force a commit after the specified number of changes have been made within an enterprise geodatabase transaction.

Usage notes

  • This setting works in the same manner as the AUTOCOMMIT enterprise geodatabase initialization parameter.
  • This parameter can help to prevent transactions from becoming too large and exceeding the database management system (DBMS) logs. See your DBMS documentation for managing transactions.
  • A higher commit value can improve performance, but this must be weighed against the possibility of losing edits if storage capacity is reached or an error occurs before the commit.

Dialog syntax

  • Auto Commit—The interval at which transactions will automatically commit. If set to 0, transactions will commit only when an explicit commit is issued.

Scripting syntax

arcpy.env.autoCommit = interval_value

ParameterExplanation

interval_value

  • 0—Transactions will commit only when an explicit commit is issued.
  • interval—Transactions will automatically commit every <interval> changes.
  • ""—Default to automatically commit every 1,000 updates.
autoCommit syntax

Script example

import arcpy

# Set the autoCommit environment to 2000.
arcpy.env.autoCommit = 2000

Related topics