MDAC 2.5 SDK - OLE DB Providers
OLE DB Provider for Oracle
A session delimits transaction scope for an Oracle Provider 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.
Using the default Oracle Provider autocommit mode, a single unit of work is treated 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 Commit or 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 autocommit mode.
The OLE DB Provider for Oracle supports ITransactionLocal::StartTransaction parameters as follows.
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 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 follows.
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 autocommit 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 follows.
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 autocommit 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.
The OLE DB Provider for Oracle does not implement the ITransactionObject interface. A consumer attempt to retrieve a reference on the interface returns E_NOINTERFACE.