No Clean Feed - Stop Internet Censorship in Australia

Oracle Error: "Data got commited in another/same session, cannot update row."

Oracle SQL DeveloperI'm using the Oracle SQL Developer application.

Version 2.1.0.63
Build MAIN-63.73

Via the application's grid view I am trying to paste a value into a field for a single record. Field type: VARCHAR2(4000 CHAR), although I've heard this problem can also happen with CLOB/BLOB type fields.

I paste, then hit the "commit" button at the top of the grid interface. Immediately I get the following error:

"Data got committed in another/same session, cannot update row."

I say, "huh?!" ... then proceed to try it again a few times mindlessly ignoring the fact that obviously something is wrong.

Google ended up being my saviour once again when I found: http://goo.gl/2vOL in the Oracle Forums.

The following is the solution that I gleaned from the forum link above (originally posted by 'gconley'):

  1. Copy and edit the value to a safe place such as notepad or another sql developer worksheet, don't try to save in the table.
  2. In a sql developer worksheet, make an update query to set the BLOB/CLOB field to NULL
  3. Run the update query and commit
  4. Refresh your table view, the BLOB/CLOB should be NULL now
  5. Copy the value back in and commit
That fixed it... Well, it's obviously a bug in the application so it's a temporary fix/workaround at least.

 

Bookmark and ShareSubscribe

Oracle Error: "Data got commited in another/same session, cannot update row."

Comments

Tom Drinane

Tom Drinane wrote on 08/16/11 9:20 AM

Great pointer. I was able to go one better. Encountering what I call the "got commited" error, I decided to try the set to null, then put in value you want route. A colleague (we'll call her Amy) suggested I just null out the field in the data editor tab, then commit, then try to enter my desired value. Because the field I was working with was not nullable I received the message:

One error saving changes to table "COEUS"."OSP$EPS_PROPOSAL":
Row 1: ORA-01407: cannot update ("COEUS"."OSP$EPS_PROPOSAL"."PROPOSAL_TYPE_CODE") to NULL

Nonetheless, I then tried to do my desired update, and - SUCCESS!
Tom Drinane

Tom Drinane wrote on 08/16/11 11:25 AM

Tried to apply this solution to a similar problem, in which I was trying to delete an entire row. It did not work, so I searched farther, and found this:

Try unselecting

use ORA_ROWSCN for DataEditor insert and update statement

in tools->preferences->database->object viewer

this usually removes this kind of problems.

This from
http://cn.forums.oracle.com/forums/thread.jspa?threadID=1058196
Yuditra Cp

Yuditra Cp wrote on 09/06/11 1:42 AM

@ Tom Driane..nice idea man..:-bd..that works for me..

Leave a comment

Tell us about yourself
(required field)
(required field)
Comment and preferences
Leave this field empty: