Sessions (OLE DB Provider for Oracle)

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

OLE DB requires that sessions delimit transaction space for a data source object. 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 object 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 object.

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

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. You can keep the Oracle connection of a session object active by maintaining a reference on at least one interface of the session object.

To provide advanced schema information about the kind of data in a data store, you can use the IDBSchemaRowset interface. When using the GetRowset method on this interface, a case-sensitive selection is performed only if a quoted value is passed in.