Oracle Point, Oracle Life.

Most Popular Posts

January 18, 2008

Monitoring Parallel Queries with scripts

Filed under: OraclePoint — R.Wang @ 3:36 pm

bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark

This is a script to monitor parallel queries against oracle database. It’s tested on Oracle 9.2.0.6 and 10.2.0.1.0.

Monitor_Parallel_Query.sql

Also, in Oracle 9ir2, we can use the following statement to monitoring the salves which are being waited by others.

set SERVEROUTPUT on
declare
inst   varchar(20);
sender varchar(20);
begin
select bitand(&&p1, 16711680) - 65535 as SNDRINST,
decode(bitand(&&p1, 65535),65535, 'QC', 'P'||to_char(bitand(&&p1, 65535),'fm000') ) as SNDR
into  inst , sender
from dual
where bitand(&&p1, 268435456) = 268435456;
dbms_output.put_line('Instance = '||inst);
dbms_output.put_line('Sender = '||sender );
end;
/

Among this statement, the variable &&P1 (senderid) can be retrieved by using the script  Map_Senderid_in_Px_Wait_Event_Oracle_Process.sql.

If we find that lots of slaves are waiting one (several) slaves, we need to investigate why the slaves is not fast enough to dequeue the messages and send the blocks.

Popularity: 3% [?]

Tags:none

Leave a Reply

 

Windows Live Translator:

Google