Oracle9i Performance Tuning Chapter 12 Tuning Tools.

Slides:



Advertisements
Similar presentations
Copyright © SoftTree Technologies, Inc. DB Tuning Expert.
Advertisements

Office of the Accountant General (A&E) Andhra Pradesh Hyderabad
Module 13: Performance Tuning. Overview Performance tuning methodologies Instance level Database level Application level Overview of tools and techniques.
Overview of performance tuning strategies Oracle Performance Tuning Allan Young June 2008.
Introduction to Oracle
Acknowledgments Byron Bush, Scott S. Hilpert and Lee, JeongKyu
Overview of Database Administrator (DBA) Tools
Oracle9i Database Administrator: Implementation and Administration 1 Chapter 2 Overview of Database Administrator (DBA) Tools.
Oracle Architecture. Instances and Databases (1/2)
INTRODUCTION TO ORACLE Lynnwood Brown System Managers LLC Performance And Tuning – Lecture 7 Copyright System Managers LLC 2007 all rights reserved.
Page Footer Keed Education Oracle Database Administration Basic Copyright 2009 Keed Education BV Version Concept.
INTRODUCTION TO ORACLE DATABASE ADMINISTRATION Lynnwood Brown System Managers LLC Introduction – Lecture 1 Copyright System Managers LLC 2007 all rights.
12 Copyright © 2005, Oracle. All rights reserved. Proactive Maintenance.
1 - Oracle Server Architecture Overview
Harvard University Oracle Database Administration Session 2 System Level.
Managing an Oracle Instance
Advanced Databases Basic Database Administration Guide to Oracle 10g 1.
A Guide to Oracle9i1 Introduction to Oracle9i Database Administration Chapter 11.
Oracle 10g Database Administrator: Implementation and Administration
Backup and Recovery Part 1.
1 Copyright © 2005, Oracle. All rights reserved. Introduction.
1 Copyright © 2009, Oracle. All rights reserved. Exploring the Oracle Database Architecture.
Module 8: Server Management. Overview Server-level and instance-level resources such as memory and processes Database-level resources such as logical.
Introduction and simple using of Oracle Logistics Information System Yaxian Yao
12 Copyright © 2007, Oracle. All rights reserved. Database Maintenance.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 10 Database Performance Tuning and Query Optimization.
2 Copyright © 2006, Oracle. All rights reserved. Performance Tuning: Overview.
Chapter Oracle Server An Oracle Server consists of an Oracle database (stored data, control and log files.) The Server will support SQL to define.
Basic Oracle Architecture
By Lecturer / Aisha Dawood 1.  You can control the number of dispatcher processes in the instance. Unlike the number of shared servers, the number of.
CSE 781 – DATABASE MANAGEMENT SYSTEMS Introduction To Oracle 10g Rajika Tandon.
1 Robert Wijnbelt Health Check your Database A Performance Tuning Methodology.
Oracle9i Performance Tuning Chapter 1 Performance Tuning Overview.
Database Systems Slide 1 Database Systems Lecture 5 Overview of Oracle Database Architecture - Concept Manual : Chapters 1,8 Lecturer : Dr Bela Stantic.
7202ICT – Database Administration
Oracle9i Performance Tuning Chapter 2 Tuning the Buffer Cache.
1 Oracle Architectural Components. 1-2 Objectives Listing the structures involved in connecting a user to an Oracle server Listing the stages in processing.
Copyright  Oracle Corporation, All rights reserved. 1 Oracle Architectural Components.
Oracle Tuning Ashok Kapur Hawkeye Technology, Inc.
Copyright © Oracle Corporation, All rights reserved. 1 Oracle Architectural Components.
An Oracle server:  Is a database management system that provides an open, comprehensive, integrated approach to information management.  Consists.
By Lecturer / Aisha Dawood 1.  Dedicated and Shared Server Processes  Configuring Oracle Database for Shared Server  Oracle Database Background Processes.
What is a schema ? Schema is a collection of Database Objects. Schema Objects are logical structures created by users to contain, or reference, their data.
Database structure and space Management. Database Structure An ORACLE database has both a physical and logical structure. By separating physical and logical.
11 Copyright © 2004, Oracle. All rights reserved. Dealing with Database Corruption.
Process Architecture Process Architecture - A portion of a program that can run independently of and concurrently with other portions of the program. Some.
14 Copyright © 2005, Oracle. All rights reserved. Backup and Recovery Concepts.
Instance and Media Recovery Structures Supinfo Oracle Lab. 7.
Chapter 1Oracle9i DBA II: Backup/Recovery and Network Administration 1 Chapter 1 Backup and Recovery Overview MSCD642 Backup and Recovery.
18 Copyright © 2004, Oracle. All rights reserved. Backup and Recovery Concepts.
Preface 1Performance Tuning Methodology: A Review Course Structure 1-2 Lesson Objective 1-3 Concepts 1-4 Determining the Worst Bottleneck 1-5 Understanding.
Oracle Architecture - Structure. Oracle Architecture - Structure The Oracle Server architecture 1. Structures are well-defined objects that store the.
Optimization and Administartion of a Database Management Systems Krystian Zieja.
18 Copyright © 2004, Oracle. All rights reserved. Recovery Concepts.
7 Copyright © Oracle Corporation, All rights reserved. Instance and Media Recovery Structures.
Oracle9i Performance Tuning Chapter 4 Tuning the Shared Pool Memory.
14 Copyright © 2005, Oracle. All rights reserved. Backup and Recovery Concepts.
Oracle9i Developer: PL/SQL Programming Chapter 11 Performance Tuning.
Introduction to Utilities for New DBAs Session #332 4/19/2008 Erik Hobbs Introduction to Utilities for New DBAs.
8 Copyright © 2006, Oracle. All rights reserved. Tuning the Shared Pool.
3 Copyright © 2004, Oracle. All rights reserved. Database Architecture Comparison.
Oracle Database Architectural Components
Chapter 21 SGA Architecture and Wait Event Summarized & Presented by Yeon JongHeum IDS Lab., Seoul National University.
3 Copyright © Oracle Corporation, All rights reserved. 管理数据库事例.
SQL Trace and TKPROF.
Oracle Memory Internals
Oracle Architectural Components
Index Index.
Presentation transcript:

Oracle9i Performance Tuning Chapter 12 Tuning Tools

Chapter 12: Tuning Tools2 Chapter Objectives Understand and use the four basic diagnostic tools supplied with Oracle9i Use statistical tools to diagnose and tune a database Understand and use SQL tools Use data block corruption tools Use the resource management tools to regulate and distribute resource usage based on priorities

Chapter 12: Tuning Tools3 Tuning Tools Categories The following are the functional categories of the Oracle-provided tuning tools: Diagnostics: diagnose problems and performance issues Statistics: collect statistical data to determine the health of the database and perform trend analysis SQL: identify problematic queries Data block corruption: detect data block corruption in data files as well as database objects Analysis: gather object storage statistics Resource management: distribute CPU allocation to database users based on planned priorities

Chapter 12: Tuning Tools4 Diagnostic Tools – Alert Log The Alert log file is the heart-beat of the system, registering errors, events, and database activities

Chapter 12: Tuning Tools5 Contents of the Alert Log The types of entries that the Alert log records include: Errors Startup and Shutdown Modified Initialization Parameters Checkpoints Archiving Physical Database Changes

Chapter 12: Tuning Tools6 Diagnostic Tool – Background Trace Files Each time a background process fails, an error is generated to the Alert log and a trace file is generated Since these trace files are usually difficult to interpret, you should work with the Oracle Technical Support team to identify the type of problem, its cause, and action necessary to resolve the problem or prevent it from occurring again

Chapter 12: Tuning Tools7 Diagnostic Tools – Views

Chapter 12: Tuning Tools8 Diagnostic Tools – Initialization Parameters STATISTICS_LEVEL

Chapter 12: Tuning Tools9 Diagnostic Tools – Initialization Parameters (continued) TIMED_OS_STATISTICS: tells Oracle to collect operating system statistics for every client call to the database TIMED_STATISTICS: this parameter tells Oracle whether to collect timed statistics for each call Allowed values are TRUE or FALSE DB_CACHE_ADVICE: this parameter tells Oracle whether to collect advisory data for database caches

Chapter 12: Tuning Tools10 Oracle Enterprise Manager

Chapter 12: Tuning Tools11 Statistics Tools – UTLBSTAT/UTLESTAT

Chapter 12: Tuning Tools12 UTLBSTAT/UTLESTAT: report.txt The report includes statistical readings in this specific order: Library cache Sessions and users System statistics System events Wait events Latch statistics Rollback segments statistics Modified initialization parameters Data dictionary Tablespace statistics Data files statistics

Chapter 12: Tuning Tools13 Statistics Tool – STATSPACK The STATSPACK provides the following benefits: Ease of use: it is simple to use to gather statistics Cost: it is free with Oracle9i (requires no additional licensing fees) Historical snapshots: it captures and stores every reading in its repository for future comparisons and trend analysis Reports: it provides reports that are well organized and formatted Procedure and scripts: it provides several procedures for administering the repository of this tool Multiple databases: it supports more than one database

Chapter 12: Tuning Tools14 STATSPACK Architecture

Chapter 12: Tuning Tools15 STATSPACK Scripts

Chapter 12: Tuning Tools16 STATSPACK PL/SQL Stored Package The STATSPACK package is the engine of this tool This package contains the following five methods: PROCEDURE MODIFY_STATSPACK_PARAMETER: modifies the thresholds of parameters (reconfigures STATSPACK hit ratios and other parameters’ thresholds) PROCEDURE QAM_STATSPACK_PARAMETER: provides the parameter default values from the STATS$STATSPACK_PARAMETER table PROCEDURE SNAP: collects a statistics snapshot of the database; the collected statistics are stored in the repository and associated with a snapshot identification number FUNCTION SNAP RETURNS NUMBER(38): collects a statistics snapshot of the database; the collected statistics are stored in the repository and associated with a snapshot identification number, which is returned to the calling environment PROCEDURE STAT_CHANGES: used by the SPREPORT.SQL script to return differences between two statistics snapshots

Chapter 12: Tuning Tools17 STATSPACK – Statistic Levels STATSPACK supports several levels of statistics collection The levels are listed here with a description of the information each captures: Level 0: general statistics, including rollback segment, row cache, SGA, system events, background events, session events, system statistics, wait statistics, lock statistics, and latch information Level 5: high resource usage SQL statements, along with all data captured by lower levels Level 6: SQL plan and SQL plan usage information for high-resource usage SQL statements, along with all data captured by lower levels Level 7: segment-level statistics, including logical and physical reads, row lock, and buffer busy waits, along with all data captured by lower levels Level 10: child latch statistics, along with all data captured by lower levels

Chapter 12: Tuning Tools18 STATSPACK – Collecting Statistics

Chapter 12: Tuning Tools19 STATSPACK – Report Structure 1.Database and Instance Configuration Information 2.Database Load Information 3.Hit Ratios 4.Top 5 Events 5.Top SQL 6.System Statistics 7.Tablespace Statistics 8.File Statistics 9.Buffer Pool Statistics 10.Instance Recovery Statistics 11.Buffer Pool Advisory Statistics 12.PGA Aggregation Advisory Statistics 13.Rollback Segments Statistics 14.Latch Activity Statistics 15.Memory Statistics 16.Modified Initialization Parameter

Chapter 12: Tuning Tools20 SQL Tools – EXPLAIN PLAN Preparation Step: PLAN TABLE SYNONYM GRANT Execution Phase: EXPLAIN PLAN command Interpret results

Chapter 12: Tuning Tools21 SQL Tools – EXPLAIN PLAN (continued) Use your own SELECT statement to retrieve execution plan Use DBMS_XPLAN

Chapter 12: Tuning Tools22 SQL Tools – SQL*Plus AUTOTRACE Preparation Phase: PLUSTRACE role PLAN_TABLE table Synonym Execution Phase:

Chapter 12: Tuning Tools23 SQL Tools – SQL Trace and TKPROF

Chapter 12: Tuning Tools24 SQL Tools – TKPROF

Chapter 12: Tuning Tools25 Data Block Corruption Tools DBVERIFY: This tool performs data file verification for corruption; it can scan an entire or partial data file whether it is online or offline

Chapter 12: Tuning Tools26 Data Block Corruption Tools (continued) DBMS_REPAIR: detects data block corruption of database objects such as tables and indexes; it also has other uses such as marking corrupted blocks to be skipped during data fetching

Chapter 12: Tuning Tools27 Analyze Tools Analyze tools include: ANALYZE command DBMS_UTILITY DBMS_STATS DBMS_DDL Oracle Enterprise Manager

Chapter 12: Tuning Tools28 Resource Management Tool The Database Resource Manager empowers the DBA to categorize users and application proxy users who are using the database into different categories which are referred to as resource consumer groups and to allocate a percentage of CPU usage based on user priorities The Database Resource Manager provides the following benefits: Transfers the control of CPU resources from the operating system to the database and thus to the DBA Distributes CPU resources among users based on need and priority Allocates degree of parallelism to different groups based on need Prevents certain users from sporadically impacting applications that need CPU resources Allows DBAs to switch priority of CPU usage for users at any time Gives the DBA control of the amount of undo space for each consumer group

Chapter 12: Tuning Tools29 Resource Management Tool (continued)

Chapter 12: Tuning Tools30 Resource Plan

Chapter 12: Tuning Tools31 DBMS_RESOURCE_MANAGER Package

Chapter 12: Tuning Tools32 Resource Management Views

Chapter 12: Tuning Tools33 Resource Management Views (continued)

Chapter 12: Tuning Tools34Summary The Alert log file is the heart beat of the system, registering errors, events, and database activities Each time a background process fails, an error is generated to the Alert log and a trace file is generated STATSPACK was developed to replace UTLBSTAT/UTLESTAT STATSPACK is an enhanced tool for collecting statistics that help you diagnose and troubleshoot database performance The Database Resource Manager distributes CPU and other resources to users based on priorities set by the DBA