Steven George Sr. Delivery Manager Mark Fuller Sr. Pr. Instructor Rick Pandya Pr. Instructor JF...
-
date post
20-Dec-2015 -
Category
Documents
-
view
225 -
download
1
Transcript of Steven George Sr. Delivery Manager Mark Fuller Sr. Pr. Instructor Rick Pandya Pr. Instructor JF...
Steven GeorgeSr. Delivery Manager
Mark FullerSr. Pr. Instructor
Rick PandyaPr. Instructor
JF VerrierPr. Curriculum Developer
Oracle Corporation
Oracle Database 10 g:
Managing the Self-Managing Database
Objectives
• Understanding the self-management capabilities of Oracle Database 10
g
• Customizing the self-management capabilities of Oracle Database 10
g
Manageability Goal
• Automatic versus Manual• Intelligence versus Data
½ Cost
• Adaptive versus Oversized• Integrated versus Third Party
• Preventive versus Corrective• Act and Succeed versus Trial and Error
Reduce Administration Cost
Reduce Capital Expenditure
Reduce Failure Cost
How DBAs Spend Their Time
Load Data 6%
MaintainSoftware 6%
Install 6% Create and Configure 12%
Manage DatabaseSystem 55%
Database Management Challenges
Applicationand SQL
Management
StorageManagement
Backup andRecovery
Management
SystemResource
Management
SpaceManagement
?
?
??
?
Solution: Self-Managing Database
Applicationand SQL
Management
StorageManagement
Backup andRecovery
Management
SystemResource
Management
SpaceManagement
Fix Advise
AlertMonitor
CommonManageabilityInfrastructure
AutomaticManagement
Enterprise
ManagerDatabaseConsole
Common Manageability Infrastructure: Automatic Workload Repository
AutomaticWorkload
Repository
ServerAlerts
AutomatedTasks
AdvisoryFramework
Data Warehouseof the Database Automatic collection
of important statistics
Direct memoryaccess
Automatic Proactive
Efficient
Automatic Workload Repository
SGA
In-memorystatistics
AWRStatistics
ASH
SYSAUXMMON
7:00 a.m.7:30 a.m.
8:00 a.m.
WR Schema
Snapshot 1
Snapshot 2
Snapshot 3
Snapshot 4
8:30 a.m.
8:30am
ADDM finds top problems
BG
BG
…
FG
FG
…
DBA
Sevendays
Statistics Level
STATISTICS_LEVEL
BASIC TYPICAL ALL
Recommendeddefault value
Additional statistics for manual SQL diagnostics
Turn offall self-tuning capabilities
Configuring The Workload Repository
Manually Creating Snapshots
Database Feature Usage Metric Collection
MMONDB Feature Usage
Statistics DB High-Water Mark
StatisticsAdvanced Replication, Oracle Streams, AQ,Virtual Private Database,Audit options, …
size of largest segment,maximum number of sessions,maximum number of tables,maximum size of the database,
maximum number of data files,…
DBA_FEATURE_USAGE_STATISTICS DBA_HIGH_WATER_MARK_STATISTICS
OracleDatabase
10g
AWR
HOST CONFIGURATION INFO
EM Repository: ECM
EM Console
Once a week
Common Manageability Infrastructure:Server Alerts
AutomaticWorkload
Repository
ServerAlerts
AutomatedTasks
AdvisoryFramework
Enabled by defaultTimely generation
Push model
Automatic Proactive
Efficient
Server Alerts
Oracle Server(SGA)
ServerAlertsQueue
Enterprise
Manager
Server monitors itself
MMON
AWR
AutomaticNotification
GuidedResolution
Server Alerts Delivery Process
AdvancedQueue
Queue
SubscribingClients
FG
BG
Push
ThirdParty
ConsoleUpdate
Page or
e-mailDBAs
EM(EMD)
Alert
Server-Generated Alert Types
MMON
85% Warning
97% CriticalAlert Cleared
Cleared
ThresholdAlerts
Non-Threshold
Alerts
Metric-Based
Event-Based
Alert Alert Alert
SnapshotToo Old
ResumableSession
Suspended
Recovery Area Low On
Free Space
Out-of-the-box Alerts
ResumableSession
Suspended
SnapshotToo Old
Recovery Area
Low On Free Space
Tablespace
85% Warning97% Critical
TablespaceSpace Usage
LocallyManaged
EM Interface to Alerts
Setting Alert Thresholds
Common Manageability Infrastructure:Automated Tasks
AutomaticWorkload
Repository
ServerAlerts
AutomatedTasks
AdvisoryFramework
Pre-packaged routinemaintenance tasks
Resource usage controlled
Statistics collection task scheduledout-of-the-box
Automatic Proactive
Efficient
Automatic Optimizer Statistics Collection
Automatic statistics collection
DBA tracks and gathers statistics
Resolvestwo issues
Targetsright objects
Determinesright samples
Gather Statistics Job
AUTO_TASKS_JOB_CLASS
AUTO_TASKS_CONSUMER_GROUP
gather_stats_job
WEEKNIGHT_WINDOW
10pm–6am Mon to Fri
MAINTENANCE_WINDOW_GROUP
WEEKEND_WINDOW
12am Sat to 12am Mon
Adding New Tasks Using EM
D E M O N S T R A T I O N
Creating Automated Tasks
Common Manageability Infrastructure:Advisory Framework
AutomaticWorkload
Repository
ServerAlerts
AutomatedTasks
AdvisoryFramework
Uniform interface Fully integrated
Automatic Proactive
Efficient
Advisory Framework
ADDM
SQL Tuning
Access
Memory
Space
PGA
SGA
Segment Advisor
Undo
Buffer Cache
Shared Pool
SeamlessintegrationAWR
Commondata source
Guided Tuning Session
Create an advisor task
Adjust task parameters
Acceptresults?
Implementrecommendations
YesNo
Perform analysis
EnterpriseManager DatabaseConsole
Advisory Central
Solution: Self-Managing Database
Applicationand SQL
Management
StorageManagement
Backup andRecovery
Management
SystemResource
Management
SpaceManagement
Fix Advise
AlertMonitor
CommonInfrastructure
AutomaticManagement
Enterprise
ManagerDatabaseConsole
Performance Monitoring Solutions
Snapshots
ADDM ADDMResults
MMON
Alerts
In-memorystatistics
AWR
SGA
ReactiveMonitoring
Proactive Monitoring within
Oracle ServerDBA
ADDM Performance Monitoring
Snapshots
ADDM
MMONIn-memorystatistics
AWR
SGA
ADDMResults
EM
30 minutes
ADDMResults
System Wait
RAC Waits
IO Waits
Concurrency
Buffer Busy
Parse Latches
Buf Cache latches
Root CausesSymptoms
ADDM Problem Classification System
…… ……
……
……Non-problem areas
Accessing ADDM Advice
ADDM Recommendations
Performance Monitoring Solutions
Snapshots
ADDM ADDMResults
MMON
Alerts
In-memorystatistics
AWR
SGA
ReactiveMonitoring
Proactive Monitoring within
Oracle ServerDBA
Performance Management Approach
CPU/Waits
SQL Sessions
Host
Oracle
CPU Bottlenecks Memory Bottlenecks
Uses ASH and AWR
EM Product Layout
Enterprise-wide Console Page
Target Databases Page
Database Home Page
Database Performance Page
Drilldowns
SQL Session
Database Performance Page
Concurrency Wait Class: Drill Down
Solution: Self-Managing Database
Applicationand SQL
Management
StorageManagement
Backup andRecovery
Management
SystemResource
Management
SpaceManagement
Fix Advise
AlertMonitor
CommonInfrastructure
AutomaticManagement
Enterprise
ManagerDatabaseConsole
Automate the SQL Tuning Process
DBA
ADDM
SQL Tuning Advisor
High-loadSQL
SQL Workload
I can doit for you!
SQL Tuning Advisor Overview
Add MissingIndex Run
Access Advisor
RestructureSQL
Plan Tuning(SQL Profile)
AutomaticTuning Optimizer
SQL AnalysisOptimization
Mode
Access Analysis Optimization
Mode
Plan Tuning Optimization
Mode
Statistics CheckOptimization
Mode
DetectStale or Missing
Statistics
ComprehensiveSQL Tuning
SQL Tuning Advisor
Plan Tuning Flow
Optimizer
(Tuning Mode)
createsubmit
output
SQL Profile
DatabaseUsers
Well-TunedPlan
SQL TuningAdvisor
use
No application code
change Optimizer
(Normal Mode)
SQL Tuning Advisor Usage Model
SQLTuning Advisor
ADDM High-load SQL
Cursor Cache
STS
Custom
Filter/Rank
Sources
ManualSelection
Automatic Selection
AWR
DBA
AWR
D E M O N S T R A T I O N
Resolving Performance
Problems
Solution: Self-Managing Database
Applicationand SQL
Management
StorageManagement
Backup andRecovery
Management
SpaceManagement
Fix Advise
AlertMonitor
CommonInfrastructure
AutomaticManagement
Enterprise
ManagerDatabaseConsole
SystemResource
Management
Overview of Automatic Shared Memory Management
Java Pool
DatabaseBuffer Cache
Redo Log Buffer
Shared Pool
Large Pool
SGA
Fixed SGA
Automatically set the optimal size
MMAN
Benefits of Automatic Shared Memory Management
DB_CACHE_SIZESHARED_POOL_SIZELARGE_POOL_SIZEJAVA_POOL_SIZE
Total SGA size
SGA_TARGET
Using EM to ConfigureAutomatic Shared Memory Management
D E M O N S T R A T I O N
Automating Memory
Management
Solution: Self-Managing Database
Applicationand SQL
Management
StorageManagement
Backup andRecovery
Management
SystemResource
Management
Fix Advise
AlertMonitor
CommonInfrastructure
AutomaticManagement
Enterprise
ManagerDatabaseConsole
SpaceManagement
Data
Segment Shrink Overview
HWM
HWM
ShrinkOperation
Data UnusedSpace
UnusedSpace
Reclaimed Space
Online and in-place
Data
How Can I Shrink Segments?
ALTER TABLE employees SHRINK SPACE CASCADE;
ALTER … SHRINK SPACE [CASCADE]
TABLE INDEX MATERIALIZED VIEW MATERIALIZED VIEW LOG
MODIFY PARTITION MODIFY LOB
ALTER TABLE employees ENABLE ROW MOVEMENT; 1
2
MODIFY SUBPARTITION
Segment Advisor
Growth Trend Report
D E M O N S T R A T I O N
Proactively Managing Space
Segment Resource Estimation
Automatic Undo Retention Tuning
• Proactive tuning– Undo retention is tuned for longest-running query.– Query duration information is collected every 30
seconds.
• Reactive tuning– Undo retention is gradually lowered under space
pressure.– Oldest unexpired extents are used first.
• Enabled by default
D E M O N S T R A T I O N
Using Automatic Undo Retention
Tuning
Undo Advisor
Redo Logfile Size Advisor
Solution: Self-Managing Database
Applicationand SQL
Management
StorageManagement
SystemResource
Management
SpaceManagement
Fix Advise
AlertMonitor
CommonInfrastructure
AutomaticManagement
Enterprise
ManagerDatabaseConsole
Backup andRecovery
Management
Automatic Backup (DBCA Setup)
Optimized Incremental Backup
Optimizes incremental backups
• Tracks which blocks have changed since last backup
Oracle Database 10g has integrated change tracking.
• New Change Tracking File is introduced.
• Changed blocks are tracked as redo is generated.
• Database backup automatically uses changed block list.
List of Changed Blocks
RedoGeneration
Redo Log
101100101011000011101001011010101110011
ChangeTrackingFile
SGA
Defining Flash Recovery Area
Flash Recovery Area Space Management
Disk limit is reached and a new file needs to be written into the Recovery Area.
12
Backup filesto be deleted
Database filebackup
1234
Warning is issued to user.
Recovery Area
Space pressure occurs.
RMAN updates
list of files that
may be deleted.
Oracle deletes files that are nolonger requiredon disk.
Suggested Strategy
Flashback Error Correction
• Flashback Database – Restore database to time– Uses flashback logs
• Flashback Drop– Restore dropped table– Uses recycle bin
• Flashback Table – Restore all rows in table to time– Uses UNDO in database
• Flashback Transaction Query– Query a committed Txn
• Flashback Versions Query– Query changes to rows over time
Order
Order Line
DatabaseCustomer
Solution: Self-Managing Database
Applicationand SQL
Management
Backup andRecovery
Management
SystemResource
Management
SpaceManagement
Fix Advise
AlertMonitor
CommonInfrastructure
AutomaticManagement
Enterprise
ManagerDatabaseConsole Storage
Management
What Is Automatic Storage Management
Database
Tablespace
Segment
Extent
ASM managesOracle files.
ASM solvesmanagement problems
of Oracle databases.
ASM does notreplace existing
concepts.
Hierarchy
Tablespace
Segment
Extent
Oracleblock
Data file
Physicalblock
ASMdisk group
ASM disk
ASM file
Allocation unitFile system
file orraw device
Database
Or
ASM Benefits
Reducesadministration
complexity
Reduces the costof managing storage
Supports RAC
Improves performance,
scalability,and reliability
ASM Files
Database file
ASM file automatically spread inside disk group dgroupA
CREATE TABLESPACE sample DATAFILE '+dgroupA';
1234
1 2 3 4
Automatic ASM filecreation
SQL Statements Issued to ASM Instances
ASM Instance
CREATE DISKGROUP
ALTER DISKGROUP DROP DISKGROUP
ALTER SYSTEMRESTRICTED SESSION
Enterprise Manager and ASM
D E M O N S T R A T I O N
Using Automatic Storage
Management
How Oracle Database 10 g DBAs
Spend Their Time
Load Data 3%MaintainSoftware 3%
Install 3%Create and
Configure 6%
Manage DatabaseSystem 25%
Proactive andStrategic
Planning 50+%
Summary
• Oracle Database 10 g’s self-management
capabilities work out-of-the-box.• Customization of Oracle Database 10
g’s self-management capabilities can be done through Enterprise Manager.
• Oracle Database 10 g is a self-managing
database which reduces administration overhead and enables DBAs to become proactive strategists.
AQ&Q U E S T I O N SQ U E S T I O N S
A N S W E R SA N S W E R S
Reminder – please complete the OracleWorld online session survey
Thank you.