Local Transactions

A session delimits transaction scope for an OLE DB Provider for Oracle local transaction. When, at consumer direction, this provider submits a request to a connected Oracle server, the request constitutes a unit of work for the provider. Local transactions always wrap one or more units of work on a single Oracle provider session.

The provider's default auto-commit mode treats a single unit of work as the scope of a local transaction. No more than one unit ever participates in the local transaction. Upon successful completion of a work unit, the work is committed. On failure, any work begun is rolled back and the error is reported to the consumer.

The consumer can direct more precise control over local transaction scope by using ITransactionLocal. When a consumer session initiates a transaction, all session work units between the transaction start point and the eventual ITransaction::Commit or ITransaction::Abort are treated as an atomic unit. The OLE DB Provider for Oracle implicitly begins a transaction when directed to do so by the consumer. If the consumer requests retention, the session reverts to auto-commit mode.

This provider supports ITransactionLocal::StartTransaction parameters as described in the following table.

Parameter

Description

isoLevel

In local transactions, this provider supports ISOLATIONLEVEL_READCOMMITTED, ISOLATIONLEVEL_REPEATABLEREAD, ISOLATIONLEVEL_ISOLATED, and the synonyms ISOLATIONLEVEL_CURSORSTABILITY and ISOLATIONLEVEL_SERIALIZABLE.

isoFlags

This provider returns an error for any value other than zero.

pOtherOptions

If not NULL, the provider requests the transaction options object from the interface. The provider returns XACT_E_NOTIMEOUT if the options object's ulTimeout member is not zero. The provider ignores the value of the szDescription member.

pulTransactionLevel

If not NULL, the provider returns the nested level of the transaction, which is always 1 at this point (because nested transactions are not supported).

For local transactions, the OLE DB Provider for Oracle implements ITransaction::Abort parameters as described in the following table.

Parameter

Description

pboidReason

Ignored if set. Can safely be NULL.

FRetaining

When TRUE, a new transaction is implicitly begun for the session. The transaction must be committed or aborted by the consumer.

When FALSE, this provider reverts to auto-commit mode for the session.

FAsync

Asynchronous abort is not supported by this provider. This provider returns XACT_E_NOTSUPPORTED if the value is not FALSE.

For local transactions, the OLE DB Provider for Oracle implements ITransaction::Commit parameters as described in the following table.

Parameter

Description

fRetaining

When TRUE, a new transaction is implicitly begun for the session. The transaction must be committed or aborted by the consumer.

When FALSE, this provider reverts to auto-commit mode for the session.

GrfTC

Asynchronous and phase-one returns are not supported by this provider. The provider returns XACT_E_NOTSUPPORTED for any value other than XACTTC_SYNC.

GrfRM

Must be 0.

The OLE DB Provider for Oracle rowsets on the session are preserved on a local commit or abort operation based on the values of the rowset properties DBPROP_ABORTPRESERVE and DBPROP_COMMITPRESERVE. By default, these properties are both VARIANT_TRUE, and all the provider's rowsets on the session are retained following an abort or commit operation.

This provider does not implement the ITransactionObject interface. A consumer attempt to retrieve a reference on the interface returns E_NOINTERFACE.