If someone uses it:
Select t. * from table name t where field = xxx for update
Instead:
Select t. rowid, t. * from table name t where field = xxx for update
This is the case when you update data.
For update does not contain rowid. It is a silly behavior, just like using svn to modify source code without getting the latest one.
If this operation is performed in the real database at the customer's site, the customer's business processing will be suspended, and the consequences will be very serious.
Therefore, in the project team, especially new users, they need to emphasize the relevant operational specifications so that the relevant actions form a habit.
To query who has locked the entire table, refer to the following statement:
"
---- Query the oracle user name, machine name, and lock table object
SELECT l. session_id sid, s. serial #, l. locked_mode, l. oracle_username,
L. OS _user_name, s. machine, s. terminal, o. object_name, s. logon_time
FROM v $ locked_object l, all_objects o, v $ session s
WHERE l. object_id = o. object_id
AND l. session_id = s. sid
Order by sid, s. serial #;
"
For more details, see:
Http://www.cnblogs.com/hangwq/p/3527969.html