Wednesday, August 18, 2010

Tracing

It is difficult to trace individual process when will it be finished.For this I suggest you some useful tricks:
In v$session there is the column called "action" which shows,as you guess,the action of the certain session.
Method DBMS_APPLICATION_INFO.SET_ACTION() will set desired action to this session which will be shown in v$session "action" column.

I used this in inserting multiple rows in a table.
begin
for i in 1..100000000
loop
insert into test_tb_big(name,surname)
values('mari','kupatadze');
DBMS_APPLICATION_INFO.SET_ACTION(i);
end loop;
end;

And at this time i was able to see i's value in v$session "action" column.Useful for understanding when this insert is supposed to be finished.

*There is also DBMS_APPLICATION_INFO.SET_MODULE() function.

No comments:

Post a Comment