Documente Academic
Documente Profesional
Documente Cultură
1 Introduction
Hi, the goal of this paper is not to make you an expert in tuning, else to introduce to
the several areas in the database you must tune, a help I would had appreciated if I
would had received on time, so I think this could be appreciated for newbies in tuning
Oracle.
I tried not to include complex explanations, only the basic.
If you want to become a serious tuning DBA you have to read some books, and some
thousand of pages and solve real performance tuning problems. There are dozens of
points you must remember to tune, including bugs. Here are the most I could get, I’ll
be adding periodiaclly more points.
if you don’t know what is for example an extent, you can find it at the concept
manual http://tahiti.oracle.com/,.
You can search the papers from Oracle Worlds, they are excellent.
For example http://otn.oracle.com/products/manageability/database/conf
And in experts sites I have a brief list on my page.
Don’t forget the SYS schema is magical, so you don’t have to touch it. Don’t analyze
sys tables neither change the buffer cache in sys tables ;). But you can pin (keep in
memory) the packages frequently used, there are in SYS.
5 2 2.5 0.0 0.02 0.11 638099598 SQL ordered by Reads for DB: ERPE Instance: erpe Snaps: 1 -2 SQL ordered by Executions for DB: ERPE Instance: erpe Snaps: 1 -2
Module: MOD_PRINCIPAL -> End Disk Reads Threshold: 1000 -> End Executions Threshold: 100
SELECT COUNT(*) FROM AGENDA WHERE TRUNC(AGE_FECHA) <= SYSDATE
AND AGE_NOTIFICAR = 'T' AND AGE_PARA = :b1 CPU Elapsd CPU per Elap per
Physical Reads Executions Reads per Exec %Total Time (s) Time (s) Hash Value Executions Rows Processed Rows per Exec Exec (s) Exec (s) Hash Value
5 12 0.4 0.0 0.05 0.03 3731325089 --------------- ------------ -------------- ------ -------- --------- ---------- ------------ --------------- ---------------- ----------- ---------- ----------
Module: MOD_PRINCIPAL LS_NUMERIC_CHARACTERS'
SELECT DUP_NOMBRE_PARAUSUARIO FROM DAZ.DEFINICION_UNIDAD_PROGR 40 40 1.0 0.00 0.00 17641746
AMACION WHERE DUP_NOMBRE = :b1 0 9 0.0 0.0 0.00 0.02 365454555 SELECT :b1 + :b2 * DECODE(:b3,'A',10,'B',11,'C',12,'D',13,'E',14
select cols,audit$,textlength,intcols,property,flags,rowid from ,'F',15,:b3) FROM DUAL
3 3 1.0 0.0 0.00 0.06 484076908 view$ where obj#=:1
UPDATE WMSYS.WM$WORKSPACES_TABLE SET FREEZE_STATUS='UNLOCKED',FR 40 40 1.0 0.00 0.00 4059714361
EEZE_MODE= NULL ,FREEZE_WRITER= NULL ,FREEZE_OWNER= NULL ,SESSIO 0 1 0.0 0.0 0.00 0.00 398896841 select type#,blocks,extents,minexts,maxexts,extsize,extpct,user#
N_DURATION=0 WHERE FREEZE_OWNER = :b1 || ',' || :b2 AND SESSI select count(*) from sys.job$ where next_date < :1 and (field1 = ,iniexts,NVL(lists,65535),NVL(groups,65535),cachehint,hwmincr, N
ON_DURATION = 1 :2 or (field1 = 0 and 'Y' = :3)) VL(spare1,0) from seg$ where ts#=:1 and file#=:2 and block#=:3
3 3 1.0 0.0 0.02 0.11 2108527011 0 1,113 0.0 0.0 0.33 0.26 446226751 39 394 10.1 0.00 0.00 2385919346
BEGIN logoff_proc(lt.getSid); END; SELECT ASCII(SUBSTR(:b2,:b1,1)) FROM DUAL select name,intcol#,segcol#,type#,length,nvl(precision#,0),decod
e(type#,2,nvl(scale,-127/*MAXSB1MINAL*/),178,scale,179,scale,180
1 319 0.0 0.0 0.06 0.68 787810128 0 5 0.0 0.0 0.30 0.29 456604738 ,scale,181,scale,182,scale,183,scale,231,scale,0),null$,fixedsto
select /*+ rule */ bucket_cnt, row_cnt, cache_cnt, null_cnt, tim BEGIN logon_proc; END; rage,nvl(deflength,0),default$,rowid,col#,property, nvl(charseti
estamp#, sample_size, minimum, maximum, distcnt, lowval, hival, d,0),nvl(charsetform,0),spare1,spare2,nvl(spare3,0) from col$ wh
density, col#, spare1, spare2, avgcln from hist_head$ where obj# 0 1 0.0 0.0 0.02 0.19 490117922
=:1 and intcol#=:2 INSERT INTO DAZ.DSUTL_PARAMETROS_DEFINICION ( PAR_NOMBRE, PAR_D 34 20 0.6 0.00 0.00 2843627416
update sys.aud$ set ses$actions=merge$actions(ses$actions,:3), s
1 33 0.0 0.0 0.00 0.12 931956286 ------------------------------------------------------------- pare2=nvl(spare2,:4) where sessionid=:1 and ses$tid=:2 and act io
n#=103 and (priv$used=:5 or priv$used is null and :5 is null)
CPU Elapsd CPU per Elap per 30 20 0.7 0.00 0.00 957616262
Physical Reads Executions Reads per Exec %Total Time (s) Time (s) Hash Value Executions Rows Processed Rows per Exec Exec (s) Exec (s) Hash Value select /*+ index(idl_char$ i_idl_char1) +*/ piece#,length,piece
--------------- ------------ -------------- ------ -------- --------- ---------- ------------ --------------- ---------------- ----------- ---------- ---------- from idl_char$ where obj#=:1 and part=:2 and version=:3 order by
select grantee#,privilege#,nvl(col#,0),max(mod(nvl(option$,0),2) 1,546 1,546 1.0 0.00 0.00 1039632228 piece#
)from objauth$ where obj#=:1 group by grantee#,privilege#,nvl(co SELECT user from sys.dual
l#,0) order by grantee# 30 40 1.3 0.00 0.00 1428100621
1,113 1,113 1.0 0.00 0.00 446226751 select /*+ index(idl_ub2$ i_idl_ub21) +*/ piece#,length,piece fr
1 2 0.5 0.0 0.02 0.05 2218243056 SELECT ASCII(SUBSTR(:b2,:b1,1)) FROM DUAL om idl_ub2$ where obj#=:1 and part=:2 and version=:3 order by pi
Module: MOD_PRINCIPAL ece#
SELECT TCS_TC_COMPRADOR,TCS_TC_VENDEDOR FROM TCS WHERE TCS_FE 838 838 1.0 0.00 0.00 3180290489
CHA = :b1 AND TCS_MONEDA = :b2 select /*+ all_rows */ count(1) from "DAZ"."DOC_SEGUIMIENTO" wh 30 20 0.7 0.00 0.00 3111103299
ere "DOC_CODDOC" = :1 and "SEG_EMPRESA" = :2 select /*+ index(idl_ub1$ i_idl_ub11) +*/ piece#,length,piece fr
1 3 0.3 0.0 0.05 0.03 3719019909 om idl_ub1$ where obj#=:1 and part=:2 and version=:3 order by pi
SELECT 'ALTER TRIGGER ' || OWNER || '.' || TRIGGER_NAME || ' 812 812 1.0 0.00 0.00 1467004782 ece#
ENABLE ' CMD FROM ALL_TRIGGERS WHERE STATUS = 'DISABLED' SELECT USR_EMPRESA FROM UTL_USUARIO_SIS WHERE USR_NOMSIS = :b
1 30 40 1.3 0.00 0.00 3218356218
1 3 0.3 0.0 0.03 0.03 3748531129 select /*+ index(idl_sb4$ i_idl_sb41) +*/ piece#,length,piece fr
SELECT /*+ ALL_ROWS IGNORE_WHERE_CLAUSE */ NVL(SUM(C1),0), NVL(S 730 730 1.0 0.00 0.00 2247476756 om idl_sb4$ where obj#=:1 and part=:2 and version=:3 order by pi
UM(C2),0), COUNT(DISTINCT C3) FROM (SELECT /*+ NOPARALLEL("S") * SELECT USR_GESTION FROM UTL_USUARIO_SIS WHERE USR_NOMSIS = :b ece#
/ 1 AS C1, 1 AS C2, "S"."FILE#" AS C3 FROM "SYS"."SEG$" SAMPLE B 1
LOCK (40.259740) "S") SAMPLESUB 29 0 0.0 0.00 0.00 1453445442
448 448 1.0 0.00 0.00 2793984522 select col#, grantee#, privilege#,max(mod(nvl(option$,0),2)) fro
0 10 0.0 0.0 0.03 0.15 9565645 SELECT ASCII(SUBSTR(:b1,:b2,1)) FROM DUAL m objauth$ where obj#=:1 and col# is not null group by privilege
SELECT DSI_PROPIETARIO FROM DS_INIC #, col#, grantee# order by col#, grantee#
319 200 0.6 0.00 0.00 787810128
13
28 202 7.2 0.00 0.00 114078687 % Total cleanout - number of ktugct calls 34 0.2
select con#,obj#,rcon#,enabled,nvl(defer,0) from cdef$ where rob Parse Calls Executions Parses Hash Value 6.8
------------ ------------ -------- ---------- cleanouts and rollbacks - consist 0 0.0 0.0
l#,0) order by grantee# cleanouts only - consistent read 2 0.0 0.4
cluster key scan block gets 7,341 51.0 1,468.2
28 39 2.14 2385919346 cluster key scans 4,185 29.1 837.0
SQL ordered by Executions for DB: ERPE Instance: erpe Snaps: 1 -2 select name,intcol#,segcol#,type#,length,nvl(pre cision#,0),decod commit cleanout failures: buffer 2 0.0 0.4
-> End Executions Threshold: 100 e(type#,2,nvl(scale,-127/*MAXSB1MINAL*/),178,scale,179,scale,180 commit cleanout failures: callbac 7 0.1 1.4
,scale,181,scale,182,scale,183,scale,231,scale,0),null$,fixedsto commit cleanouts 181 1.3 36.2
CPU per Elap per rage,nvl(deflength,0),default$,rowid,col#,property, nvl(charseti commit cleanouts successfully com 172 1.2 34.4
Executions Rows Processed Rows per Exec Exec (s) Exec (s) Hash Value d,0),nvl(charsetform,0),spare1,spare2,nvl(spare3,0) from col$ wh commit txn count during cleanout 19 0.1 3.8
------------ --------------- ---------------- ----------- ---------- ---------- consistent changes 0 0.0 0.0
j#=:1 24 29 1.83 1453445442 consistent gets 55,313 384.1 11,062.6
select col#, grantee#, privilege#,max(mod(nvl(option$,0),2)) fro consistent gets - examination 14,598 101.4 2,919.6
28 90 3.2 0.00 0.00 1536916657 m objauth$ where obj#=:1 and col# is not null group by privilege CPU used by this session 693 4.8 138.6
select con#,type#,condlength,intcols,robj#,rcon#,match#,re fact,n #, col#, grantee# order by col#, grantee# CPU used when call started 693 4.8 138.6
vl(enabled,0),rowid,cols,nvl(defer,0),mtime,nvl(spare1,0) from c CR blocks created 0 0.0 0.0
def$ where obj#=:1 23 24 1.76 2918884618 cursor authentications 124 0.9 24.8
select node,owner,name from syn$ where obj#=:1 data blocks consistent reads - un 0 0.0 0.0
27 0 0.0 0.00 0.00 2963598673 db block changes 9,012 62.6 1,802.4
select job, nvl2(last_date, 1, 0) from sys.job$ where (((:1 <= n 20 20 1.53 502510949 db block gets 9,069 63.0 1,813.8
select privilege#,level from sysauth$ connect by grantee#=prior DBWR buffers scanned 88 0.6 17 .6
-------- ----------------------------------------------------- privilege# and privilege#>0 start with grantee#=:1 and privilege DBWR checkpoint buffers written 312 2.2 62.4
#>0 DBWR checkpoints 1 0.0 0.2
DBWR free buffers found 88 0.6 17.6
19 28 1.45 114078687 DBWR lru scans 1 0.0 0.2
select con#,obj#,rcon#,enabled,nvl(defer,0) from cdef$ where rob DBWR make free requests 1 0.0 0.2
SQL ordered by Parse Calls for DB: ERPE Instance: erpe Snaps: 1 -2 j#=:1 DBWR summed scan depth 88 0.6 17.6
-> End Parse Calls Threshold: 1000 DBWR transaction table writes 0 0.0 0.0
19 28 1.45 1536916657 DBWR undo block writes 65 0.5 13.0
% Total select con#,type#,condlength,intcols,robj#,rcon#,match#,refact,n deferred (CURRENT) block cleanout 59 0.4 11.8
Parse Calls Executions Parses Hash Value vl(enabled,0),rowid,cols ,nvl(defer,0),mtime,nvl(spare1,0) from c dirty buffers inspected 1 0.0 0.2
------------ ------------ -------- ---------- def$ where obj#=:1 enqueue conversions 27 0.2 5.4
81 1,546 6.19 1039632228 enqueue releases 1,275 8.9 255.0
SELECT user from sys.dual 18 22 1.38 3844343967 enqueue requests 1,275 8.9 255.0
select i.obj#,i.ts#,i.file#,i.block#,i.intcols,i.type#,i.flags, enqueue waits 0 0.0 0.0
76 76 5.81 1966425544 i.property,i.pctfree$,i.initrans,i.maxtrans,i.blevel,i.leafcnt,i execute count 7,691 53.4 1,538.2
select text from view$ where rowid=:1 .distkey, i.lblkkey,i.dblkkey,i.clufac,i.cols,i.analyzetime,i.sa free buffer inspected 1 0.0 0.2
mplesize,i.dataobj#, nvl(i.degree,1),nvl(i.instances,1),i.rowcnt free buffer requested 10,384 72.1 2,076.8
64 64 4.89 2091761008 ,mod(i.pctthres$,256),i.indmethod#,i.trunccnt,nvl(c.unicols,0),n hot buffers moved to head of LRU 214 1.5 42.8
select condition from cdef$ where rowid=:1 immediate (CR) block cleanout app 2 0.0 0.4
15 45 1.15 1930240031 immediate (CURRENT) block cleanou 30 0.2 6.0
40 40 3.06 4059714361 select pos#,intcol#,col#,spare1,bo#,spare2 from icol$ where obj# index fetch by key 10,952 76.1 2,190.4
select type#,blocks,extents,minexts,maxexts,extsize,extpct,user# =:1
,iniexts,NVL(lists,65535),NVL(groups,65535),cachehint,hwmincr, N
VL(spare1,0) from seg$ where ts#=:1 and file#=:2 and block#=:3 15 89 1.15 2085632044
select intcol#,nvl(pos#,0),col# from ccol$ where con#=:1
34 319 2.60 787810128 Instance Activity Stats for DB: ERPE Instance: erpe Snaps: 1 -2
select /*+ rule */ bucket_cnt, row_cnt, cache_cnt, null_cnt, tim 15 15 1.15 2321865901
estamp#, sample_size, minimum, maximum, distcnt, lowval, hival, select l.col#, l.intcol#, l.lobj#, l.ind#, l.ts#, l.file#, l.blo Statistic Total per Second per Trans
density, col#, spare1, spare2, avgcln from hist_head$ where obj# ck#, l.chunk, l.pctversion$, l.flags, l.property, l.retention, l --------------------------------- ------------------ -------------- ------------
=:1 and intcol#=:2 .freepools from lob$ l where l.obj# = :1 order by l.intcol# asc index scans kdiixs1 6,371 44.2 1,274.2
leaf node splits 14 0.1 2.8
31 74 2.37 189272129 14 14 1.07 1491008679 leaf node 90-10 splits 6 0.0 1.2
select o.owner#,o.name,o.namespace,o.remoteowner,o.linkname,o.su select u.name,o.name, t.update$, t.insert$, t.delete$, t.enabled logons cumulative 5 0.0 1.0
bname,o.dataobj#,o.flags from obj$ o where o.obj#=:1 from obj$ o,user$ u,trigger$ t where t.baseobject=:1 and t.ob messages received 48 0.3 9.6
j#=o.obj# and o.owner#=u.user# order by o.obj# messages sent 48 0.3 9.6
31 44 2.37 2591785020 no buffer to keep pinned count 0 0.0 0.0
select obj#,type#,ctime,mt ime,stime,status,dataobj#,flags,oid$, no work - consistent read gets 29,962 208.1 5,992.4
spare1, spare2 from obj$ where owner#=:1 and name=:2 and namespa opened cursors cumulative 1,138 7.9 227.6
ce=:3 and(remoteowner=:4 or remoteowner is null and :4 is null)a parse count (failures) 1 0.0 0.2
nd(linkname=:5 or linkname is null and :5 is null)and(subname=:6 SQL ordered by Parse Calls for DB: ERPE Instance: erpe Snaps: 1 -2 parse count (hard) 235 1.6 47.0
or subname is null and :6 is null) -> End Parse Calls Threshold: 1000 parse count (total) 1,309 9.1 261.8
parse time cpu 171 1.2 34.2
30 30 2.29 957616262 % Total parse time elapsed 289 2.0 57.8
select /*+ index(idl_char$ i_idl_char1) +*/ piece#,length,piece Parse Calls Executions Parses Hash Value physical reads 10,141 70.4 2,028.2
from idl_char$ where obj#=:1 and part=:2 and version=:3 order by ------------ ------------ -------- ---------- physical reads direct 0 0.0 0.0
piece# physical reads direct (lob) 0 0.0 0.0
13 15 0.99 1159012319 physical write s 313 2.2 62.6
30 30 2.29 1428100621 select col#,intcol#,toid,version#,packed,intcols,intcol#s,flags, physical writes direct 0 0.0 0.0
select /*+ index(idl_ub2$ i_idl_ub21) +*/ piece#,length,piece fr physical writes non checkpoint 196 1.4 39.2
om idl_ub2$ where obj#=:1 and part=:2 and version=:3 order by pi ------------------------------------------------------------- pinned buffers inspected 0 0.0 0.0
ece# prefetched blocks 8,780 61.0 1,756.0
prefetched blocks aged out before 0 0.0 0.0
30 30 2.29 3111103299 process last non-idle time 5,412,354,092 37,585,792.3 ############
select /*+ index(idl_ub1$ i_idl_ub11) +*/ piece#,length,piece fr recursive calls 30,023 208.5 6,004.6
om idl_ub1$ where obj#=:1 and part=:2 and version=:3 order by pi Instance Activity Stats for DB: ERPE Instance: erpe Snaps: 1 -2 recursive cpu usage 482 3.4 96.4
ece# redo blocks written 3,596 25.0 719.2
Statistic Total per Second per Trans redo buffer allocation retries 4 0.0 0.8
30 30 2.29 3218356218 --------------------------------- ------------------ -------------- ------------ redo entries 4,640 32.2 928.0
select /*+ index(idl_sb4$ i_idl_sb41) +*/ piece#,length,piece fr active txn count during cleanout 32 0.2 6.4 redo log space requests 2 0.0 0.4
om idl_sb4$ where obj#=:1 and part=:2 and version=:3 order by pi background checkpoints completed 0 0.0 0.0 redo log space wait time 28 0.2 5.6
ece# background checkpoints started 1 0.0 0.2 redo ordering marks 4 0.0 0.8
background timeouts 165 1.2 33.0 redo size 1,794,496 12,461.8 358,899.2
28 33 2.14 931956286 buffer is not pinned count 38,379 266.5 7,675.8 redo synch time 80 0.6 16.0
select grantee#,privilege#,nvl(col#,0),max(mod(nvl(option$,0),2) buffer is pinned count 27,134 188.4 5,426.8 redo synch writes 32 0.2 6.4
)from objauth$ where obj#=:1 group by grantee#,privilege#,nvl(co bytes received via SQL*Net from c 99,907 693.8 19,981.4 redo wastage 11,320 78.6 2,264.0
bytes received via SQL*Net from d 0 0.0 0.0 redo write time 101 0.7 20.2
bytes sent via SQL*Net to client 182,314 1,266.1 36,462.8 redo writer latching time 0 0.0 0.0
bytes sent via SQL*Net to dblink 0 0.0 0.0 redo writes 39 0.3 7.8
calls to get snapshot scn: kcmgss 14,797 102.8 2,959.4 rollback changes - undo records a 0 0.0 0.0
SQL ordered by Parse Calls for DB: ERPE Instance: erpe Snaps: 1 -2 calls to kcmgas 76 0.5 15.2 rollbacks only - consistent read 0 0.0 0.0
-> End Parse Calls Threshold: 1000 calls to kcmgcs 32 0.2 6.4 rows fetched via callback 5,347 37.1 1,069.4
change write time 169 1.2 33.8 session connect time 5,412,354,092 37,585,792.3 ############
14
session cursor cache hits 283 2.0 56.6 P Buffers Hit % Gets Reads Writes Waits Waits Waits
session logical reads 64,382 447.1 12,876.4 --- ---------- ----- ----------- ----------- ---------- ------- -------- ------ Low High
session pga memory 2,324,4 48 16,142.0 464,889.6 D 8,008 88.8 90,585 10,141 313 0 0 0 Optimal Optimal Total Execs Optimal Execs 1 -Pass Execs M-Pass Execs
session pga memory max 10,456,436 72,614.1 2,091,287.2 K 4,004 100.0 97 0 0 0 0 0 ------- ------- -------------- ------------- ------------ ------------
session uga memory 1,109,772 7,706.8 221,954.4 R 2,002 0 0 0 0 0 0 8K 16K 621 621 0 0
session uga memory max 7,708,868 53,533.8 1,541,773.6 ------------------------------------------------------------- 16K 32K 10 10 0 0
shared hash latch upgrades - no w 5,731 39.8 1,146.2 32K 64K 1 1 0 0
sorts (disk) 0 0.0 0.0 Instance Recovery Stats for DB: ERPE Instance: erpe Snaps: 1 -2 64K 128K 3 3 0 0
sorts (memory) 699 4.9 139.8 -> B: Begin snapshot, E: End snapshot 256K 512K 2 2 0 0
sorts (rows) 21,571 149.8 4,314.2 512K 1024K 18 18 0 0
SQL*Net roundtrips to/from client 1,049 7.3 209.8 Targt Estd Log File Log Ckpt Log Ckpt -------------------------------------------------------------
SQL*Net roundtrips to/from dblink 0 0.0 0.0 MTTR MTTR Recovery Actual Target Size Timeout Interval
summed dirty queue length 0 0.0 0.0 (s) (s) Estd IOs Redo Blks Redo Blks Redo Blks Redo Blks Redo Blks PGA Memory Advisory for DB: ERPE Instance: erpe End Snap: 2
- ----- ----- ---------- ---------- ---------- ---------- ---------- ---------- -> When using Auto Memory Mgmt, minimally choose a pga_aggregate_target value
B 0 0 9569 9216 9216 19975 where Estd PGA Overalloc Count is 0
E 0 0 9158 9216 9216 23249
------------------------------------------------------------- Estd Extra Estd PGA Estd PGA
Instance Activity Stats for DB: ERPE Instance: erpe Snaps: 1 -2 PGA Target Size W /A MB W/A MB Read/ Cache Overalloc
Buffer Pool Advisory for DB: ERPE Instance: erpe End Snap: 2 Est (MB) Factr Processed Written to Disk Hit % Count
Statistic Total per Second per Trans -> Only rows with estimated physical reads >0 are displayed ---------- ------- ---------------- ---------------- -------- ----------
--------------------------------- ------------------ -------------- ------------ -> ordered by Block Size, Buffers For Estimate 13 0.1 23.3 8.5 73.0 2
switch current to new buffer 23 0.2 4.6 25 0.3 23.3 0.0 100.0 0
table fetch by rowid 14,814 102.9 2,962.8 Size for Size Buffers for Est Physical Estimated 50 0.5 23.3 0.0 100.0 0
table fetch continued row 336 2.3 67.2 P Estimate (M) Factr Estimate Read Factor Physical Reads 75 0.8 23.3 0.0 100.0 0
table scan blocks gotten 15,303 106.3 3,060.6 --- ------------ ----- ---------------- ------------- ------------------ 100 1.0 23.3 0.0 100.0 0
table scan rows gotten 248,283 1,724.2 49,656.6 K 8 .3 1,001 1.00 47 120 1.2 23.3 0.0 100.0 0
table scans (long tables) 5 0.0 1.0 D 8 .1 1,001 10.61 5,172,842 140 1.4 23.3 0.0 100.0 0
table scans (rowid ranges) 0 0.0 0.0 K 16 .5 2,002 1.00 47 160 1.6 23.3 0.0 100.0 0
table scans (short tables) 3,346 23.2 669.2 D 16 .3 2,002 8.74 4,257,541 180 1.8 23.3 0.0 100.0 0
transaction rollbacks 0 0.0 0.0 K 24 .8 3,003 1.00 47 200 2.0 23.3 0.0 100.0 0
user calls 1,023 7.1 204.6 D 24 .4 3,003 4.34 2,112,822 300 3.0 23.3 0.0 100.0 0
user commits 3 0.0 0.6 K 32 1.0 4,004 1.00 47 400 4.0 23.3 0.0 100.0 0
user rollbacks 2 0.0 0.4 D 32 .5 4,004 2.80 1,366,917 600 6.0 23.3 0.0 100.0 0
workarea executions - onepass 0 0.0 0.0 K 40 1.3 5,005 1.00 47 800 8.0 23.3 0.0 100.0 0
workarea executions - optimal 657 4.6 131.4 D 40 .6 5,005 1.93 940,840 -------------------------------------------------------------
write clones created in backgroun 0 0.0 0.0 K 48 1.5 6,006 1.00 47
write clones created in foregroun 0 0.0 0.0 D 48 .8 6,006 1.55 753,879
------------------------------------------------------------- K 56 1.8 7,007 1.00 47
D 56 .9 7,007 1.18 573,060
K 64 2.0 8,008 1.00 47 Rollback Segment Stats for DB: ERPE Instance: erpe Snaps: 1 -2
D 64 1.0 8,008 1.00 487,392 ->A high value for "Pct Waits" suggests more rollback segments may be required
K 72 2.3 9,009 1.00 47 ->RBS stats may not be accurate between begin and end snaps when using Auto Undo
Tablespace IO Stats for DB: ERPE Instance: erpe Snaps: 1 -2 D 72 1.1 9,009 0.95 462,176 managment, as RBS may be dynamically created and dropped as needed
->ordered by IOs (Reads + Writes) desc K 80 2.5 10,010 1.00 47
D 80 1.3 10,010 0.89 433,082 Trans Table Pct Undo Bytes
Tablespace K 88 2.8 11,011 1.00 47 RBS No Gets Waits Written Wraps Shrinks Extends
------------------------------ D 88 1.4 11,011 0.88 428,017 ------ -------------- ------- --------------- -------- -------- --------
Av Av Av Av Buffer Av Buf K 96 3.0 12,012 1.00 47 0 1.0 0.00 0 0 0 0
Reads Reads/s Rd(ms) Blks/Rd Writes Writes/s Waits Wt(ms) D 96 1.5 12,012 0.85 414,116 1 94.0 0.00 377,872 0 0 0
-------------- ------- ------ ------- ------------ -------- ---------- ------ K 104 3.3 13,013 1.00 47 2 877.0 0.00 241,942 0 0 0
TBL_USERS D 104 1.6 13,013 0.72 351,616 3 9.0 0.00 712 0 0 0
1,299 9 4.0 7.6 0 0 0 0.0 K 112 3.5 14,014 1.00 47 4 8.0 0.00 2,350 0 0 0
SYSTEM D 112 1.8 14,014 0.70 343,319 5 7.0 0.00 816 0 0 0
62 0 29.0 4.1 176 1 0 0.0 K 120 3.8 15,015 1.00 47 6 9.0 0.00 1,114 0 0 0
TBL_STATPACK D 120 1.9 15,015 0.66 324,030 7 7.0 0.00 438 0 0 0
0 0 0.0 72 1 0 0.0 K 128 4.0 16,016 1.00 47 8 7.0 0.00 562 0 0 0
TBL_UNDO D 128 2.0 16,016 0.66 319,289 9 7.0 0.00 438 0 0 0
0 0 0.0 65 0 0 0.0 K 136 4.3 17,017 1.00 47 10 7.0 0.00 500 0 0 0
------------------------------------------------------------- D 136 2.1 17,017 0.65 315,625 -------------------------------------------------------------
K 144 4.5 18,018 1.00 47
D 144 2.3 18,018 0.64 313,793
K 152 4.8 19,019 1.00 47
D 152 2.4 19,019 0.64 310,883
File IO Stats for DB: ERPE Instance: erpe Snaps: 1 -2 K 160 5.0 20,020 1.00 47 Rollback Segment Storage for DB: ERPE Instance: erpe Snaps: 1 -2
->ordered by Tablespace, File D 160 2.5 20,020 0.61 298,922 ->Optimal Size should be larger than Avg Active
-------------------------------------------------------------
Tablespace Filename RBS No Segment Size Avg Active Optimal Size Maximum Size
------------------------ ---------------------------------------------------- ------ --------------- --------------- --------------- ---------------
Av Av Av Av Buffer Av Buf 0 401,408 0 401,408
Reads Reads/s Rd(ms) Blks/Rd Writes Writes/s Waits Wt(ms) 1 5,365,760 555,095 5,365,760
-------------- ------- ------ ------- ------------ -------- ---------- ------ PGA Aggr Target Stats for DB: ERPE Instance: erpe Snaps: 1 -2 2 4,317,184 540,043 5,365,760
SYSTEM E:\ORAERPE\DATAFILES\DFL_SYS_ERPE -> B: Begin snap E: End snap (rows dentified with B or E contain data 3 4,317,184 440,947 4,317,184
62 0 29.0 4.1 176 1 0 which is absolute i.e. not diffed over the interval) 4 4,317,184 567,423 5,365,760
-> PGA cache hit % - percentage of W/A (WorkArea) data processed only in -memory 5 4,317,184 481,451 4,317,184
TBL_STATPACK E:\ORAERPE\DATAFILES\DFL_STATPACK_ERPE -> Auto PGA Target - actual workarea memory target 6 3,268,608 619,733 6,414,336
0 0 72 1 0 -> W/A PGA Used - amount of memory used for all Workareas (manual + auto) 7 5,365,760 492,645 5,365,760
-> %PGA W/A Mem - percentage of PGA memory allocated to workareas 8 4,317,184 470,036 5,365,760
TBL_UNDO E:\ORAERPE\DATAFILES\DFL_UNDO_ERPE -> %Auto W/A Mem - percentage of workarea memory controlled by Auto Mem Mgmt 9 2,220,032 471,052 5,365,760
0 0 65 0 0 -> %Man W/A Mem - percentage of workarea memory under manual control 10 4,317,184 435,859 4,317,184
-------------------------------------------------------------
TBL_USERS E:\ORAERPE\DATAFILES\DFL_USER_ERPE PGA Cache Hit % W/A MB Processed Extra W/A MB Read/Written
1,299 9 4.0 7.6 0 0 0 --------------- ---------------- -------------------------
100.0 22 0
-------------------------------------------------------------
%PGA %Auto %Man Latch Activity for DB: ERPE Instance: erpe Snaps: 1 -2
PGA Aggr Auto PGA PGA Mem W/A PGA W/A W/A W/A Global Mem ->"Get Requests", "Pct Get Miss" and "Avg Slps/Miss" are statistics for
Target(M) Target(M) Alloc(M) Used(M) Mem Mem Mem Bound(K) willing-to-wait latch get requests
- --------- --------- ---------- ---------- ------ ------ ------ ---------- ->"NoWait Requests", "Pct NoWait Miss" are for no-wait latch get requests
Buffer Pool Statistics for DB: ERPE Instance: erpe Snaps: 1 -2 B 100 75 20.0 0.0 .0 .0 .0 5,120 ->"Pct Misses" for both should be very close to 0.0
-> Standard block size Pools D: default, K: keep, R: recycle E 100 75 21.2 0.0 .0 .0 .0 5,120
-> Default Pools for other block sizes: 2k, 4k, 8k, 16k, 32k ------------------------------------------------------------- Pct Avg Wait Pct
Get Get Slps Time NoWait NoWait
Free Write Buffer PGA Aggr Target Histogram for DB: ERPE Instance: erpe Snaps: 1 -2 Latch Requests Miss /Miss (s) Requests Miss
Number of Cache Buffer Physical Physical Buffer Complete Busy -> Optimal Executions are purely in-memory operations ------------------------ -------------- ------ ------ ------ ------------ ------
15
active checkpoint queue 51 0.0 0 0 ------------------------------------------------------------- 96 2.0 95 10,060 33,416 1.0
archive control 4 0.0 0 0 5,254,195
archive process latch 3 0.0 0 0 -------------------------------------------------------------
cache buffer handles 48 0.0 0 0
cache buffers chains 141,301 0.0 0 19,178 0.0
cache buffers lru chain 20,695 0.0 0 82 0.0 Top 5 Logical Reads per Segment for DB: ERPE Instance: erpe Snaps: 1 -2
channel handle pool latc 7 0.0 0 0 -> End Segment Logical Reads Threshold: 10000
channel operations paren 101 0.0 0 0 SGA Memory Summary for DB: ERPE Instance: erpe Snaps: 1 -2
checkpoint queue latch 3,256 0.0 0 292 0.0 Subobject Obj. Logical
child cursor hash table 2,351 0.0 0 0 Owner Tablespace Object Name Name Type Reads %Total SGA regions Size in Bytes
Consistent RBA 37 0.0 0 0 ---------- ---------- -------------------- ---------- ----- ------------ ------- ------------------------------ ----------------
dml lock allocation 1,840 0.0 0 0 SYS SYSTEM DUAL TABLE 9,984 23.01 Database Buffers 117,440,512
dummy allocation 8 0.0 0 0 DAZ TBL_USERS SGR_EVENTOS_SEGURIDA TABLE 9,936 22.90 Fixed Size 453,392
enqueue hash chains 2,543 0.0 0 0 SYS SYSTEM USER$ TABLE 3,776 8.70 Redo Buffers 1,077,248
enqueues 767 0.0 0 0 SYS SYSTEM SEG$ TABLE 1,920 4.42 Variable Size 109,051,904
event group latch 4 0.0 0 0 SYS SYSTEM TS$ TABLE 1,552 3.58 ----------------
file number translation 693 0.0 0 0 ------------------------------------------------------------- sum 228,023,056
FOB s.o list latch 17 0.0 0 0 -------------------------------------------------------------
hash table column usage 0 0 10,023 0.0
hash table modification 1 0.0 0 0 Top 5 Physical Reads per Segment for DB: ERPE Instance: erpe Snaps: 1 -2
job_queue_processes para 3 0.0 0 0 -> End Segment Physical Reads Threshold: 1000 SGA breakdown difference for DB: ERPE Instance: erpe Snaps: 1 -2
lgwr LWN SCN 71 0.0 0 0
library cache 62,899 0.0 0 284 0.0 Subobject Obj. Physical Pool Name Begin value End value % Diff
library cache load lock 534 0.0 0 0 Owner Tablespace Object Name Name Type Reads %Total ------ ------------------------------ ---------------- ---------------- -------
library cache pin 29,880 0.0 0 0 ---------- ---------- -------------------- ---------- ----- ------------ ------- java free memory 25,448,448 25,448,448 0.00
library cache pin alloca 11,396 0.0 0 0 DAZ TBL_USERS SGR_EVENTOS_SEGURIDA TABLE 9,728 96.24 java memory in use 8,105,984 8,105,984 0.00
list of block allocation 15 0.0 0 0 SYS SYSTEM TAB$ TABLE 226 2.24 large free memory 8,388,608 8,388,608 0.00
messages 591 0.0 0 0 DAZ TBL_USERS UTL_TOOLBAR TABLE 79 .78 shared dictionary cache 1,610,880 1,610,880 0.00
mostly latch-free SCN 71 0.0 0 0 DAZ TBL_USERS DS_VER TABLE 49 .48 shared errors 42,824 43,048 0.52
multiblock read objects 2,662 0.0 0 0 SYS SYSTEM CDEF$ TABLE 9 .09 shared fixed allocation callback 180 180 0.00
ncodef allocation latch 2 0.0 0 0 ------------------------------------------------------------- shared free memory 3,856,888 4,630,552 20.06
object stats modificatio 427 0.0 0 0 shared joxlod: in ehe 518,604 518,604 0.00
post/wait queue 77 0.0 0 33 0.0 shared joxs heap init 4,220 4,220 0.00
process allocation 4 0.0 0 4 0.0 shared KGK heap 1,064 1,064 0.00
process group creation 7 0.0 0 0 shared kgl simulator 2,260,476 2,260,476 0.00
redo allocation 4,736 0.0 0 0 Dictionary Cache Stats for DB: ERPE Instance: erpe Snaps: 1 -2 shared KGLS heap 2,809,232 2,650,808 -5.64
redo copy 0 0 4,626 0.0 ->"Pct Misses" should be very low (< 2% in most cases) shared KQR L SO 136,192 136,192 0.00
redo writing 253 0.0 0 0 ->"Cache Usage" is the number of cache entries being used shared KQR M PO 1,783,368 1,847,888 3.62
row cache enqueue latch 53,027 0.0 0 0 ->"Pct SGA" is the ratio of usage to allocated size for that cache shared KQR M SO 121,884 121,884 0.00
row cache objects 64,252 0.0 0 325 0.0 shared KQR S PO 189,600 189,600 0.00
sequence cache 20 0.0 0 0 Get Pct Scan Pct Mod Final shared KQR S SO 24,668 24,668 0.00
session allocation 5,392 0.0 0 0 Cache Requests Miss Reqs Miss Reqs Usage shared KQR X PO 51,072 51,072 0.00
session idle bit 2,230 0.0 0 0 ------------------------- ------------ ------ ------- ----- -------- ---------- shared KSXR pending messages que 841,036 841,036 0.00
session switching 4 0.0 0 0 dc_histogram_data 67 11.9 0 0 59 shared KSXR receive buffers 1,033,000 1,033,000 0.00
session timer 50 0.0 0 0 dc_histogram_data_values 54 9.3 0 0 41 shared library cache 8,040,064 8,230,180 2.36
shared pool 33,815 0.0 1.0 0 0 dc_histogram_defs 1,673 19.1 0 0 1,095 shared miscellaneous 6,287,652 6,361,932 1.18
simulator hash latch 2,454 0.0 0 0 dc_object_ids 5,382 1.4 0 0 674 shared parameters 24,344 19,152 -21.33
simulator lru latch 679 0.0 0 11 0.0 dc_objects 919 4.8 0 0 1,198 shared PLS non-lib hp 2,068 2,068 0.00
sort extent pool 2 0.0 0 0 dc_profiles 5 0.0 0 0 2 shared PL/SQL DIANA 4,499,004 4,020,688 -10.63
SQL memory manager latch 1 0.0 0 45 0.0 dc_segments 571 7.0 0 0 268 shared PL/SQL MPCODE 1,104,724 946,728 -14.30
dc_sequences 1 0.0 0 1 5 shared PL/SQL PPCODE 27,616 27,616 0.00
dc_tablespaces 2,900 0.0 0 0 13 shared PL/SQL SOURCE 4,428 4,428 0.00
dc_user_grants 10,580 0.0 0 0 71 shared sim memory hea 127,064 127,064 0.00
dc_usernames 442 0.0 0 0 26 shared sql area 29,594,324 29,292,804 -1.02
Latch Activity for DB: ERPE Instance: erpe Snaps: 1 -2 dc_users 14,771 0.0 0 0 90 shared table definiti 6,312 6,348 0.57
->"Get Requests", "Pct Get Miss" and "Avg Slps/Miss" are statistics for ------------------------------------------------------------- shared trigger defini 2,508 2,968 18.34
willing-to-wait latch get requests shared trigger inform 1,760 1,728 -1.82
->"NoWait Requests", "Pct NoWait Miss" are for no-wait latch get requests shared trigger source 3,632 1,812 -50.11
->"Pct Misses" for both should be very close to 0.0 Library Cache Activity for DB: ERPE Instance: erpe Snaps: 1 -2 shared 1M buffer 2,098,176 2,098,176 0.00
->"Pct Misses" should be very low buffer_cache 117,440,512 117,440,512 0.00
Pct Avg Wait Pct fixed_sga 453,392 453,392 0.00
Get Get Slps Time NoWait NoWait Get Pct Pin Pct Invali- log_buffer 1,067,008 1,067,008 0.00
Latch Requests Miss /Miss (s) Requests Miss Namespace Requests Miss Requests Miss Reloads dations -------------------------------------------------------------
------------------------ -------------- ------ ------ ------ ------------ ------ --------------- ------------ ------ -------------- ------ ---------- --------
SQL memory manager worka 3,432 0.0 0 0 BODY 48 0.0 48 0.0 0 0
transaction allocation 14 0.0 0 0 CLUSTER 152 0.0 159 0.0 0 0
transaction branch alloc 2 0.0 0 0 SQL AREA 901 0.6 10,998 2.6 16 6
undo global data 213 0.0 0 0 TABLE/PROCEDURE 5,819 0.4 5,151 5.7 151 0 init.ora Parameters for DB: ERPE Instance: erpe Snaps: 1 -2
user lock 28 0.0 0 0 TRIGGER 14 0.0 14 14.3 2 0
-------------------------------------------------------- ----- ------------------------------------------------------------- End value
Parameter Name Begin value (if different)
----------------------------- ------------------------ --------- --------------
audit_sys_operations TRUE
audit_trail DB
Latch Sleep breakdown for DB: ERPE Instance: erpe Snaps: 1 -2 Shared Pool Advisory for DB: ERPE Instance: erpe End Snap: 2 background_dump_dest E:\ORAERPE\TRACE\BACKGROUND
-> ordered by misses desc -> Note there is often a 1:Many correlation between a single logical object compatible 9.2.0.1.0
in the Library Cache, and the physical number of memory objects associated control_files E:\ORAERPE\CONTROLFILES\CTL_ERPE0
Get Spin & with it. Therefore comparing the number of Lib Cache objects (e.g. in core_dump_dest E:\ORAERPE\TRACE\CDUMP
Latch Name Requests Misses Sleeps Sleeps 1 ->4 v$librarycache), with the number of Lib Cache Memory Objects is invalid cursor_sharing EXACT
-------------------------- -------------- ----------- ----------- ------------ cursor_space_for_time FALSE
shared pool 33,815 1 1 0/1/0/0/0 Estd db_block_size 8192
------------------------------------------------------------- Shared Pool SP Estd Estd Estd Lib LC Time db_cache_size 67108864
Size for Size Lib Cache Lib Cache Cache Time Saved Estd Lib Cache db_domain
Estim (M) Factr Size (M) Mem Ob j Saved (s) Factr Mem Obj Hits db_file_multiblock_read_count 16
----------- ----- ---------- ------------ ------------ ------- --------------- db_files 15
24 .5 26 4,677 33,278 1.0 5,242,330 db_keep_cache_size 33554432
Latch Miss Sources for DB: ERPE Instance: erpe Snaps: 1 -2 32 .7 33 5,002 33,328 1.0 5,246,193 db_name ERPE
-> only latches with sleeps are shown 40 .8 40 5,922 33,356 1.0 5,248,679 db_recycle_cache_size 16777216
-> ordered by name, sleeps desc 48 1.0 47 6,159 33,380 1.0 5,250,424 fast_start_mttr_target 0
56 1.2 60 6,972 33,389 1.0 5,251,380 instance_name ERPE
NoWait Waiter 64 1.3 67 7,149 33,394 1.0 5,252,262 java_pool_size 33554432
Latch Name Where Misses Sleeps Sleeps 72 1.5 74 7,320 33,406 1.0 5,253,086 job_queue_processes 1
------------------------ -------------------------- ------- ---------- -------- 80 1.7 81 8,149 33,412 1.0 5,253,588 large_pool_size 8388608
shared pool kghalo 0 1 0 88 1.8 88 8,881 33,416 1.0 5,254,134 license_max_users 70
16
log_archive_dest D:\ERPEARCHLOG
log_archive_start TRUE Recover damaged blocks. 15.2 NT specific
log_buffer 1000448 This is definetively the tool you should use to do backups. 15.2.1 Screen Savers
log_checkpoint_interval 0
max_dump_file_size UNLIMITED Any screen saver in NT consume excessive CPU on the server they MUST
max_enabled_roles 70 11.4 You too can use export and import to backup BE AVOIDED.
open_cursors 800 You can do incremental exports, but I’ll not recommend, usually you can 15.2.2
open_links 4 Cache In NT4
optimizer_index_caching 90 export all database and reimport to optimize, or to move one table or NT 4 don’t detect automatically the cache, by default it only the minimal.
optimizer_index_cost_adj 10
optimizer_max_permutations 2500 schema, but not for periodicall backups You have to set the SecondLevelDataCache using the registry editor.
pga_aggregate_target 104857600
processes 50
query_rewrite_enabled TRUE
11.5 Test your database backups ALWAYS 16 Other considerations
query_rewrite_integrity ENFORCED Test if you backups are burned without writing errors (compressing winrar
read_only_open_delayed FALSE
remote_dependencies_mode SIGNATURE and testing) 16.1 Bugs and hidden parameters
remote_login_passwordfile
session_cached_cursors
SHARED
1000
Periodically test your backup restauration works, this will test all. If you There are bugs and specially situations that will need you to fill a tar in
session_max_open_files 30 don’t want to do, you don’t have to do, but you can lose your job in a very metalink.oracle.com (paying support).
shared_pool_size 50331648 bad manner if you don’t and if restauration fails when needed. For example in 9i, a improvement using views,cuased all queryes failed, in
statistics_level ALL
timed_statistics TRUE that situation you could use _complex_view_merging=FALSE, hidden
undo_management
undo_retention
AUTO
56000 12 24x7 parameter (note the first letter is an underscore)
undo_tablespace TBL_UNDO Oracle offers several tools to keep always your database up. 24 hours and 7 You can see hidden parameter with the following view
user_dump_dest E:\ORAERPE\TRACE\USER
utl_file_dir * days a week.
workarea_size_policy AUTO
------------------------------------------------------------- Select ksppinm, ksppstvl from
12.1 Tables and indexes x$ksppi a, x$ksppsv b
End of Report rdbms_redefinition, allows severan online operation in tables and indexes where a.indx=b.indx and substr(ksppinm,1,1) = '_';
12.2 Backups
10.7 Waits RMAN, hot backups, without need to shut down database, to do a full Remember hidden parameter are NOT SUPPORTED by Oracle if used
Here are better explanations than the one I could give you. backup. without their commandment, and must be used through Oracle support,
http://otn.oracle.com/products/manageability/database/pdf/OWPerformanc only exceptional situations, only a good expertise allow the use of hidden
eMgmtPaper.pdf 12.3 Recovery parameters.
12.3.1 Backup recover
http://www.dbspecialists.com/presentations/wait_events2.html
http://ww.dbazine.com/burleston8.html The time to recover a backup in a database, must be tested individually in 16.2 Try don’t apply techniques that works in other database
http://download- every database, and there are several factor involved, distinct physical For example I had a serious problem because I didn’t knew in Sql Server,
west.oracle.com/docs/cd/B10501_01/server.920/a96533/instance_tune.htm disk, processor, etc. etc. stored procedure you had to check after each statement if there was a
#18211
12.3.2 Instance Recovery return value.
10.7.1 Waits by object Every time a instance crashes, there is a process to automatically recover it To transport your old technique of tuning from one database work as other
There is a new view in 9.2 to view statistics by segment (usually a table, using redologs, the time this recovery takes, can be tunned. could be the worst mistake you can do.
unless partitioned is one segment). You can read here
http://download- 16.3 Test your solutions
SELECT OBJECT_NAME,STATISTIC_NAME, VALUE Several techniques don’t work as expected, for several reason, including
FROM V$SEGMENT_STATISTICS west.oracle.com/docs/cd/B10501_01/server.920/a96533/instreco.htm#442
821 bugs; some advices could not be the best for you specific database
WHERE OBJECT_NAME = ‘TABLE_NAME’' situation, there are always exceptions for a rule.
11 Backups 13 Other Parameters
16.4 What to opti mize
Oracles offers a rich and interesting ways to do backups. 13.1 MAX_ENABLED_ROLES You must optimize what is not enough fast, what gives the parameter of
But you must know how to restore them too, and need to practice it, before If you got the impression as I, that this parameter can severly affect how fast should be a process, is the client requirement.
you need to do that. performance, this is not true, you can have dozens of roles, and this will For example a 10 hours process that must be run once weekly, and can be
not take too much resources. executed in 20 hours and no body will complaint, is not a priority.
11.1 Full Backup A 0,50 seconds update, run hundreds of thousands times a day, seems to be
If you shutdown the database and copy all archives (controlfiles, logfiles, 14 Hardware more important.
datafiles, etc.), you’ll can after shutdown again the database, replace that
archives and the database will work OK. 14.1 Don’t use Raid 5 16.5 Patches
Use Raid 5 in a highly updated database, is disastrous for performance, You can get them at http://metalink.oracle.com/, but you must pay the
11.2 Archivelog Mode support.
Oracle (in archivelog mode), saves old logs to a directory automatically. because it implies a high update penalty.
If you know the exactly SCN (number that corresponds to every commit) Oracle recommends using RAID 10 (a.k.a., RAID 0+1) for all systems that 17 How to get specific information from you
you wanto to return to, you can (after backing up all including all log experience significant updates.
files), replace current datafiles with previous datafiles (from a backup) and 15 Operating system Oracle Database
rollforward (reapply) changes and get your database as it was. Some information useful you use to get from your database
It avoids having to do full backups frequently. You must remember almost all the information from the database are 95%
15.1 Defragmentation accesible through views.
Operating System Logical disks, defragmentation can give a small
11.3 RMAN So is important you memorize some of them, to search information, they
improvement, you can use Diskeeper or other .
Rman is THE TOOL for backups, it allows hot backups (without shutting are extremely useful.
down the database), but you must test any way, thre are some bugs around.
Allow to resume a long backup after a crash.
17
SCHEMA PROCEDURE
17.1 Database Objects STARTUP PARENT_ID
There are several views showing information at three leves CATALOG Oracle9i Catalog Views
DBA_TABLES (all tables plus additional information), USER_TABLES 9.2.0.1.0 VALID 05-SEP-2002 14:42:59 SYS
(user owned objects), ALL_TABLES (all tables). SYS DBMS_REGISTRY_SYS .VALIDATE_CATALOG
Remember always DBA_ prefixed view have more information CATPROC Oracle9i Packages and Types
9.2.0.1.0 VALID 05-SEP-2002 14:42:59 SYS
SYS DBMS_REGISTRY_SYS .VALIDATE_CATPROC
DBA_OBJECTS, has all objects, it is useful to find objects
There are one view for any kind of objects DBA_TABLES, 18 Bibliography
DBA_INDEXES, DBA_SYNONYMS, etc. Some books usually suggested to read are:
Any way if you don’t find the one you are looking for you can search Oracle Concepts
select * from dba_views where VIEW_NAME LIKE '%PRIV%'; Oracle Administration Guide
Oracle Application Developer
17.2 Views for Tuning Orcle Performance Tuning
There is a good list and explanation here:
http://download- To a more detailed explanation get Tom Kyte’s ‘Effective Oracle by
west.oracle.com/docs/cd/B10501_01/server.920/a96533/sqlviews.htm#172
Design” book and/or go to asktom.oracle.com
14
17.3 Version
Para obtener la versión de Oracle que utiliza
SQL> select * from v$version;
BANNER
----------------------------------------------------------------
Oracle9i Release 9.2.0.1.0 - Production
PL/SQL Release 9.2.0.1.0 - Production
CORE 9.2.0.1.0 Production
TNS for 32-bit Windows: Version 9.2.0.1.0 - Production
NLSRTL Version 9.2.0.1.0 - Production
17.3.1 Interpretación del número de versión
A partir de Oracle 9i versión 2, se ha puesto en vigencia un nuevo método
de numeración, por ejemplo.
9.2.0.1.0
9 Numero principal de versión
2 Numero de mantenimiento
0 Número de versión de Servidor de Aplicaciones
1 Versión de componentes específicos
0 Versión específica de plataforma
17.4 Operating System
SQL> select dbms_utility.port_string from dual;
PORT_STRING
--------------------------------------------------
IBMPC/WIN_NT -8.1.0
17.5 Options availables on your database release
To see which options are available in your release
SQL> select * from v$option;
PARAMETER VALUE
---------------------------------------------------------------- ------
Partitioning FALSE
Objects TRUE
Real Application Clusters FALSE
Advanced replication FALSE
Bit-mapped indexes FALSE
……..
To see the status and version from your database componentes
COMP_ID COMP_NAME
VERSION STATUS MODIFIED CONTROL