OGG rep运行慢的分析步骤: 第一:按照rep的进程名进行 ps -ef | grep ,获得rep的进程PID [Oracle@hosta ~]$ ps -ef | grep rep
OGG rep运行慢的分析步骤:
第一:按照rep的进程名进行 ps -ef | grep ,,获得rep的进程PID
[Oracle@hosta ~]$ ps -ef | grep repfull
oracle 27906 27861 0 18:01 pts/7 S+ 0:00 \_ grep repfull
oracle 27603 20773 1 17:03 ? Ssl 0:51 \_ /u02/ggs/replicat PARAMFILE /u02/ggs/dirprm/repfull.prm REPORTFILE /u02/ggs/dirrpt/REPFULL.rpt PROCESSID REPFULL USESUBDIRS
第二:按照rep的进程PID 进行 ps -ef | grep,以获得27603产生的LOCAL=YES的进程
[oracle@hosta ~]$ ps -ef f | grep 27603
oracle 27910 27861 0 18:01 pts/7 S+ 0:00 \_ grep 27603
oracle 27603 20773 1 17:03 ? Ssl 0:52 \_ /u02/ggs/replicat PARAMFILE /u02/ggs/dirprm/repfull.prm REPORTFILE /u02/ggs/dirrpt/REPFULL.rpt PROCESSID REPFULL USESUBDIRS
oracle 27607 27603 2 17:03 ? Ds 1:41 \_ oracleorcl (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq))) ---->这一个就是。
[oracle@hosta ~]$
sqlplus 里执行如下sql即可:
SELECT sql_text,sql_id FROM v$sqltext a WHERE a.hash_value = (SELECT sql_hash_value FROM v$session b
WHERE b.SID =( select s.sid from v$session s,v$process p where s.paddr=p.addr and p.spid='27607')) ---> 替换上27607
ORDER BY piece ASC;
select plan_table_output from table(dbms_xplan.display_cursor('6ufrk02y1h6u5')); --->替换为上一步查询得到的sql_id,查看其执行计划。