Oracle数据库数据恢复、性能优化

找回密码
注册
搜索
热搜: 活动 交友 discuz
发新帖

0

积分

0

好友

1

主题
1#
发表于 2015-1-30 14:08:46 | 查看: 3860| 回复: 7
环境
Windows 2k3,  raid 5, 硬盘5400转。 数据库和应用服务器之间有个网闸,仅开通1521 端口。

问题描述
从应用服务器B 向数据库服务器A ,通过SQLPLUS或pl sqldeveloper 跑任意 SQL 均会出现延迟现象。 如在A(也使用TNS方式登录)跑select需要0.3秒以内,到了B就需要1.2秒。


处理过程
先做了AWR report,见附件。发现有wait class 有network内容且较高。苦于缺乏证据,tnsping和ping均在10ms以内。
然后按刘大指导,做了10046 trace,对比了远端和本地,并未发现什么问题,只是远端出现了Misses in library cache during parse: 2。查看了AWR,觉得soft parse > 95%,应该不是parse问题。

AWR report top 5 里有control file sequential read        , MOS说是一个bug, 所以system io的瓶颈也无从下手。
Bug 8682160 - AWR snapshot causes many "control file sequential read" waits (文档 ID 8682160.8)

Affects:

Product (Component)        Oracle Server (Rdbms)
Range of versions believed to be affected        Versions BELOW 12.1
Versions confirmed as being affected       
11.2.0.1
11.1.0.7
Platforms affected        Generic (all / most platforms affected)
Fixed:

This issue is fixed in       
12.1.0.1 (Base Release)
11.2.0.2 (Server Patch Set)
11.2.0.1 Bundle Patch 3 for Exadata Database
11.1.0.7 Patch 46 on Windows Platforms
Symptoms:

Related To:

Waits for "control file sequential read"
Workload repository / reporting
Description

AWR snapshots could take a long time flushing one of the tables (WRH$_THREAD)
due to a bad plan.

Rediscovery Notes:
AWR snapshots take a lot of time flushing WRH$_THREAD, with many
'control file sequential read' waits and a poor plan with cartesian joins.



Listener的配置刚刚更改,因为只有一个IP和端口,所以建了一个listener监听两个实例,动态静态都启用了。 listener的日志也并未发现问题,如需要可上传。

sqlnet.ora我也在加一些条件再试试。

请问下各位前辈,我的思路和处理是否正确?请指导

MyForthReport.html

249.46 KB, 下载次数: 475

My5thReport.HTML

223.31 KB, 下载次数: 478

2#
发表于 2015-1-30 14:10:34
应用端执行sql trace 部分节选。
select employee0_.nemployeid as nemployeid118_, employee0_.nemployeetype as
  nemploye2_118_, employee0_.NORGAID as NORGAID118_, employee0_.sadder as
  sadder118_, employee0_.saddtime as saddtime118_, employee0_.semployeecode
  as semploye5_118_, employee0_.semployeename as semploye6_118_,
  employee0_.sremark as sremark118_, employee0_.ssex as ssex118_,
  employee0_.stelphone as stelphone118_, employee0_.supdater as supdater118_,
  employee0_.supdatetime as supdate11_118_
from
XTGL_EMPLOYEE employee0_, xtgl_user user1_ where employee0_.nemployeid=
  user1_.NEMPLOYEID and user1_.susername='snqwangxiaoyan'


call     count       cpu    elapsed       disk      query    current        rows
------- ------  -------- ---------- ---------- ---------- ----------  ----------
Parse        1      0.00       0.00          0          0          0           0
Execute      1      0.00       0.00          0          0          0           0
Fetch        2      0.00       0.00          0         10          0           1
------- ------  -------- ---------- ---------- ---------- ----------  ----------
total        4      0.00       0.00          0         10          0           1

Misses in library cache during parse: 1
Optimizer mode: ALL_ROWS
Parsing user id: 55  

Rows     Row Source Operation
-------  ---------------------------------------------------
      1  NESTED LOOPS  (cr=10 pr=0 pw=0 time=90 us)
      1   TABLE ACCESS FULL XTGL_USER (cr=8 pr=0 pw=0 time=103 us)
      1   TABLE ACCESS BY INDEX ROWID XTGL_EMPLOYEE (cr=2 pr=0 pw=0 time=21 us)
      1    INDEX UNIQUE SCAN SYS_C005394 (cr=1 pr=0 pw=0 time=10 us)(object id 51568)


Elapsed times include waiting on following events:
  Event waited on                             Times   Max. Wait  Total Waited
  ----------------------------------------   Waited  ----------  ------------
  SQL*Net message to client                       2        0.00          0.00
  SQL*Net message from client                     2        0.32          0.55

回复 只看该作者 道具 举报

3#
发表于 2015-1-30 14:58:40
给出原始的2个 10046 raw trace

回复 只看该作者 道具 举报

4#
发表于 2015-1-30 15:00:06
感谢关注

app_trace.txt

7.14 KB, 下载次数: 908

local_trace.txt

7.06 KB, 下载次数: 884

回复 只看该作者 道具 举报

5#
发表于 2015-1-30 15:03:18
Elapsed times include waiting on following events:
  Event waited on                             Times   Max. Wait  Total Waited
  ----------------------------------------   Waited  ----------  ------------
  SQL*Net message to client                       2        0.00          0.00
  SQL*Net message from client                     2        0.32          0.55


给出ping log,给出ftp 一个500MB文件的 FTP LOG

回复 只看该作者 道具 举报

6#
发表于 2015-1-30 15:51:38
刘大稍等一会,客户不在,好了我在群里at您,不好意思,让您久等

回复 只看该作者 道具 举报

7#
发表于 2015-1-30 17:30:48
刘大,因为网闸的限制,只能从应用端连数据库端,端口只开了1521,只有ping log 。 没法做sftp/ftp

QQ图片20150130172224.jpg (1.19 MB, 下载次数: 240)

QQ图片20150130172224.jpg

回复 只看该作者 道具 举报

8#
发表于 2015-2-4 14:54:35
问题解决,如刘大所说,我改ping了大包,超过25152就ping不通了。是网闸问题,已和客户联系。

回复 只看该作者 道具 举报

您需要登录后才可以回帖 登录 | 注册

QQ|手机版|Archiver|Oracle数据库数据恢复、性能优化

GMT+8, 2024-5-17 17:00 , Processed in 0.057100 second(s), 31 queries .

Powered by Discuz! X2.5

© 2001-2012 Comsenz Inc.

回顶部
TEL/電話+86 13764045638
Email service@parnassusdata.com
QQ 47079569