Random ORA-01403: no data found error [message #64028] |
Tue, 07 December 2004 08:28 |
SB
Messages: 2 Registered: September 2004
|
Junior Member |
|
|
This will take a minute to explain, so bear with me.
I have a table, table_1, defined as follows:
ety_seq not null number
ety_type_cd not null varchar2(3)
The ety_seq column is a FK to a column in table_2, and the FK is nullable, such that if the ety_seq from table_1 is deleted, the value in the column of table_2 is set to null.
When I attempt to delete a row from table_1, if the ety_seq is NOT a FK in table_2, I get the following:
SQL> delete from table_1 where ety_seq = 77;
delete from table_1 where ety_seq = 77
*
ERROR at line 1:
ORA-01403: no data found
Yet, this value definitely exists in table_1. I can update it and insert it, but I cannot delete it. If I insert a row into table_2 with the FK column value set to 77 and then delete from table_1, it is successful. It is almost like the FK value existing in the child table was required before it could be deleted.
This, in and of itself seems like an Oracle bug. However, I was working with my DBA, and she could login as the same user (the owner of the tables) and she could delete it. I thought maybe it was some environmental issue, so I had her connect to the Unix box under my ID and then connect to Oracle as the schema owner and then she could not delete either. Following up on the environmental difference hypothesis, I had another coworker login and she could not delete either ... at first ... then she magically could delete. I went back to my desk and I could also delete records. I called the DBA, and now she could NOT delete, but I could.
Neither of us has any idea what is going on ... we thought maybe some lock problem, but that isn't consistent with what we are seeing. Any ideas????
Thanks
|
|
|
|