關於ora_pz程式的一些討論

blueocean926發表於2009-01-06

在oracle10g資料庫上經常看到一些ora_pz程式

From Oracle 10g onwards you will find on every node slave processes like pz99. This are the processes that query the gv$ views

select * from gv$px_process;

INST_ID SERV STATUS PID SPID SID SERIAL#
---------- ---- --------- ---------- ------------ ---------- ----------
2 PZ99 IN USE 35 24994 2562 53336
2 PZ98 AVAILABLE 109 3905
2 PZ97 AVAILABLE 1229 4260
1 PZ99 IN USE 545 19131 1503 28122
1 PZ98 AVAILABLE 55 17027
1 PZ97 AVAILABLE 1210 6661

--查詢並行程式

col username for a12
col username for a12
col "QC SID" for A6
col SID for A6
col "QC/Slave" for A8
col "Requested DOP" for 9999
col "Actual DOP" for 9999
col "Slaveset" for A8
col "Slave INST" for A9
col "QC INST" for A6
set pages 300
set lines 200
select
decode(px.qcinst_id,NULL,username,
' - '||lower(substr(pp.SERVER_NAME,
length(pp.SERVER_NAME)-4,4) ) )"Username",
decode(px.qcinst_id,NULL, 'QC', '(Slave)') "QC/Slave" ,
to_char( px.server_set) "SlaveSet",
to_char(s.sid) "SID",
to_char(px.inst_id) "Slave INST",
decode(px.qcinst_id, NULL ,to_char(s.sid) ,px.qcsid) "QC SID",
to_char(px.qcinst_id) "QC INST",
px.req_degree "Req. DOP",
px.degree "Actual DOP"
from gv$px_session px,
gv$session s ,
gv$px_process pp
where px.sid=s.sid (+)
and px.serial#=s.serial#(+)
and px.inst_id = s.inst_id(+)
and px.sid = pp.sid (+)
and px.serial#=pp.serial#(+)
order by 6 , 1 desc
/

[@more@]

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/48010/viewspace-1015737/,如需轉載,請註明出處,否則將追究法律責任。

相關文章