database maintenance
Objectives
After completing this lesson, you should be able to:
• Manage the Automatic Workload Repository (AWR)
• Use the Automatic Database Diagnostic Monitor (ADDM)
• Describe and use the advisory framework
• Set alert thresholds
• Use server-generated alerts
• Use automated tasks
目标
完成本课程后,您应该能够:
•管理自动工作负载存储库(AWR)
•使用自动数据库诊断监视器(ADDM)
•描述和使用咨询框架
•设置警报阈值
•使用服务器生成的警报
•使用自动化任务
Automatic Workload Repository
自动工作负载存储库
Automatic Diagnostic Repository
自动诊断库
Advisory framework
Automated tasks
Server alerts
咨询框架
自动化任务
服务器警报
Viewing the Alert History
查看警报历史记录
Terminology
• Statistics: Data collections providing database and object detail
– Optimizer statistics: Used by query optimizer
– Database statistics: Used for performance
• Metric: Rate of change in a cumulative statistic
• Threshold: A boundary value against which metric values are compared
• Automatic Workload Repository (AWR): Infrastructure for data gathering, analysis, and solutions recommendations
• AWR Baseline: A set of AWR snapshots for performance comparison
术语
•统计:提供数据库和对象详细信息的数据收集
–优化器统计信息:由查询优化器使用
–数据库统计:用于性能
•指标:累积统计的变化率
•阈值:与度量值进行比较的边界值
•自动工作负载存储库(AWR):用于数据收集、分析和解决方案建议的基础设施
•AWR基线:一组用于性能比较的AWR快照
Automatic Workload Repository (AWR): Overview
• Built-in repository of performance information
• Snapshots of database metrics taken every 60 minutes and retained for eight days
• Foundation for all self-management functions
自动工作负载存储库(AWR):概述
•内置性能信息存储库
•每60分钟拍摄一次并保留8天的数据库指标快照
•所有自我管理功能的基础
AWR Infrastructure AWR基础设施
Automatic Workload Repository 自动工作负载存储库
AWR Baselines AWR基线
Accessing the AWR Page 访问AWR页面
Managing the AWR
• Retention period
– Default: Eight days
– Consider storage needs
• Collection interval
– Default: 60 minutes
– Consider storage needs
and performance impact
• Collection level
– Basic (disables most ADDM functionality)
– Typical (recommended)
– All (adds additional SQL tuning information to snapshots)
管理AWR
•保留期
–默认值:8天
–考虑存储需求
•收集间隔
–默认值:60分钟
–考虑存储需求
和性能影响
•收集级别
–基本(禁用大多数ADDM功能)
–典型(推荐)
–All(向快照添加其他SQL优化信息)
Statistic Levels 统计水平
Automatic Database Diagnostic Monitor (ADDM)
• Runs after each AWR snapshot
• Monitors the instance; detects bottlenecks
• Stores results in the AWR
自动数据库诊断监视器(ADDM)
•在每个AWR快照后运行
•监控实例;检测瓶颈
•在AWR中存储结果
ADDM Findings in Enterprise Manager Cloud Control 企业管理器云控制中的ADDM发现
ADDM Findings in Enterprise Manager Database Express 在Enterprise Manager Database Express中的ADDM发现
Advisory Framework 咨询框架
Viewing the Advisor Central Page in Enterprise Manager Cloud Control 在Enterprise Manager云控制中查看Advisor中心页面
Using Packages to Invoke the Advisors
Package Name
DBMS_ADDM
(DBMS_ADDM)
DBMS_ADVISOR
DBMS_COMPRESSION
DBMS_SQLDIAG
DBMS_SQLPA
DBMS_SQLTUNE
Advisor Name
Automatic Database Diagnostic Monitor
SQL Access Advisor and Segment Advisor
Compression Advisor
SQL Repair Advisor
SQL Performance Analyzer
SQL Tuning Advisor
使用包调用顾问
程序包名称
数据库管理系统
(数据库管理系统)
数据库管理系统顾问
DBMS U压缩
数据库管理系统
数据库管理系统
数据库管理系统
顾问姓名
自动数据库诊断监视器
SQL访问顾问和段顾问
压缩顾问
SQL修复顾问
SQL性能分析
SQL优化顾问
Automated Maintenance Tasks
Autotask maintenance process:
1. Maintenance Window opens.
2. Autotask background process schedules jobs.
3. Scheduler initiates jobs.
4. Resource Manager limits impact of Autotask jobs.
Default Autotask maintenance jobs:
• Gathering optimizer statistics
• Automatic Segment Advisor
• Automatic SQL Advisor
自动化维护任务
自动任务维护过程:
1维护窗口打开。
2自动任务后台进程调度作业。
三。调度程序启动作业。
4资源管理器限制自动任务作业的影响。
默认自动任务维护作业:
•收集优化器统计信息
•自动分部顾问
•自动SQL顾问
Automated Maintenance Tasks 自动化维护任务
Automated Maintenance Tasks Configuration 自动维护任务配置
Server-Generated Alerts 服务器生成的警报
Setting Metrics Thresholds 设置指标阈值
Reacting to Alerts
• If necessary, you should gather more input (for example, by running ADDM or another advisor).
• Investigate critical errors.
• Take corrective measures.
• Acknowledge alerts that are not automatically cleared.
对警报作出反应
•如有必要,您应该收集更多的输入(例如,通过运行ADDM或其他advisor)。
•调查关键错误。
•采取纠正措施。
•确认未自动清除的警报。
Alert Types and Clearing Alerts 警报类型和清除警报
Quiz
Stateless alerts, such as SNAPSHOT TOO OLD can be found in the dictionary view DBA_OUTSTANDING_ALERTS.
测验
无状态警报,如SNAPSHOT TOO OLD,可以在字典视图DBA_untillet_alerts中找到。
Summary
In this lesson, you should have learned how to:
• Manage the Automatic Workload Repository (AWR)
• Use the Automatic Database Diagnostic Monitor (ADDM)
• Describe and use the advisory framework
• Set alert thresholds
• Use server-generated alerts
• Use automated tasks
摘要
在本课中,您应该学习如何:
•管理自动工作负载存储库(AWR)
•使用自动数据库诊断监视器(ADDM)
•描述和使用咨询框架
•设置警报阈值
•使用服务器生成的警报
•使用自动化任务
Practice: Overview
This practice covers proactively managing your database with ADDM, including:
• Setting up an issue for analysis
• Reviewing your database performance
• Implementing a solution
实践:概述
此实践包括使用ADDM主动管理数据库,包括:
•设置问题进行分析
•检查数据库性能
•实施解决方案