Professional Documents
Culture Documents
Oracle Database 10 :
Managing the Self-
Managing Database
הדר פייס
יונתן טולדנו
Certified Oracle 10g Technician
How DBAs Spend Their Time?
Install Create &
6% Configure
12%
Maintain
Software
6%
Load Data
6%
System
Management
55%
How DBAs Spend Their Time?
Install
Create &
6%
Configure
12%
Maintain
Software
6%
Load Data
6%
System
Management
55%
Software Installation
• Fast lightweight install
– Major redesign of installation process
– Single CD, 20 Minutes
– CPU, memory, disk space consumption greatly reduced
– Extremely lightweight client install (3 files) using Oracle Instant
Client
• Automation of All Pre and Post Install Steps
– Validate OS Configuration, patches, resource availability etc.
– Configure all components (listeners, database, agent, OMS,
OID etc.) for automatic startup and shutdown
• Enhanced silent install
Simplified Creation &
Configuration
• Greatly reduced database creation time using
pre-configured, ready-to-use database
• 90% reduction of initialization parameters: < 30
Basic parameters
• Automatically setup common tasks, e.g. backups
• Automatically configures LDAP server
• Automatic Shared Server Set-up
• Easy Connect Naming
Basic Parameters
y compatible y cluster_database y db_create_online_log_dest_n
y processes y db_block_size y db_create_file_dest
y sessions y sga_target y log_archive_dest_n
y pga_aggregate_target y control_files y log_archive_dest_state_n
y nls_language y db_name y remote_login_passwordfile
y nls_territory y db_recovery_file_dest y db_unique_name
y db_domain y remote_listener
y shared_servers y db_recovery_file_dest_size
y instance_number
Simplified Upgrade
Load Data
6%
System
Management
55%
Data Pump: What is it?
• Server-based facility for high performance
loading and unloading of data and metadata
• Callable: DBMS_DATAPUMP. Internally uses
DBMS_METADATA
• Data written in Direct Path stream format. Metadata
written as XML
• New clients expdp and impdp: Supersets of original
exp / imp.
• Foundation for Streams, Logical Standby, Grid,
Transportable Tablespaces and Data Mining initial
instantiation.
Features: Performance!!
• Automatic, two-level parallelism
– Direct Path for inter-partition parallelism
– External Tables for intra-partition parallelism
– Simple: parallel=<number of active threads>
– Dynamic: Workers can be added and removed from a running
job in Enterprise Edition
– Index builds automatically “parallelized” up to degree of job
• Simultaneous data and metadata unload
• Single thread of data unload: 1.5-2X exp
• Single thread of data load: 15X-40X imp
• With index builds: 4-10X imp
Features: Checkpoint / Restart
• Job progress recorded in a “Master Table”
• May be explicitly stopped and restarted later:
– Stop after current item finishes or stop immediate
• Abnormally terminated job is also restartable
• Current objects can be skipped on restart if
problematic
Features: Monitoring
Program Elapsed
exp out of the box: direct=y 0 hr 10 min 40 sec
exp tuned: direct=y buffer=2M recordlength=64K 0 hr 04 min 08 sec
expdp out of the box: Parallel=1 0 hr 03 min 12 sec
imp out of the box 2 hr 26 min 10 sec
imp tuned: buffer=2M recordlength=64K 2 hr 18 min 37 sec
impdp out of the box: Parallel=1 0 hr 03 min 05 sec
Keep in Mind:
System
Management
55%
Database Management Challenges
?
? Application
and SQL
Management ?
System
Storage
Resource
Management
Management
?
Backup and
Space
?
Recovery
Management
Management
Solution: Self-Managing Database
Enterprise Application
Manager and SQL
Database Management
Console System
Storage
Resource
Management Monitor Alert Management
Automatic
Fix Management Advise
Backup and
Space
Recovery
Management
Management Common
Manageability
Infrastructure
Common Manageability Infrastructure:
Automatic Workload Repository
Server Advisory
Alerts Framework
Automatic
Workload
Repository Efficient
8:30am
DBA
Statistics Level
STATISTICS_LEVEL
Once a week
DB Feature Usage DB High-Water Mark
MMON
Statistics Statistics
Advanced Replication, size of largest segment,
Oracle Streams, AQ, maximum number of sessions,
Virtual Private Database, maximum number of tables,
Audit options, … AWR
maximum size of the database,
maximum number of data files,
…
DBA_FEATURE_USAGE_STATISTICS DBA_HIGH_WATER_MARK_STATISTICS
Server Advisory
Alerts Framework
Automatic
Workload
Repository Efficient
Push model
Enabled by default
Timely generation
Server Alerts
Enterprise Guided
Manager Resolution
Automatic
Server
Notification
Alerts
Queue
Server monitors
itself
Oracle Server AWR
(SGA)
MMON
Server Alerts Delivery Process
Subscribing
Clients Console
Update
Third
Queue Party
BG
Advanced
Queue Push
FG
EM
(EMD)
Page
or
e-mail
DBAs
Server-Generated Alert Types
Metric-Based
Alert 97% Critical Cleared
Threshold
Alerts Alert 85% Warning Cleared
MMON
Tablespace
Space Usage
Server Advisory
Alerts Framework
Automatic
Workload
Repository Efficient
Statistics collection
Pre-packaged routine
Resource usage task scheduled
maintenance tasks
controlled out-of-the-box
Automatic Optimizer Statistics Collection
Resolves
two issues
WEEKNIGHT_WINDOW WEEKEND_WINDOW
gather_stats_job
AUTO_TASKS_JOB_CLASS
AUTO_TASKS_CONSUMER_GROUP
Adding New Tasks Using EM
Common Manageability Infrastructure:
Advisory Framework
Server Advisory
Alerts Framework
Automatic
Workload
Repository Efficient
Undo
Common Seamless
data source AWR
integration
Guided Tuning Session
No Accept Yes
results?
Implement
recommendations
Advisory Central
Solution: Self-Managing Database
Enterprise Application
Manager and SQL
Database Management
Console System
Storage
Resource
Management Monitor Alert Management
Automatic
Fix Management Advise
Backup and
Space
Recovery
Management
Management
Common
Infrastructure
Performance Monitoring Solutions
SGA
In-memory MMON
statistics Snapshots
ADDM ADDM
Results
EM AWR
ADDM
Results
ADDM Problem Classification System
… …
…
…
System Wait
Concurrency Parse Latches …
…
IO Waits
…
…
Non-problem areas
Host
CPU Bottlenecks Memory Bottlenecks
Oracle
CPU/Waits
SQL Sessions
Database Performance Page
Concurrency Wait Class: Drill Down
Solution: Self-Managing Database
Enterprise Application
Manager and SQL
Database Management
Console System
Storage
Resource
Management Monitor Alert Management
Automatic
Fix Management Advise
Backup and
Space
Recovery
Management
Management
Common
Infrastructure
Automate the SQL Tuning Process
I can do
it for you!
SQL Workload
DBA
ADDM
submit create
Optimizer
(Tuning Mode)
SQL Tuning SQL
Advisor Profile
use
No application
code
change output
Optimizer
(Normal Mode)
Database Well-Tuned
Users Plan
SQL Tuning Advisor Usage Model
Automatic Selection
AWR
Cursor Cache
Filter/Rank
Custom DBA
Solution: Self-Managing Database
Enterprise Application
Manager and SQL
Database Management
Console System
Storage
Resource
Management Monitor Alert Management
Automatic
Fix Management Advise
Backup and
Space
Recovery
Management
Management
Common
Infrastructure
Overview of Automatic Shared
Memory Management
SGA
MMAN
DB_CACHE_SIZE
SHARED_POOL_SIZE
LARGE_POOL_SIZE
JAVA_POOL_SIZE
SGA_TARGET
Using EM to Configure
Automatic Shared Memory Management
Solution: Self-Managing Database
Enterprise Application
Manager and SQL
Database Management
Console System
Storage
Resource
Management Monitor Alert Management
Automatic
Fix Management Advise
Backup and
Space
Recovery
Management
Management
Common
Infrastructure
Segment Shrink Overview
Data
Unused Unused
Data
Space Space
HWM
Data
HWM
How Can I Shrink Segments?
– 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
Undo Advisor
Redo Logfile Size Advisor
Solution: Self-Managing Database
Enterprise Application
Manager and SQL
Database Management
Console System
Storage
Resource
Management Monitor Alert Management
Automatic
Fix Management Advise
Backup and
Space
Recovery
Management
Management
Common
Infrastructure
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.
Disk limit is
reached and a Oracle deletes
Recovery new file needs files that are no
Database file Area to be written longer required
backup into the on disk.
1 Recovery Area.
2
3 Space pressure
4 occurs.
Warning is issued
to user.
RMAN updates 1
list of files that 2
may be deleted. Backup files
to be deleted
Suggested Strategy
Flashback Error Correction
Database – Flashback Database
Customer
• Restore database to time
• Uses flashback logs
– Flashback Drop
• Restore dropped table
Order
• Uses recycle bin
– Flashback Table
• Restore all rows in table to time
• Uses UNDO in database
Order Line
– Flashback Transaction Query
• Query a committed Txn
– Flashback Versions Query
• Query changes to rows over time
Solution: Self-Managing Database
Enterprise Application
Manager and SQL
Database Management
Console System
Storage
Resource
Management Monitor Alert Management
Automatic
Fix Management Advise
Backup and
Space
Recovery
Management
Management
Common
Infrastructure
What Is Automatic Storage Management
Database
Tablespace
Improves
performance,
scalability,
and reliability
ASM Files
Database file
1 Automatic
2 ASM file
3 creation
4
1 2 3 4
ALTER SYSTEM
CREATE DISKGROUP
RESTRICTED SESSION
ASM Instance
Load Data
6%
System
Management
55%
Enterprise Configuration
Management
Oracle View/Search
Inventory
Dis Compare/Diff
Software e
Configurations
co
ve Grid Control a lyz
r An Change Tracking
Hardware
Configurations Reference
Configurations
Install/Clone Oracle.com
s ion Liv
i Policy
Configure r ov e Lin Product Updates
P k
Manager
Patch Patches
Product
Secure
Configuration
How Oracle Database 10 g DBAs
Spend Their Time
Install Create &
Proactive & Configure
Stratigic 3% Load Data
6%
Planing 3%
60%
System
Maintain
Management
Software
25%
3%
Oracle Database 10g
Simplified Creation & Configuration
Fast Lightweight
Install ½ COST Efficient
Data Load
Enterprise
Configuration Self-Managing Database
Management
Oracle 10g : Twice as
Manageable as Oracle9i
16 13
10 10
Number of Steps
12
6 6
8
4
4
4
2 2 2 2
1 Oracle9i
Oracle 1 0g
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
• MORE sleep at nights!
• MORE weekends off!
• MORE databases
• MORE applications: OLTP, DW, OCS, iAS
• MORE users, larger databases
• MORE mission-critical applications
• MORE proactive and strategic
• MORE important and valuable!
LESS Cost for Businesses
For customers
• Less Administration Cost
• Less Capital Expenditure
• Less Failures
Thank You
hpaiss@hpcc.co.il
toledano@hi-tech.co.il