Documente Academic
Documente Profesional
Documente Cultură
In Oracle 11g database New dimension fault diagnosability infrastructure added to Oracle self
managing concept to reduce time for resolving problem/bug/SR and round trip between end-user
and Oracle Support. Trace file dump file core file !"R !"R#I etc are components of fault
diagnosability infrastructure.
In early version of oracle $%en ever critical error suc% as code bug data corruption occur end
user need to collect diagnostic data suc% as process dump data structure dump etc. In oracle 11g
database end user need to worry about w%at &ind of dump need to collect need not to searc%
trace file w%ic% need to send to Oracle Support Oracle 11g "atabase proactively collect tagged
and store diagnostic data in file based repository &nown as !"R. 11g used file based repository
because even your database is down you %ave diagnostic data to send to oracle support.
Key Components for Fault Diagnosability Infrastructure
ADR
ADRCI ( ADR Command line utility )
Alert log
Trace ,Dumps etc.
ADR (Automatic Diagnostic Repository)
!"R is file based repository for diagnostic data li&e trace fileprocess dumpdata structure dump
etc.
In oracle 11g trace. alert not saved in '(")*+(",ST directory even you set t%ose parameters
in init.ora.11g ignore '(")*+(",ST and store data in new format directory structure is given
below
"iag/product(type/database(name/instance(name
!"R(base/diag/rdbms/orcl-/orcl-
"iag !"R root
.
rdbms
.
"atabase Name
.
SI" !"R(/O*, 0 )ser "efine ,nv 1ariable 2
(((((((((((((.((((((((((((((((((((((((((((((((((((((((((
. . . . . . . . . .
Trace alert cdump %m incp&g incedent stage sweep metadata lc&
ote ! ADR"#$%& is user define 'ariable , I (a'e define t(is 'ariable ma)e life easier
!"R root w%ere !"R directory structure start.11g New initiali3e parameter
"I!4NOSTI#(",ST decide location of !"R root
*y default location of DIA+$,TIC"D&,T is -$RAC.&"#$%&/log,
if $RAC.&"*A,& is set in en'ironment t(en DIA+$,TIC"D&,T is set to
-$RAC.&"*A,&
In 11g alert file is saved in - location one is in alert directory 0 in 5*6 format2 and old style
alert file in trace directory. $it%in !"R base t%ere can be many !"R %omes w%ere eac% !"R
%ome is t%e root directory for all diagnostic data for a particular instance. T%e location of an
!"R %ome for a database is s%own on t%e above grap%ic.
ote !0 I (a'e created on en'ironment 'ariable ADR"#$%&1
2Diag/product"type/database"name/instance"name3. I am using same in all my t(is
document
S768 s%ow parameter diag
N!*, T9+, 1!6),
------------------------------------ --------------------------------- ------------------------------
diagnostic"dest string /u:1/app/oracle
Data $ld location ADR location
#ore "ump #OR,(")*+(",ST ;!"R(/O*,/cdump
!lert log data <!#=4RO)N"(")*+(",ST ;!"R(/O*,/trace
;!"R(/O*,/alert 05*62
<ac&ground process trace <!#=4RO)N"(")*+(",ST ;!"R(/O*,/trace
)ser process trace )S,R(")*+(",ST ;!"R(/O*,/trace
S768 desc v;diag(info
Name Null> Type
------------------------------ -------- ----------------------------
INST(I" N)*<,R
N!*, 1!R#/!R-0?@2
1!6), 1!R#/!R-0A1-2
S768 select ' from v;diag(infoB
INST(I" N!*, 1!6),
---------- ------------------------- ---------------------------------------------
1 "iag ,nabled TR),
1 !"R <ase /u:1/app/oracle
1 !"R /ome /u:1/app/oracle/diag/rdbms/orcl-/orcl-
1 "iag Trace /u:1/app/oracle/diag/rdbms/orcl-/orcl-/trace
1 "iag !lert /u:1/app/oracle/diag/rdbms/orcl-/orcl-/alert
1 "iag Incident /u:1/app/oracle/diag/rdbms/orcl-/orcl-/incident
1 "iag #dump /u:1/app/oracle/diag/rdbms/orcl-/orcl-/cdump
1 /ealt% *onitor /u:1/app/oracle/diag/rdbms/orcl-/orcl-/%m
1 "efault TraceCile
/u:1/app/oracle/diag/rdbms/orcl-/orcl-/trace/orcl-(ora(1@DEA.trc
1 !ctive +roblem #ount :
1 !ctive Incident #ount :
Retention policy
T%ere is retention policy for !"R t%at allow to specify %ow long to &eep t%e data
!"R incidents are controlled by two different policiesF
T(e incident metadata retention policy ( default is 4 year )
T(e incident files and dumps retention policy ( Default is one mont()
$e can c%ange retention policy using GadrciH **ON purge data automatically on eIpired !"R
data.
adrci8 s(o5 control
!"R /ome J /u:1/app/oracle
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
!"RI" ,#$RT6"6$.IC7 .$+6"6$.IC7
6!ST(*O"(TI*, 6!ST(!)TO+R4(TI*,
6!ST(*!N)+R4(TI*, !"R"IR(1,RSION
!"RS#/*(1,RSION !"RS#/*1(S)**!R9 !"R!6,RT(1,RSION
#R,!T,(TI*,
-------------------- -------------------- -------------------- ----------------------------------------
---------------------------------------- ---------------------------------------- --------------------
-------------------- -------------------- -------------------- ----------------------------------------
D??KED-DAD 89: ;8<: -::E-:K-:- 1DF-@F:1.:EE?E1 -:KF::
-::E-:K--- ::F-:F:@.11D@@1 -:KF:: 1
- : 1 -::E-:K-:- 1DF-@F:1.:EE?E1 -:KF::
1 rows fetc%ed
adrci8
C(ange Retention
adrci3 set control 0S/ORT+(+O6I#9 J D?: 2
adrci3 set control 06ON4+(+O6I#9 J @DE: 2
Automatic Diagnostic Repository (ADRCI)
Oracle 11g introduce new tool/utility called !"R#I &nown as !"R command line tool. T%is
tool
allow user to interact wit% !"R c%ec& alert log c%ec& %ealt% monitor0/*2 status create report
on /* +ac&age incident and problem information into a 3ip file for send to Oracle Support. etc.
No username/password need to log in to !"R#I !"R#I interact wit% file system and !"R data
is secured only by operating system permissions on t%e !"R directories.
L#lic& /ere for Oracle "ocumenation on adrci M
LoracleNapps::1 OM; ; adrci
adrci8 %elp
/,6+ LtopicM
!vailable TopicsF
#R,!T, R,+ORT
,#/O
,5IT
/,6+
/OST
I+S
+)R4,
R)N
S,T <!S,
S,T <RO$S,R
S,T #ONTRO6
S,T ,#/O
S,T ,"ITOR
S,T /O*,S . /O*, . /O*,+!T/
S,T T,R*O)T
S/O$ !6,RT
S/O$ <!S,
S/O$ #ONTRO6
S/O$ /*(R)N
S/O$ /O*,S . /O*, . /O*,+!T/
S/O$ IN#"IR
S/O$ IN#I",NT
S/O$ +RO<6,*
S/O$ R,+ORT
S/O$ TR!#,CI6,
S+OO6
T%ere are ot%er commands intended to be used directly by Oracle type
P/,6+ ,5T,N","P to see t%e list
OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
adrci8
adrci8 S/O$ IN#I",NT
!"R /ome J /u:1/app/oracle/diag/rdbms/orcl-/orcl-F
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
IN#I",NT(I" +RO<6,*(=,9 #R,!T,(TI*,
----------------- ---------------------------------- ------------------------------------------------
QE1K OR! ?:: L&cidr(reeval(DM -::E-:A-1@ 1EF@1F:D.?:Q:KK R:AFD:
1 incident info records fetc%ed
C(ec)ing alert log 5it( ADRCI
One can see alert log content wit% t%e %elp of !"R#I
adrci88s%ow alert
If Sust want to tail content of alert log
$adrci
adrci> set editor vi
adrci> show alert ( it will open alert in vi editor )
adrci> show alert -tail ( Similar to Unix tail command )
adrci> show alert -tail 200 ( Similar to Unix Command tail -200 )
adrci> show alert -tail -f ( Similar to Unix command tail -f )
#ontent of Iml alert log 0 log.Iml 2
Sample output of log.xml ( xml format of alert.log)
Tmsg timeJU-::E-:E-1DT1DFAKF-Q.K@:-:KF::U org(idJUoracleU comp(idJUrdbmsU
typeJU)N=NO$NU levelJU1?U %ost(idJUapps::1U
%ost(addrJU1Q-.-:.1E-.11DU moduleJUU pidJU1QA@1U8
TtIt8Incremental c%ec&point up to R<! L:I1:e.QEcbe.:M current log tail at R<!
L:I1:e.QEcea.:M
T/tIt8
Since alert log saved as 5*6 format 0 log.Iml 2 you can Vuery Iml file as well
<elow is eIample to c%ec& all GOR!-G in alert log
adrci3S/O$ !6,RT -+ P*,SS!4,(T,5T 6I=, UWOR!-WUP
9ou can spool output for !"R#I using spool command same as we use in sVlplus
6roblem and Incident
6roblem
!" introduce new concept of problem and incident problem is critical error in database and in
!"R problem is identified by problem &ey. +roblem &ey is consist of oracle error number error
parameter value etc
for eIample OR!?::&ci
Incident
Incident is single occurrence of problem eac% incident is identified by uniVue number called
incident id
w%ic% is uniVue in !"R %ome all incident data stored in !"R. ,ac% incident %as a problem &ey
and is
mapped to a single problem. $%en error occurred bac&up ground process ma&e entry in alert.log
and
collect data about incident 0li&e process dump data structure dump etc2
If similar incident %appen more freVuently oracle will not collect data for all incident
<y default only fi'e dumps per (our for a gi'en problem are allo5ed for single gi'en
problem and
t%is call flood control in 11g some time you see =flood control= messages in alertTSI"8.log /
log.Iml.
Incident can be created as manual as well if needed.
adrci88,#$> ICID&T
!"R /ome J /u:1/app/oracle/diag/rdbms/orcl-/orcl-F
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
IN#I",NT(I" +RO<6,*(=,9 #R,!T,(TI*,
----------------- ---------------------------------- --------------------------------------------------
QE1K OR! ?:: L&cidr(reeval(DM -::E-:A-1@ 1EF@1F:D.?:Q:KK R:AFD:
1 incident info records fetc%ed
I6, ( Incident pac)age ser'ice )
"<! need not searc% trace dump etc related particular error to sent it to oracle support. In
!"R
diagnostic data are tagged wit% incident id and I+S identified trace and dump for particular
incident
and allow end user to create pac&age from !"R to send to Oracle Support. )sing I+S end user
can
add some more file to pac&age if needed.
#o5 to create pac)age
Create logical package
Add files to package
Create zip file to send to oracle support
Create logical package
#%ec& incidents for w%ic% you want to create pac&age
adrci3SHOW !C"#!$
!"R /ome J /u:1/app/oracle/diag/rdbms/orcl-/orcl-F
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
IN#I",NT(I" +RO<6,*(=,9 #R,!T,(TI*,
---------------------- -----------------------------
---------------------------------------------------------
QE1K OR! ?:: L&cidr(reeval(DM -::E-:E-1@ 1EF@1F:D.?:Q:KK R:AFD:
1 incident info records fetc%ed
$e can use I+S #R,!T, +!#=!4, command to create a logical pac&age for above incident
adrci3ips create pac&age incident QE1K
Created pac%a&e ' (ased on incident id )*+,- correlation level t.pical
Add files to package
!dding diagnostic information for a particular 0QE1K2 incident
adrci3ips create pac&age incident QE1K
#reated pac&age @ based on incident id QE1K correlation level typical
adrci3ips add incident QE1K pac&age @
!dded incident QE1K to pac&age @
9ou can add additional files if needed <ut file s%ould be in !"R below in eIample we adding
alert log to pac&age.
adrci3 ips add file
/u:1/app/oracle/diag/rdbms/orcl-/orcl-/trace/alert(orcl-.log pac&age @
!dded file /u:1/app/oracle/diag/rdbms/orcl-/orcl-/trace/alert(orcl-.log to
pac&age @
Create zip file to send to oracle support
adrci3 ips generate pac&age @ in /tmp
4enerated pac&age @ in file /tmp/OR!?::&ci(-::E:E1@1E@A1?(#O*(1.3ip mode
complete
adrci3
LrootNapps::1 tmpMXls ?l /tmp/@.Aip
-rw-r--r-- 1 oracle oinstall AE@@1: *ay 1@ 1EFA:
$RA<::)ci"9::;:;4B4;BC4<"C$%"4.Aip
LrootNapps::1 tmpMX un3ip -l OR!?::&ci(-::E:E1@1E@A1?(#O*(1.3ip
!rc%iveF OR!?::&ci(-::E:E1@1E@A1?(#O*(1.3ip
6engt% "ate Time Name
-------- ---- ---- ----
K?D-1: :A-1@-:E 1EF@1
diag/rdbms/orcl-/orcl-/incident/incdir(QE1K/orcl-(ora(AQ?K(iQE1K.trm
-D:-A:? :A-1@-:E 1EF@1
diag/rdbms/orcl-/orcl-/incident/incdir(QE1K/orcl-(ora(AQ?K(iQE1K.trc
1E?EEK :A-1@-:E 1EF@1 diag/rdbms/orcl-/orcl-/trace/alert(orcl-.log
@Q1QE- :A-1@-:E 1EF@1 diag/rdbms/orcl-/orcl-/alert/log.Iml
11-- :A-1@-:E 1EF@1 diag/rdbms/orcl-/orcl-/trace/orcl-(diag(AQD1.trc
1EQ :A-1@-:E 1EF@1 diag/rdbms/orcl-/orcl-/trace/orcl-(diag(AQD1.trm
1D@- :A-1@-:E 1EF@1 diag/rdbms/orcl-/orcl-/trace/orcl-(ora(AQ?K.trc
KKD :A-1@-:E 1EF@1 diag/rdbms/orcl-/orcl-/trace/orcl-(ora(AQ?K.trm
ED1 :A-1@-:E 1EF@Q
diag/rdbms/orcl-/orcl-/incp&g/p&g(@/seV(1/eIport/I+S(#ONCI4)R!TION.dmp
DDE :A-1@-:E 1EF@Q
diag/rdbms/orcl-/orcl-/incp&g/p&g(@/seV(1/eIport/I+S(+!#=!4,.dmp
1QD :A-1@-:E 1EF@Q
diag/rdbms/orcl-/orcl-/incp&g/p&g(@/seV(1/eIport/I+S(+!#=!4,(IN#I",NT.dmp
1:Q@ :A-1@-:E 1EF@Q
diag/rdbms/orcl-/orcl-/incp&g/p&g(@/seV(1/eIport/I+S(+!#=!4,(CI6,.dmp
-D@ :A-1@-:E 1EF@Q
diag/rdbms/orcl-/orcl-/incp&g/p&g(@/seV(1/eIport/I+S(+!#=!4,(/ISTOR9.dmp
?::@ :A-1@-:E 1EF@Q
diag/rdbms/orcl-/orcl-/incp&g/p&g(@/seV(1/eIport/I+S(CI6,(*,T!"!T!.dmp
-1@ :A-1@-:E 1EF@Q
diag/rdbms/orcl-/orcl-/incp&g/p&g(@/seV(1/eIport/I+S(CI6,(#O+9(6O4.dmp
1-KD :A-1@-:E 1EF@Q
diag/rdbms/orcl-/orcl-/incp&g/p&g(@/seV(1/eIport/"",()S,R(!#TION(",C.dmp
1E1D :A-1@-:E 1EF@Q
diag/rdbms/orcl-/orcl-/incp&g/p&g(@/seV(1/eIport/"",()S,R(!#TION(+!R!*,T,R(",C
.dmp
-:@ :A-1@-:E 1EF@Q
diag/rdbms/orcl-/orcl-/incp&g/p&g(@/seV(1/eIport/"",()S,R(!#TION.dmp
1QE :A-1@-:E 1EF@Q
diag/rdbms/orcl-/orcl-/incp&g/p&g(@/seV(1/eIport/"",()S,R(!#TION(+!R!*,T,R.dmp
DAD :A-1@-:E 1EF@Q
diag/rdbms/orcl-/orcl-/incp&g/p&g(@/seV(1/eIport/"",()S,R(IN#I",NT(T9+,.dmp
1?D :A-1@-:E 1EF@Q
diag/rdbms/orcl-/orcl-/incp&g/p&g(@/seV(1/eIport/"",()S,R(IN#I",NT(!#TION(*!+.d
mp
?1@ :A-1@-:E 1EF@Q
diag/rdbms/orcl-/orcl-/incp&g/p&g(@/seV(1/eIport/IN#I",NT.dmp
DAK :A-1@-:E 1EF@Q
diag/rdbms/orcl-/orcl-/incp&g/p&g(@/seV(1/eIport/IN##=,9.dmp
-:- :A-1@-:E 1EF@Q
diag/rdbms/orcl-/orcl-/incp&g/p&g(@/seV(1/eIport/IN#I",NT(CI6,.dmp
@:? :A-1@-:E 1EF@Q
diag/rdbms/orcl-/orcl-/incp&g/p&g(@/seV(1/eIport/+RO<6,*.dmp
K1: :A-1@-:E 1EF@Q
diag/rdbms/orcl-/orcl-/incp&g/p&g(@/seV(1/eIport//*(R)N.dmp
E@D :A-1@-:E 1EF@Q diag/rdbms/orcl-/orcl-/%m//*R,+ORT(/*(R)N(-1.%m
K:E :A-1@-:E 1EF@Q diag/rdbms/orcl-/orcl-/%m//*R,+ORT(/*(R)N(@1.%m
-:K :A-1@-:E 1EF@Q
diag/rdbms/orcl-/orcl-/incp&g/p&g(@/seV(1/eIport/,*()S,R(!#TI1IT9.dmp
?-?-@ :A-1@-:E 1EF@Q
diag/rdbms/orcl-/orcl-/incp&g/p&g(@/seV(1/config.Iml @EQ :A-1@-:K 1EF@Q
diag/rdbms/orcl-/orcl-/incp&g/p&g(@/seV(1/metadata.Iml
QA:E :A-1@-:E 1EF@Q
diag/rdbms/orcl-/orcl-/incp&g/p&g(@/seV(1/manifest(@(1.Iml
: :A-:A-:E :@F:: diag/rdbms/orcl-/orcl-/alert/
: :A-:A-:E :@F:: diag/rdbms/orcl-/orcl-/cdump/
: :A-1@-:E 1EF@Q diag/rdbms/orcl-/orcl-/%m/
: :A-1@-:E 1EF@1 diag/rdbms/orcl-/orcl-/incident/
: :A-1@-:E 1EF@A diag/rdbms/orcl-/orcl-/incp&g/
: :A-1D-:E --FA1 diag/rdbms/orcl-/orcl-/ir/
: :A-1@-:E 1EF@1 diag/rdbms/orcl-/orcl-/lc&/
: :A-:A-:E :@F:: diag/rdbms/orcl-/orcl-/metadata/
: :A-1@-:E 1EF@1 diag/rdbms/orcl-/orcl-/stage/
: :A-1@-:E 1EF@1 diag/rdbms/orcl-/orcl-/sweep/
: :A-1@-:E 1EF@1 diag/rdbms/orcl-/orcl-/trace/
@EQ :A-1@-:E 1EF@Q metadata.Iml
-------- -------
DEDE:E: @@ files
LrootNapps::1 tmpMX
6og a SR and upload t%is 3ip file to Oracle Support for diagnose and resolution.
I6, in ,ummary
$ adrci
adrci> help ips
adrci> show incident
( /or example a(ove command show incident !o )*+, for O01-200 34567 )
adrci> ips create package incident 9!" 89 ( it will &ive pac%a&e !o:)
adrci> ips create package incident 9!"
Created pac%a&e ' (ased on incident id )*+,- correlation level t.pical
adrci> ips add incident 9!" package #
1dded incident )*+, to pac%a&e '
adrci>
adrci>>ips add file
$u%!$app$oracle$diag$rd&ms$orcl'$orcl'$trace$alert(orcl'.log package #
1dded file ;<0+;app;oracle;dia&;rd(ms;orcl2;orcl2;trace;alert=orcl2:lo& to
pac%a&e '
adrci>>ips generate package # in $tmp
>enerated pac%a&e ' in file ;tmp;O01200%ci=200*0*+'+*'?+2=CO@=+:Aip- mode
complete
adrci>>
#ealt( %onitor (#%)
/ealt% *onitor run diagnostic c%ec&s on various components of t%e database. /ealt% *onitor
c%ec&s
eIamine various components of t%e database including files memory transaction integrity
metadata
and process usage. In order to collect more data after critical error 0incident2 oracle invo&e
%ealt%
monitoring implicitly. If need end-user can also run %ealt% monitoring procedure manually
/ealt% *onitor c%ec&s run in two waysF
Reacti'e! T%e fault diagnosability infrastructure can invo&e /ealt% *onitor c%ec&s
automatically
in response to critical errors.
%anual! "<! can manually run /ealt% *onitor %ealt% c%ec&s *anually
Kinds of (ealt( monitoring
+lease loo& at t%e 1;/*(#/,#= view it will list all /ealt% monitoring c%ec&s
S768 desc v;%m(c%ec&
Name Null> Type
--------- -------- -------
I" N)*<,R
N!*, 1!R#/!R-0?@2
#6SI" N)*<,R
#6S(N!*, 1!R#/!R-01A2
C6!4S N)*<,R
INT,RN!6(#/,#= 1!R#/!R-012
OCC6IN,(#!+!<6, 1!R#/!R-012
",S#RI+TION 1!R#/!R-0?@2
S768 select name from v;%m(c%ec& B
N!*,
-------------------------
/* Test #%ec&
"atabase #ross #%ec&
"ata <loc& #%ec&
Redo #%ec&
6ogical <loc& #%ec&
Table #%ec&
Table-IndeI #ross #%ec&
Table Row #%ec&
Table-IndeI Row *ismatc%
Transaction #%ec&
)ndo Segment #%ec&
!ll #ontrol Ciles #%ec&
#C *ember #%ec&
!ll "atafiles #%ec&
Single "atafile #%ec&
6og 4roup #%ec&
6og 4roup *ember #%ec&
!rc%ived 6og #%ec&
Redo Revalidation #%ec&
IO Revalidation #%ec&
<loc& IO Revalidation #%ec&
TIn Revalidation #%ec&
Cailure Simulation #%ec&
Database Dictionary C(ec)
-A rows selected.
/ig% 6ig%ted /* we going to run *anually in neIt step
#ealt( monitoring report
T%e c%ec&er generates a report of its eIecution in 5*6 and stores t%e reports in !"R.
9ou can view t%ese reports using eit%er 1;/*(R)N "<*S(/* !"R#I or ,nterprise
*anager.
Run #ealt( C(ec) %anually
S768 eIec dbms(/*.R)N(#/,#=0UDatabase Dictionary C(ec)U2B
+6/S76 procedure successfully completed.
;adrci
adrci8S/O$ /*(R)N
!"R /ome J /u:1/app/oracle/diag/rdbms/orcl-/orcl-F
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
----------------------------------------------------------
R)N(I" 1
R)N(N!*, /*(R)N(1
#/,#=(N!*, "atabase #ross #%ec&
N!*,(I" -
*O", -
ST!RT(TI*, -::E-:E-:A :@F:1FA?.KED:AQ R:AFD:
R,S)*,(TI*,
,N"(TI*, -::E-:E-:E :@F:-F:@.::K1KE R:AFD:
*O"ICI,"(TI*, -::E-:E-:E :@F:-F:@.::K1KE R:AFD:
TI*,O)T :
C6!4S :
ST!T)S A
SR#(IN#I",NT(I" :
N)*(IN#I",NTS :
,RR(N)*<,R :
R,+ORT(CI6,
R)N(I" -1
RD"A%& #%"RD"94
#/,#=(N!*, "atabase "ictionary #%ec&
N!*,(I" -@
*O", :
ST!RT(TI*, -::E-:E-1D -DF:QF@D.ED1AKD R:AFD:
R,S)*,(TI*,
,N"(TI*, -::E-:E-1D -DF:QF@K.K1D1Q1 R:AFD:
*O"ICI,"(TI*, -::E-:E-1@ ::F:DF:1.@K::D1 R:AFD:
TI*,O)T :
C6!4S :
ST!T)S A
SR#(IN#I",NT(I" :
N)*(IN#I",NTS :
,RR(N)*<,R :
R,+ORT(CI6,
/u:1/app/oracle/diag/rdbms/orcl-/orcl-/%m//*R,+ORT(/*(R)N(-1.%m
- rows fetc%ed
Create #% Report
adrci88#R,!T, R,+ORT /*(R)N /*(R)N(-1
9ou can create and view /ealt% *onitor c%ec&er reports using t%e !"R#I utility. *a&e sure
t%at Oracle environment variables are set properly T%e !"R#I utility starts and displays its
prompt as s%own above.
9ou t%en enter t%e S/O$ /*(R)N command to list all t%e c%ec&er runs registered in t%e !"R
repository. 6ocate t%e c%ec&er run for w%ic% you want to create a report and note t%e c%ec&er run
name using t%e corresponding R)N(N!*, field. you can generate t%e report using t%e
#R,!T, R,+ORT /*(R)N command. 9ou view t%e report using t%e S/O$ R,+ORT
/*(R)N command or by running dbms(%m.get(run(report on sVl prompt
Eie5 #% generated reports on ,F. prompt
S768 set long 1::::::
S768 select dbms"(m.get"run"report(G#%"RD"94G) from dualH
"<*S(/*.4,T(R)N(R,+ORT0U/*(R)N(-1U2
--------------------------------------------------------------------------------
T>Iml versionJP1.:P encodingJP)S-!S#IIP>8
T/*-R,+ORT R,+ORT(I"JP/*(R)N(-1P8
TTIT6,8/* ReportF /*(R)N(-1T/TIT6,8
TR)N(INCO8
T#/,#=(N!*,8"atabase "ictionary #%ec&T/#/,#=(N!*,8
TR)N(I"8-1T/R)N(I"8
TR)N(N!*,8/*(R)N(-1T/R)N(N!*,8
TR)N(*O",8*!N)!6T/R)N(*O",8
TR)N(ST!T)S8#O*+6,T,"T/R)N(ST!T)S8
TR)N(,RROR(N)*8:T/R)N(,RROR(N)*8
TSO)R#,(IN#I",NT(I"8:T/SO)R#,(IN#I",NT(I"8
TN)*(IN#I",NTS(#R,!T,"8:T/N)*(IN#I",NTS(#R,!T,"8
TR)N(ST!RT(TI*,8-::E-:E-1D -DF:QF@D.ED1AKD R:AFD:T/R)N(ST!RT(TI*,8
TR)N(,N"(TI*,8-::E-:E-1D -DF:QF@K.K1D1Q1 R:AFD:T/R)N(,N"(TI*,8
T/R)N(INCO8
TR)N(+!R!*,T,RS8
TR)N(+!R!*,T,R8T!<6,(N!*,J!66(#OR,(T!<6,ST/R)N(+!R!*,T,R8
TR)N(+!R!*,T,R8#/,#=(*!S=J!66T/R)N(+!R!*,T,R8
T/R)N(+!R!*,T,RS8
TR)N-CIN"IN4S/8
T//*-R,+ORT8
Eie5 #% generated reports on adrci prompt
adrci88s(o5 report (m"run #%"RD"94
T>Iml versionJP1.:P encodingJP)S-!S#IIP>8
T/*-R,+ORT R,+ORT(I"JP/*(R)N(-1P8
TTIT6,8/* ReportF /*(R)N(-1T/TIT6,8
TR)N(INCO8
T#/,#=(N!*,8"atabase "ictionary #%ec&T/#/,#=(N!*,8
TR)N(I"8-1T/R)N(I"8
TR)N(N!*,8/*(R)N(-1T/R)N(N!*,8
TR)N(*O",8*!N)!6T/R)N(*O",8
TR)N(ST!T)S8#O*+6,T,"T/R)N(ST!T)S8
TR)N(,RROR(N)*8:T/R)N(,RROR(N)*8
TSO)R#,(IN#I",NT(I"8:T/SO)R#,(IN#I",NT(I"8
TN)*(IN#I",NTS(#R,!T,"8:T/N)*(IN#I",NTS(#R,!T,"8
TR)N(ST!RT(TI*,8-::E-:A-1D -DF:QF@D.ED1AKD R:AFD:T/R)N(ST!RT(TI*,8
TR)N(,N"(TI*,8-::E-:A-1D -DF:QF@K.K1D1Q1 R:AFD:T/R)N(,N"(TI*,8
T/R)N(INCO8
TR)N(+!R!*,T,RS8
TR)N(+!R!*,T,R8T!<6,(N!*,J!66(#OR,(T!<6,ST/R)N(+!R!*,T,R8
TR)N(+!R!*,T,R8#/,#=(*!S=J!66T/R)N(+!R!*,T,R8
T/R)N(+!R!*,T,RS8
TR)N-CIN"IN4S/8
T//*-R,+ORT8
adrci8
Eie5 #% generated reports on $, le'el ( In ADR repository )
LoracleNapps::1 %mM; pwd
/u:1/app/oracle/diag/rdbms/orcl-/orcl-/%m
LoracleNapps::1 %mM; ls
/*R,+ORT(/*(R)N(-1.%m
LoracleNapps::1 %mM; more /*R,+ORT(/*(R)N(-1.%m
T>Iml versionJP1.:P encodingJP)S-!S#IIP>8
T/*-R,+ORT R,+ORT(I"JP/*(R)N(-1P8
TTIT6,8/* ReportF /*(R)N(-1T/TIT6,8
TR)N(INCO8
T#/,#=(N!*,8"atabase "ictionary #%ec&T/#/,#=(N!*,8
TR)N(I"8-1T/R)N(I"8
TR)N(N!*,8/*(R)N(-1T/R)N(N!*,8
TR)N(*O",8*!N)!6T/R)N(*O",8
TR)N(ST!T)S8#O*+6,T,"T/R)N(ST!T)S8
TR)N(,RROR(N)*8:T/R)N(,RROR(N)*8
TSO)R#,(IN#I",NT(I"8:T/SO)R#,(IN#I",NT(I"8
TN)*(IN#I",NTS(#R,!T,"8:T/N)*(IN#I",NTS(#R,!T,"8
TR)N(ST!RT(TI*,8-::E-:A-1D -DF:QF@D.ED1AKD R:AFD:T/R)N(ST!RT(TI*,8
TR)N(,N"(TI*,8-::E-:A-1D -DF:QF@K.K1D1Q1 R:AFD:T/R)N(,N"(TI*,8
T/R)N(INCO8
TR)N(+!R!*,T,RS8
TR)N(+!R!*,T,R8T!<6,(N!*,J!66(#OR,(T!<6,ST/R)N(+!R!*,T,R8
TR)N(+!R!*,T,R8#/,#=(*!S=J!66T/R)N(+!R!*,T,R8
T/R)N(+!R!*,T,RS8
TR)N-CIN"IN4S/8
T//*-R,+ORT8
LoracleNapps::1 %mM;
Conclusion
T%at was Sust a Vuic& glance at some of t%e new features in Oracle "atabase 11g Release 1. Now
IUm off to read t%e documentation in full so I can ta&e advantage of all t%e new stuff.
2)
$racle 44g e5 Feature Database Replay
GSimulating production load is not possibleH you mig%t %ave %eard t%ese word.
In one proSect w%ere last - year management want to migrate from )NI5 system to 6inuI
system 0 R!# 2 but t%ey still testing because t%ey are not sure w%ere t%is 6inuI <oIes w%ere
bale to %andle load or not. T%ey %ave put lot of efforts and time in load testing and functional
testing etc but still not le gain confidence.
!fter using t%ese feature of 11g t%ey will gain confidence and will able to migrate to 6inuI wit%
full confidence and will &now %ow t%ere system will be%ave after migration/upgrade.
!s per datas%eet given on OTN
"atabase Replay wor&load capture of eIternal clients is performed at t%e database server level.
T%erefore "atabase Replay can be used to assess t%e impact of any system c%anges below t%e
database tier level suc% as belowF
"atabase upgrades patc%es parameter sc%ema c%anges etc.
#onfiguration c%anges suc% as conversion from a single instance to R!# etc.
Storage networ& interconnect c%anges
Operating system %ardware migrations patc%es upgrades parameter c%anges
"< replay does t%is by capturing a wor&load on t%e production system wit% negligible
performance over%ead0 *y observation is --AW more #+) usage 2 and replaying it on a test
system wit% t%e eIact timing concurrency and transaction c%aracteristics of t%e original
wor&load. T%is ma&es possible complete assessment of t%e impact of t%e c%ange including
undesired resultsB new contentions points or performance regressions. ,Itensive analysis and
reporting 0 !$R !""* report and "< replay report2 is provided to %elp identify any potential
problems suc% as new errors encountered and performance divergences. T%e ability to
accurately capture t%e production wor&load results in significant cost and timesaving since it
completely eliminates t%e need to develop simulation wor&loads or scripts. !s a result realistic
testing of even compleI applications using load simulation tools/scripts t%at previously too&
several mont%s now can be accomplis%ed at most in a few days wit% "atabase Replay and wit%
minimal effort. T%us using "atabase Replay businesses can incur muc% lower costs and yet %ave
a %ig% degree of confidence in t%e overall success of t%e system c%ange and significantly reduce
production deployment
,teps for Database Replay
4. >or)load Capture
"atabase are trac&ed and stored in binary files called capture files on t%e file system. T%ese files
contain all relevant information about t%e call needed for replay suc% as S76 teIt bind values
wall cloc& time S#N etc.
12 <ac&up production "atabase I
-2 !dd/remove filter 0 if any you want 2
<y default all user sessions are recorded during wor&load capture. 9ou can use
wor&load filters to specify w%ic% user sessions to include in or eIclude from t%e
wor&load. Inclusion filters enable you to specify user sessions t%at will be
captured in t%e wor&load. T%is is useful if you want to capture only a subset of t%e
database wor&load.
Cor eIample we donUt want to capture load for S#OTT user
<,4IN
"<*S($OR=6O!"(#!+T)R,.!""(CI6T,R 0
fname J8 Uuser(scottU
fattribute J8 U)S,RU
fvalue J8 US#OTTU2B
,N"B
/ere filter name is Puser(scottP 0 user define name2
D2 #reate directory ma&e sure enoug% space is t%ere
#R,!T, OR R,+6!#, "IR,#TOR9 db(replay(dir
!S U/u:@/oraout/test/db-replay-captureUB
@2 #apture wor&load
<,4IN
"<*S($OR=6O!"(#!+T)R,.start(capture 0
name J8 capture(testingUdirJ8U"<(R,+6!9("IRU
duration J8 N)66 2B
,N"B
"uration J8 N)66 mean it will capture load till we stop wit% below mentioned
manual S76 command. "uration is optional input to specify t%e duration 0in
seconds2 default is N)66
A2 Cinis% capture
<,4IN
"<*S($OR=6O!"(#!+T)R,.finis%(captureB
,N"B
I Ta&e bac&up of production before 6oad capture so we can restore database on test
environment and will run replay on same S#N level of database to minimi3e data
divergence
ote as per $racle datas(eet
T%e wor&load t%at %as been captured on Oracle "atabase release 1:.-.:.@ and %ig%er
can also be replayed on Oracle "atabase 11g release.So I t%in& It simply mean
N,$ patc% set 1:.-.:.@ will support capture processes. Is it mean #urrent patc% set
01:.-.:.D2 not support load capture >>>>>>
9. >or)load 6rocessing
Once t%e wor&load %as been captured t%e information in t%e capture files %as to be processed
preferably on t%e test system because it is very resource intensive Sob. T%is processing transforms
t%e captured data and creates all necessary metadata needed for replaying t%e wor&load.
eIec "<*S($OR=6O!"(R,+6!9.process(capture0U"<(R,+6!9("IRU2B
J. >or)load Replay
12 Restore database bac&up ta&en step one to test system and start "atabase
-2 Initiali3e
<,4IN
"<*S($OR=6O!"(R,+6!9.initiali3e(replay 0
replay(name J8 UT,ST(R,+6!9U
replay(dir J8 U"<(R,+6!9("IRU2B
,N"B
D2 +repare
eIec
"<*S($OR=6O!"(R,+6!9.prepare(replay0sync%roni3ation
J8 TR),2
@2 Start clients
; wrc modeJcalibrate replaydirJ/u:D/oradata/test/db-
replay-capture
$or&load Replay #lientF Release 11.1.:.?.: - +roduction
on $ed "ec -? ::FD1F@1 -::K
#opyrig%t 0c2 1QE- -::K Oracle. !ll rig%ts reserved.
Report for $or&load inF /u:D/oradata/test/db-replay-
capture
-----------------------
RecommendationF
#onsider using at least 1 clients divided among 1 #+)0s2.
$or&load #%aracteristicsF
- maI concurrencyF 1 sessions
- total number of sessionsF K
!ssumptionsF
- 1 client process per A: concurrent sessions
- @ client process per #+)
- t%in& time scale J 1::
- connect time scale J 1::
- sync%roni3ation J TR),
; wrc system/pass modeJreplay replaydirJ/u:D/oradata/test/db-replay-
capture
$or&load Replay #lientF Release 11.1.:.?.: - +roduction on $ed "ec -?
::FD1FA- -::K
#opyrig%t 0c2 1QE- -::K Oracle. !ll rig%ts reserved.
$ait for t%e replay to start 0::FD1FA-2
A2 Start Replay
<,4IN
"<*S($OR=6O!"(R,+6!9.start(replayB
,N"B
/
; wrc system/pass modeJreplay replaydirJ/u:D/oradata/test/db-replay-
capture
$or&load Replay #lientF Release 11.1.:.?.: - +roduction on $ed "ec -?
::FD1FA- -::K
#opyrig%t 0c2 1QE- -::K Oracle. !ll rig%ts reserved.
$ait for t%e replay to start 0::FD1FA-2
Replay started 0::FDDFD-2
Replay finis%ed 0::F@-FA-2
B. Analysis and Reporting
4enerate !$R !""* and "< reply report and compare wit% data gat%ered on production for
same time period w%en load was captured on +roduction database. Cor "atabase Replay Report
run following command
S768 #O6)*N name COR*!T !-:
S768 S,6,#T id name CRO* dba(wor&load(replaysB
I" N!*,
---------- --------------------
1 T,ST(R,+6!9
",#6!R,
v(report #6O<B
<,4IN
v(report FJ "<*S($OR=6O!"(replay.report0
replay(id J8 1
formatJ8"<*S($OR=6O!"(#!+T)R,.T9+,(/T*6
2B
dbms(output.put(line0l(report2B
,N"B
/
J) Automatic %emory %anagement( $racle 44g e5 Features)
Automatic )emor* )anagement ( +racle !!g ,ew -eatures)
$ell in 1:g S4! can be auto tune and 11g it eItended to +4! as well ie S4! and +4! bot% can
auto tune
0 i would say i understood t%is muc% only
11g memory management J S4! auto tune R +4! auto tune 2
Cor auto memory we need to set parameter *,*OR9(T!R4,T and
*,*OR9(*!5(T!R4,T. +arameter *,*OR9(T!R4,T is dynamic we can c%ange t%e
target memory si3e at any time wit%out restarting t%e database. T%e *,*OR9(*!5(T!R4,T
serves as an upper limit so t%at we cannot by mista&e set t%e *,*OR9(T!R4,T si3e too %ig%.
<ecause certain S4! components eit%ercannot easily s%rin& or must remain at a minimum si3e
t%e database also prevents you from setting t%etarget memory si3e too low.
If *,*OR9(T!R4,T is set to a non-3ero valueF
If SGA_TARGET and PGA_AGGREGATE_TARGET are set, they will be
considered the min value for the sizes of SGA and the PGA resectively!
"E"#R$_TARGET can ta%e values from SGA_TARGET &
PGA_AGGREGATE_TARGET to "E"#R$_"A'_SI(E!
If SGA_TARGET is set and PGA_AGGREGATE_TARGET is not set, we will still
auto)tune both arameters! PGA_AGGREGATE_TARGET will be initialized to a
value of *"E"#R$_TARGET)SGA_TARGET+!
If PGA_AGGREGATE_TARGET is set and SGA_TARGET is not set, we will still
auto)tune both arameters! SGA_TARGET will be initialized to a value of
min*"E"#R$_TARGET)PGA_AGGREGATE_TARGET, SGA_"A'_SI(E *if set
by the user++ and will auto)tune subcoms!
4)
,F. 6erformance AnalyAer
KClic) #ere for 6DF L
Case! - 9ou want to adSust some parameters in production and you want to c%ec& %ow over all
application going to run i.e. is S76 performance improved or it degrade >
,olution! - Oracle 11g nw features S76 +erformance !naly3er 0S+!2 analy3e t%e S76
performance impact of any type of system c%anges. S76 +erformance !naly3er automates t%e
process of assessing t%e overall effect of a c%ange on t%e full S76 wor&load by identifying
performance divergence for eac% statement.
S+! report t%at s%ows t%e net impact on t%e wor&load performance due to t%e c%ange is
provided. Cor regressed S76 statements S76 +erformance !naly3er also provides appropriate
eIecutions plan details along wit% tuning recommendations. !s a result "<!s can remedy any
negative outcome before t%eir end users are affected and can validate wit% significant time and
cost savings t%at t%e system c%ange to t%e production environment will result in net
improvement.
The stes of the S,- Performance Analyzer wor%flow are as follows.
Capture ,F.s on 6roduction Database
%o'e ,F.s to Test Database
Create a ,F. 6erformance AnalyAer tas) on t(e test system
4enerate and store t%e Vuery eIecution statistics before t%e c%ange.
%a)e c(anges (Database upgrade to 44g , parameter c(anges etc)
4enerate and store t%e Vuery eIecution statistics after t%e c%ange.
Compare 6erformance
+enerate Report
Drop Tas)
!n Oracle 1"g
8 s9lplus :; as s<sdba:
#=3>/lus? -elease 10@2@0@1@0 A /roduction on %hu "ar B 1C?04?5D 200E
#=3F #)3)(% dbms$stats@get$param7G)#%."&%)$/)-()0%G) 2-+" dualH
!"#$#%&%#@,)%$/&-&"7G)#%."&%)$/)-()0%G)
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
!"#$#%&%#@&*%+$#&"/3)$#.4)
#=3F
#=3F #)3)(% dbms$stats@get$param7Gmethod$optG) 2-+" dualH
!"#$#%&%#@,)%$/&-&"7G")%1+$+/%G)
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
2+- &33 (+3*"0# #.4) &*%+
#=3F #)3)(% dbms$stats@get$param7G,-&0*3&-.%6G) 2-+" dualH
!"#$#%&%#@,)%$/&-&"7G,-&0*3&-.%6G)
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
&*%+
#=3F #)3)(% dbms$stats@get$param7G0+$.05&3.&%)G) 2-+" dualH
!"#$#%&%#@,)%$/&-&"7G0+$.05&3.&%)G)
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
!"#$#%&%#@&*%+$.05&3.&%)
#=3F #)3)(% dbms$stats@get$param7G),-))G) 2-+" dualH
!"#$#%&%#@,)%$/&-&"7G),-))G)
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
0*33
#=3F #)3)(% dbms$stats@get$param7G(&#(&)G) 2-+" dualH
!"#$#%&%#@,)%$/&-&"7G(&#(&)G)
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
!"#$#%&%#@&*%+$(&#(&)
IF
#=3F eJec dbms$stats@set$param7G)#%."&%)$/)-()0%G,G100G)H
/3;#=3 procedure successfull< completed@
#=3F #)3)(% dbms$stats@get$param7G)#%."&%)$/)-()0%G) 2-+" dualH
!"#$#%&%#@,)%$/&-&"7G)#%."&%)$/)-()0%G)
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
100
#=3F eJec dbms$stats@-)#)%$/&-&"$)2&*3%#7)H
/3;#=3 procedure successfull< completed@
#=3F #)3)(% dbms$stats@get$param7G)#%."&%)$/)-()0%G) 2-+" dualH
!"#$#%&%#@,)%$/&-&"7G)#%."&%)$/)-()0%G)
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
!"#$#%&%#@&*%+$#&"/3)$#.4)
AF
,)%$/&-&" , -)#)%$,3+!&3$/-)2#$)2&*3%# and #)%$/&-&" are obsolete in
+racle 11g@
.n place of above procedures need to use following procedures ,)%$/-)2# ,
-)#)%$,3+!&3$/-)2$)2&*3%# and #)%$,3+!&3$/-)2#
#=3F #elect dbms$stats@,)%$/-)2#7G(&#(&)G) from dualH
!"#$#%&%#@,)%$/-)2#7G(&#(&)G)
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
!"#$#%&%#@&*%+$(&#(&)
#=3F #elect dbms$stats@,)%$/-)2#7G),-))G) from dualH
!"#$#%&%#@,)%$/-)2#7G),-))G)
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
0*33
#=3F #elect dbms$stats@,)%$/-)2#7G)#%."&%)$/)-()0%G) from dualH
!"#$#%&%#@,)%$/-)2#7G)#%."&%)$/)-()0%G)
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
!"#$#%&%#@&*%+$#&"/3)$#.4)
#=3F #elect dbms$stats@,)%$/-)2#7G")%1+$+/%G) from dualH
!"#$#%&%#@,)%$/-)2#7G")%1+$+/%G)
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
2+- &33 (+3*"0# #.4) &*%+
#=3F #elect dbms$stats@,)%$/-)2#7G0+$.05&3.&%)G) from dualH
!"#$#%&%#@,)%$/-)2#7G0+$.05&3.&%)G)
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
!"#$#%&%#@&*%+$.05&3.&%)
#=3F #elect dbms$stats@,)%$/-)2#7G,-&0*3&-.%6G) from dualH
!"#$#%&%#@,)%$/-)2#7G,-&0*3&-.%6G)
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
&*%+
#=3F #elect dbms$stats@,)%$/-)2#7G/*!3.#1G) from dualH
!"#$#%&%#@,)%$/-)2#7G/*!3.#1G)
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
%-*)
#=3F #elect dbms$stats@,)%$/-)2#7G.0(-)")0%&3G) from dualH
!"#$#%&%#@,)%$/-)2#7G.0(-)")0%&3G)
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
2&3#)
#=3F #elect dbms$stats@,)%$/-)2#7G#%&3)$/)-()0%G) from dualH
!"#$#%&%#@,)%$/-)2#7G#%&3)$/)-()0%G)
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
10
.n +racle 11g <ou can set preference not onl< on database level but on global level ,
schema level , table level as well@ .t reall< give more control to !& for eJample on
one table <ou want histograms should collected alwa<s or want to set ")%1+$+/%
KF L2+- &33 (+3*"0# #.4) 254M on some tables
/rocedure for setting preference on global , database , schema and table level are
given below
1. SET_#$OBA$_%&E'S
2. SET_DATABASE_%&E'S
3. SET_S()EMA_%&E'S
*. SET_TAB$E_%&E'S
/reference set on global appl< for new objects or object which no preference
available
atabase level preference will be applied on all objects in the database
eJcluding the tables owned b< +racle@ %hese tables can included b< passing
T#UE for the a::_sys parameter of procedure@
.f <ou set preference value to 0*33 , it will set to +racle default value
F
#
#Test case
#
S,-3 create table test4*abc number+5
Table created!
S,-3 create table test6*abc number+5
Table created!
S,-3 select dbms_stats!0et_refs*7STA-E_PER/E8T7, 7S$S7, 7TEST47+ from dual5
9:"S_STATS!GET_PRE;S*7STA-E_PER/E8T7,7S$S7,7TEST47+
))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
4<
S,-3 select dbms_stats!0et_refs*7STA-E_PER/E8T7, 7S$S7, 7TEST67+ from dual5
9:"S_STATS!GET_PRE;S*7STA-E_PER/E8T7,7S$S7,7TEST67+
))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
4<
S,-3 e2ecute dbms_stats!set_table_refs*7S$S7, 7TEST67, 7STA-E_PER/E8T7, 7=>7+5
P-?S,- rocedure successfully comleted!
S,-3select dbms_stats!0et_refs*7STA-E_PER/E8T7, 7S$S7, 7TEST67+ from dual5
9:"S_STATS!GET_PRE;S*7STA-E_PER/E8T7,7S$S7,7TEST67+
))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
=>
S,-3 e2ecute dbms_stats!set_0lobal_refs*7STA-E_PER/E8T7, 76<7+5
P-?S,- rocedure successfully comleted!
S,-3select dbms_stats!0et_refs*7STA-E_PER/E8T7, 7S$S7, 7TEST47+ from dual5
9:"S_STATS!GET_PRE;S*7STA-E_PER/E8T7,7S$S7,7TEST47+
))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
6<
S,-3 select dbms_stats!0et_refs*7STA-E_PER/E8T7, 7S$S7, 7TEST67+ from dual5
9:"S_STATS!GET_PRE;S*7STA-E_PER/E8T7,7S$S7,7TEST67+
))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
=>
S,-3 e2ec dbms_stats!SET_9ATA:ASE_PRE;S*7STA-E_PER/E8T7, 74>7+5
P-?S,- rocedure successfully comleted!
S,-3select dbms_stats!0et_refs*7STA-E_PER/E8T7, 7S$S7, 7TEST47+ from dual5
9:"S_STATS!GET_PRE;S*7STA-E_PER/E8T7,7S$S7,7TEST47+
))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
6<
S,-3select dbms_stats!0et_refs*7STA-E_PER/E8T7, 7S$S7, 7TEST67+ from dual5
9:"S_STATS!GET_PRE;S*7STA-E_PER/E8T7,7S$S7,7TEST67+
))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
=>
S,-3 e2ec dbms_stats!set_database_refs*7STA-E_PER/E8T7,7=<7+5
P-?S,- rocedure successfully comleted!
S,-3 select dbms_stats!0et_refs*7STA-E_PER/E8T7, 7S$S7, 7TEST67+ from dual5
9:"S_STATS!GET_PRE;S*7STA-E_PER/E8T7,7S$S7,7TEST67+
))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
=>
S,-3 select dbms_stats!0et_refs*7STA-E_PER/E8T7, 7:1G7, 7:1G_1SER7+
from dual5
9:"S_STATS!GET_PRE;S*7STA-E_PER/E8T7,7:1G7,7:1G_1SER7+
))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
=<
S,-3 e2ec dbms_stats!SET_9ATA:ASE_PRE;S*7STA-E_PER/E8T7, 74>7+5
P-?S,- rocedure successfully comleted!
S,-3select dbms_stats!0et_refs*7STA-E_PER/E8T7, 7S$S7, 7TEST67+ from dual5
9:"S_STATS!GET_PRE;S*7STA-E_PER/E8T7,7S$S7,7TEST67+
))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
=>
S,-3 select dbms_stats!0et_refs*7STA-E_PER/E8T7, 7:1G7, 7:1G_1SER7+
from dual5
!"#$#%&%#@,)%$/-)2#7G#%&3)$/)-()0%G,G!*,G,G!*,$*#)-G)
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
15
Published and Pending Statistics
#tatistics published b< default when s<stem;user;job collect stats@ .n +racle 11g we
have option to put newl< collect stats in pending state and published latter once
satisNed b< performance testing based on new statistics@
.n 10g we have face performance issue when collected stats on +3%/ 724 O D )
database, probabl< because stats of one indeJ; table published before other@ #o
collect stats in pending stat , test it and once satisNed with testing published it@
#=3F col name form a40
#=3F col 5&3*) form aB
#=3F col .##)#$"+.2.&!3 5&3*) form aB
#=3F col .##)#$"+.2.&!3 form aB
#=3F col .##6#$"+.2.&!3) form a12
#=3F select name,value,isses$modiNable,iss<s$modiNable
from v8parameter
where nameKGoptimiPer$use$pending$statisticsG H
0&") 5&3*) .##)#$"+.2.&!3 .##6#$"+.2.
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAA AAAAAAAAAAAAAAA AAAAAAAAAAAA
optimiPer$use$pending$statistics 2&3#) %-*) ."").&%)
Test (ase
Testing
#=3F eJec
dbms$stats@import$table$stats7ownnameKFG5.-#1&-"G,tabnameKFG%)#%1G,
stattabKFG#%&%#G)H
select column$name, last$anal<Ped from user$tab$columns
wheretable$nameKG%)#%1GH
I
I 6ublis(ed stats
I 6ublis( t(e ,tats to Data Dictionary for $ptimiAer Dsage
I
#=3F eJec dbms$stats@publish$pending$stats7tabnameKFG%)#%1G)H
/3;#=3 procedure successfull< completed@
.f #tats published and performance become worse , then <ou can restore old version
of stats@ +racle will manage the historical statistics repositor<, purging the statistics
on a regular basis, b< default ever< Q1 da<s
!< default +racle keep stats for Q1 da< after that it purge@ -etention can be
increased useing following
#=3F eJec !"#$#%&%#@&3%)-$#%&%#$1.#%+-6$-)%)0%.+0 7 B0 )H
/3;#=3 procedure successfull< completed@
>ee) < 6artitioning
Two New &ind of partition introduce in 11g
System +artition
Interval +artition
T%ere mig%t more Ceature apart from above
>ee) 8 ,ecurity e5 Features
#ase Sensitive password
<y "efault many Security enabled
,ncrypt tablespace
!#6 0 !ccess #ontrol 6ist2 L #lic& /ereM
$racle 44g e5 feaures Case ,ensiti'e 6ass5ord
$racle 44g e5 feaures ! Case ,ensiti'e 6ass5ord
Eirag ,(arma 'irag49JPgmail.com
!fter upgrading production database to 11g I t%oug%t to try some ot%er features of Oracle
database 11g on test database. So tried to start configuring standby database. #reated password
files wit% manager password.
<ut we noticed t%at arc%ive file is not s%ipping to p%ysical standby side and getting
aut%entication error again and again. Cinally I %ave s%utdown my +# and went to watc% News.
$%ile watc%ing movie idea came into mind t%is error mig%t be because of 11g new feature case
sensitive password. $ell it is and I created password file wit% following command and after t%at
t%ing wor& fine.
orapwd fileJorclpwd passwordJmanager ignorecase1y
+assword case sensitive by default new init.ora parameter sec(case(sensitive(logon is introduce
in 11g to switc% on/off
X
X Init.ora parameter
X
sec"case"sensiti'e"logon 1 (TRD& FA.,&)
X
X On system level you can switc% off
X
alter system set sec"case"sensiti'e"logon 1 false
X
XCind users w%o %ave case sensitive or case insensitive
Xpasswords
X
S768 #O6 )S,RN!*, form a1Q
S768 S,6,#T )S,RN!*,+!SS$OR"(1,RSIONS
CRO* "<!()S,RS w%ere rownum T8
)S,RN!*, +!SS$OR"
---------- --------
!<#59Z1- 1:4 114
!"=)6!<# 1:4 114
OR!#6,1- 1:4 114
1IR!4S/! 1:4
Since password are case sensitive so "< lin& created from pre-114 "< to 114 "< mig(t not
wor&. $%en you create database lin& in pre-114 "< by default password saved in upper case
and w%en you use database lin& you will get error POR!-:1:1KF invalid username/passwordB
logon deniedP
$%en creating database lin& use following wor& around to force case sensitive password
X
X )se Vuote P wit% password li&e PtigerP
X
create database lin& abc connect to scott identified
by =tiger= using UOR#6-UB
$racle 44g ,ecurity &n(ancements 6art ? 4
$racle 44g ,ecurity &n(ancements 6art ? 4
New parameters %ave been added to t%e Oracle "atabase 11& to en%ance t%e default security of
t%e database.
S,#(R,T)RN(S,R1,R(R,6,!S,
S,#(+ROTO#O6(,RROR(C)RT/,R(!#TION
S,#(+ROTO#O6(,RROR(TR!#,(!#TION
S,#(*!5(C!I6,"(FAILED_LOGIN_ATTEMPTS
S,#("IS!<6,(O6",R(OR!#6,(R+#S'
T%ese parameters are system wide and static.
Release of ser'er information restriction
9ou can restrict t%e display of t%e database version banner to unaut%enticated clients by setting
t%e S,#(R,T)RN(S,R1,R(R,6,!S,(<!NN,R initiali3ation parameter in t%e initsid.ora initiali3ation parameter file to eit%er 9,S or NO. <y default S,#(R,T)RN(S,R1,R(R,6,!S,(<!NN,R
is set to C!6S,.
S768 s%ow parameter S,#(R,T)RN(S,R1,R(R,6,!S,(<!NN,R
N!*,T9+, 1!6),
----------------------------- -------------------- ---------------------
sec"return"ser'er"release"banner boolean FA.,&
$%en set to true t%e full banner is displayed. $%en t%e value is set to C!6S, a limited generic
banner is displayed.
6rotect against denial of ,er'ice (Do,) attac)s
T%e two parameters s%own specify t%e actions to be ta&en w%en t%e database receives bad
pac&ets from a client. T%e assumption is t%at t%e bad pac&ets are from a possible malicious
client. T%e S,#(+ROTO#O6(,RROR(C)RT/,R(!#TION parameter specifies w%at action
is to be ta&en wit% t%e client connectionF #ontinue drop t%e connection or delay accepting
reVuests.
I #ontinue connection after 1: bad pac&et
,&C"6R$T$C$."&RR$R"FDRT#&R"ACTI$ 1 Continue
X"elay @ Sec before sever accept neIt connection
,&C"6R$T$C$."&RR$R"FDRT#&R"ACTI$ 1 Delay,B
X "rop connection after 1: bad pac&et
,&C"6R$T$C$."&RR$R"FDRT#&R"ACTI$ 1 Drop,4:
T%e ot%er parameter S,#(+ROTO#O6(,RROR(TR!#,(!#TION specifies a monitoring
actionF NON, TR!#,0"efault2 6O4 or !6,RT.
X ",C!)6T #reates t%e trace files but it is useful for debugging purposes
,&C"6R$T$C$."&RR$R"TRAC&"ACTI$ 1 Trace
I $rites a s%ort one-line error message to t%e server trace file and alert log.
,&C"6R$T$C$."&RR$R"TRAC&"ACTI$ 1 Alert
X $rites a s%ort one-line message to t%e server trace file.
,&C"6R$T$C$."&RR$R"TRAC&"ACTI$ 1 .og
X #onfigures t%e server to ignore t%e bad pac&ets and does not generate any
trace files or
,&C"6R$T$C$."&RR$R"TRAC&"ACTI$ 1 one
3
S768 s%ow parameter S,#(+ROTO#O6(,RROR(C)RT/,R(!#TION
N!*,T9+, 1!6),
------------------------------- ------------------- ------------------------
sec"protocol"error"furt(er"action string C$TID&
S768 s%ow parameter S,#(+ROTO#O6(,RROR(TR!#,(!#TION
N!*, T9+, 1!6),
---------------------- ------------------------- -----------------------
sec"protocol"error"trace"action string TRAC&
6rotect against intruder
If profile is not enabled t%en intruder can try unlimited number of aut%enticated reVuests wit%
different user names and passwords in an attempt to gain access to t%e database.
! new initiali3ation parameter SEC_MAX_FAILED_LOGIN_ATTEMPTS t%at %as a default
setting of 1: causes a connection to be automatically dropped after t%e specified number of
attempts. T%is parameter is enforced even w%en t%e password profile is not enabled.
S768 s%ow parameter S,#(*!5(C!I6,"(6O4IN(!TT,*+TS
N!*,T9+, 1!6),
-------------------------- --------------------------------------------------
sec"maN"failed"login"attempts integer 4:
8
T%e sVlnet.ora IN<O)N"(#ONN,#T(TI*,O)T parameter and t%e
C!I6,"(6O4IN(!TT,*+TS initiali3ation parameter also restrict failed logins but t%e
difference is t%at t%ese two parameters only apply to valid user accounts.
8
Recently come across new parameter S,#("IS!<6,(O6",R(OR!#6,(R+#S on "atabase
,rror *essages 11g Release 1
8
+1A7%8!89B $his OC call has (een disa(led (. the "C1
CauseB $he S2C(9:SA;52(+5921(+1AC52(1/CS initialiAation parameter was ena(led:
ActionB Contact the "ata(ase 1dministrator
<ut w%en searc%ed oracle documentation not found any detail about it also not found any detail
about it on "atabase
S768 s%ow parameter S,#("IS!<6,(O6",R(OR!#6,(R+#S
S768
$racle 44g and AC. ( access control list )
$racle 44g and AC. ( access control list )
Eirag ,(arma 'irag49JPgmail.com
If your application code 0 pac&age procedure function 2 uses utl(tcp utl(smtp etc and you
upgraded database to oracle 11g t%en t%at code will not wor& even you gave eIecute permission
on utl(tcp etc to user
9ou need eIecute addition steps and add user to !#6 0 access control list 2
How to check XML DB installed or not
.
S768 select #O*+(N!*, status from dba(registryB
#O*+(N!*, ST!T)S
-------------------------------------------- --------
Oracle "atabase #atalog 1iews 1!6I"
Oracle "atabase +ac&ages and Types 1!6I"
Oracle Real !pplication #lusters 1!6I"
$racle Q%. Database EA.ID
...
#o5 to install Q%. D*
If above Vuery not s%ow 5*6 "< component t%en run following sVl to install 5*6 "<
s;l<lus =/ as sys:>a=
SQL>?@/5:>2s/a:2in/cat;2As;l
#o5 to add user to AC.
Collowing eIample s%ow %ow add scott user to !#6
SQL> eBec %MS_NET-O#'_ACL_AMINAC#EATE_ACLC4M"AB2l46
4Co22ents AA46 4SCOTT46 T#UE6 4connect4DE
SQL>eBec
%MS_NET-O#'_ACL_AMINAASSI9N_ACLC4M"AB2l464FAa>cAco24DE
SQL> Co22itE
Note :- Don't forget to commit
!s per Oracle 11g )pgrade manual
Configure Fine0+rained Access to &Nternal et5or) ,er'ices
Oracle "ata(ase ++& 0elease + (++:+) incl<des fine-&rained access control
to the U$D=$CE- U$D=S@$E- U$D=@1D- U$D=H$$E- or U$D=!1""0
pac%a&es <sin& Oracle 4@D "C: f .o< have applications that <se one of
these pac%a&es- .o< m<st install Oracle 4@D "C if it is not alread.
installed: 5o< m<st also confi&<re networ% access control lists (1CDs) in the
data(ase (efore these pac%a&es can wor% as the. did in prior releases:
$he followin& example first loo%s for an. 1CD c<rrentl. assi&ned to
host=name: f one is fo<nd- then the example &rants <ser=name the
CO!!#C$ privile&e in the 1CD onl. if that <ser does not alread. have it: f
no 1CD exists for host=name- then the example creates a new 1CD called
1CD=name- &rants the CO!!#C$ privile&e to <ser=name- and assi&ns the
1CD to host=name:
ECLA#E
acl_<ath 0A#C1A#(C)///DE
%E9IN
SELECT acl INTO acl_<ath FOM :>a_net7o5k_acls
!"EE host 3 4host_na2e4 #ND lo7e5_<o5t
IS NULL #ND u<<e5_<o5t IS NULLE
IF %MS_NET-O#'_ACL_AMINAC1EC'_$#I0ILE9ECacl_<ath6
4use5_na2e464connect4D IS NULL
T1EN
%MS_NET-O#'_ACL_AMINAA_$#I0ILE9ECacl_<ath6
4use5_na2e46 T#UE6 4connect4DE
EN IFE
EXCE$TION
-1EN no_:ata_foun: T1EN
%MS_
NET-O#'_ACL_AMINAC#EATE_ACLC4ACL_na2eAB2l46
4ACL :esc5i<tion46 4use5_na2e46 T#UE6 4connect4DE
%MS_NET-O#'_ACL_AMINAASSI9N_ACLC4ACL_na2eAB2l464host_na2e4D
E
ENE
COMMITE
DT."TC6, DT."#TT6, DT.",%T6, DT."%AI., and
DT."IADDR 6./,F. 6ac)ages
! new security measure is introduced in t%is release for t%e following networ&-
related
+6/S76 pac&agesF UTL_TC$ UTL_1TT$ UTL_SMT$ UTL_MAIL and UTL_INA#.
T%e invo&er of t%ose pac&ages needs additional privileges to connect to an eIternal
%ost or to resolve t%e name or t%e I+ address of a %ost. T%e pac&ages c%ec& t%e
invo&er for t%e necessary privileges only w%en t%e calls are made at runtime and
raises an eIception if t%e invo&er lac&s t%e privileges. T%is new security measure is
implemented by 5*6 "<Us access control list 0!#62 mec%anism and t%erefore
reVuires 5*6 "< to be installed in order to use t%ose pac&ages.
,ac% eIternal %ost t%at a database user wants to connect to or to resolve t%e name
or I+ address for from t%e database is restricted by an access control list 0!#62.
To grant a user t%e privileges for t%e %ost t%e database administrator s%ould create
an !#6 add t%e privileges to t%e !#6 for t%e user assign t%e !#6 to t%e %ost
and commit t%e c%anges using t%e %MS_NET-O#'_ACL_AMIN +6/S76 pac&age.
Cor eIample to give t%e users S#OTT and !"!*S t%e permission to connect
to 777Ao5acleAco2 via /TT+ 0namely to connect to T#+/I+ port E:2 t%e
database administrator s%ould eIecute t%e followingF
SQL> #EM C5eates a ne7 ACL an: a::s SCOTT the <5iGileHe
SQL> #EM to the ACL to 2ake TC$ connections
SQL> EXECUTE
%MS_NET-O#'_ACL_AMINAC#EATE_ACLC4acl_fo5_o5acleAB2l46 !
> 4ACL fo5 777Ao5acleAco246 4SCOTT46 T#UE6 4connect4D
SQL> #EM A::s AAMS the <5iGileHe to the ACL to 2ake TC$
connections also
SQL> EXECUTE
%MS_NET-O#'_ACL_AMINAA_$#I0ILE9EC4acl_fo5_o5acleAB2l46 !
> 4AAMS46 T#UE6 4connect4D
SQL> #EM AssiHns the ne7 ACL to 777Ao5acleAco2 fo5 TC$/I$ <o5t I/
C1TT$D
SQL> EXECUTE
%MS_NET-O#'_ACL_AMINAASSI9N_ACLC4acl_fo5_o5acleAB2l46 !
> 4777Ao5acleAco246 I/D
SQL> #EM Co22its to 2ake the ACL take effect
SQL> COMMIT
T%e invo&er of t%e UTL_TC$ UTL_1TT$ UTL_SMT$ and UTL_MAIL pac&ages needs
t%e 4connect4 privilege to ma&e T#+/I+ /TT+ or S*T+ connections to t%e
eIternal %ost. T%e invo&er of t%e UTL_INA# pac&age needs t%e 45esolGe4
privilege to resolve t%e name or t%e I+ address of t%e eIternal %ost. Note t%at t%ose
privileges are not granted t%roug% t%e 9#ANT S76 statement but t%roug% t%e
%MS_NET-O#'_ACL_AMIN pac&age.
T%e current !#6 assignment to eIternal %osts and t%e privileges currently defined
in t%e !#6s are s%own t%roug% t%e system catalog views %A_NET-O#'_ACLS
and %A_NET-O#'_ACL_$#I0ILE9ES.
T%e invo&ers of ot%er database components t%at use t%ose +6/S76 pac&ages to
perform networ& operations from t%e database w%ic% are 5*6 "<Us
/ttp)riType Oracle *ultimedia 0formerly inter*edia2 and Spatial are
subSect to t%e same networ& permission c%ec& and need t%e same privileges.
>ee) ; ,F. 6lan %anageability
>ee) O Automatic ,F. Tuning
Automatic SQL Tuning :- 9urin0 maintenance window , database automatic run S,-
Tunin0 Advisor for hi0h load s@ls from AAR *Automatic Aor%load Reository+!
;ollowin0 ste erforme durin0 e2ecution
1. Identified %ig% load S76s from !$R
-. Run automatic !dvisory for sVls
D. #%ec& sVl profile on sVl
@. If !##,+T(S76(+ROCI6,S J true t%en implement t%e S76 profiles provided t%ey
meet t%e criteria of t%reefold performance improvement.
Ae can chec% from dba_advisor_arameters, what is value set for
A//EPT_S,-_PR#;I-ES
S,-3 /#-1"8 arameter_value ;#R"AT A==
S,-3
S,-3 SE-E/T arameter_name, arameter_value
6 ;R#" dba_advisor_arameters
= ABERE tas%_name C 7S$S_A1T#_S,-_T18I8G_TASD7
E A89 arameter_name I8 *7A//EPT_S,-_PR#;I-ES7+
PARA"ETER_8A"E PARA"ETER_FA-1E
)))))))))))))))))))))))))))))) ))))))))))))))))))))))))))))))
A//EPT_S,-_PR#;I-ES ;A-SE
Enabling and Disabling Automatic SQL Tuning
If STATISTI/S_-EFE- arameter is set to :ASI/ , then AAR will not collect data that mean
auto S,- Tunin0 will disable
S,-3 show arameter STATISTI/S_-EFE-
8A"E T$PE FA-1E
)))))))))))))))))))))))))))))))))))) ))))))))))) ))))))))))))))))))))))))))))))
statistics_level strin0 T$PI/A-
GTo enable automatic S,- tunin0, use the E8A:-E rocedure in the
G9:"S_A1T#_TASD_A9"I8 ac%a0e.
:EGI8
9:"S_A1T#_TASD_A9"I8!E8A:-E*
client_name C3 7s@l tunin0 advisor7,
oeration C3 81--,
window_name C3 81--+5
E895
?
GTo disable automatic S,- tunin0, use the 9ISA:-E rocedure in the
G9:"S_A1T#_TASD_A9"I8 ac%a0e.
:EGI8
9:"S_A1T#_TASD_A9"I8!9ISA:-E*
client_name C3 7s@l tunin0 advisor7,
oeration C3 81--,
window_name C3 81--+5
E895
?
#onfiguring !utomatic S76 Tuning If you want to accept profile automatically run use
"<*S(S76T)N,. Cor eIample to enable automatic profile accept run following command
:EGI8
9:"S_S,-T18E!SET_T18I8G_TASD_PARA"ETER*
tas%_name C3 7S$S_A1T#_S,-_T18I8G_TASD7,
arameter C3 7A//EPT_S,-_PR#;I-ES7, value C3 7TR1E7+5
E895
?
Viewing Automatic SQL Tuning Reports
set a0esize <
set lon0 4<<<<<<<<
set lon0chun%size 4<<<
set linesize 4H<
set timin0 on trim sool on
select dbms_s@ltune!reort_auto_tunin0_tas%*8ull, 8ull, 7TE'T7, 7A--,
AITB_TRA/E7+ from dual5
GE8ERA- I8;#R"ATI#8
SE/TI#8
)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
Tunin0 Tas% 8ame .
S$S_A1T#_S,-_T18I8G_TASD
Tunin0 Tas% #wner . S$S
Tunin0 Tas% I9 .
6E<=<=
Aor%load Tye . Automatic Bi0h)-oad S,-
Aor%load
E2ecution /ount .
4<
/urrent E2ecution .
E'E/_6E<=<=_6
E2ecution Tye . T18E
S,-
Scoe .
/#"PREBE8SIFE
Global Time -imit*seconds+ .
=I<<
Per)S,- Time -imit*seconds+ .
46<<
/omletion Status .
I8TERR1PTE9
Started at . <J?4=?6<<H
<I.<<.<J /omleted
at . <J?4=?6<<H
<J.<<.4<
8umber of /andidate S,-s .
6=>
/umulative Elased Time of S,- *s+ .
4K4HJI4
)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
Error. #RA)4=I=K. The current oeration was interruted because it timed
out!
)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
S1""AR$
SE/TI#8
)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
Global S,- Tunin0 Result
Statistics
)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
8umber of S,-s Analyzed .
=J
8umber of S,-s in the Reort .
=J
8umber of S,-s with ;indin0s .
44
8umber of S,-s with S,- rofiles recommended .
=
8umber of S,-s with Inde2 ;indin0s .
>
8umber of S,-s with S,- Restructure ;indin0s .
J
8umber of S,-s with Timeouts .
4
)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
S,-s with ;indin0s #rdered by "a2imum *Profile?Inde2+ :enefit, #bLect
I9
)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
obLect I9 S,- I9 statistics rofile*benefit+ inde2*benefit+
restructure )))))))))) ))))))))))))) ))))))))))
)))))))))))))))) )))))))))))))) )))))))))))
4HHJJ 6hzurm6faw%n2
KK!KHM
4HHJK cnrK2r0=40EhL KK!KHM
4HHH6 Kvmy<aJ@t4L0 KK!=<M
6
4HHHJ =2=4L>nchn2yE K>!>JM KK!4JM
4HHJI a@22@yhu=Eb<<
KH!JKM
4HHIK cJt%cEvrm66c@ K<!JKM 6
4HHJ> bt>hvJJEr@0I IE!HEM
46
4HHIJ 62Jamuaz0tma 6
4HHIH 4EwK4E2L@%v=z
6
4HHJE E%fhnt6vdrrLz 6
4HHHI cKHyEs@%<zy6z
6
)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
Tables with 8ew Potential Indices *ordered by schema, number of times,
table+
)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
Schema 8ame Table 8ame Inde2 8ame 8b Time
N!!
>ee) 4: ADD% For RAC KClic) #ereL
$racle 44g e5 Features D*%,"ADD% for RAC
Oracle 11g 5e0 'eat.res DBMS_ADDM -or &A(
5irag #harma virag12QRgmail@com
.n !" racle Database #$g E%am &uide chapter Q S&utomatic atabase
"anagementT there is @uestion
5@ %o retrieve the &" reports using #=3, what do <ou need to doU
&@ -un the addmrpt@s9l #=3 script
!@ *se the !&$&" view
(@ *se the !&$&5.#+- view
@ *se the !"#$&" package
&nswer S&T is correct and D is wrong because there is no /3;#=3 package named
DBMS_ADDM@
!ut in 11g , it is not true , i@e@ /ackage !"#$&" is there in 11g@ .n case of -&(
script addmrpt@s9l
run give report for single instance, not report of all instance in -&(@ !ut using
!"#$&" , we can generate report for all instance of -&(@
i'erent mode of !"#$&"
1@ atabase "ode .nstance "ode
2@ /artial "ode
atabase "ode of !"#$&"
.n database mode !"#$&" , anal<Pe all instance in -&(
5&- tname 5&-(1&-27Q0)H
5&- start$snap$id numberH
5&- end$snap$id numberH
!),.0
?tname ?K G!$"+)$%)#%$-&,GH
?start$snap$id ?K 100 H
?end$snap$id ?K 200 H
DBMS_ADDM.A5A$67E_DB7?tname, ?start$snap$id, ?end$snap$id)H
)0H
.nstance "ode of !"#$&"
.n .nstance mode !"#$&" , anal<Pe one particular instance
5&- tname 5&-(1&-27Q0)H
5&- start$snap$id numberH
5&- end$snap$id numberH
5&- .0#%$0*" numberH
!),.0
?tname ?K G.0#%$"+)$%)#%$-&,GH
?start$snap$id ?K 100 H
?end$snap$id ?K 200 H
?.0#%$0*" ?K 2H
DBMS_ADDM.A5A$67E_!5ST7?tname,?start$snap$id,?end$snap$id,
?.0#%$0*" )H
)0H
;
/artial mode of !"#$&"
.n partial mode !"#$&" anal<Pe subset of instances@ for eJample we want
to anal<Pe instance 2 and 4 out of four node -&(
5&- tname 5&-(1&-27Q0)H
5&- start$snap$id numberH
5&- end$snap$id numberH
!),.0
?tname ?K G/&-%$"+)$%)#%$-&,GH
?start$snap$id ?K100H
?end$snap$id ?K 200H
DBMS_ADDM.A5A$67E_%A&T!A$7?tname,G2,4G, ?start$snap$id, ?end$snap$id)H
)0H
;
Displaying an ADDM Report
SET LON9 .////// $A9ESIJE /E
SELECT D$MS%#DDM&GET%EPOT':tn(me) &#OM UALE
o5
SELECT %MS_AMA9ET_#E$O#TC4%_MOE_TEST_#A94D &#OM UALE
e5 features in $racle Oi/4:g/44g RAC
Oracle Real Application Clusters New features
Oracle 9i RAC
OPS (Oracle Parallel Server) was renamed as RAC
CFS (Cluster File System) was supported
OCFS (Oracle Cluster File System) for Linux and Windows
watcdo! timer replaced "y an!cec# timer
Oracle 10g R1 RAC
Cluster $ana!er replaced "y CRS
AS$ introduced
Concept of Services expanded
ocrcec# introduced
ocrdump introduced
AWR was instance specific
Oracle 10g R2 RAC
CRS was renamed as Clusterware
asmcmd introduced
CL%&F' introduced
OCR and &otin! dis#s can "e mirrored
Can use FA()FCF wit *AF for OC+ and O,P-(.*
JJJJJJJJJJJJJJJJJJJJJJ
Difference bet5een 4:g and 44g
4.,implified and impro'ed automatic memory management
9.e5 fault diagnosability infrastructure to pre'ent, detect, diagnose, and (elp
resol'e critical database errors
J.In'isible IndeNes
B.Eirtual columns
C.&n(anced security for pass5ord0based aut(entication by enabling use of miNed
case in pass5ords.
<.Tablespace0le'el encryption
8.Ability to online redefine tables t(at (a'e materialiAed 'ie5 logs
- See more atF %ttpF//c%etanyadavds.blogspot.in/-:11/:K/difference-between-1:g-and-
11g.%tmlXst%as%.Km,6i+]f.dpuf
/ere t%ey are some feature available in 11g ^ found in oracle.com forum.
/opefully it can answer my curiousity..
1.Simplified and improved automatic memory management
-.New fault diagnosability infrastructure to prevent detect diagnose and %elp
resolve critical database errors
D.Invisible IndeIes
@.1irtual columns
A.,n%anced security for password-based aut%entication by enabling use of miIed
case in passwords.
?.Tablespace-level encryption
K.!bility to online redefine tables t%at %ave materiali3ed view logs
E.<e carefull wit% merge Soin cartesian eIplain plan.
Q.!ccess #ontrol 6ist for accessing )T6(*!I6 )T6(S*T+ )T6(/TT+ )T6(T#+ etc
1:g also provides t%e following features in additionF
!utomatic $or&load Repository 0!$R2
Udrop databaseU statement
!utomatic "atabase "iagnostic *onitor 0!""*2
)N"RO+ a table from a recycle bin
rename Table-space
transport Table-space across mac%ine types 0,.g. $indows to )niI2
Clas%bac& operation on transaction table or database level
T%ere are some additional features of 11g t%at were not presented previously
,n%anced automatic memory management
Cacility to online redefine c%art t%at %ave occurred view logs.
Cundamental columns
Imperceptible IndeIes
New errors diagnose structure to avoid detect and resolve vital database errors.
New memory structure called a results cac%e
Optimi3er #%anges
Superior safety for password-based verification
Table-space-level encryption
/ere are some &ey features of Oracle "atabase Qi 1:g and 11gB