26

I occasionally get this error when i try to update a record through the grid.

One error saving changes to table "SCHEMA"."TABLENAME":
Row 3: Data got committed in another/same session, cannot update row.

Looked up at OTN but no solution yet given.

Tried to disable the option Post edits on row change but still no luck.

There is a known solution for setting the field to NULL through the SQL Worksheet but it's surely a pain.

2
  • are you sure you have the latest SQL Developer? Commented May 22, 2012 at 7:49
  • i previously used something like 2.xx.xxx and now I have upgraded to version 3.1.07 Build MAIN-07.42 and still get the same error Commented May 22, 2012 at 7:53

4 Answers 4

37

It could be that your table is created with NOROWDEPENDENCIES so row-level dependency tracking is turned off, and SQL Developer is configured to "Use ORA_ROWSCN for DataEditor insert and update statements".

Either uncheck the ORA_ROWSCN option, or recreate the table with ROWDEPENDENCIES.

Sign up to request clarification or add additional context in comments.

5 Comments

How do I uncheck this option, @DavidAldridge ? I have no idea how to find it.
It's somewhere in the preferences ... can't remember where and I don't have SQL Developer installed anymore
Select Tools from the menu bar -> Preferences -> Database -> ObjectViewer, There a check box "Use ORA_ROWSCN for DataEditor insert and update statements" here a image postimg.org/image/8z2fkqb4z
Note that after you turn of ORA_ROWSCN, you must exit Oracle SQL developer, and then restart it. Then I was allowed to delete the records that were getting this error.
I have version 4.1.5.21 and I've unchecked this option, and restarted and it still doesn't seem to fix the issue? Help.
5

Just simply run simple update command and set your cplumn to null. Then try to update with your real value. It will definitely work.

Comments

2

"One error saving changes to table "SCHEMA"."TABLENAME": Row XX: Data got committed in another/same session, cannot update row."

Got this error with SQL developer when commiting changes in multiple rows, but not when commiting a single row.

I fixed it going to:

Tools menu -> Preferences -> Database -> ObjectViewer

and check: "Post edits on row change"

However, every time I navigate to another row takes some time (less than a second with the DB I am working on). For what I could understand from other posts the remote DB in my session is being updated (but not comitted to all sessions) every time I change row. However to commit to all session it is needed to explicitly commit.

Meanwhile I tried, as others suggested, to:

Tools menu -> Preferences -> Database -> ObjectViewer

uncheck "Use ORA_ROWSCN for DataEditor insert and update statements" option (and also leave uncheck: "Post edits on row change")

This also works, but it is faster. It guess that now the update is only local. Remote DB is not updated every time I navigate to another row. It is needed to commit to update remote DB, but now with no errors.

I read that this solution does not worked for all. It worked in my case with:

SQL developer Version: 17.4.1.054, Build 054.0712

ODAC 12.2c Release 1 and Oracle Developer Tools for Visual Studio (12.2.0.1.0) (32-bit) (http://www.oracle.com/technetwork/topics/dotnet/utilsoft-086879.html)

Remote DB server version: Oracle Database 11g Release 11.2.0.1.0 - 64bit Production

Comments

-1

I ran into this problem as well while running a stored procedure. My solution fell inline with the above answers. Before updating the row that I wanted to the value I wanted, I added an update line that first updated the column to null. The following line then updated the column to the value that I wanted. I did this in addition to unchecking the box for ORA_ROWSCN.

UPDATE TEST_LOCATION SET STATUS = NULL WHERE FULL_NAME = SITE_FULL_NAME;

UPDATE TEST_LOCATION SET STATUS = CAST(STATUS_IN AS INTEGER) WHERE FULL_NAME = SITE_FULL_NAME;

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.