oracle存储过程无法编译、表数据无法修改
在对数据的增、删、改操作时,有时会发现一直操作不成功,原因可能是表被锁死;或者存储过程无法编译。
操作方法
- 01
--存储过程无法编译 SELECT V.OSUSER, V.PROCESS, V.PROGRAM,v.MACHINE,V.TERMINAL, V.MODULE,V.USERNAME,V.STATUS, V.SID,V.SERIAL#, 'alter system kill session ''' || V.sid || ',' || V.SERIAL# || ''';' as KILL_SESSION, V.PADDR FROM V$SESSION V WHERE V.USERNAME LIKE '%用户名%' AND V.STATUS in( 'INACTIVE','ACTIVE') and v.PROGRAM = 'plsqldev.exe';
- 02
--表无法修改,复制KILL_SESSION列的sql语句执行 SELECT object_name, machine, s.sid, s.serial# , 'alter system kill session ''' || s.sid || ',' || s.SERIAL# || ''';' as KILL_SESSION FROM gv$locked_object l, dba_objects o, gv$session s WHERE l.object_id = o.object_id AND l.session_id = s.sid;
赞 (0)