SET serveroutput ON size 50000
col name format a30
SET veri off feed off pagesize 50000
cle scr
prompt Please enter the USER's login id:
select *
from sys.dbms_lock_allocated
where upper(name) like upper('%&userid.%');
prompt Please enter lockid to release:
declare
rc integer;
begin
rc := dbms_lock.release('&lockid');
if rc = 0 then
dbms_output.put_line('Success.');
elsif rc = 3 then
dbms_output.put_line('Parameter Error.');
elsif rc = 4 then
dbms_output.put_line('DO NOT own LOCK specified.');
elsif rc = 5 then
dbms_output.put_line('Illegal LOCK handled.');
else
dbms_output.put_line('Unknown error.');
end if;
end;
/