解决方案如下: 1.查哪个过程被锁: 查V$DB_OBJECT_CACHE视图: SELECT * FROM V$DB_OBJECT_CACHE WHERE OWNER='过程的所属用户' AND CLOCKS!='0'; 2. 查是哪一个SID,通过SID可知道是哪个SESSION: 查V$ACCESS视图: SELECT * FROM V$ACCESS WHERE OWNER='过程的所属用户' AND NAME='刚才查到的过程名'; 3. 查出SID和SERIAL#: 查V$SESSION视图: SELECT SID,SERIAL#,PADDR FROM V$SESSION WHERE SID='刚才查到的SID'; 查V$PROCESS视图: SELECT SPID FROM V$PROCESS WHERE ADDR='刚才查到的PADDR'; 4. 杀进程: (1)先杀ORACLE进程: ALTER SYSTEM KILL SESSION '查出的SID,查出的SERIAL#'; (2)再杀操作系统进程: (linux) KILL -9 刚才查出的SPID或ORAKILL 刚才查出的SID 刚才查出的SPID。 SELECT /*+ rule */ lpad(' ',decode(l.xidusn ,0,3,0))||l.oracle_username User_name, o.owner,o.object_name,o.object_type,s.sid,s.serial# FROM v$locked_object l,dba_objects o,v$session s WHERE l.object_id=o.object_id AND l.session_id=s.sid ORDER BY o.object_id,xidusn DESC / drop user src cascade; //查询数据库当前连接数 select sid,serial# from v$session where username='SRC'; alter system kill session '182,35496'; //查询是否死锁 select username,lockwait,status,machine,program from v$session where sid in(select session_id from v$locked_object); //查询死锁进程 select s.username,I.object_id,I.session_id,s.serial#,I.oracle_username,I.os_user_name,I.process from v$locked_object I,V$session s where I.session_id = s.sid; kill alter system kill session '182,35496'; sid(session_id),serial# alter system kill session '182,35496#'; 或杀进程: select pro.spid from v$session ses,v$process pro where ses.sid='1188' and ses.paddr = pro.addr; select pro.spid from v$session ses,v$process pro where ses.sid='707' and ses.paddr = pro.addr;