`
coolsooner
  • 浏览: 1315115 次
文章分类
社区版块
存档分类
最新评论

Diagnostic and Tuning Tools(1)

 
阅读更多
Chapter02 Diagnostic and Tuning Tools
诊断与调优工具


Objectives:
1.Identify key tuning components of the alert log file.理解alert log file中关于调优的重要信息。
2.Identify key tuning components of background trace files.理解后台trace文件关于调优的信息。
3.Identify key tuning components of user trace files.了解用户trace文件关于调优的信息。
4.Collect statistics with Oracle Enterprise Manager.看OEM中收集的统计数据。
5.Describe how Statspack collects statistics.重点介绍statspack这个工具如何收集数据。
6.掌握Statspack的初步用法。
7.Identify dynamic performance views useful in tuning.认识一些性能调优的视图。
8.掌握以下其他的工具。


Maintenance of Alert Log
任何一个设计良好的服务器软件肯定有Alert Log。
Alert log 按时间顺序记录了软件消息与错误。
show parameter dump
找到bdump,这个路径就是alert_SID.log的路径。
打开alert_SID.log.查找/ORA-,找到错误。
定期进行清空或归档。
mv alert_SID.log alert_SID.log.20090113 进行归档
cat /dev/null > alert_SID.log 可以清空掉日志文件,如果删除掉则ORACLE会自动创建新的。


Tuning Compoents.
The alert log file包含以下信息帮助调优。
1.Checkpoint start and end times
2.Incomplete checkpoints
3.Time to perform archiving.
4.Instance recovery start and complete times.
5.Deadlock and timeout errors.


show parameter log_ch找到log_checkpoints_to_alert将其设为TRUE,才能使checkpoint信息写到alert.log中。
alter system checkpoint;再查看alert.log就能看到checkpoint信息确实写到里面。


BP Trace Files
ORACLE比较大,LOG文件有多种。ALERT.log与数据库相关的,每次启动就顺序记录。TRACE文件与进程相关,进程生命周期可能很短。
1.The Oracle server dumps information about errors detected by any background process into trace files.把后台进程的错误信息写进trace文件。
2.Oracle Support uses these trace files to diagnose and troubleshott.
3.These files do not usually contain tuning information.
一般用户是不用看的,一般是ORACLE支持人员看,也不包含调优信息。这些信息也是在alert.log的文件夹中。


USER Trace Files
1.Server process tracing can be enabled or disabled at the session or instance level.
2.A user trace file contains statistics for traced SQL statements in that session.
3.User trace files are created on a per server process basis.
4.User trace files can also be created by:backup control file to trace,database set events;
意识是,每一个服务器进程(与客户端相连接的服务器进程)一个trace文件,可以获得用户的行为,用户哪个SQL语句出问题,对调优有帮助。
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics