Professional Documents
Culture Documents
200609johal Oracle10gs As
200609johal Oracle10gs As
200609johal Oracle10gs As
Inderpal S. Johal
Manager, DBA Group
Agenda
AWR - Automatic Workload Repository
ASH - Active Session History
ADDM - Automatic database Diagnostic Monitor
ADVISORY
ASMM - Automatic Shared Memory Management
ASM - Automatic Storage Management
Q&A
WR
SGA 60 S
MMON Min C
H
In-Memory E
Statistics V$ DBA_ M
A
WORKLOAD
REPOSITORY
ADDM EM
Advisory SQL*Plus
Auto SQLTuning 3rd
rd Party Tool
. .
Internal Clients External Clients
AWR
ASH
STATISTICS
SGA
In-Memory V$
Statistics
INACTIVE
SESSIONS
V$ACTIVE_SESSION_HISTORY
- ASH Buffers are filled with 1 Sec Samples from Active Session-state information
- Hidden parameter “_ASH_SAMPLING_INTERVAL” Please Don’t change it
- Hidden parameter “_ASH_SAMPLE_ALL” Please Don’t change it
ASH Report
- Top Events
- Load Profile
- Top SQL
- Top Sessions
- Top Objects/Files/Latches
- Activity Over Time
AWR
ASH
STATISTICS
SGA
In-Memory V$
Statistics
Metrics
- It is the statistics derived from Base Statistics
- E.g Number of any specific waits or Physical Read in last one hour
- Oracle support Metrics for following statistics
- System
- Sessions
- Files
- Wait events
- MMON periodically updates the Metrics data from corresponding
Base Statistics
V$SYSMETRIC
V$SYSMETRIC_HISTORY
SYSTEM
V$SYSMETRIC_SUMMARY
METRICS
DBA_HIST_SYSMETRIC_HISTORY
DBA_HIST_SYSMETRIC_SUMMARY
SESSIONS V$SESSMETRIC
METRICS DBA_HIST_SESSMETRIC_HISTORY
V$FILEMETRIC
FILES
V$FILEMETRIC_HISTORY
METRICS
DBA_HIST_FILEMETRIC_HISTORY
V$EVENTMETRIC
WAIT EVENTS
V$WAITCLASSMETRIC
METRICS
V$WAITCLASSMETRIC_HISTORY
Snapshot
DBA
OLD NEW
W R
SGA O
R
E
P
MMON K O
In-Memory L
O
S
I
Statistics DBA_
A
D
T
O
V$ R
Y
WORKLOAD
REPOSITORY
EM
SQL*Plus
3rd
rd Party Tool
.
External Clients
SYSAUX Tablespace
SGA WR SCHEMA
In-Memory 9:00 am Snapshot 1
Statistics 10:00 am Snapshot 2
11:00 am Snapshot 3
12:00 am Snapshot 4
1:00 pm Snapshot 5
2:00 pm Snapshot 6
SGA 3:00 pm Snapshot 7
In-Memory 4:00 pm Snapshot 8
Statistics
5:00 pm Snapshot 9
WORKLOAD REPOSITORY
MMON
Advisory
WR Schema Tables
WRI$_xx DBA_HIST_xx
Partitioned
Historical
Tables by day
Statistics
7 days
Tables
WRH$_ xx DBA_HIST_xx
AWR
SGA SNAPSHOT
60 Min
MMON
In-Memory
Statistics
ADDM
Results
ADDM
Proactive Monitoring
DBA
Reactive Monitoring
AWR
PGA Advisor
SNAPSHOT SQL Tuning
PGA
Buffer Cache
Memory
EM SGA
Access Shared Pool
ADDM
10g
SQL Tuning
Advisor
• DB_CACHE_SIZE/SHARED_POOL_SIZE/JAVA_POOL_SIZE/LARGE_POOL_SIZE/STREAMS_POOL_SIZE =0
when SGA_TARGET is set to non Zero value
• If you specify any value to above Auto Tuned variable in initialization parameter file,
they will become Lower bound value
e.g. if SGA_TARGET=20G and SHARED_POOL_SIZE=5G, then SHARED POOL never shrink below 5G
• ASMM uses new Background process MMAN [Memory Manager]
• MMAN coordinates the sizing of Memory components
PR Newswire Oracle 10g A’
A’s : AWR, ADDM, ASH, ASM .. 34
Advisor – ASMM
Tablespaces Tablespaces
Files
Automatic
File systems Storage Disk Groups
Management
Logical
Volumes
Physical Physical
Volumes Volumes
PR Newswire Oracle 10g A’
A’s : AWR, ADDM, ASH, ASM .. 39
Benefits of Automatic Storage Management
Provide efficient management of storage
Provide integrated Cluster File system and Volume
management capabilities
No need for buggy OCFS or expensive 3rd Party CFS
Provide Software Mirroring on top of vendor supplied SAN
[2 or 3 Mirrors]
To reconfigure the CSS daemon to run from the new Oracle home:
# $ORACLE_HOME/bin/localconfig reset $ORACLE_HOME
ASM Disk ASM Disk ASM Disk ASM Disk ASM Disk ASM Disk ASM Disk
In 10g Rel 2, Disk names are unique within Disk Group while in Rel 1 it
is unique within ASM instance.
Means Disk is of Oracle Object but can only be added to disk group
FOREIGN with FORCE keyword
CANDIDATE Means Disk is available to be added to any disk group
PROVISIONED Same as CANDIDATE except that Disk is configured using ASMLIB
FORMER Means Disk was formerly part of some disk group
MEMBER Means Disk is already part of existing disk group
rm cd du
mkalias lsct
ASMCMD
rmalias lsdg
pwd ls find
$ export ORACLE_SID=+ASM
$ asmcmd
ASMCMD> ls -ltr
State Type Rebal Unbal Name
MOUNTED EXTERN N N DG_DATA/
ASM to ASM
COPY_FILE - Read Local File and copy it to new location on local system
GET_FILE - Contact Remote DB to read Remote file and copy it to Local system
PUT_FILE - Read Local File and contact Remote DB to copy it to remote system
Note : This operation can be performed directly without having to convert the datafile
It will only be used for Database files like Datafile, tempfiles,controlfiles etc
SQL> begin
2 DBMS_FILE_TRANSFER.COPY_FILE(
3 source_directory_object => ‘ASM_D' ,
4 source_file_name => 'spfiledevprof.ora' ,
5 destination_directory_object => ‘NonASM' ,
6 destination_file_name => 'spfileDEV.ora');
7 end ;
8 /
THANKS