ORA-03127

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
Alladin
Posts: 149
Joined: Mon 27 Nov 2006 16:18
Contact:

ORA-03127

Post by Alladin » Tue 15 Jul 2008 19:55

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?

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Thu 17 Jul 2008 13:45

Hello, Alladin.

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

Regards, Andrey.

Alladin
Posts: 149
Joined: Mon 27 Nov 2006 16:18
Contact:

Post by Alladin » Thu 17 Jul 2008 18:57

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?

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Fri 18 Jul 2008 12:55

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.

Alladin
Posts: 149
Joined: Mon 27 Nov 2006 16:18
Contact:

Post by Alladin » Fri 18 Jul 2008 18:11

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

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Mon 28 Jul 2008 12:15

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?

Post Reply