When you debug a stored procedure a few days ago, Oracle inexplicable error, when the stored procedure to a section of SQL, how to do not pass the past, and finally the sqlcopy out of the separate execution OK, when a specific record of the change, the hint table has been occupied by other users, so it is the line of Oracle lock AH.
* * Here are two ways to find a lock:
1. Can use the Enterprise Manager Console console, with system or SYS user login, login after the point lock, the normal situation is not a task lock, under normal circumstances will have a corresponding lock information;
After login:
Click the routine-lock, the following filter selection: User type lock, you can see the current database lock information;
2. Because Oracle is installed in Linux, all can use the Sql/plus command mode to look at the lock information, the specific operations are as follows:
Su-oracle;
Sqlplus/nolog;
conn system/password; or Connect/as sysdba;
Use the following syntax to detect the lock:
SELECT A.sid,a.serial#,a.username,b.type from v$session a,v$lock B WHERE a.sid=b.sid;
* * Solution:
1. With the Enterprise Manager console console, select the right key to interrupt the session-immediately, OK;
2. Kill the process with sql/plus command, ALTER SYSTEM kill session ' sid,serial# ', OK;