Home > Database > Mysql Tutorial > body text

OGG rep运行慢的分析步骤

WBOY
Release: 2016-06-07 16:08:02
Original
1327 people have browsed it

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,查看其执行计划。 

本文永久更新链接地址:

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!