Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Pl/SQL problem in Oracle Financials
I want to automatically fire a script from Concurrent Manager whenever
there is a lock.
I am writing the following procedure but it is not compiling and bombing
out at the line
'from v$session'. I already granted select on v$session to oraap.
I am new at PL/SQL - please help. See code below:
CREATE OR REPLACE PROCEDURE oraap.track_lock_holders
IS
DECLARE
user_id varchar2(15);
BEGIN
(select osuser into user_id
from v$session
where audsid=userenv('sessionid'));
drop table oraap.lock_holders;
create table oraap.LOCK_HOLDERS /* temporary table */
(
waiting_session number,
holding_session number,
lock_type varchar2(17), mode_held varchar2(10), mode_requested varchar2(10), lock_id1 varchar2(10), lock_id2 varchar2(10), user_id varchar2(15)) /* Gets it value from OSUSER */ TABLESPACE entergy_tbl;
![]() |
![]() |