Page 1 of 1

ORA-03127

Posted: Tue 15 Jul 2008 19:55
by Alladin
Hi, I'm using the latest version of Corelab.Oracle drivers...

Sometimes after reading some tables with blobs, I get ORA-03127 during OracleConnection.Rollback().

Supressing this exception is not really good, because connection is pooled and the second request gets this broken session from pool and fails as well on the first select.

The question is how could I force internal session clean up before disposing OracleConnection?

Posted: Thu 17 Jul 2008 13:45
by AndreyR
Hello, Alladin.

Please send us a small test project to reproduce the problem, if possible. Please include database definition script in it.

Regards, Andrey.

Posted: Thu 17 Jul 2008 18:57
by Alladin
OK. Some additional information.

I guess this error is easy to reproduce on any unicode-based Oracle database instance.

1) Create unicode database instance (AL32UTF8).
2) Create any table with blobs or clobs.
3) Fill lobs with data.
4) Use CoreLab drivers to access these lobs using Unicode=false in connection string.
5) Enjoy various crashes starting from Memory corrupt till Cannot perform operation...

Looks like mismatch in database encoding & client encoding + Unicode settings in connection string plays an important role.

Whould it be very difficult to implement automatic unicode database detection?

Posted: Fri 18 Jul 2008 12:55
by AndreyR
Hello, Alladin.

It is important to set the same Unicode settings for Oracle client and server. This is an Oracle feature.
Is the error reproducible when settings coincide?

Regards, Andrey.

Posted: Fri 18 Jul 2008 18:11
by Alladin
Nice feature :)

How should client know whether some particular server is unicode or not?
It's not written in TNSNAMES.ORA, any clues?

How should my program react? Wait for first access violation encountered, then switch Unicode=true in connection string and reconnect? :)

I'm sure there is a correct way to handle this issue

Posted: Mon 28 Jul 2008 12:15
by AndreyR
Sorry, but we could not reproduce the problem.
Testing was prformed with Oracle servers 9.2.0.6.0 and 11.1.0.6.0 (AL32UTF8 encoding). There was created a test table with a clob column.
Then the following code was executed successfully:

Code: Select all

      OracleCommand oracleSelectCommand1 = new OracleCommand();
      oracleSelectCommand1.Connection = oracleConnection1;
      oracleSelectCommand1.CommandType = CommandType.TableDirect;
      oracleSelectCommand1.CommandText = "clob";

      OracleDataTable oracleDataTable1 = new OracleDataTable(oracleSelectCommand1);
      oracleDataTable1.Active = true;
      dataGridView1.DataSource = oracleDataTable1;
Could you please provide us the code where you get the error?