This content has been marked as final. Show 9 replies
Yes, this could be if u r running 2 instances of this form in the same pc;this happens with me after Executing the Query.
it's not a condition to update or create only...
When u got it again u can either do the following:
1.Click No in response to the message. Do not keep trying to reopen a locked record.
Pls Note*: your form locks every record it fetches
2.Wait 1 minute and try to reaccess the record could possibly someone is sharing u same table.
3.There is 1 way i don't recommand really to get remove from this message is :
go to Data block property palette > Database Locking Mode > Default Automatic Set it to Delayed. then you can't received this error...
cause it has a draw back but i leave the choice according to ur form bussiness requirements to decide.
4.To show if there are any blocking database locks and if so - which user is locking the Database
use the following queries to get the information you want.
v$session and dba_waiters are two other useful tables u or any one may need...
SELECT * FROM v$LOCK ; SELECT * FROM V$LOCKED_OBJECT ;
Hope this helps...
Edited by: Abdetu on Jan 18, 2011 2:06 AM
Thanks for answering guys!
From V$LOCKED_OBJECT , I can see my name on 3 entries, locked_mode is 2,3,2 (row shared and row exclusive). I'm not familiar with these.
Also, from v$session, I found 3 entries with may name.
Program = toad.exe, seconds_in_wait = 503589 the most, state = WAITING.
Give these informations, what should be the next thing to do to avoid the error?
Here is a query that gives us a list of blocking sessions and the sessions that they are blocking:
In this case, we find out ...
SELECT Program , blocking_session, sid, SERIAL#, state , seconds_in_wait FROM v$session WHERE blocking_session is not NULL ORDER BY blocking_session;
1. WHAT program is blocking what session ?
2.is blocking what db sid ?
3.for how many seconds...?
For example:_ if you know the SQL_ID and serial number for an Oracle session, you can join into the v$sql view and actually get ...
the source code for the SQL statement that is currently executing.
We would then want to find out who is running session ..., and go find them and see why they are having a problem..?
u have then many alternatives easiest one is to ....
Oracle 11g introduced the ALTER SYSTEM DISCONNECT SESSION syntax as a new method for killing Oracle sessions.
SQL> ALTER SYSTEM KILL SESSION 'sid,serial#';
Unlike the KILL SESSION command which asks the session to kill itself.
Hope this helps...
it's not a condition to update or create only...In fact, automatic locks only occur when you update or delete a row. A query will NEVER lock a row(except you specify an FOR UPDATE). If you have a lock after some execute_query in forms, There is some wrong code in your POST-QUERY-trigger.
Edited by: Andreas Weiden on 19.01.2011 19:43
Hi ,thanks for the info Andreas
But, i believe u r correct Regarding ,These DML operations INSERT, UPDATE, DELETE, MERGE, and SELECT ... FOR UPDATE.
These DML operations require table locks to reserve DML access to the table on behalf of a transaction and to prevent DDL operations that would conflict with the transaction.
But some other cases as if not having this...
e.g. running form once on Firefox i do make execute_Query...,then made some modification, then re-run the form i got the same message so ...
i have to close the old one if it is executed :( ...
but this is not happening in case of usingthe IE
Thanks again Andreas