13 Copyright © 2004, Oracle. All rights reserved. Optimizing Database Performance.

Slides:



Advertisements
Similar presentations
12 Copyright © 2006, Oracle. All rights reserved. Automatic Storage Management.
Advertisements

INTRODUCTION TO ORACLE Lynnwood Brown System Managers LLC Introduction to Oracle Automatic Storage Management (ASM) Copyright System Managers LLC 2008.
9 Copyright © 2006, Oracle. All rights reserved. Automatic Performance Management.
13 Copyright © 2005, Oracle. All rights reserved. Monitoring and Improving Performance.
2 Copyright © 2005, Oracle. All rights reserved. Installing the Oracle Database Software.
INTRODUCTION TO ORACLE Lynnwood Brown System Managers LLC Backup and Recovery Copyright System Managers LLC 2008 all rights reserved.
5 Copyright © 2005, Oracle. All rights reserved. Managing Database Storage Structures.
4 Copyright © 2005, Oracle. All rights reserved. Managing the Oracle Instance.
1 Copyright © 2008, Oracle. All rights reserved. Database Architecture and ASM.
Oracle9i Database Administrator: Implementation and Administration 1 Chapter 2 Overview of Database Administrator (DBA) Tools.
Oracle Architecture. Instances and Databases (1/2)
Page Footer Keed Education Oracle Database Administration Basic Copyright 2009 Keed Education BV Version Concept.
15 Copyright © 2004, Oracle. All rights reserved. Monitoring and Managing Memory.
12 Copyright © 2005, Oracle. All rights reserved. Proactive Maintenance.
Steven George Sr. Delivery Manager Mark Fuller Sr. Pr. Instructor Rick Pandya Pr. Instructor JF Verrier Pr. Curriculum Developer Oracle Corporation.
Harvard University Oracle Database Administration Session 2 System Level.
5 Copyright © 2006, Oracle. All rights reserved. Database Recovery.
Backup and Recovery Part 1.
Configuring Recovery Manager
4 Copyright © 2008, Oracle. All rights reserved. Configuring Backup Specifications.
9 Copyright © Oracle Corporation, All rights reserved. Oracle Recovery Manager Overview and Configuration.
Backup Concepts. Introduction Backup and recovery procedures protect your database against data loss and reconstruct the data, should loss occur. The.
Introduction to Oracle Backup and Recovery
Using RMAN to Perform Recovery
14 Copyright © 2004, Oracle. All rights reserved. Automatic Storage Management.
1 Copyright © 2005, Oracle. All rights reserved. Introduction.
20 Copyright © 2004, Oracle. All rights reserved. Database Recovery.
1 Copyright © 2009, Oracle. All rights reserved. Exploring the Oracle Database Architecture.
13 Copyright © Oracle Corporation, All rights reserved. RMAN Complete Recovery.
12 Copyright © 2004, Oracle. All rights reserved. Automatic Management.
15 Copyright © 2004, Oracle. All rights reserved. Proactive Maintenance.
CHAPTER 2 Implementing a Database. Introduction to Creating Databases After you’ve installed the Oracle software, the next logical step is to create a.
Oracle on Windows Server Introduction to Oracle10g on Microsoft Windows Server.
5 Copyright © 2004, Oracle. All rights reserved. Using Recovery Manager.
5 Copyright © 2008, Oracle. All rights reserved. Using RMAN to Create Backups.
11 Copyright © Oracle Corporation, All rights reserved. RMAN Backups.
11 Copyright © Oracle Corporation, All rights reserved. RMAN Backups.
1Introduction Objectives 1-2 Course Objectives 1-3 Oracle Products 1-4 Relational Database Systems 1-5 How the Data Is Organized 1-6 Integrity Constraints.
Preface 1 Introduction Course Objectives 1-2 How DBAs Spend Their Time 1-3 Oracle Database 10g Manageability Goals 1-4 Database Management Challenges 1-5.
16 Copyright © 2007, Oracle. All rights reserved. Performing Database Recovery.
5 Copyright © 2004, Oracle. All rights reserved. Controlling the Database.
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.
17 Copyright © Oracle Corporation, All rights reserved. Recovery Catalog Creation and Maintenance.
3 Copyright © 2009, Oracle. All rights reserved. Creating an Oracle Database Using DBCA.
5 Copyright © 2005, Oracle. All rights reserved. Managing Database Storage Structures.
14 Copyright © 2005, Oracle. All rights reserved. Backup and Recovery Concepts.
ASM General Architecture
6 Copyright © 2007, Oracle. All rights reserved. Managing Database Storage Structures.
Creating an Oracle Database. Considerations before creating a DB Planning for Database Creation –Select the standard database block size. –Use an undo.
3 Copyright © 2006, Oracle. All rights reserved. Using Recovery Manager.
Oracle 10g Automatic Storage Management Overview of ASM as a Storage Option for Oracle 10g.
12 Copyright © Oracle Corporation, All rights reserved. User-Managed Complete Recovery.
6 Copyright © 2007, Oracle. All rights reserved. Performing User-Managed Backup and Recovery.
2 Copyright © 2007, Oracle. All rights reserved. Configuring for Recoverability.
2 Copyright © 2006, Oracle. All rights reserved. Configuring Recovery Manager.
8 Copyright © 2007, Oracle. All rights reserved. Using RMAN to Duplicate a Database.
3 Copyright © 2004, Oracle. All rights reserved. Creating an Oracle Database.
3 Copyright © 2004, Oracle. All rights reserved. Database Architecture Comparison.
1 Copyright © 2006, Oracle. All rights reserved. Introduction.
2 Copyright © 2006, Oracle. All rights reserved. RAC and Shared Storage.
9 Copyright © 2004, Oracle. All rights reserved. Incomplete Recovery.
14 Copyright © 2007, Oracle. All rights reserved. Backup and Recovery Concepts.
4 Copyright © 2004, Oracle. All rights reserved. Managing the Oracle Instance.
Control File Information The database name The timestamp of database creation The names and locations of associated datafiles and redo log files Tablespace.
5 Copyright © 2005, Oracle. All rights reserved. Managing the Oracle Instance.
Oracle Database Architectural Components
How To Pass Oracle 1z0-060 Exam In First Attempt?
Index Index.
Performing Database Recovery
Presentation transcript:

13 Copyright © 2004, Oracle. All rights reserved. Optimizing Database Performance

13-2 Copyright © 2004, Oracle. All rights reserved. Objectives After completing this lesson, you should be able to: Provide a brief review of the advisors Formulate tuning goals Tune applications Simplify file management using ASM

13-3 Copyright © 2004, Oracle. All rights reserved. Advisory Framework Overview ADDM SQL Tuning Advisor SQL Access Advisor Memory Space PGA Advisor SGA Segment Advisor Undo Advisor Buffer Cache Advisor Library Cache Advisor PGA

13-4 Copyright © 2004, Oracle. All rights reserved.

13-5 Copyright © 2004, Oracle. All rights reserved. Database Control and Advisors

13-6 Copyright © 2004, Oracle. All rights reserved. Typical Advisor Tuning Session Create an advisor task Adjust task parameters Accept results? Implement recommendations Yes No Perform analysis

13-7 Copyright © 2004, Oracle. All rights reserved. Manually Invoking ADDM

13-8 Copyright © 2004, Oracle. All rights reserved. Application Tuning Challenges DBA ADDM SQL Tuning Advisor High-load SQL SQL Workload I can do it for you! How can I tune my high-load SQL?

13-9 Copyright © 2004, Oracle. All rights reserved. SQL Tuning Advisor Overview Add Missing Index Run Access Advisor Restructure SQL Plan Tuning (SQL Profile) Automatic Tuning Optimizer SQL Analysis Optimization Mode Access Analysis Optimization Mode Plan Tuning Optimization Mode Statistics Check Optimization Mode Detect Stale/Missing Statistics Comprehensive SQL Tuning SQL Tuning Advisor

13-10 Copyright © 2004, Oracle. All rights reserved. SQL Tuning Advisor Options and Recommendations

13-11 Copyright © 2004, Oracle. All rights reserved. Using the SQL Tuning Advisor Use the SQL Tuning Advisor to analyze SQL statements and obtain performance recommendations Sources for SQL Tuning Advisor to analyze: –Top SQL: Analyzes the top SQL statements currently active –SQL Tuning Sets: Analyzes a set of SQL statements you provide –Snapshots: Analyzes a snapshot –Baselines: Analyzes a baseline

13-12 Copyright © 2004, Oracle. All rights reserved. Using the SQL Tuning Advisor

13-13 Copyright © 2004, Oracle. All rights reserved. Using the SQL Access Advisor

13-14 Copyright © 2004, Oracle. All rights reserved. Full Notes Page

13-15 Copyright © 2004, Oracle. All rights reserved. Using the Memory Advisor

13-16 Copyright © 2004, Oracle. All rights reserved. Segment Advisor Overview Determines the list of objects that are good candidates for shrinking Recommendations are based on: –Sampled analysis –Historical information –Future growth trends Accessible from Database Control: –Advisor Central page –Tablespaces page –Schema object pages

13-17 Copyright © 2004, Oracle. All rights reserved. Segment Advisor

13-18 Copyright © 2004, Oracle. All rights reserved. Growth Trend Report Used by the Segment Advisor Space usage statistics are collected into AWR

13-19 Copyright © 2004, Oracle. All rights reserved. Segment Resource Estimation

13-20 Copyright © 2004, Oracle. All rights reserved. The Undo Management Page

13-21 Copyright © 2004, Oracle. All rights reserved. The Undo Advisor Page

13-22 Copyright © 2004, Oracle. All rights reserved. What Is Automatic Storage Management? Portable and high performance cluster file system Manages Oracle database files Data is spread across disks to balance load Integrated mirroring across disks Solves many storage management challenges ASM File System Volume Manager Operating System Application Database

13-23 Copyright © 2004, Oracle. All rights reserved. ASM Key Features and Benefits Stripes files, not logical volumes Online disk reconfiguration and dynamic rebalancing Adjustable rebalancing speed Provide redundancy on a file basis ASM only supports Oracle database files Cluster aware Automatically installed

13-24 Copyright © 2004, Oracle. All rights reserved. ASM Concepts Database Tablespace Segment Extent Oracle block Data file Physical Block ASM Disk Group ASM Disk ASM File Allocation Unit File System File or Raw Device

13-25 Copyright © 2004, Oracle. All rights reserved. ASM General Architecture ASM Instance SID=ant ASM Instance SID=bee ASM Disks ASM Diskgroup TomASM Diskgroup DickASM Diskgroup Harry DB Instance SID= sales DB Instance SID=test DB Instance SID= sales DB Instance SID=test ASMB FG Node2Node1 Group Services tom=ant dick=ant harry=ant Group Services tom=bee dick=bee harry=bee DBW 0 ASMB RBAL ARB 0 ARB A … ARB 0 ARB A … ASMB RBAL

13-26 Copyright © 2004, Oracle. All rights reserved.

13-27 Copyright © 2004, Oracle. All rights reserved. ASM Instance Creation

13-28 Copyright © 2004, Oracle. All rights reserved. ASM Instance Initialization Parameters INSTANCE_TYPE = ASM DB_UNIQUE_NAME = +ASM ASM_POWER_LIMIT = 1 ASM_DISKSTRING = '/dev/rdsk/*s2', '/dev/rdsk/c1*' ASM_DISKGROUPS = dgroupA, dgroupB LARGE_POOL_SIZE = 8MB

13-29 Copyright © 2004, Oracle. All rights reserved. Accessing an ASM Instance Disk group Storage system AS SYSDBA AS SYSOPER ASM instance All operationsNondestructive operations

13-30 Copyright © 2004, Oracle. All rights reserved. ASM Home Page

13-31 Copyright © 2004, Oracle. All rights reserved. ASM Performance Page

13-32 Copyright © 2004, Oracle. All rights reserved. ASM Configuration Page

13-33 Copyright © 2004, Oracle. All rights reserved. Starting Up an ASM Instance $ sqlplus /nolog SQL> CONNECT / AS sysdba Connected to an idle instance. SQL> STARTUP; ASM instance started Total System Global Area bytes Fixed Size bytes Variable Size bytes Database Buffers bytes Redo Buffers bytes ASM diskgroups mounted

13-34 Copyright © 2004, Oracle. All rights reserved. Shutting Down an ASM Instance SHUTDOWN NORMAL ASM Instance Database Instance ADatabase Instance B

13-35 Copyright © 2004, Oracle. All rights reserved. ASM Disk Groups A pool of disks managed as a logical unit Partitions total disk space into uniform sized units Spreads each file evenly across all disks Uses coarse or fine grain striping based on file type Administer disk groups not files Disk Group ASM Instance

13-36 Copyright © 2004, Oracle. All rights reserved. ASM Administration Page

13-37 Copyright © 2004, Oracle. All rights reserved. Create Disk Group Page

13-38 Copyright © 2004, Oracle. All rights reserved. ASM Files Database File ASM File automatically spread inside Disk Group dgroupA CREATE TABLESPACE sample DATAFILE '+dgroupA'; Automatic ASM file Creation RMAN

13-39 Copyright © 2004, Oracle. All rights reserved. ASM Filenames ASM Filename Fully- qualified Incomplete with template NumericAlias Alias with template Incomplete Reference Single-file Creation Multiple-file Creation

13-40 Copyright © 2004, Oracle. All rights reserved. ASM File Name Mapping Oracle File Type Def Template Control filescontrolfileCF/BCFCONTROLFILE Data filesdatafile _ DATAFILE Online logsonline_loglog_ ONLINELOG Archive logsarchive_logparameterARCHIVELOG Temp filestemp _ TEMPFILE Data file backup piecesbackupsetClient SpecifiedBACKUPSET Data file incremental backup pieces backupsetClient SpecifiedBACKUPSET Arch log backup piecebackupsetClient SpecifiedBACKUPSET Data file copydatafile _ DATAFILE Initialization parametersinitspfilePARAMETERFILE Broker configurationsdrc DATAGUARDCONFIG Flashback logsrlog _ FLASHBACK Change tracking bitmapsCTBBITMAPCHANGETRACKING Auto backupAutoBackupClient SpecifiedAUTOBACKUP Data Pump dump setDumpsetdumpDUMPSET Cross-platform converted data files XTRANSPORT

13-41 Copyright © 2004, Oracle. All rights reserved. SQL Commands and File Naming CREATE CONTROLFILE DATABASE sample RESETLOGS ARCHIVELOG MAXLOGFILES 5 MAXLOGHISTORY 100 MAXDATAFILES 10 MAXINSTANCES 2 LOGFILE GROUP 1 ('+dgroupA','+dgroupB') SIZE 100M, GROUP 2 ('+dgroupA','+dgroupB') SIZE 100M DATAFILE '+dgroupA ' SIZE 100M DATAFILE '+dgroupA ' SIZE 100M;

13-42 Copyright © 2004, Oracle. All rights reserved. DBCA and Storage Options

13-43 Copyright © 2004, Oracle. All rights reserved. Migrating Your Database to ASM Storage 1.Shut down your database cleanly 2.Shutdown the database and modify your server parameter file to use Oracle Managed Files (OMF) 3.Edit and execute the following RMAN script: STARTUP NOMOUNT; RESTORE CONTROLFILE FROM '/u1/c1.ctl'; ALTER DATABASE MOUNT; BACKUP AS COPY DATABASE FORMAT '+dgroup1'; SWITCH DATABASE TO COPY; SQL "ALTER DATABASE RENAME '/u1/log1' TO '+dgroup1' "; # Repeat RENAME command for all online redo log members... ALTER DATABASE OPEN RESETLOGS; SQL "ALTER DATABASE TEMPFILE '/u1/temp1' DROP";

13-44 Copyright © 2004, Oracle. All rights reserved. Summary In this lesson, you should have learned how to: Provide a brief review of the advisors Formulate tuning goals Tune applications Simplify file management using ASM

13-45 Copyright © 2004, Oracle. All rights reserved. Practice 13 Overview: Optimizing Database Performance This practice covers the following topics: Proactively tuning your database using ADDM. Using Automatic Shared Memory Management to avoid long running queries issues.

13-46 Copyright © 2004, Oracle. All rights reserved.

13-47 Copyright © 2004, Oracle. All rights reserved.

13-48 Copyright © 2004, Oracle. All rights reserved.