| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Troubles with dbms_application_info.set_session_longops
Hello
dbms_application_info.set_session_longops doesn't behave how I expect
it or how I interprete the documentation.
Here's the code I have picked up somewhere:
create or replace procedure long_running_procedure as
l_rindex pls_integer;
l_slno pls_integer;
begin
dbms_application_info.set_client_info( 'This is me' ); dbms_application_info.set_module( 'long_running_procedure', 'starting' );
for i in 1 .. 30 loop
l_rindex := dbms_application_info.set_session_longops_nohint;
l_slno := NULL;
dbms_application_info.set_session_longops
( rindex => l_rindex,
slno => l_slno,
op_name => 'LONG_RUNNNIG_PROCEDURE' || i,
target => 1000000+i,
context => 2000000+i,
sofar => i,
totalwork => 100,
target_desc => 'What I''m Working On',
units => 'numbers 1-100' );
dbms_lock.sleep(1);
When I start the procedure and query v$session_longops, oracle
shows me an entry for each call that was made to set_session_longops (30
in the end). However, I expected there to be one row only.
Is this how it is supposed to work or is something wrong with the code?
Also, how can I get rid of the rows in v$session_longops?
MK
Received on Fri Jun 14 2002 - 09:11:11 CDT
![]() |
![]() |