How is the database session obtained/maintained ?

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
Torben Nielsen
Posts: 1
Joined: Mon 17 Aug 2009 09:26

How is the database session obtained/maintained ?

Post by Torben Nielsen » Mon 17 Aug 2009 09:29

How is the database session obtained/maintained using devart.

I want to obtain the following:

When an application start log onto the database
Today we call OCISessionBegin and then link the database session with our user table

This means that when executing stored procedures we have created a function
identifyUserAndGroup(l_userId, l_userName, l_groupId, l_groupName),
which is used to automatically fill out fields with who created, updated, owns various fields

Once the web request is over or the application stops OCISessionEnd is called.

How could the same functionality we obtained using devart, being able to
insure that all calls to Oracle is using the same underlying session.

What would be the correct approach?

Thanks in Advance

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Thu 20 Aug 2009 10:32

A separate session is created for each OracleConnection object. So we recommend you to disable pooling by setting Pooling=false; in your connection string, and to work with one connection object to be in the frame of one database session. You can also manage sessions using the OCI Session Pooling feature of the OracleConnection.ConnectionString property: http://www.devart.com/dotconnect/oracle/docs/ , the Index tab, the ConnectionString Property (OracleConnection) section.

Post Reply