stored procedures [message #18936] |
Thu, 21 February 2002 18:43 |
krishna
Messages: 141 Registered: October 1998
|
Senior Member |
|
|
hi
where can i get examples of stored procedures. Not documentation but actual codes written.
thanks
bye
|
|
|
Re: stored procedures [message #18943 is a reply to message #18936] |
Thu, 21 February 2002 23:09 |
pratap kumar tripathy
Messages: 660 Registered: January 2002
|
Senior Member |
|
|
here is an example
create or replace procedure killuser(v_osuser varchar2) as
cursor kill_cur is
select sid,serial#,username,osuser
from v$session
where osuser=v_osuser;
v_command varchar2(300);
begin
for tmp in kill_cur
loop
v_command :='ALTER SYSTEM KILL SESSION '''||tmp.sid
||','||tmp.serial#||'''';
Execute immediate v_command;
end loop;
end;
/
|
|
|