Oracle Database 11g: Manage Performance &

<Insert Picture Here>
Oracle Database 11g:
Self-Managing Database - The Next Generation
Katharina Römer
Principal Sales Consultant
Agenda
• Introduction
• Manage Performance & Resources
• Manage Fault
<Insert Picture Here>
Agenda
• Introduction
• Manage Performance & Resources
• Manage Fault
<Insert Picture Here>
Management Automation
Auto-tuning
Advisory
Replication
Recovery
RAC
Schema
Apps/SQL
Memory
Backup
Storage
Instrumentation
Self-Managing Database: The Next Generation
Manage
change
Manage performance & resources
Manage fault
Agenda
• Introduction
• Manage Performance & Resources
• Manage Fault
<Insert Picture Here>
Oracle Database 11g:
Manage Performance & Resources
• Automatic SQL Tuning
• ADDM new Features
• Automatic Memory Management
<Insert Picture Here>
Manage Performance &
Resources:
Automatic SQL Tuning
Oracle Database 10g: SQL Tuning
Workload
1
High load
4
Generate
SQL profiles
2
ADDM
3
DBA
Run SQL Tuning Advisor
Accept profiles
Automatic
SQL Tuning
Advisor
Oracle Database 11g: Automatic SQL Tuning
AWR
p
To
2
SQ
L
Auto matic
Workload
3
1
SQL Tuning
R
ts
or
ep
4
DBA
Selecting Potential SQL Statements for Tuning
AWR
Weekly
Daily
Hourly
Avrg execution
Candidate list
1. Pull the top queries from the past week into four buckets:
Top for the past week
Top for any day in the past week
Top in any single hour
Top by average single execution
2. Combine four buckets into one (assigning weights)
3. Cap at 150 queries per bucket
Maintenance Window Timeline
Automatic SQL Tuning task
…
Pick
candidate
SQL
Tune
S1
Test
P1
Accept
P1
One hour maximum (by default)
Maintenance
window
Tune
S2
…
Automatic Tuning Process
Not considered for
auto implementation
New
SQL profile
Restructure
SQL
Existing
profile?
Indexes
Considered for
auto implementation
N
3X
benefit?
Y
Accept profile
N
Y
Stale
stats
3X
benefit?
Y
Replace profile
GATHER_STATS_JOB
N
Ignore new profile
Automatic SQL Tuning Task
Configuring Automatic SQL Tuning
Automatic SQL Tuning Result Summary
Automatic SQL Tuning: Result Details
Automatic SQL Tuning Result Details: Drilldown
SQL Access Advisor: Overview
What
partitions, indexes,
and MVs do I need
to optimize
my entire
workload?
Solution
SQL
Access
Advisor
DBA
Workload
No expertise
required
Component
of CBO
Provides
implementation
script
SQL Access Advisor: Usage Model
SQL Access
Advisor
SQL cache
Workload
Hypothetical
STS
Filter
Options
Indexes
Materialized
views
Materialized Partitioned
views log
objects
<Insert Picture Here>
Manage Performance &
Resources:
ADDM new Features
AWR Snapshots in RAC
MMON Coordinator
In-memory
statistics
SYSAUX
SGA (Inst1)
AWR tables
…
6:00 a.m.
9:00 a.m.
7:00 a.m.
8:00 a.m.
In-memory
statistics
SGA (Instn)
MMON
9:00 a.m.
Automatic Database Diagnostic Monitor for RAC
Database ADDM
Self-diagnostic engine
Instance ADDM
AWR
…
Inst1
Instn
Automatic Database Diagnostic Monitor for RAC
• Identifies the most critical performance problems for
the entire RAC cluster database
• Runs automatically when taking AWR snapshots
• Performs database-wide analysis of:
–
–
–
–
–
Global resources (for example I/O and global locks)
High-load SQL and hot blocks
Global cache interconnect traffic
Network latency issues
Skew in instance response times
• Is used by DBAs to analyze cluster performance
• Eliminates need to investigate n reports to spot
common problems
EM Support for ADDM for RAC
<Insert Picture Here>
Manage Performance &
Resources:
Automatic Memory Management
Automatic Memory Management: Overview
PGA memory
10g&11g
Untunable
PGA
Free
11g
Untunable
PGA
Free
PGA target
tar
PG A
Untunable
PGA
get
SQL areas
SQL areas
SQL areas
SGA target
Buffer cache
Buffer cache
SGA memory
Memory target
SGA targ
et
Buffer cache
Large pool
Large pool
Large pool
Shared pool
Shared pool
Shared pool
Java pool
Streams pool
Java pool
Streams pool
Java pool
Streams pool
Other SGA
Other SGA
Other SGA
OLTP
BATCH
BATCH
Automatic Memory Management: Overview
11g
11g
350 MB
Memory
max target
350 MB
Memory
max target
300 MB
Memory target
Memory target
250 MB
ALTER SYSTEM SET
MEMORY_TARGET=300M;
Oracle Database 11g Memory Parameters
MEMORY_MAX_TARGET
SGA_MAX_SIZE
MEMORY_TARGET
SGA_TARGET
SHARED_POOL_SIZE
DB_CACHE_SIZE
LARGE_POOL_SIZE
JAVA_POOL_SIZE
STREAMS_POOL_SIZE
PGA_AGGREGATE_TARGET
Others
DB_KEEP_CACHE_SIZE
DB_RECYCLE_CACHE_SIZE
DB_nK_CACHE_SIZE
LOG_BUFFER
RESULT_CACHE_SIZE
Enabling Automatic Memory Management
Monitoring Automatic Memory Management
DBCA & Automatic Memory Management
Manage Performance & Resources: Summary
• Set up and modify Automatic SQL Tuning
• View and interpret reports generated by Automatic
SQL Tuning
• Use the new features of ADDM
• Use Automatic Memory Management
Agenda
• Introduction
• Manage Performance & Resources
• Manage Fault
<Insert Picture Here>
Oracle Database 11g: Manage Fault
• Automatic Diagnostic Repository
• Support Workbench
• Data Recovery Advisor
Oracle Database 11g R1 Fault Management
Goal: Reduce Time to Resolution
Change assurance
and
automatic health
checks
Prevention
Automatic
Diagnostic
Workflow
Intelligent
resolution
Proactive
patching
Diagnostic
Solution
Delivery
Resolution
Ease Diagnosis: Automatic Diagnostic Workflow
Critical
Error
Automatic
Diagnostic
Repository
DBA
Auto incident creation
First failure capture
1
2
Alert DBA
Targeted health checks
Assisted SR filling
No
Known
bug?
DBA
Yes
4
EM Support Workbench:
Package incident info
Data Repair
EM Support Workbench:
Apply patch/Data repair
3
DBA
<Insert Picture Here>
Manage Fault:
Automatic Diagnostic
Repository
Automatic Diagnostic Repository
DIAGNOSTIC_DEST
Support Workbench
BACKGROUND_DUMP_DEST
CORE_DUMP_DEST
$ORACLE_BASE
USER_DUMP_DEST
$ORACLE_HOME/log
ADR
Base
diag
rdbms
DB
Name
ADR
Home
alert
cdump incpkg incident
incdir_1
metadata
SID
…
hm
trace
(others)
incdir_n
ADRCI
log.xml
alert_SID.log
V$DIAG_INFO
V$DIAG_INFO
SQL> SELECT * FROM V$DIAG_INFO;
NAME
------------------Diag Enabled
ADR Base
ADR Home
Diag Trace
Diag Alert
Diag Incident
Diag Cdump
Health Monitor
Default Trace File
Active Problem Count
Active Incident Count
VALUE
--------------------------------------------------------------TRUE
/u01/app/oracle
/u01/app/oracle/diag/rdbms/oc11/oc11
/u01/app/oracle/diag/rdbms/oc11/oc11/trace
/u01/app/oracle/diag/rdbms/oc11/oc11/alert
/u01/app/oracle/diag/rdbms/oc11/oc11/incident
/u01/app/oracle/diag/rdbms/oc11/oc11/cdump
/u01/app/oracle/diag/rdbms/oc11/oc11/hm
/u01/app/oracle/diag/rdbms/oc11/oc11/trace/oc11_ora_11424.trc
3
8
Viewing the Alert Log Using Enterprise Manager
Problems & Incidents
Problem ID
Critical
Error
Problem
Au
tom
atic
a
Flood
control
Problem
Key
Collecting
lly
Incident
a ll y
u
n
Ma
Incident Status
Incident ID
Automatic
transition
Ready
Tracking
Data-Purged
Closed
DBA
Traces
ADR
MMON Auto-purge
Non-critical
Error
Package to be
sent to
Oracle Support
Incident Packaging Service (IPS)
• Uses rules to correlate all relevant dumps and traces
from ADR for a given problem and allow you to
package them to ship to Oracle Support
• Rules can involve files that were generated around the
same time, and associated with the same client, same
error codes, and so on
• DBAs can explicitly add/edit or remove files before
packaging
• Access IPS through either EM or ADRCI
Incident Packages
ORA600HAH_20070818131159_COM_1.zip
• An incident package is a logical
structure inside ADR representing
one or more problems
• A package is a zip file containing
dump information related to an
incident package
• By default, only the first and last
ADR
three incidents of each
Home
problem are included to
alert cdump
an incident package
• You can generate complete
pkg_1
or incremental zip files
ADR
Base
diag
rdbms
DB
Name
metadata
SID
incpkg incident
…
pkg_n
hm
trace
(others)
<Insert Picture Here>
Manage Fault:
Support Workbench
EM Support Workbench Roadmap
1
7
6
View critical
error alerts in
Enterprise Manager
Close incidents
2
View problem
details
Track the SR and
implement repairs
3
Gather additional
diagnostic
information
Package and upload
diagnostic data
to Oracle Support
5
4
Create a
service request
Oracle Configuration Manager
View Critical Error Alerts in Enterprise Manager
View Problem Details
View Incident Details
View Incident Details
Create a Service Request
Package & Upload Diagnostic Data to
Oracle Support
Track the SR and Implement Repairs
Track the SR and Implement Repairs
Close Incidents and Problems
Incident Packaging Configuration
Custom Packaging: Create New Package
Custom Packaging: Manipulate Incident Package
Custom Packaging: Finalize Incident Package
Custom Packaging: Generate Package
Custom Packaging: Upload Package
Viewing & Modifying Incident Packages
Creating User-Reported Problems
Running Health Checks Manually: EM Example
<Insert Picture Here>
Manage Fault:
Data Recovery Advisor
Data Recovery Advisor
• Reducing down time by eliminating confusion:
1. Assess data failures
2. List failures by severity
3. Advise on repair
Health Monitor
Data
Recovery
Advisor
4. Choose and execute repair
5. Perform proactive checks
DBA
Assessing Data Failures
1
Database Instance Health …
error
2 link
3
Problem Details
Data Failures
Data Failure: Examples
• Not accessible components, for example:
– Missing data files at the OS level
– Incorrect access permissions
– Offline tablespace, and so on
• Physical corruptions, such as block checksum failures
or invalid block header field values
• Logical corruptions, such as inconsistent dictionary,
corrupt row piece, corrupt index entry, or corrupt
transaction
• Inconsistencies, such as control file is older or newer
than the data files and online redo logs
• I/O failures, such as a limit on the number of open files
exceeded, channels inaccessible, network or I/O error
Listing Data Failures
Advising on Repair
1
2a
(1) After manual repair
(2) Automatic repair
2b
Executing Repairs
In less than
19 second
Manage Fault: Summary
• Set up Automatic Diagnostic Repository
• Use the Support Workbench
• Run health checks
Management Automation
Auto-tuning
Advisory
Replication
Recovery
RAC
Schema
Apps/SQL
Memory
Backup
Storage
Instrumentation