Sessions

A provider session represents a single connection to an Oracle Server.

OLE DB requires that sessions delimit transaction space for a data source. All command objects created from a specific session object will participate in the local or distributed transaction of the session object.

The first session object created on the initialized data source receives the Oracle connection established at initialization. When all references on the interfaces of the session object are released, the Oracle connection becomes available to another session object created on the data source.

An additional session object created on the data source establishes its own connection to the Oracle provider as specified by the data source. The Oracle connection is dropped when the application releases all references to objects created that session.

For more information on Go to
Sessions "Sessions" in Chapter 2, "Enumerators, Data Source Objects, and Sessions," of the OLE DB Programmer's Reference
Transactions "Transaction Management" in Chapter 1, "Overview of OLE DB," of the OLE DB Programmer's Reference
Data sources "Data Source Objects" in Chapter 2, "Enumerators, Data Source Objects, and Sessions," of the OLE DB Programmer's Reference

Creating new provider session objects can generate significant application overhead for applications that continually create and release session objects. The overhead can be minimized by managing the provider session objects efficiently. OLE DB Provider for Oracle applications can keep the Oracle connection of a session object active by maintaining a reference on at least one interface of the session object.