Skip to Main Content

ODP.NET

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Problem with ODP.NET Managed driver, update nclob raises ORA-01483

mtramullasDec 12 2014 — edited Sep 28 2015

Hello all,

We have a problem with the ODP.NET Managed driver 12.1.0.1.0

We have a table that contains among others, a NCLOB column and a BLOB column. In case we try to set for LONG1, more that 4000 characters, the following happens:

the sentence (1) it works as desired, but when we try to execute the sentence (2) it fails throwing an ORA-01483 exception

a) UPDATE TEST SET LONG_1 = :LONG1, LONG_2=:LONG2  WHERE TEST_ID = 1

b) UPDATE TEST SET LONG_1 = :LONG1, LONG_2=:LONG2  WHERE TEST_ID = :TESTID

This is the test table creation sentence:

  CREATE TABLE "TEST"

   (

     "TEST_ID" NUMBER(10,0),

     "LONG_1" NCLOB,

     "LONG_2" BLOB

   )

We made a WIndows Console application to reproduce it, this is the code:

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

using System.Threading.Tasks;

using Oracle.ManagedDataAccess.Client;

namespace TestOracleNClobProblem

{

    class Program

    {

        static void Main(string[] args)

        {

            const int length = 4001;

            byte[] data2 = new byte[length];

            using (OracleConnection conn = new OracleConnection(<<connection string>>))

            {

                conn.Open();

                StringBuilder data1 = new StringBuilder();

                for (int i = 0; i < length; i++)

                {

                    data1.Append("A");

                    data2[i] = 10;

                }

               

                string sql = "UPDATE TEST SET LONG_1=:LONG1, LONG_2=:LONG2 WHERE TEST_ID = :TESTID";

                using (OracleCommand command = new OracleCommand(sql))

                {

                    command.Connection = conn;

                    command.BindByName = true;

                    command.CommandTimeout = 0;

                    command.Parameters.Add("LONG1", data1.ToString());

                    command.Parameters.Add("LONG2", data2);

                    command.Parameters.Add("TESTID", 1);

                   

                    command.ExecuteNonQuery();  

                }

             }

        }

    }

}

Do anyone have an idea what we are doing wrong?

Thanks in advance

Matias

This post has been answered by Alex Keh-Oracle on Jan 2 2015
Jump to Answer

Comments

Alex Keh-Oracle

I was able to reproduce the error and filed a bug (20206306) so that Oracle can investigate and fix the problem.

Alex Keh-Oracle
Answer

This bug has been fixed and the code changes merged. The fix will be a part of future ODP.NET patches and the next ODAC release.

Marked as Answer by mtramullas · Sep 27 2020
mtramullas

Hello,

Could you please give me an aproximated date for the ODAC release where the problem will be fixed?

Thanks in advance

With kind regards

Matias Tramullas

user9967034

Hello,


When will this fix be available as a release?


Thanks

Alex Keh-Oracle

The fix is already available in the Oracle bundle patches for Windows that you can download from My Oracle Support.

We will include the fix in the next ODAC release, which will be around June.

Etore Schiavini

Hi Alex

Some off topic, but related to CLOBs.

Can you confirm that the problem at inserting more than 1000 characters on CLOBs is already fixed in the bundle patch too ?

Thanks

Étore

Alex Keh-Oracle

If you're referring to Bug 20206306, that fix was added in the second 12.1.0.2 bundle patch.

user9967034

Hi Alex,

Could you please let me know what the Bundle Patch Number for the Oracle.ManagedDataAccess.dll fix.

Thanks

Alex Keh-Oracle

Bundle Patch 2 for 12.1.0.2 or any of the higher bundle patches has the fix. You can use that one or any later bundle patch. However, another forum user found managed ODP.NET missing from the fourth bundle patch. You may want to wait for the fifth bundle patch if you want the latest and greatest.

Etore Schiavini

Alex, I'm referring to bug 20361140.

We had to downgrade to ODAC beta version to workaround this.

I just seen in Metalink: https://support.oracle.com/epmos/faces/BugMatrix?id=20361140

It was included on 12.1.0.2.4

Thanks

Étore

user9967034

Thanks, so is it Patch 20681828?

Alex Keh-Oracle

Patch 20684004 is the 12.1.0.2.4 latest bundle patch. However, another user reported a problem using this patch to update managed ODP.NET. I would recommend waiting until the next bundle patch comes along (Patch 5) , which should arrive sometime soon.

user9967034

Hello,

Is Oracle.ManagedDataAccess.dll with the fix to this ORA-01483  available in a ODAC release now?

Thanks

b5282b6a-158b-4527-891e-0fca027ea2f4

When will the next ODAC Version be available? In this thread you said that it will be around june. This is already 3 months ago. The last ODAC Version is still from december 23, 2014.

Alex Keh-Oracle

The bug is fixed in the latest NuGet release, which came out in June, 2015.

1 - 15
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Oct 26 2015
Added on Dec 12 2014
15 comments
4,583 views