Select concurrency mode (form)

Applies To: Microsoft Dynamics AX 2012 R3, Microsoft Dynamics AX 2012 R2, Microsoft Dynamics AX 2012 Feature Pack, Microsoft Dynamics AX 2012

Click System administration > Setup > Database > Select concurrency mode.

Use this form to set the global concurrency mode for database changes. The concurrency mode you choose can significantly affect database performance.

About concurrency strategies

You can select an optimistic concurrency mode or a pessimistic concurrency mode globally for the database. Concurrency settings can also be controlled at the individual table or statement level.

Optimistic concurrency

Optimistic concurrency does not lock data when it is retrieved from the database for future modification. Therefore, no locks are held while filters and other business logic are being applied. Data is locked only when an update is performed. If any data has been changed by another transaction between the time of the retrieval and the time of the update, the change is detected and an Infolog exception is displayed.

Pessimistic concurrency

A pessimistic concurrency strategy uses an update lock to lock data when the data is retrieved from the database for future modification. Locks are held while filters and other business logic are being applied, in addition to being held during an update. Data cannot be changed by other transactions.

Acquiring an update lock for a large volume of rows increases the lock escalation from row level to table level in Microsoft SQL Server. This can block other users and reduce transaction throughput.

Table-level concurrency settings

If the global concurrency mode is set to Optimistic concurrency mode enabled per table, table-level control of concurrency settings is available using the OccEnabled property.

Statement-level concurrency settings

You can use the optimisticlock or pessimisticlock keywords in a SELECT statement to override the global or table concurrency mode settings.

Tasks that use this form

Tune data access settings

The following table provides descriptions for the controls in this form.

Fields

Field

Description

Optimistic concurrency mode enabled per table

The default setting. Enable concurrency mode to be set per table. Optimistic concurrency is initially set for all tables, with a few exceptions. If the global concurrency mode is set to Optimistic concurrency mode enabled per table, table-level control of concurrency settings is available using the OccEnabled property.

Optimistic concurrency mode enabled globally

Enable optimistic concurrency mode for all tables. We recommend that you use this setting only if advised to by a Microsoft Dynamics AX support engineer.

Pessimistic concurrency mode enabled globally

Enable pessimistic concurrency mode for all tables. We recommend that you use this setting only if advised to by a Microsoft Dynamics AX support engineer.

Writes all UPDATE conflict exceptions to the log

Write all UPDATE conflict exceptions to the log.

We recommend that you use this option temporarily, only while troubleshooting update conflicts, because it can significantly slow performance.

Update record version automatically

Each time a record is updated, Microsoft Dynamics AX searches memory for the record and changes the update values in all instances of it.

We recommend that you use this option temporarily, only while troubleshooting update conflicts, because it can significantly slow performance.

Announcements: To see known issues and recent fixes, use Issue search in Microsoft Dynamics Lifecycle Services (LCS).