Skip to Main Content

SQL & PL/SQL

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!

Why I cannot DELETE rows from my table?

dariyooshDec 13 2010 — edited Dec 14 2010
OS: Linux Redhat Enterprise Edition 5.0
Oracle version: Oracle Database 10g Release 10.2.0.3.0 - Production
Dear all,


I have a question about DELETE FROM query. I have a table whose data is regularly updated by using SQL*Loader, but each time I remove a certain number of rows before running SQL*Loader, that is, something like this (my table name is SAP_PTECH)
DELETE FROM SAP_PTACH
WHERE (cd_app = 'REPRISE_PATRIMOINE');
This has been working pretty well, since one year without any problem. Each time the specified rows corresponding to the condition in the WHERE clause have been removed before running my SQL*Loader script. Now last week, I inserted a lot of data with SQL*Loader (usually I insert about 2000 lines, but this time I inserted about 80000 lines with SQL*Loader), since then, I cannot remove any data from the table anymore. I mean, if I run
DELETE FROM SAP_PTACH
WHERE (cd_app = 'REPRISE_PATRIMOINE');
This hangs forever.


After a bit googling I saw several people suggested that this may be due to some kind of lock on the table. I found the following query
select
  oracle_username
  os_user_name,
  locked_mode,
  object_name,
  object_type
from
  v$locked_object a,dba_objects b
where
  a.object_id = b.object_id;
Each time when I run
DELETE FROM SAP_PTACH
WHERE (cd_app = 'REPRISE_PATRIMOINE');
I see that the LOCKED_MODE for the table SAP_PTECH is 3. I dont know what it means.

But what I don't really understand, is that what has been happened, as I said earlier, since about one year, every day I run this query without any problem but now for the first time I'm unable to DELETE rows from my table.


Any idea?


Thanks in advance,


Kind Regards,
Dariyooh
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 11 2011
Added on Dec 13 2010
8 comments
15,944 views