Академический Документы
Профессиональный Документы
Культура Документы
Oracle10i
Grid Oracle10i
Oracle
Database
Control Database
Database
10g
Other
Applications
Make Single Database Easy to Manage
to Manage
y Enable the Grid Oracle iASiAS
Oracle
Oracle iAS
y For Application
ISV Partners
y For End Users
Oracle
y For All Types of Grid
Database
Control
Workload 10g
Other
Applications
Manageability
Revolution
Unprecedented Development
Effort
y Single, biggest effort
– 50% of the architects in the organization
– 200+ engineers
– Gathered customers feedback
– Active, focused development
– Not just research!
y Wide-spread effort
– Projects span entire technology stack
y Long term commitment
Where DBA’s spend their time
Install 6%
Create & Configure
12 %
Software Maintenance
6% Load Data 6%
Install 6%
Create & Configure
12 %
Software Maintenance
6% Load Data 6%
Install 6%
Create & Configure
12 %
Software Maintenance
6% Load Data 6%
Install 6%
Create & Configure
12 %
Software Maintenance
6% Load Data 6%
System Resource
Management
Backup & Recovery
Management
CPU Utilization
Tapes, MTTR Memory Pools
Disaster Recovery Processes
Database Space
Database Backup & Recovery
Management Management
Management
Control
Intelligent
Infrastructure
Intelligent Infrastructure
y Automatic Workload
Repository
Advisory – “Data Warehouse” of the
Infrastructure Database
– Code instrumentation
Server-generated Alert
Infrastructure y Automatic Maintenance
Tasks
Automatic Maintenance Task – Pre-packaged, resource
Infrastructure controlled
Automatic Workload y Server-generated Alerts
Repository – Push vs. Pull, Just-in-time,
Out-of-the-box
y Advisory Infrastructure
– Integrated, uniformity
Automatic Database
Diagnostic Monitor (ADDM)
y Performance expert in a box
y Integrate all components
Application & SQL
together
Management y Automatically provides
database-wide performance
Storage
Management
System Resource
Management
diagnostic, including RAC
y Provides impact and benefit
analysis
Space
Backup & Recovery
Management Database Management y Provides Information vs. raw
Management data
Intelligent Infrastructure y Runs proactively
y Real-time results using the
Time Model
ADDM’s Architecture
Snapshots in y Instrument database code
Automatic Workload paths to produce Time &
Repository Wait Model
y Classification Tree is based
Automatic Diagnostic
Self-Diagnostic Engine
Engine on decades of Oracle
performance tuning
expertise
y Pinpoint root cause and
non-problem areas
y Active Session History –
High-load IO / CPU snapshot of session activity
RAC issues
SQL issues every second
y Runs proactively & manually
System Network +
SQL
Sizing DB config
Advisor Advice Advice
Performance Diagnostic: Before and Now
Scenario: Hard parse problems
Before Oracle10g
1. Examine system utilization
1. Review ADDM
2. Look at wait events
recommendations
3. Observe latch contention
2. ADDM recommends
4. See wait on shared pool and library cache latch
use of cursor_sharing
5. Review v$sysstat (difficult)
6. See “parse time elapsed” > “parse time cpu” and #hard
parses greater than normal
7. Identify SQL by..
y Identifying sessions with many hard parses and trace
them, or
y Reviewing v$sql for many statements with same hash
plan (difficult)
8. Examine objects accessed and review SQL
9. Identify “hard parse” issue by observing the SQL contains
literals
10. Enable cursor sharing
Application and SQL
Management Key to efficient SQL execution:
Oracle Cost-based Optimizer
y Proven Technology
– Over 10 years of production
usage
Application & SQL
Management – Adopted by all top-tier
applications vendors
Storage System Resource y Sophisticated functionality
Management Management – Automatically-gathered
object and system (CPU, IO,
Caching) statistics
Backup & Recovery Space – Comprehensive set of
Database Management
Management access paths, adaptive
Management search strategy
Intelligent Infrastructure – Cost-based transformations
– Automatic allocation of
memory and parallelism
– Versioned optimizer statistics
Remaining Challenges
y How to quickly find optimal plans for complex
queries?
– Sub-optimal plans caused by correlations, complex
predicate selectivity
y What is “bad” SQL?
y How to work-around ‘bad’ SQL in packaged
applications?
y How to ‘globally’ optimize an entire application’s
SQL statements?
– Adding an index may help one statement, but what is the
impact on the rest of the application
Automatic Tuning Optimizer
Packaged Customizable
Apps Apps
y Identify ‘bad’ SQL
High-load SQL – Automatic workload
capture
– Automatic
identification of high-
load SQL
– Top N highest
resource-consuming
SQL Statements
Automatic Tuning Optimizer
Packaged Customizable
Apps Apps
y Automatic SQL Tuning
High-load SQL – Learn from past
executions
Automatic Tuning Optimizer – Dynamic sampling,
Auto SQL partial execution
Tuning
techniques
– Profile the SQL
statement to feedback
Packaged to optimizer
Apps
+ – No change to SQL text
SQL
Profile
Well-tuned SQL
Automatic Tuning Optimizer
Packaged Customizable
Apps Apps
y Automatic SQL Analysis
High-load SQL
– Optimizer explains
decision points
Automatic Tuning Optimizer
– Advises on badly written
Auto SQL
Analysis SQL, stale statistics, bad
schema
Customizable
Apps
+
SQL
Advice
Well-tuned SQL
Automatic Tuning Optimizer
Packaged Customizable
Apps Apps
y SQL Access Advisor
High-load SQL – Advise on access
paths
Automatic Tuning Optimizer – Indexes, Materialized
Access Views, Indexes on
Advisor
Materialized Views
– Consider entire
workload
Customizable
Apps – Consider Impact on
+ insert/update/delete
Indexes &
MVs
Well-tuned SQL
Automatic Tuning Optimizer
Packaged Customizable
Apps Apps
y Complete SQL
High-load SQL
Management
Automatic Tuning Optimizer
– Automated workload
capture, identification of
Auto SQL Auto SQL Access
Tuning Analysis Advisor high-load SQL
– Automatic SQL Tuning
– Automatic SQL Analysis
Packaged Customizable Customizable – SQL Access Advisor
Apps Apps Apps
+ + +
SQL SQL Indexes &
Profile Advice MVs
Well-tuned SQL
SQL Tuning: Before and Now
Scenario: Bad SQL in Packaged Applications
Before Oracle10g
1. Examine system utilization
1. Review ADDM
2. Look at wait events recommendations
3. See wait on DB scattered read
2. Follow link to run
4. Determine scope – system wide, module-dependent, user- Automatic SQL tuning
dependent?
3. Accept SQL Profile
5. Identify SQL by (difficult)
recommendations from
y Identifying sessions with high DB scattered read waits and SQL Tuning
trace them, or
y Reviewing Top Sessions in OEM
6. Get explain plan
7. Examine objects accessed (size/cardinality)
8. Review SQL statistics and/or compare to object statistics (v$sql)
(difficult)
9. Identify the problem
10. Contact packaged app vendor
11. Produce test case for vendor
12. Vendor produces patch/upgrade
13. Patch/upgrade installed in customer’s next maintenance cycle
System Resource Management
Oracle 9i
Application & SQL
y Resource Manager
Management
controls and prioritizes
Storage System Resource CPU usage
Management Management
y Automatic SQL
Space
Memory Tuning
Backup & Recovery
Management Database Management
Management
Intelligent Infrastructure
Automatic Shared Memory
Tuning
y Automatically adapts
Online Large Batch Buffer Cache to workload changes
Users Buffer Cache Jobs y Maximizes memory
utilization
Large Pool
y Single Parameter
Large Pool
makes it easier to
SQL Cache SQL Cache use
Java Pool Java Pool SGA y Helps eliminate out
of memory errors
PGA y Can help improve
sort sort performance
SGA Memory Management: Before and Now
Scenario: Out-of-memory Errors (ORA-4031)
Before Oracle10g
(This space is intentionally left
1. Launch Buffer Pool Advisor blank – No manual steps needed
with Automatic Shared Memory
2. Examine output; check if Buffer Pool is over allocated Tuning)
3. If so, reduce size of Buffer Pool
4. Launch Shared Pool Advisor
5. Examine output; check if Shared Pool is under allocated
6. If so, increase size of Shared Pool
Automatic Space Management
Oracle9i
y Eliminates external space
Application & SQL
Management
fragmentations
– Locally Managed
Storage
Management
System Resource Tablespace
Management
y Eliminates space allocation
contention
Backup & Recovery Space
Management Database Management – Automatic Segment
Management Space Management
Intelligent Infrastructure
Proactive Space Management
Segment running
out of space y Automatically monitor,
capture space usage at
space allocation time -
efficient
y Advise and predict
Server-
Capacity
Generated space growth trend,
Planning
Alerts fragmentation
y “Just-in-Time” Alerts on
space pressure
90
80
70
60
50
40
30
20
10
0
1st Qtr 2nd Qtr 3rd Qtr 4th Qtr
Proactive Space Management
Segment running Fragmented
out of space Segment Online Segment Shrink
– Reclaim space from
internal
fragmentation
– Improve performance
Server- Online
Capacity – In-place shrinking of
Generated Segment
Planning tables
Alerts Shrink
– Wait on DML
operations
90
80
70
60
50
40
30
20
10
0
1st Qtr 2nd Qtr 3rd Qtr 4th Qtr
Space Management : Before and Now
Scenario: Reclaim Wasted Space
Before Oracle10G
1. Launch Segment Advisor to
y Check to see which objects in the tablespace have pockets advise on which object(s) to
of wasted space due to deletion: shrink
1. Create a script that looks at DBA_TABLES view to 2. Accept the recommendations
compare the total space allocated for each object to shrink the objects online
(BLOCKS * DB_BLOCK_SIZE) in a tablespace to the and in-place
estimated space used by the object (AVG_ROW_LEN
* NUM_ROWS)
(assumes objects have been analyzed)
2. Review script output and identify target objects for
reorganization
3. Identify/Create “scratch” tablespace
4. For each object to be reorganized, use the Enterprise
Manager Reorg wizard to recreate each object along with its
dependencies
Automatic Backup & Recovery
Before Oracle10g
(Tablespace Point-in-time Recovery)
1. Single Command
1. Prepare an auxiliary instance by first creating an Oracle Recovery:
password file FLASHBACK TABLE
2. Create parameter file for auxiliary instance <table_name> TO
3. Start auxiliary instance in NOMOUNT mode using SQL*Plus BEFORE DROP ;
4. Using RMAN interface to perform TSPITR
5. Using RMAN, connect to target database and bring
tablespace in question online
6. Shutdown the auxiliary instance
7. Delete auxiliary instance data files, control files, and redo log
files
Automatic Storage Management
ISV
Grid/Database Control ISV
ISV
Open Interfaces
Database Space
Backup & Recovery
Management Management
Management
Intelligent
Infrastructure
Where DBA’s spend their time
Install 6%
Create & Configure
12 %
Software Maintenance
6% Load Data 6%
Dis Compare/Diff
Software
co Grid Control ze
Configurations ve aly
r An Change Tracking
Hardware
Configurations Reference
Configurations
Install/Clone Oracle.com
io n
is Liv
ov Policy e Lin
Configure Pr k Product Updates
Manager
Patch Patches
Product
Secure
Configuration
Oracle Database 10g
Simplified Creation & Configuration
½ COST
Fast Lightweight
Install
Efficient
Data Load
Enterprise
Configuration Self-Managing Database
Management
Oracle 10g : Twice as
Manageable as Oracle9i
16 13
10 10
12
Number of Steps
6 6
8
4
4
4
2 2 2 2
1 Oracle9i
Oracle 10g
0
Performance SQL Tuning Resource Space Backup & Storage
Diagnostic Management Management Recovery Management
(Memory)
Result Summary
Oracle 10g required 44% less time and 47% fewer steps than Oracle9i.
What Does It
Mean to You?
DBA of the Future Does MORE
Session ID : 40090
Thank you.
QUESTIONS
ANSWERS