Você está na página 1de 226

BC505 Database Administration Oracle

BC505
Release 4.6C 22.01.2002
0
SAP AG 1999
BC505 Database Administration Oracle
BC505
R/3 Release 4.6B 50034335
BC505
R/3 Release 4.6B 50034335
Database Administration
Oracle
Database Administration
Oracle
0.2
SAP AG 1999
Copyright 00! "A# A$. All rights reser%ed.
&o part o' this p(blication may be reprod(ced or transmitted in
any 'orm or 'or any p(rpose )itho(t the e*press permission o'
"A# A$. +he in'ormation contained herein may be changed
)itho(t prior notice.
All rights reser%ed.
Copyright
Trademarks:
Some software products marketed by SAP AG and its distributors contain proprietary software
components of other software vendors.
Microsoft

! "#$%&"S

! $'

! ()C(*

! "ord

! PowerPoint

and S+* Server

are re,istered
trademarks of Microsoft Corporation.
#BM

! %B-

! &S.-

! %B-./000

! Para00e0 Sysp0e1

! M2S.(SA

! 3S./000

! A#)

! S.450

!
AS.600

! &S.450

! and &S.600

are re,istered trademarks of #BM Corporation.


&3AC*(

is a re,istered trademark of &3AC*( Corporation.


#$7&3M#)

8&n*ine for SAP and #$7&3M#)

%ynamic Server
'M
are re,istered trademarks of
#nformi1 Software #ncorporated.
9$#)

! ).&pen

! &S7.:

! and Motif

are re,istered trademarks of the &pen Group.


;'M*! %;'M*! )M*! );'M* are trademarks or re,istered trademarks of "4C

! "or0d "ide
"eb Consortium! Massachusetts #nstitute of 'echno0o,y.
<A2A

is a re,istered trademark of Sun Microsystems! #nc.


<A2ASC3#P'

is a re,istered trademark of Sun Microsystems! #nc.! used under 0icense for


techno0o,y invented and imp0emented by $etscape.
SAP! SAP *o,o! 3.-! 3#2A! 3.4! ABAP! SAP Archive*ink! SAP Business "orkf0ow! "eb70ow!
SAP (ar0y"atch! BAP#! SAPP;#3(! Mana,ement Cockpit! mySAP.com *o,o and mySAP.com
are trademarks or re,istered trademarks of SAP AG in Germany and in severa0 other countries a00
over the wor0d. A00 other products mentioned are trademarks or re,istered trademarks of their
respective companies.
1
SAP AG 1999
"A# Basis Administration +raining 4.6
,*pert Competence
Database
Administration +raining
Core Competence
BC305 3 days
Advanced R/3
System Administration
-BC30 2 days
R/3-ec!nical
"m#lementation and
$#eration %ana&ement
ec!nical Core
Com#etence
BCtcc. ' days
BC35 3 days
So(t)are *o&istics
BC3!5 3 days
+or,load Analysis
BC535 3 days
-ata.ase Administration
-/2 0-/
BC530 ' days
-ata.ase Administration
-/2/390
Corresponding R/3 Basis
/no)ledge #rod(ct and/or
"A# ,*pert /no)ledge Boo0
BC505 3 days
-ata.ase
Administration $racle
-ata.ase
Administration "n(ormi1
BC5!! ' days
-ata.ase
Administration SAP -/
BC5!5 2 days
BC50 3 days
-ata.ase Administration
%S S2* Server
.+echnical Core Competence 1ersions
BC3!0 2indo)s &+ / Oracle
BC3! 2indo)s &+ / "A# DB
BC3!4 2indo)s &+ -" "34 "er%er
BC3!5 62indo)s &+ / 7&89: / DB
BC360 7&89 / Oracle
BC36! 7&89 / 8n'ormi*
BC36 7&89 / "A# DB
BC350 8B- A"400
BC3;0 8B- /3;0
..BC350 2or0place 6combined )ith -<30!:
BC350.. 3 days
CC +or,#lace
BC555 2 days
*iveCac!e Administration
BC55 3 days
-ata.ase Administration
-/2/400
-<30! days
+or,#lace
=C> SAP AG BC505 :
2
SAP AG 1999
http=//sapnet.sap.com/+ech&et
"A#>s /no)ledge +rans'er -odel
/no)ledge
#rod(cts
+echnical
Certi'ications
http=//sapnet.sap.com/pa
,*pert /no)ledge
Boo0 "eries
http=//sapnet.sap.com/Boo0s SAPAG1999 (i lename3 a4t!or5 / 2
-ata.ase Admi nistration
SAP-/
BC5!5 2 days
Core Competence ,*pert Competence
BC305 3 days
Advanced R/3
System Administration
.ec!ni cal Cor e Com#etence 6ersi ons
/C310 +indo)s 7 / $racle
/C314 +indo)s 7 %SS2* Server
/C318 3+indo)s 7/ 07"95 / -/2
/C360 07"9 / $racle
/C362 07"9 / SAP -/
-BC30 2 days
R/3-ec!nical
"m#lementati on an d
$#erati on %ana&ement
ec!nical Core
Com#etence
BCtcc. ' days
Corr esponding R/ 3Basis
/no)ledge #rod(ct
BC505 3 days
-ata.ase Admi nistration
$RAC*:
BC35 3 days
So( t)a re *o&istics
BC50 3 days
-ata.ase Admi nistration
%S S2* Server
"A# Basis Administration +raining 4.6
BC535 3 days
-ata.ase Admi nistration
-/2 0-/
SAPAG ;%mySAP.com(or ec!n. "m#l.< " Cons.<Sys. " nte&ration0= / 8
+echnical Opt imi ?ation
o' #ricing
,2A!0 3S-5 2 days
+echnical Opt imi ?ation
o' D(e 4i st #rocessing
incl(ding "ched(ling
,2A!! 3S-5 2 days
+echnical Opt imi ?ation
o' BatchDetermination
,2A!3 3S-5 2 days
+echnical Opt imi ?ation
o' Credit -anagement
,2A!4 3S-5 2 days
+echnical Opt imi ?ation
o' +e*t Determinati on
,2A!5 3S-5 1 day
+echnical Opt imi ?ation
o' #rod(ct "election
,2A!6 3S-5 1 day
+echnical Opt imi ?ation
o' #artner Determinat ion
,2A!5 3S-5 1 day
+echnical Optimi?ation
o' Bac0'l(shi ng o'
#rod(ction Orders
,2A! 3 PP5 2 days
+echnical Optimi?ation
o' the A%ailabili ty Chec0
,2C!0 3 S-/PP5 2 days
+echnical Optimi?ation
o' -R#R(n and
4ong+erm #lanning
,2A0 3 PP5 2 days
+echni cal Optimi ?ation
o' #ro' itabilit yAnalysis
,2A!@ 3C$5 2 days
+echni cal Optimi ?ation
o' Calc(lat ion o'
#rod(cti on Orders
,2C!3 3PP/ C$5 2 days
+echnical Optimi?ation
"hipping and
2areho(se-anagement
,2C!6 3S-5 2 days
,mpo)ering 2or0shops A Application and Cross
Application
8B7speci'ic
and $lobal
2or0shops
+echnical Optimi ?ation
o' Con'ig(ration
o' 1ariant s
,2C!! 3S-/PP5 2 days
,mpo)ering 2or0shops
+echnical +raining and
2or0shops
http=//sapnet.sap.com/,d(cation"er%ices
http=//sapnet.sap.com/Basis/n#rod
"A# $oing4i%e Chec0 http=//sapnet.sap.com/$oing4i%eChec0
"A# ,arly2atch "er%ice http=//sapnet.sap.com/,arly2atch
"A# ,arly2atchAlert http=//sapnet.sap.com/,2A
"A# Cons(lting "er%ices http=//sapnet.sap.com/Cons(lting"er%ices
+eam"A# "(pport http=//sapnet.sap.com/+eam"A#s(pport
=C> SAP AG BC505 :
3
SAP AG 1999
Co(rse O%er%ie)
=C> SAP AG BC505 :
3.2
SAP AG 1999
Co(rse #rereB(isites A +arget $ro(p A D(ration
#rereB(isites=
"A#050 basis technology
+echnical core competence BC3!0 or BC360 6depending on
the operating system (sed:
#ro'o(nd 0no)ledge o' the operating system and the Oracle
database
+arget gro(p=
#roCect teams
"ystem administrators
Database administrators
D(ration=
+hree days
=C> SAP AG BC505 -
3.3
SAP AG 1999
+his co(rse )ill enable yo( to=
De'ineD per'ormD and monitor an appropriate database
bac0(p strategy
-onitor and administrate yo(r R/3 Oracle system
by (sing the=
R/3 database monitors
Database administration tools o''ered by "A#
8denti'y per'ormance problems by monitoring the R/3
"ystem
Co(rse $oals
=C> SAP AG BC505 4
3.4
SAP AG 1999
0nit 6 Ad%anced Bac0(p
+echniB(es
0nit 8 "torage
-anagement
0nit > #er'ormance
-onitoring
0nit 9 +op !0 #roblems
0nit 1 Database O%er%ie)
0nit 2 Bac0(p "trategy and
+ape -anagement
0nit 3 "ched(lingD #er'orming
and -onitoring Bac0(ps
0nit 4 Restore and Reco%ery
0nit ' Bac0(p "trategies
7sing R-A&
Co(rse O%er%ie)
Concl(sion
Co(rse Content
=C> SAP AG BC505 6
4
SAP AG 1999
Database O%er%ie)
! Database O%er%ie) 6 Ad%anced Bac0(p +echniB(es
Bac0(p "trategy and
+ape -anagement
5 "torage -anagement
3 "ched(lingD #er'ormingD
and -onitoring Bac0(ps
@ #er'ormance -onitoring
4 Restore and Reco%ery ; +op !0 #roblems
5 Bac0(p "trategies
7sing R-A&
=C> SAP AG BC505 :
4.2
SAP AG 1999
Database O%er%ie)
Contents
Database components
Oracle #rocess architect(re
&et@ Basics
Database administration tools
ObCecti%es
At t!e end o( t!is 4nit< yo4 )ill .e a.le to?
Describe the di''erent Oracle processes and their '(nctions
,*plain the role o' &et@
&ame the important database administration tas0s
'his course is desi,ned to be operatin, system p0atform8independent. #f you are usin, "indows $'!
you must substitute certain terms and notations.
&rac0e on the "indows $' operation system uses the "indows $' imp0ementation of threads.
"indows $' threads are comparab0e to processes in a 9$#) environment. #n most cases! you can
substitute the 9$#) term process by the $' term thread. ;owever! a00 &rac0e processes =e1cept
the &rac0e 0istener> form one &rac0e process in the "indows $' environment. 'his process is
started as a service ca00ed &rac0eService?S#%@. 'o enab0e network communication! the &rac0e
0istener process in the $' imp0ementation of the &rac0e database is started as a service ca00ed
&rac0e'$S*istener.
'he directory separator si,n used here is the A.B si,n. 7or "indows $'! the ACB si,n is used.
'he current va0ue of a 9$#) environment variab0e is obtained usin, D2A3#AB*(E$AM(. 7or
"indows $'! the synta1 F2A3#AB*(E$AM(F is used to obtain the va0ue of a variab0e.
7or &rac0e on 9$#)! the namin, convention for the 0istener contro00er pro,ram is 0snrct0. 7or
&rac0e on $'! the namin, convention depends on the re0easeG
&rac0e H.0G 0snrct0H0
&rac0e H.: and aboveG 0snrct0
"hen you have comp0eted this trainin, unit you wi00 have refreshed your know0ed,e about the
architecture of the &rac0e database.
=C> SAP AG BC505 -
4.3
SAP AG 1999
#rocesses
-emory area
Database 'iles
2# Reconnect=
rsdb/recoEtrials F 3
rsdb/recoEsleepEtime F 5
RDB-"
Control
'iles
Data 'iles
Online redo
log 'iles
O''line redo
log 'iles
#ro'ile
"$A "$A Database b(''er pool Database b(''er pool
"hared pool "hared pool
Redo log b(''er Redo log b(''er
"hared "34 Area
Con'ig(rable
6initG"8DH.ora:
Ro) cache
"hared processes
A
R
C
I
A
R
C
I
C
/
#
+
C
/
#
+
4
$
2
R
4
$
2
R
D
B
2
R
D
B
2
R
#
-
O
&
#
-
O
&
"
-
O
&
"
-
O
&
Oracle listener process Oracle listener process
R/3 )or0
processes
"
h
a
d
o
)
"
h
a
d
o
)
"
h
a
d
o
)
"
h
a
d
o
)
"
h
a
d
o
)
"
h
a
d
o
)
!=!
Re%ie)= Oracle O%er%ie)
"hen an &rac0e database instance is started! severa0 processes are created. 'he ,roups of processes
are distin,uished as fo00owsG
Dedicated shadow processes are created when a new user session on the database is estab0ished
Shared processes perform the various tasks that are reIuired for the database mana,ement system
to function
%atabase data is stored in H JB b0ocks in data fi0es on disk. 'o acce0erate read and write access to
data! these data b0ocks are cached in the database buffer pool in main memory.
Modifications to database data are 0o,,ed in the on0ine redo 0o, fi0es. 'his procedure ensures data
security. 'o ensure fai08safe database operation! without usin, additiona0 operatin, system uti0ities!
the contro0 fi0es and the on0ine redo 0o, fi0es of the database system shou0d be mirrored.
'he &rac0e database mana,ement system ho0ds the e1ecutab0e S+* statements in the Shared S+*
Area! which is part of the shared poo0.
(ach 3.4 work processG
Connects to the database as one database user! SAPR3
;and0es database reIuests for the different 3.4 System users
Communicates with a correspondin, shadow process on the database
Can reconnect to the database
=C> SAP AG BC505 4
4.4
SAP AG 1999
R/3 in a 2indo)s &+ ,n%ironment
O" 7ser O" $ro(p Database 7ser Database #ri%ileges
@S"-Aadm $RAB@S"-AB-/A "7:R7A* 3SCS5< D4ll data.ase administration
$PSE@S"-Aadm
SAPService@S"-A $RAB@S"-AB$P:R $PSESAPService@S"-A Restricted data.ase administration
R/3 in a 2indo)s &+ ,n%ironment
O" 7ser O" $ro(p Database 7ser Database #ri%ileges
@S"-Aadm $RAB@S"-AB-/A "7:R7A* 3SCS5< D4ll data.ase administration
$PSE@S"-Aadm
SAPService@S"-A $RAB@S"-AB$P:R $PSESAPService@S"-A Restricted data.ase administration
R/3 in a 7&89 ,n%ironment
O" 7ser O" $ro(p Database 7ser Database #ri%ileges
ora@S"-A d.a< o#er "7:R7A* 3SCS5 D4ll data.ase administration
@S"-Aadm o#er $PSE@S"-Aadm Restricted data.ase administration
R/3 in a 7&89 ,n%ironment
O" 7ser O" $ro(p Database 7ser Database #ri%ileges
ora@S"-A d.a< o#er "7:R7A* 3SCS5 D4ll data.ase administration
@S"-Aadm o#er $PSE@S"-Aadm Restricted data.ase administration
#ro'ile initG"8DH.ora
O"EA7+I,&+E#R,J89FO#"K
#ri%ileges reB(ired 'or "A#DBA
bac0gro(nd actions s(ch as bac0(pD
chec0D Achec0optD
Aanaly?eD Ane*t
Restricted data.ase administration
Access to ta.les reF4ired (or R/3
data.ase administration
#ri%ileges reB(ired 'or "A#DBA
bac0gro(nd actions s(ch as bac0(pD
chec0D Achec0optD
Aanaly?eD Ane*t
Restricted data.ase administration
Access to ta.les reF4ired (or R/3
data.ase administration
"ec(rity= Operating "ystem and Database 7sers
'o ensure the security of your 3.4 System! you must consider the security of the operatin, system
and database users. &peratin, system users have certain privi0e,es for accessin, fi0es and e1ecutin,
pro,rams. %atabase users have different privi0e,es for chan,in, tab0es and inde1es.
&rac0e mechanisms move the entire database security mechanism to the operatin, system 0eve0. #f
the user &PSD?user_name@ is defined as identified externally at the database 0eve0! the operatin,
system user ?user_name@ can connect to the database without authentication.
'he fo00owin, &S and database users are avai0ab0e for &rac0e administration in an 3.4 SystemG
9$#)G ora<SID> =no &PSD user>! <SID>adm! and PS!<SID>adm
"indows $'G ?S#%@adm! PS!<SID>adm and SAPSer"ice<SID># PS!SAPSer"ice<SID>
'he fo00owin, &S ,roups are important in an &rac0e database environment =see a0so Appendi1>G
dba =$'G &3AE?S#%@E%BA>G &S users of this ,roup can connect to &rac0e usin, C&$$(C'
#$'(3$A* with fu00 database administration privi0e,es
oper =$'G &3AE?S#%@E&P(3>G &S users of this ,roup can connect to &rac0e usin, C&$$(C'
#$'(3$A* with restricted database privi0e,es! such as startup or shutdown database
'he database administration too0 SAP%BA reIuires the restricted database administration privi0e,es
avai0ab0e in the ,roup oper. SAP%BA on0y has access to the tab0es reIuired for performin, 3.4
database administration in the back,round. 'hese privi0e,es are assi,ned durin, 3.4 insta00ation or
up,rade.
=C> SAP AG BC505 6
4.5
SAP AG 1999
Oracle Oracle
R/3 )or0
process
R/3 application ser%er
Database ser%er
+able
"A#7",R
O $et pass)ord 'or
(ser "A#R3 'rom
table "A#7",R
ODisconnect (ser O#"K
OConnect as (ser "A#R3
O#"K (ser=
7&89= O#"KG"8DHadm
&+= O#"K"A#"er%iceG"8DH
initG"8DH.ora parameter
R,-O+,EO"EA7+I,&+ F +R7,
OConnect as (ser O#"K
"ec(rity= "A#R3 #ass)ord
'he fo00owin, mechanism is used by an 3.4 work process to connect to the database as user SAP34G
A connection to the database is made as user PS! =9$#)G PS!<SID>adm! $'G
PS!SAPSer"ice<SID>> with very few privi0e,es.
9ser &PSD is the owner of tab0e SAP9S(3. 7rom this tab0e! the password for user SAPR3 is
retrieved and the database session for user PS! is terminated.
'he work process now connects as user SAPR3 with the password from tab0e SAP9S(3.
'o a00ow 3.4 work processes to connect over the network usin, the &PSD mechanism! the
init<SID>$ora parameter 3(M&'(E&SEA9';($' must be set to '39(. 'his a00ows remote &S
authentication for &S users with an &PSD user on any computer in the network in which the database
is accessib0e.
'o chan,e the password of user SAPR3! perform the fo00owin,G
7or 9$#)G 9se pro,ram SAP%BA to perform the reIuired actions
7or $'G Connect to &rac0e as user PS!SAPSer"ice<SID># andG
Chan,e the password entry for user SAPR3 in tab0e SAP9S(3
Chan,e the password of user SAPR3
As of version 6.5B! user SAP34 is stored with an encrypted password in tab0e SAP9S(3.
=C> SAP AG BC505 5
4.6
SAP AG 1999
&et@ &et@
+C#/8# +C#/8#
R/3 )or0
process
R/3 )or0
process
R/3 )or0
process
R/3 application ser%er
"hado) "hado)
tnsnames.ora
sBlnet.ora
"hado) "hado)
"hado) "hado)
"hado) "hado)
R/3 )or0
process
&et@ &et@
8#C 8#C
tnsnames.ora
sBlnet.ora
listener.ora
Database ser%er
Oracle Oracle
4istener 4istener
&,+@ Basics
#f an 3.4 instance is runnin, on a server other than the database server! 3.4 work processes and their
dedicated shadow processes communicate over a network. As communication protoco0! 'CP.#P is
used. 'he work processes of an 3.4 instance confi,ured on the database server use the #PC protoco0
to communicate with dedicated shadow processes runnin, on the same server.
7or $etH to accept connections on the database server! the 0istener must be runnin,. 'he &rac0e
uti0ity lsnrctl is used to start and stop the 0istener and to check the status of $etH connections. #n a
9$#) environment! the process tnslsnr is started. &n $'! the service K&rac0e'$S*istenerK is
started.
'hree operatin, system fi0es are used in a $('H confi,uration. Lou can find these fi0es in the
&3AC*(E;&M( subdirectory network.admin =$'G netH0Cadmin> on each app0ication server and on
the database serverG
tnsnames$oraG Contains a 0ist of service names for a00 databases that can be accessed in the
network
s%lnet$oraG Contains c0ient side defau0t domain information and optiona0 dia,nostic parameters
used for c0ient tracin, and 0o,,in,
listener$ora G&n0y used on a database server machine. Contains &rac0e system #%s for which the
0istener can receive connections! and various contro0 parameters used by pro,ram lsnrctl
'he defau0t 3.4 System profi0e shou0d contain the entry dbs.ora.tnsname M ?S#%@
=C> SAP AG BC505 /
4.7
SAP AG 1999
Bank Bank
Database Administration +ools
4i%e
R/3 "ystem
"A#D
B
A
T.D.
+o 'i* the problemD
(se the monitoring
tools and database
administration tools
pro%ided by "A#
"+04
DB0
DB4
RL0
"A#DBA
Poor performance
'o improve performance and to minimiNe system downtime! you must monitor the &rac0e database
dai0y. 'he Computin, Center Mana,ement System provides the fo00owin, monitorsG
'he %atabase Performance Monitor =transaction S&'(> disp0ays an overview of the 0oad and
confi,uration of the database mana,ement system and the database.
'he 'ab0es and #nde1es Monitor =transaction D)'*> disp0ays an overview of the stora,e behavior
of the database and the status of the database obOects.
'he %BA &perations Monitor =transaction D)*(> provides you with a centra0 point from which
you can check the status and 0o,s of a00 database operations! inc0udin, backup monitorin,! updates
of the optimiNer statistics! and dba checks.
'he %atabase A0ert Monitor =can be started from transaction R+*'> is a too0 you can use to
monitor a00 the preset a0erts for different areas of the database.
=C> SAP AG BC505 P
4.
SAP AG 1999
Database #er'ormance -onitoring 6"+04:
"hared
"34
B(ality
"hared
"34
B(ality
Oracle
data
b(''er
B(ality
Oracle
data
b(''er
B(ality
7ser
calls
statistics
7ser
calls
statistics
Reset "ince reset "ince DB start Detail analysis men( #re%io(s days "(mmary
Data buffer
Shared Pool
Calls
Log buffer
Database QAS Database summary Day, Time 08/19/1999 1!"#$%
D& Ser'er T(D)*+0% Start u, at 08/19/1999 1!"9$%-
.elease 8!0!"!1!1 /la,sed si01e start 2s3 8,-8%
Si4e 5b
Quality 6
Si4e 5b
reloads/,i0s 6
DD7Ca1he 8uality 6
,i0ratio 6
SQL Area getratio 6
9ser 1alls
1ommits
rollba15s
10:,%-%
Redo log
b(''er
B(ality
Redo log
b(''er
B(ality
1%",9-0
%!8
90
9%
0!0%
99!:
-:,#%
:,0#-
1#1
Si4e 5b
/0tries
Allo1atio0 retries
Allo1 fault rate 6
.edo log ;ait s
Log files 2i0 use3
.e1ursi'e 1alls
Parses
9ser/.e1ursi'e 1alls
.eads/9ser 1alls
.eads
Physi1al reads
;rites
&uffer busy ;aits
&uffer ;ait time s
:,-0%,81
-%,-9
10,%1
1
1
:-8
#1,99
1
0!0
0
8 23
7rom the 3.4 main screen! choose &ools Administration ,onitor Performance
Database Acti"ity =or use transaction S&'(-$
'he main screen of the SAP.&rac0e %atabase Monitor shows the most important indicators of &rac0e
database performance! such as data buffer! shared poo0 buffer! user ca00s! and tab0e scans.tab0e fetch.
'he Detail analysis menu takes you to the detai0ed 0eve0 of performance re0ated ana0ysis. ;ere! you
can ana0yNe database activity from the point of view of! for e1amp0e! &rac0e sessions! fi0e system
reIuests! and S+* reIuests to the database.
Lou can a0so view the &rac0e a0ert fi0e! monitor any chan,es to the parameter fi0e for &rac0e! and
monitor database 0ock8waits.
'he monitor takes a snapshot of the system at a free0y se0ectab0e reference point =usua00y at database
start>. Lou can use the fo00owin, to chan,e this reference pointG
Reset sets the reference point to the current point in time
Since D) start sets the reference point to the time of the database start
Since reset sets the reference point back to the 0ast reset point
=C> SAP AG BC505 H
4.!
SAP AG 1999
Database "pace -onitoring 6DB0:
O%erall
chec0 'or
the
database
O%erall
chec0 'or
the
database
Chec0 at
tablespace
le%el
Chec0 at
tablespace
le%el
Chec0
at obCect
le%el
Chec0
at obCect
le%el
+ables and 8nde*es
+ablespaces
Database system
Total number
Total size/kb
More than 1 extent
Missing in database
Missing in R/3 DDIC
Spacecritical ob!ects
Tables Indexes Detailed analysis
-issing inde*es
"pace critical obCects
"pace statistics
"pace statistics
C(rrent si?es
Jreespace statistics
Total number
Total size/kb
Total "ree/kb
Minimum "ree/kb
Max# autoextensible/kb
Database
$ame
Date/time o" this anal%sis
Re'resh Chec0s "pace statistics
19,-99
#,0-,0%
1,:"1
0
0
0
--,%%9
:,#8:,00
1,8"1
0
0
0
-#
18,090,8%8
#,08:,09
%,0%0
Auto/<te0d off
:96
=.ACL/
QAS
08/1-/1999 1:$%-$0"
7rom the 3.4 main screen! choose &ools Administration ,onitor Performance Database
&ables . Indexes. A0ternative0y! use transaction D)'*$
#n the section Database system chec/! you can refresh the statistics! 0ook at the database history
=Space Statistics>! or check the stora,e parameters for tab0espace and tab0es.inde1es. Lou can a0so
check for the optimiNer statistic runs.
#n the &ablespaces section! options are avai0ab0e for ana0yNin, tab0espaces. Lou can view a comp0ete
0ist of tab0espaces with detai0s of! for e1amp0e! siNe! freespace! used space! number of obOects! and
number of e1tents. Lou can trace the ,rowth of a tab0espace over a particu0ar time period! and track
chan,es to siNe! e1tents! and so on.
'he &ables and indexes section disp0ays the obOects in this tab0espace. 'he siNes of the obOects =in
ki0obytes and b0ocks> are disp0ayed! and the number of used e1tents and the va0ue defined for the
obOect for MA)()'($'S are a0so disp0ayed. #n this section! you can monitor inde1es that are
defined in the ABAP %ictionary but are missin, in the database =missin, inde1es> or inde1es that are
created in the database but are unknown to the ABAP %ictionary.
=C> SAP AG BC505 5
4.10
SAP AG 1999
DBA Operations -onitor 6DB4:
O%er%ie) o' allD
r(nning and
'inished operations
on database
O%er%ie) o' allD
r(nning and
'inished operations
on database
Clic0 to display
errors only
Clic0 to display
errors only
Clic0 to display
all operations
Clic0 to display
all operations
Clic0 to display
)arning only
Clic0 to display
)arning only
Displays speci'ic
database operations
chosen by the
corresponding p(sh
b(tton on the toolbar
Displays speci'ic
database operations
chosen by the
corresponding p(sh
b(tton on the toolbar
All R(nning Jinished
+otal
2arning
,rror
O%er%ie)
Bac0(p/reco%ery #er'ormance -emory str(ct(re Chec0 sessions Con'ig(ration All database operations
"et(p
"tat(s +ime Date J8D ObCect R(ntime #rogram Description
Re'resh e%ery
Delete a'ter
1ie)= the last
!0 seconds
!!! days
!0 days
O/ O/ O/
2arning 2arning
,rror ,rror
+otal +otal
C&M'()T)D
C&M'()T)D
C&M'()T)D
C&M'()T)D
C&M'()T)D
C&M'()T)D
C&M'()T)D
C&M'()T)D
C&M'()T)D
C&M'()T)D
C&M'()T)D
*+#,-#1. ###
*+#,-#1. ###
*+#,-#1. ###
**#,-#1. ###
**#,-#1. ###
*1#,-#1. ###
*,#,-#1. ###
*,#,-#1. ###
1/#,-#1. ###
1/#,-#1. ###
1/#,-#1. ###
*30,-0 ###
110*+0 ###
110,10 ###
1,0320 ###
,*0,10 ###
,*0,10 ###
130,.0 ###
1,0*,0 ###
1.0**0 ###
1203,0 ###
1+0+,0 ###
an"
an"
s3d
s3d
s3d
s3d
s3d
s3d
s3d
al%
opt
database
database
database log
database log
database log
database log
database log
database log
database log
D4ST5TC&
'S5'6
,10+.0+1
,,0,.03+
,,01+0,/
,,01/0++
,,0,*0,*
,,01,0*+
,*01+0+1
,,0,-0,+
,,0130,1
,,0,10+1
,,0,20,,
4R45C78'
4R45C78'
4R5RC9I:)
4R5RC9I:)
4R5RC9I:)
4R5RC9I:)
4R5RC9I:)
4R5RC9I:)
4R5RC9I:)
S5'D45
S5'D45
;hole o0li0e database ba15u, usi0g ba15i0t
;hole o0li0e database ba15u, usi0g ba15i0t
first ba15u, a0d deletio0 of ar1hi'elogs
first ba15u, a0d deletio0 of ar1hi'elogs
first ba15u, a0d deletio0 of ar1hi'elogs
first ba15u, a0d deletio0 of ar1hi'elogs
first ba15u, a0d deletio0 of ar1hi'elogs
first ba15u, a0d deletio0 of ar1hi'elogs
first ba15u, a0d deletio0 of ar1hi'elogs
1he15 0eed of 0e; db7o,timi4er7statisti1s
1reate / refresh db7o,timi4er statisti1s
@
3
0
!!
0
0
0
0
3
@
0
!!
Do(bleAclic0 here
to see more details
9se the %BA operations monitor for on0ine monitorin, of database operations. Lou can a0so monitor
the runtime and the remainin, time of operations that are runnin,. 'he %BA operations monitor
provides historica0 as we00 as current =on0ine> information about the fo00owin, database operationsG
Backup.recovery =for e1amp0e! backin, up or recoverin, the database>
Performance =for e1amp0e! checkin,! creatin,! updatin, and de0etin, database statistics>
'he memory structure =for e1amp0e! space information for database obOects! reor,aniNin, database
obOects! or e1tendin, and de0etin, database obOects>.
%atabase checks =for e1amp0e! checkin, the database for critica0 situations>
Confi,uration =for e1amp0e! confi,urin, database parameters>
'o ca00 the %BA operations monitor! choose &ools 00,S D) administration perations
monitor. A0ternative0y! use transaction D)*(.
'o disp0ay specific database operations =for e1amp0e! backup.recovery operations>! choose the
correspondin, button.
'o automatica00y refresh the disp0ay of database operations! choose Setup Auto1refresh
Acti"ate. 'o set the time interva0 for the refresh! choose Setup Auto1refresh &ime Inter"al.
7or detai0s about operations =for e1amp0e! the remainin, time for the operation! or the directory and
name of the 0o, fi0e>! doub0e8c0ick the tab0e entry! or se0ect the tab0e entry and choose Display details
on the app0ication too0bar.
=C> SAP AG BC505 :0
4.11
SAP AG 1999
DBA Alert -onitor 6RL0:
<o( can monitor =
+ablespaces
#er'ormance
Bac0(ps
Database connections
"34 statements
R/3 "ystem log
Database host operating
system
#reAde'ined
template 'or
Oracle database
monitor in RL0
space mana&ement
performance
backup/restore
R/3 consistency
health
SAP CCMS Monitor Templates (Database . . .
Database
Oracle
>ie;$ Curre0t system status 208/1-/1999 , 1%$%$%8
tablespaces
segments
optimizer
buffers
checkpoints
archiving
backup status
objects missing in the database
unknown objects in ABAP Dictionary
inconsistent objects
other checks
optional indees
running jobs
database files
/<,ert a0alysis , ?ode dis,lay off
=,e0 alerts Pro,erties
'he a0ert monitor in CCMS a00ows you to centra00y monitor different parts of the &rac0e database.
Lou can confi,ure ana0ysis and data co00ection too0s for different types of a0erts. 9se the fo00owin,
menu pathG &ools 00,S 0ontrol.,onitorin2 Alert monitor. A0ternative0y! use transaction
R+*'. Lou can find the %atabase monitor under SAP 00,S ,onitor &emplates.
Lou can monitor! for e1amp0e! the freespace 0eft in the tab0espace! tab0e.inde1es with too few
a00ocab0e e1tents! se,ments approachin, MA)()'($'! and the fai0ure of ro00back se,ment
e1tensions.
Lou can monitor the performance of the database system by 0ookin, at a0erts for the optimiNer! the
&rac0e buffer.cache area! and buffer ,ets of S+* statements.
Lou can monitor the backup status and the status of the .orac0e.?S#%@.saparch directory.
=C> SAP AG BC505 ::
4.12
SAP AG 1999
"A#DBA 6O" 4e%el:
h - Backup database
i - Backup offline redo logs
j - Restore/Recovery
k - DB check/verification
l - Show/Cleanup
m - ser and Security
n - S!" #nline $elp
4og in'o
and more
1ersion
n(mber
Call
BRARCI81,
S!"DB! %&'(C - S!" Database !dministration
#R!C)* version+ ,'-'.'/'-
#R!C)*0S1D+ 2CC
#R!C)*0$#3*+ /oracle/2CC
D!2!B!S*+ open
S!"R4+ &(B5 6. times connected
Database
state
Call
BRBAC/7#
a - Startup/Shutdown instance
b - 1nstance information
c - 2ablespace administration
d - Reorgani7ation
e - *8port/import
f - !rchive mode
g - !dditional functions
9 - :uit
"lease select ;;< I
"tart or stop
database
"tart I+-4 help
#er'orm
reco%ery
Reorgani?e
table or
data 'ile
Add space
'o start SAP%BA! run command sapdba at command 0ine. SAP%BA inc0udes the fo00owin,
components for administratin, the &rac0e databaseG
%atabase backup! restore and recovery
Space mana,ement
%atabase system check
%atabase reor,aniNation
Cost8based optimiNation of access
Lou can ca00 up the SAP%BA functions from an ASC## interface! or you can use a command option
to confi,ure and e1ecute the functions individua00y. 'he administration too0 SAP%BA for &rac0e and
its backup too0s B3BACJ9P! B3A3C;#2( and B33(S'&3( support the database administrator
both in dai0y routine tasks and in 0ess freIuent! more comp0e1 tasks! such as recoverin, or
reor,aniNin, the database.
Lou can use the SAP%BA functions from the CCMS! since it meets the 3.4 SystemQs app0ication8
specific reIuirements. SAP%BA is de0ivered as standard with the 3.4 System.
#f you ca00 SAP%BA with any command options! the SAP%BA initia0 menu does not appear. #nstead!
you can perform operations that do not reIuire interaction with the end user.
'o enab0e SAP%BA to function proper0y! you must confi,ure init<SID>$dba fi0e.
Make sure you have the 0atest patch insta00ed for SAP%BA. 'o check SAP%BAQs patch mana,ement
concept! refer to SAP $otes :-/P/5 and :6:555.
=C> SAP AG BC505 :-
4.13
SAP AG 1999
7nit "(mmary
&o) yo( are able to=
,*plain the basic concepts o' the Oracle database
Address sec(rity iss(es
,*plain Oracle comm(nication o%er a net)or0 6&,+@:
7nderstand )hich tool to (se 'or each part o' the Oracle
database
'he &rac0e database system can be operated on0y when it is confi,ured correct0y. 'o make
confi,uration chan,es! you need a basic know0ed,e of its components.
'he connection process and database administration are the two ,reatest security risks. Lou need to
know how to address these risks.
#n the 3.4 System environment! each individua0 database component is created fo00owin, the
standard namin, convention. 'hese conventions simp0ify database administration! because they are
automatica00y used by the various 3.4 database administration too0s.
$('H is used to communicate with the &rac0e database over the network. 'o ensure that network
communication functions proper0y! you need to know the basic confi,uration fi0es and their contents.
=C> SAP AG BC505 :4
4.14
SAP AG 1999
Additional Co(rse "lides
Contents=
Appendi*
=C> SAP AG BC505 :6
4.15
SAP AG 1999
Oracle processes Oracle processes= =
Data 'iles
#ro'ile
Online redo log 'iles
O''line redo log 'iles
Database b(''er pool
Redo log b(''er
A
R
C
I
A
R
C
I
C
/
#
+
C
/
#
+
4
$
2
R
4
$
2
R
D
B
2
R
D
B
2
R
&omo(nt
-o(nt
Open
Control 'iles
"hared pool
#
-
O
&
#
-
O
&
"
-
O
&
"
-
O
&
Oracle listener process Oracle listener process
"$A
Appendi*= "tarting and "topping the Database
"hen an &rac0e database is started! it ,oes throu,h 4 phasesG
#n the 3o mount phase! the database instance is bui0t up. &peratin, system resources are a00ocated
usin, confi,uration information stored in the profi0e init?S#%@.ora.
#n the ,ount phase! the contro0 fi0es of the database are eva0uated. 'he system reads the
information about the fi0e structure of the database. %ata fi0es and 0o,s are not yet opened.
#n the pen phase! a00 fi0es in the database system are opened. #f reIuired! an instance recovery is
performed immediate0y after openin, the database. Pendin, database transactions are ended.
Lou can shut down the database usin, one of three commandsG
S;9'%&"$ $&3MA*G $o new database 0o,on possib0e. After a00 database user have 0o,,ed
off! the database is c0osed systematica00yG a00 fi0es are c0osed! the database is dismounted! and the
instance is shut down. 'he database is consistent after shutdown.
S;9'%&"$ #MM(%#A'(G &n0y the current commands are e1ecuted. PM&$ ends a00 sessions
and performs a ro00back of the open transactions. 'he database is then c0osed systematica00y =as for
a norma0 shutdown>. 'he database is consistent after shutdown.
CautionG %B"3 and A3C; may reIuire up to : hour post8processin, time.
S;9'%&"$ AB&3'G (mer,ency database shutdown. 9sers are not 0o,,ed off! and a ro00back
of the open transactions is not performed. 'he database is not consistent after shutdown. An
instance recovery is automatica00y performed at the ne1t database startup.
=C> SAP AG BC505 :5
4.16
SAP AG 1999
Data 'iles
#ro'ile
Database b(''er pool
Redo log b(''er
ARCI ARCI
4$2R 4$2R
#rocesses #rocesses and and memory memory
#ro'ile initG"8DH.ora
lo"#arc$i%e#start & T'()
lo"#arc$i%e#dest & *+sa,arc$+
C/#+ C/#+
Control 'iles
Online redo log 'iles
O''line redo log 'iles
A'C-./)0O1 2OD): T'()
DB2R DB2R
Appendi*= 2riting Data and 4og Jiles
An &rac0e database system has three processes that write information from the Shared G0oba0 Area
=SGA> to the appropriate fi0esG
%urin, a checkpoint! the database writer =%B"3> asynchronous0y writes the chan,ed b0ocks from
the SGA to the database data fi0es
'o speed up the writin, of checkpoints! the checkpoint process =CJP'> is started
'he 0o,writer =*G"3> synchronous0y writes the chan,e 0o, from the SGA redo 0o, buffer to the
current0y active on0ine redo 0o, fi0e
#n a production database system! the database must a0ways run in A3C;#2(*&G mode and have
the archiver process =A3C;> started =init?S#%@.oraG 0o,EarchiveEstart M '39(>. A3C; archives a
comp0eted on0ine redo 0o, fi0e into an off0ine redo 0o, fi0e in the archive directory.
A3C; determines the archive directory from the init<SID>$ora parameter lo2_archi"e_dest
=defau0tG 4.saparch.- and determines the fi0e name from the parameter lo2_archi"e_format.
&nce the off0ine redo 0o, fi0e has been successfu00y created! the correspondin, on0ine redo 0o, fi0e is
re0eased to be overwritten with new 0o, information.
#f no freespace is avai0ab0e in the archive directory! the archiver does not archive the fi0e. After a
correspondin, number of redo 0o, switches! the database becomes KstuckK. %atabase chan,es cannot
be committed as 0on, as this archiver stuck situation persists.
=C> SAP AG BC505 :/
4.17
SAP AG 1999
Appendi*= "torage -anagement Concepts
,*tent
Data Bloc0
"egment
6+able/8nde*:
@/
00/ !50/
350/
Data 'ile
+ablespace
A database is divided into 0o,ica0 stora,e units ca00ed tab0espaces. 'ab0espaces are divided into
0o,ica0 units of stora,e ca00ed se,ments =tab0es.inde1es>. Se,ments are further divided into e1tents!
which consist of conti,uous data b0ocks. A data b0ock =norma00y HJ> is the sma00est unit of #.& used
by a database.
A tab0espace in an &rac0e database consists of one or more physica0 data fi0es. A data fi0e can be
associated with on0y one tab0espace. Lou can increase a tab0espace in two waysG
Add a data fi0e to a tab0espace. "hen you add another data fi0e to an e1istin, tab0espace! you
increase the amount of disk space a00ocated for the correspondin, tab0espace.
#ncrease the siNe of a data fi0e.
Stora,e parameters such as #$#'#A* ()'($'! $()' ()'($' and MA) ()'($' a00ow you to
mana,e space a00ocated to a tab0e.
7or performance reasons! operatin, system b0ock siNe shou0d be the same as &rac0e data b0ock siNe.
=C> SAP AG BC505 :P
4.1
SAP AG 1999
#re'i* Abbre%iation ,*tension
PSAP @SBnameA - 3data5 or " 3inde15 #hysical
layer
G+"EnameH.data!
.ta.d.data1
G+"EnameH.data
.ta.d.data2
4ogical
layer
G+"EnameHE!
.ta.dB1
+ablespace
name
G+"EnameHE
.ta.dB2
#"A#G+"EnameH
PSAP/A/-
Directory
names
Jiles
names
#re'i* +ablespace name ,*t. -eaning 7sed by
SCS:% $racle --"C Oracle RDB-"
PSAP R$** Roll.ac, se&ments Oracle RDB-"
PSAP :%P Sort #rocesses Oracle RDB-"
PSAP :*@ReleaseA - or " -evelo#ment environment loads R/3 Basis
PSAP :S@ReleaseA - or " -evelo#ment environment so4rces R/3 Basis
PSAP *$A- - or " Screen and re#ort loads 3A/AP5 R/3 Basis
PSAP S$0RC: - or " Screen and re#ort so4rces 3A/AP5 R/3 Basis
PSAP --"C - or " A/AP -ictionary R/3 Basis
PSAP PR$ - or " *o&-li,e ta.les 3(or e1am#le< s#ool5 R/3 Applications
PSAP C*0 - or " Cl4ster ta.les R/3 Applications
PSAP P$$* - or " Pool ta.les 3(or e1am#le< AA/5 R/3 Applications
PSAP SA/ - or " %aster data and trans#arent ta.les R/3 Applications
PSAP /A/ - or " ransaction data< trans#arent ta.les R/3 Applications
PSAP -$C0 - or " -oc4mentation< SAPscri#t< SAP(ind R/3 Applications
PSAP 0S:R1 - or " C4stomer ta.les R/3 Applications
Appendi*= R/3 &aming Con%entions
'he &rac0e database uses tab0espaces. 7rom a 0o,ica0 point of view! a tab0espace is a container for
database obOects! such as tab0es and inde1es. &n disk! a tab0espace consists of one or more data fi0es.
Lou can increase the capacity of a tab0espace by addin, fi0es to it.
'he 3.4 namin, convention for tab0espace names is defined as fo00owsG
PSAP?tab0espaceEname@?e1tension@.
'he abbreviations in the tab0espace name are part of the directory name and fi0e name of each data
fi0e. %irectories and data fi0es are numbered.
'he obOects 0ocated in the tab0espaces SLS'(M! PSAP3&**! and PSAP'(MP be0on, either to the
&rac0e database users SLS or SLS'(M. %o not create any obOects owned by other users in these
tab0espaces.
'he obOects 0ocated in the other tab0espaces be0on, to the 3.4 database user SAPR3. 3.4 System
users do not have a database system user.
'he 3.4 System and SAP too0s! such as SAP%BA! reIuire that the namin, conventions be observed.
'he insta00ed system constitutes a 0o,ica0 unit! which you shou0d not chan,e. #n this way! SAP can
ensure that you receive fast and efficient support.
=C> SAP AG BC505 :H
4.1!
SAP AG 1999
Directory Contains Jile name e*amples
dbs "A# and Oracle pro'ilesD initG"8DH.oraD initG"8DH.dbaD initG"8DH.sap
bin Oracle e*ec(tables
saptrace Bac0gro(nd 6Oracle alert 'ile:
(sertrace
sapdata! Data'iles /btabd!/btabd.data!D system.data!D
. ctrlG"8DH.db'D /btabi!/btabi.data!
.
sapdataGnH
sapbac0(p BRBAC/7#D BRR,"+OR, logs
saparch BRARCI81, logsD Oracle archi%e dir ctrlG"8DH.db'
sapchec0 "A#DBA logs 6Ane*tD Achec0D Aanaly?e:
sapreorg "A#DBA logs6de'a(lt:D
de'a(lt compression directory
origlogA Online redo log 'iles logEg!0!m!.db'D logEg!03m!.db'
origlogB Online redo log 'iles logEg!0m!.db'D logEg!04m!.db'
mirrlogA Online redo log 'iles logEg!0!m.db'D logEg!03m.db'
mirrlogB Online redo log 'iles logEg!0m.db'D logEg!04m.db'
. . .
#ro'ile initG"8DH.ora
lo"#arc$i%e#3ormat & 4t#4s
Appendi*= Oracle Directory "tr(ct(re in R/3
%irectory and fi0e names are standardiNed in the 3.4 environment. "e recommend that you use the
fo00owin, standardsG
'ab0espace fi0es reside in the sapdata<n> directories
'he on0ine redo 0o, fi0es reside in the ori2lo2 and mirrlo2 directories
'he off0ine redo 0o, fi0es are written to the saparch directory
'here shou0d be at 0east 4 copies of the &rac0e contro0 fi0e on different disks
'he profi0e init<SID>$ora confi,ures the &rac0e instance! and resides in directory dbs
=$'G database>
'he profi0e init<SID>$sap confi,ures the backup too0s brbac/up and brarchi"e! and resides in
directory dbs =$'G database>
'he profi0e init<SID>$dba confi,ures the SAP%BA too0! and resides in directory dbs
=$'G database>
'he &rac0e a0ert fi0e is written to directory saptrace.bac/2round
'race fi0es of the &rac0e shadow processes are written to the directory saptrace.usertrace
%urin, reor,aniNation! e1port datasets are written to directory sapreor2
'he directories saparch! sapchec/! sapreor2! and sapbac/up are used by the SAP database too0s.
=C> SAP AG BC505 :5
4.20
SAP AG 1999
"er%er site
dbs
6&+=database:
bin
net)or0/admin
6&+= net@0Madmin:
ORAC4,EIO-,
origlogB
mirrlogB
sapdataGnH
sapbac0(p
sapreorg
...
sapdata!
origlogA
mirrlogA
saparch
sapchec0
saptrace
"A#DA+AEIO-,
Client site
ORAC4,EIO-,
net)or0/admin
6&+= net@0Madmin:
7&89 en%ironment %ariables 6client site:
ORAE&4"= KORAC4,EIO-,/ocommon/&4"E53/admin/data
ORAE&4"3= KORAC4,EIO-,/ocommon/&4"E533/admin/data
ORAE&4"33= KORAC4,EIO-,/ocommon/&4"E@05/admin/data
Appendi*= Oracle Directories/,n%ironment 1ariables
'he &rac0e database fi0e tree structure on the database server site has two main branchesG
'he &rac0e binaries are 0ocated in the subdirectory bin of the &3AC*(E;&M( directory. 'he
environment variab0e &3AC*(E;&M( points to this directory. 'he &3AC*(E;&M( directory
is a0so reIuired on each server with a database c0ient
'he environment variab0es SAP%A'AE;&M( and SAP%A'A?n@ point to the directories
containin, database8specific fi0es! such as data fi0es! on0ine redo 0o, fi0es! and off0ine redo 0o, fi0es
'he operatin, system users <SID>adm and ora<SID> =on the database server! not used in an $'
environment> reIuire the fo00owin, environment variab0esG
&3AC*(ES#% M ?S#%@ =on the database server site>
%BSE&3AE'$S$AM(G set to the database identifier ?S#%@ from tnsnames.ora
#n a 9$#) environment! the fo00owin, environment variab0es are set by 3.4 confi,uration too0sG
&3AE$*SG D&3AC*(E;&M(.ocommon.$*SEP-4.admin.data =on each c0ient site>
&3AE$*S4- D&3AC*(E;&M(.ocommon.$*SEP44.admin.data =on each c0ient site>
&3AE$*S44G D&3AC*(E;&M(.ocommon.$*SEH05.admin.data =on each c0ient site>
=C> SAP AG BC505 -0
4.21
SAP AG 1999
Database Role Description
SCS-/A Can #er(orm data.ase administration<
!as #rivile&es to access all data.ase ta.les
SCS$P:R Can #er(orm data.ase administration s4c! as start4#< s!4tdo)n< and .ac,4#<
!as no #rivile&es to access data.ase ta.les
SAP-/A =as #rivile&es to access certain ta.les reF4ired (or data.ase administration
actions #er(ormed in .ac,&ro4nd 3-c!ec,< -c!ec,o#t< -analyGe< -ne1t< .ac,4#5
Database Role Description
SCS-/A Can #er(orm data.ase administration<
!as #rivile&es to access all data.ase ta.les
SCS$P:R Can #er(orm data.ase administration s4c! as start4#< s!4tdo)n< and .ac,4#<
!as no #rivile&es to access data.ase ta.les
SAP-/A =as #rivile&es to access certain ta.les reF4ired (or data.ase administration
actions #er(ormed in .ac,&ro4nd 3-c!ec,< -c!ec,o#t< -analyGe< -ne1t< .ac,4#5
Database 7ser Description
SCS -ata.ase o)ner< can #er(orm data.ase administration<
!as #rivile&es to access all data.ase ta.les
SCS:% Can #er(orm data.ase administration<
!as #rivile&es to access data.ase ta.les in read and )rite mode 3.4t not
$racle --"C ta.les5
SAPR3 $)ner o( data.ase ta.les and inde1es 4sed .y t!e R/3 a##lications<
!as no #rivile&es to #er(orm data.ase administration
Database 7ser Description
SCS -ata.ase o)ner< can #er(orm data.ase administration<
!as #rivile&es to access all data.ase ta.les
SCS:% Can #er(orm data.ase administration<
!as #rivile&es to access data.ase ta.les in read and )rite mode 3.4t not
$racle --"C ta.les5
SAPR3 $)ner o( data.ase ta.les and inde1es 4sed .y t!e R/3 a##lications<
!as no #rivile&es to #er(orm data.ase administration
Connect ReB(est Description
"7:R7A* C$77:C "7:R7A* #ossi.le (or $S 4ser .elon&in& to $S &ro4# -/A
)it! SCS-/A #rivile&es and (or $S 4ser .elon&in& to $S &ro4# $P:R
)it! SCS$P:R #rivile&es
Connect ReB(est Description
"7:R7A* C$77:C "7:R7A* #ossi.le (or $S 4ser .elon&in& to $S &ro4# -/A
)it! SCS-/A #rivile&es and (or $S 4ser .elon&in& to $S &ro4# $P:R
)it! SCS$P:R #rivile&es
Appendi*= Database Roles and 7sers
'he fo00owin, database ro0es are important for performin, database administration tasks in the 3.4
environmentG
SLS%BAG Privi0e,e to access a00 database obOects
SLS&P(3G Privi0e,e to chan,e the operation mode of the database. $o privi0e,e ,ranted on tab0es
SAP%BAG Privi0e,e to access certain tab0es be0on,in, to SAP34 that are reIuired to perform
database administration tasks in the back,round
'he combined privi0e,es of the SLS&P(3 and SAP%BA ro0es are sufficient to perform certain
database administration tasks in the back,round
&S users be0on,in, to the &S ,roups %BA and &P(3 can connect to the &rac0e database usin, the
identification #$'(3$A*. 'hey are assi,ned the privi0e,es of the database ro0es SLS%BA or
SLS&P(3.
'he database users are as fo00owsG
SLSG &rac0e defau0t database user for database administration! owner of the database
SLS'(MG &rac0e defau0t user who can access a00 database tab0es in read and write mode when the
database is open. $o privi0e,e to chan,e &rac0e %%#C tab0es.
SAP34G A00 3.4 tab0es and inde1es be0on, to this database user. %oes not have privi0e,e to
perform administrative actions on the database
=C> SAP AG BC505 -:
4.22
SAP AG 1999
< lsnrctl help
2he following operations are available
!n asterisk =>? denotes a modifier or e8tended command+
start stop status services
version reload trace spawn
dbsnmp0start dbsnmp0stop dbsnmp0status 9uit
e8it cancel> repeat> set>
show>
< lsnrctl status
Connecting to =!DDR*SS;="R#2#C#);1"C?=@*A;2CC??
S2!2S of the )1S2*B*R
------------------------
!lias )1S2*B*R
%ersion 2BS)SBR for $"C+ %ersion ,'-'.'-'- - "roduction
Start Date /4-3!A-DD /&+//+4.
ptime 6- days 64 hr' .6 min' &E sec
2race )evel off
Security #FF
SB3" #FF
)istener "arameter File /usr/sap/trans/listener'ora
)istener )og File /oracle/2CC/network/log/listener'log
Services Summary'''
2CC has / service handlers
2he command completed successfully
Appendi*= &et@ 4istener
'he &rac0e 0istener is contro00ed by command lsnrctl. =$'G lsnrctl5'>
Command lsnrctl status =lsnrctl5' status> disp0ays information such as $etH version! 0istener
pro,ram start time! and the 0ocation of parameter and 0istener 0o, fi0es.
'o return a 0ist of avai0ab0e commands! enter help at the 0snrct0 command prompt.
'he fi0e listener$ora is read when the 0istener pro,ram is started on the database server. 'he
confi,uration information specified in this fi0e determines $etH settin,s such as the network protoco0
to be used! host name! port! and the defau0t tracin, information.
%atabase server 0istener tracin, can be enab0ed by settin, trace 0eve0 information in the fi0e
listener$ora or by turnin, it on throu,h the pro,ram lsnrctl.
2a0id options for 0istener tracin, areG
&77G $o tracin, =defau0t>
9S(3G *imited 0eve0 of tracin, information
A%M#$G %etai0ed trace
9se tracin, for dia,nostic purposes on0y. %o not 0eave tracin, on indefinite0y in a production system.
=C> SAP AG BC505 --
4.23
SAP AG 1999
Appendi*= Alert -onitoring +ree
#roblem or ,rror
2arning
O/
&o data
-onitoring attrib(tes and c(rrent %al(es
-onitoring attrib(tes and c(rrent %al(es
"ho) most recent
per'ormance
%al(es
"ho) most recent
per'ormance
%al(es
Display all alerts o'
the selected item
Display all alerts o'
the selected item
C(stomi?e alerts and
con'ig(re threshold
%al(es
C(stomi?e alerts and
con'ig(re threshold
%al(es
Delete alerts 'rom
open alert list
Delete alerts 'rom
open alert list
"tart analysis tool
associated )ith the alert
"tart analysis tool
associated )ith the alert
-onitoring obCect
-onitoring obCect
Current status Displa% alerts Complete alerts 'roperties
=ra1le
s,a1e ma0ageme0t
,erforma01e
Database
>ie;$ =,e0 alerts 208/18/1999 , 09$:9$13
o,timi4er
1he15,oi0ts
library 1a1he
/<,ert a0alysis , ?ode dis,lay off
buffers
buffer 1a1he
redo log buffer
N !6 Alerts O D 56P G ;0P= Cache hit ratio belo) threshold
N 5 Alerts O D !!5 G 4D000 redo entries per redo log space reB(ests
-onitor identi'ication
-onitor identi'ication
-onitoring tree
element 6-+,:
-onitoring tree
element 6-+,:
Display detailed alerts
Display detailed alerts
'he A0ert Monitor monitors various component of your 3.4 System. 9se the menu pathG &ools
00,S 0ontrol.,onitorin2 Alert monitor. A0ternative0y! use transaction R+*'.
'he pen Alerts view shows what has happened in the system since it was 0ast checked.
'he 0urrent status view shows the most recent va0ues.
'he Display Alert shows the history of the a0ert va0ues.
Any prob0ems or errors are disp0ayed in in red. "arnin,s are disp0ayed in ye00ow. Green means that!
accordin, to the thresho0d va0ues! there are no prob0ems.
Lou can use Properties to customiNe the thresho0d va0ues for red and ye00ow a0erts.
'o start the ana0ysis too0! doub0e8c0ick the a0ert te1t that you want to ana0yNe.
'o disp0ay detai0s of certain type of a0erts! set the checkbo1 ne1t to the a0ert and then choose Display
detailed alerts.
'he 0omplete Alert button resets the a0erts disp0ayed on the screen.
=C> SAP AG BC505 -4
4.24
SAP AG 1999
,*ercises
Q
"ol(tions
7nit Actions
=C> SAP AG BC505 -6
4.25Database O%er%ie5: )6ercises
&o. ,*ercise
! "tart yo(r local database (sing "A#DBA. Chec0 i' yo(r local database
is r(nning in ARCI81,4O$ mode. 8' it is notD (se the "A#DBA to s)itch
to ARCI81,4O$ mode.
Chec0 i' the pass)ords o' (sers "<"+,- and "<" still ha%e their
de'a(lt %al(es in yo(r local database.
3 Change the pass)ord o' (ser "A#R3 in yo(r local database.
4 7se the "A#DBA men( Tablespace administration to 'ind a list o' all
tablespaces on yo(r local database. 2hat are the names o' the 'iles on
the operating system le%el and in )hich directory do they e*istQ
5 4og on to the R/3 "ystem and start the database monitor. ,nter %al(es
'or=
'.1 -ata .4((er
'.2 *o& .4((er
'.3 S!ared #ool
6 4ist the parameter %al(es belonging to the 'ollo)ing obCects=
6.1 !e siGe o( t!e s!ared #ool
6.2 !e n4m.er o( .loc,s in t!e data .4((er
6.3 !e siGe o( t!e lo& .4((er
6.4 !e siGe o( an $RAC*: .loc,
5 4oo0 in the 1K tables 1K4O$ and 1K4O$J84,
8.1 Dind t!e names o( t!e online redo lo& (iles
8.2 Dind t!e c4rrent lo& seF4ence n4m.er
8.3 +!ic! online redo lo&s !ave already .een .ac,ed 4# .y t!e ARC="6:RH
@ "tart the Tables and Indexes Monitor and access the list o' all
tablespaces in the R/3 "ystem=
>.1 +!ic! is t!e lar&est ta.les#aceH
>.2 +!ic! ta.les#ace !as t!e smallest amo4nt o( (ree s#aceH
>.3 +!ic! ta.les#ace contains t!e most ta.les or inde1esH
>.4 =o) many data (iles are t!ere in t!e ta.les#ace PSAP/A/-H
; 6Optional: 8n the R/3 "ystemD 'ind o(t i' the R/3 database is r(nning in
ARCI81,4O$ mode.
=C> SAP AG BC505 -5
4.26Database O%er%ie5: 7ol8tions
&o. "ol(tion
! +o 'ind the necessary in'ormation in "A#DBAD select f - Archie mode.
8' noarchielo! is displayed by DA+ABA", 4O$ -OD,D s)itch to
archi%e log mode by (sing a - To!!le database lo! mode. &O+,=
"A#DBA m(st recycle 6stop and restart: the database 'or this operation.
Call "A#DBAD and choose m - "ser and Sec#rit$ b A "ser information
3 Call "A#DBAD and choose m - "ser and Sec#rit$ p R Chan!e
pass%ord c R Chan!e pass%ord. Change pass)ord o' (ser "A#R3.
,nter a ne) pass)ord. Con'irm the ne) pass)ord.
4 Jrom "A#DBAD select c - Tablespace administration h - Displa$ all
tablespaces and data files. A list o' all tablespaces and the related data
'iles 'rom yo(r local database is displayed.
5 Jrom the main R/3 men( choose Tools CCMS Control&Monitorin!
Performance men# Database Actiit$. +he %al(es yo( need are
displayed.
6 Jrom the main R/3 men( choose Tools CCMS Control&Monitorin!
Performance men# Database Actiit$ Detail anal$sis men#
Parameter chan!es. +hen choose Actie parameters. +he parameters
yo( need are=
6.1 S=AR:-BP$$*BS"I:
6.2 -/B/*$C;B/0DD:RS
6.3 *$GB/0DD:R
6.4 -/B/*$C;BS"I:
5 Jrom the main R/3 men( choose Tools CCMS Control&Monitorin!
Performance men# Database Actiit$. +hen choose Displa$
'('al#es
8.1 !e names o( t!e online redo lo& (iles are in ta.le 6E*$GD"*:
8.2 !e c4rrent lo& seF4ence n4m.er is t!e n4m.er o( t!e redo lo& &ro4# )it!
t!e stat4s current in ta.le 6E*$G
8.3 "( yes is dis#layed (or Archive< t!en t!e online redo lo& !as already .een
arc!ived.
@ Jrom the main R/3 men(D choose Tools CCMS Control&Monitorin!
Performance men# Database Tables&Indexes. +hen choose
C#rrent si)es.
>.1 Sort .y Size(kb)
>.2 Sort .y Free(kb)
>.3 Sort .y Tab/Ind.
>.4 Place t!e c4rsor on PSAP/A/-< and t!en c!oose Data Files. A list o( data
(iles .elon&in& to PSAP/A/- is dis#layed.
=C> SAP AG BC505 -/
; +he in'ormation is in table 1KDA+ABA",. "ee e*ercise 5 'or the men(
path.
=C> SAP AG BC505 -P
5
SAP AG 1999
Bac0(p "trategy and +ape -anagement
! Database O%er%ie) 6 Ad%anced Bac0(p +echniB(es
Bac0(p "trategy and
+ape -anagement
5 "torage -anagement
3 "ched(lingD #er'ormingD
and -onitoring Bac0(ps
@ #er'ormance -onitoring
4 Restore and Reco%ery ; +op !0 #roblems
5 Bac0(p "trategies
7sing R-A&
=C> SAP AG BC505 :
5.2
SAP AG 1999
Bac0(p "trategy and +ape -anagement
Contents
Bac0(p strategy
#ossible ca(ses o' data loss
+ape management '(nctions pro%ided by the "A# database
bac0(p tools
ObCecti%es
At t!e end o( t!is 4nit< yo4 )ill .e a.le to?
De'ine a bac0(p strategy that meets the needs o' yo(r
company
Con'ig(re the tape management system 'or per'orming
database and o''line redo log 'ile bac0(ps
"et (p and manage tape pools
&nce you have comp0eted this unit! you wi00 be ab0e toG
%efine a backup strate,y that meets the needs of your company
Confi,ure the tape mana,ement system for performin, database and off0ine redo 0o, fi0e backups
Set up and mana,e tape poo0s
Perform tape initia0iNation
%escribe the tape 0ayout
%escribe the procedure of tape se0ect by the tape mana,ement system
=C> SAP AG BC505 -
5.3
SAP AG 1999
A good database bac0(p strategy pre%ents data
loss and minimi?es system do)ntime
,*ternal 'actors
6"(ch as 'ire or
)ater damage:
#hysical errors
6"(ch as hard)are
'ail(re:
DR#" 3!R!
4ogical errors
6"(ch as a deleted
table:
Data
loss
+he 8mportance o' Database Bac0(ps
#roced(re and
,scalation #lan
#f you do not have a suitab0e backup strate,y! e1terna0 factors! physica0 errors! and 0o,ica0 errors can
cause system downtime and may 0ead to data 0oss.
#f data is 0ost due to e1terna0 factors! such as water dama,e to your hardware! or physica0 errors! such
as hardware fai0ure! you must recover the database up to the point in time when the database crashed.
#f a fu00 recovery is possib0e! on0y the data of uncommitted transactions before the error wi00 be 0ost.
#f data is 0ost due to 0o,ica0 errors! such as an unintentiona00y de0eted tab0e! you must recover the
database up to a point in time short0y before the error occurred.
Lour backup strate,y must be desi,ned accordin, to the needs of your company. 'o ensure the
avai0abi0ity of your 3.4 System! your backup strate,y must be carefu00y tested before your 3.4
System ,oes 0ive! and after any chan,es to your backup strate,y.
"hen you set up your backup strate,y! you must consider how 0on, you can afford to shut down the
3.4 System for each of the above scenarios.
'o ensure that the correct actions are performed for each of the scenarios! create a document
containin, or,aniNationa0 descriptions of procedures and an esca0ation p0an. 'his document must be
understood by the person who performs the database restore and recovery.
Lou shou0d eva0uate and imp0ement the most suitab0e backup type and method for your company.
SAP provides too0s that support different types of backups! such as fu00 on0ine! incrementa0 backups
with 3MA$! and sp0it mirror backups! which are discussed in the ne1t units.
=C> SAP AG BC505 4
5.4
SAP AG 1999
#hysical
data chec0=
1eri'y bac0(p
on tape
4ogical
data chec0=
1eri'y database
consistency
Oracle data 'iles
ORAA!55@=
Oracle data
bloc0
corr(pted
Database bac0(p
#re%enting and Iandling ,rrors
Lour backup strate,y shou0d inc0ude verifyin, the data to be backed up as we00 as the data on tape.
'o verify the consistency of the &rac0e database! perform a lo2ical data chec/.
Corrupt &rac0e b0ocks =error &3A8:5PH> can appear in your 3.4 database as a resu0t of operatin,
system or hardware errors. Corrupt &rac0e b0ocks may make a backup unusab0e.
'he e1istence of these b0ocks on0y becomes evident durin, the ne1t read access attempt to a tab0e
within the database. Since this particu0ar access attempt do not occur often! and corrupt &rac0e
b0ocks are not reco,niNed durin, a database backup! these corrupt b0ocks may remain undetected
in your system for a 0on, time.
'herefore! you shou0d perform a 0o,ica0 data check at re,u0ar interva0s. Lou can perform this
check usin, brbac/up 1w use_db" =see SAP $otes :555-6 and -4465>. 7or optima0 performance!
perform this check durin, periods of 0ow system activity! such as weekends.
'o verify the tapes used for a database backup! perform a physical data chec/. 'o check the physica0
correctness of the data transferred! the tapes shou0d be read after a successfu0 backup.
=C> SAP AG BC505 6
5.5
SAP AG 1999
<o( m(st reco%er the complete database to a point in time be'ore the error
DR#" 3!R!
4ogical errors
6"(ch as a deleted
table:
+ime )hen logical
error occ(rred
+ime )hen database is
stopped 'or reco%ery
4ost in'ormation
4ogical error reco%ery
#ossible Ca(ses o' Data 4oss 6!:
/6+.- &+--
/6+.- - &+--
*o,ica0 errors can be caused byG
Manua00y droppin, database obOects
Manua00y de0etin, parts of a database obOects! such as rows in a tab0e
App0ication errors
#f a 0o,ica0 database error occurs! you must recover the comp0ete database since the data from
different tab0es must be consistent.
Because you must perform a point in time reco"ery to a point in time before the error! data chan,ed
between the time when the 0o,ica0 error occurred and the time the database is stopped for recovery is
0ost.
%ependin, on the tab0e! it may be possib0e to restore the database to a different machine and then
e1port the tab0e from that machine to your production 3.4 System or to read the missin, tab0e rows
from the restored tab0e. 'his method avoids data 0oss. ;owever! this method is difficu0t and reIuires
e1pert know0ed,e of the app0ication modu0e that uses the tab0e.
=C> SAP AG BC505 5
5.6
SAP AG 1999
8' one o''line redo log 'ile is lostD none o' the 'iles
that 'ollo) it can be (sed
"eB(ence o' o''line redo log 'iles=
Jor)ard reco%ery
A database bac0(p is restored and yo( )ant to
reco%er data 'rom o''line redo log 'iles
4ost o''line redo log 'ile
#oint in time o'
the database error
8ntact b(t (n(sable
o''line redo log 'iles
4ost in'ormation
+ime
#ossible Ca(ses o' Data 4oss 6:
"hen you perform a point in time reco"ery! you need a00 the off0ine redo 0o, fi0es from the point in
time of the 0ast database backup up to the point in time you want to restore to.
#f a fi0e is missin, from the chain of off0ine redo 0o, fi0es! then a restore of subseIuent off0ine redo
0o, fi0es is not possib0e. %ata wi00 be 0ost from the point in time of your 0ost off0ine redo 0o, fi0e.
'herefore! you shou0d keep at 0east t5o copies of a00 off0ine redo 0o, fi0es on tape.
=C> SAP AG BC505 /
5.7
SAP AG 1999
Disaster reco%ery
,*ternal 'actors
6"(ch as 'ire or )ater damage:
#hysical errors
6"(ch as hard)are 'ail(re:
Only data sa%ed on
tape can be reco%ered
Only tapes stored in a sa'e
location can be reco%ered
#ossible Ca(ses o' Data 4oss 63:
#f a hardware fai0ure occurs! such as a disk crash! you can on0y restore data that is stored on tape.
#f a00 of your disks or the comp0ete hardware is 0ost! on0y the data avai0ab0e on tape can be recovered.
&n0y the off0ine redo 0o, fi0es a0ready stored on tape can be restored. &ff0ine redo 0o, fi0e
information that is not stored on tape wi00 be 0ost.
#f data 0oss occurs due to e1terna0 factors! such as fires or water dama,e! a00 tapes that are not stored
in a safe 0ocation may be 0ost.
=C> SAP AG BC505 P
5.
SAP AG 1999
Additional
O''line redo log
'ile bac0(p 6*:
@ days
O''line redo log
'ile bac0(p 6*:
1eri'y the database
1eri'y the bac0(p
Online
Online
1eri'y the bac0(p
O''line
Bac0(p Cycle Recommendations
"e recommend a backup cyc0e of 6 weeks.
A poo0 of tapes for database and off0ine redo 0o, fi0e backups is reIuired. (nsure that enou,h tapes
are provided in each tape poo0 to span the entire backup cyc0e. "e recommend havin, 40F more
tapes than reIuired to cover database ,rowth and additiona0 backups! for e1amp0e after a database
e1tension. Backup tapes can be reused at the end of a backup cyc0e =after -H days>.
Perform a full online bac/up each workday. Perform a full offline bac/up at 0east once in the cyc0e.
Lou must back up the off0ine redo 0o, fi0es each workday! as we00 as after every on0ine and off0ine
backup. (nsure that you back up the off0ine redo 0o, fi0es twice! on separate tapes! before they are
de0eted.
'o verify a backup! check the database for 0o,ica0 errors and the database backups for physica0
errors. Lou must perform backup verification at 0east once in the backup cyc0e. ;owever! we
recommend that you perform it once a week.
3emove the 0ast verified fu00 off0ine backup of each cyc0e from the tape poo0! and keep this backup in
0on,8term stora,e. 3ep0ace the tapes! and initia0iNe new ones.
Chan,es to the fi0e structure of the database affect the subseIuent database restore. 'hese chan,es
occur when a data fi0e is added! when a data fi0e is moved to a different 0ocation! or when a
tab0espace and its data fi0es are reor,aniNed. Perform additiona0 backups after each database structure
modification or a system up,rade. P0ace these additiona0 backups in 0on,8term stora,e.
=C> SAP AG BC505 H
5.!
SAP AG 1999
-edia
cpio/dd
Control
'ile
Data
'iles
Online
redo log 'iles
O''line
redo log 'iles
Oracle database
-edia
BRR,"+OR, BRARCI81,
cpio/dd
parallel
BRBAC/7#
"A# Database Bac0(p +ools
Detail log Detail log
"(mmary "(mmary
log log
Detail log Detail log
"(mmary "(mmary
log log
#n addition to the database administration too0 SAP%BA! SAP provides you with the fo00owin, too0s
for performin, data backupsG
'he pro,ram B3BACJ9P backs up the data fi0es! the contro0 fi0e! and the database redo 0o, fi0es
where necessary.
'he pro,ram B3A3C;#2( backs up the off0ine redo 0o, fi0es of the database.
Both B3BACJ9P and B3A3C;#2( record the actions performed in 0o, fi0es. 'hese 0o, fi0es can
be used in the case of a database restore! and can be ana0yNed by the pro,ram B33(S'&3(. 'his
pro,ram can restore a00 fi0es be0on,in, to the database system from the backups.
'he database backup too0s support standard backups! both to disk and to tape.
=C> SAP AG BC505 5
5.10
SAP AG 1999
ObCects that need to be bac0ed (p
R/3 data Comp(ting center data
R/3 inter'aces
"A# e*ec(tables
Operating system
Database e*ec(tables
Database obCects
Data 'iles
Online redo log 'iles
Control 'ile
#ro'iles
O''line redo log 'iles
O''line redo log
'ile bac0(p
O''line redo log
'ile bac0(p
Database bac0(p
Database bac0(p
BRBAC/7#
BRARCI81,
BRR,"+OR,
Bac0(p ObCects
SAP%BA wi00 backup a00 the business data! but your backup strate,y must inc0ude backin, up a00
obOects. (1act0y which obOects these are depends on the or,aniNationa0 structure of your company. #n
the 3.4 environment! the backup obOects inc0ude the operatin, system and the fi0es associated with
3.4.
'he obOects that need to be backed up inc0udeG
3.4 data! such asG
3.4 archivin, obOects
3.4 interfaces
SAP e1ecutab0es
Computin, center data! such asG
'he operatin, system
'hird party pro,rams connected to 3.4
%atabase obOects
A correct0y imp0emented database backup strate,y is the on0y effective protection a,ainst data 0oss in
the database.
=C> SAP AG BC505 :0
5.11
SAP AG 1999
BRBAC/7#
BRARCI81,
Q Q
4ength o'
bac0(p cycle
&(mber o' parallel
bac0(p de%ices
S 30P Reser%e
JreB(ency
o' bac0(ps
Database
si?e
&(mber and si?e o' redo
log 'iles in a bac0(p cycle
+ape pools
+ape #ools
'o he0p mana,e your tapes! B3BACJ9P and B3A3C;#2( offer a tape mana,ement system thatG
;e0ps you find the tapes that are necessary to perform a backup
;e0ps you find the appropriate tapes when you need to recover your database
Provides the security that tapes are not overwritten accidenta00y
Lou must initia0iNe one poo0 of tapes for B3BACJ9P and another poo0 of tapes for B3A3C;#2(.
'apes that are initia0iNed by B3BACJ9P cannot be used by B3A3C;#2(! and vice versa.
'he number of tapes you need for B3BACJ9P depends on factors such as the 0en,th of your
backup cyc0e! the siNe of your database! the number of tape devices to be used in para00e0! the
stora,e capacity of the tapes you use! and the freIuency of database backup operations.
'he number of tapes you need for B3A3C;#2( depends on the 0en,th of your backup cyc0e! the
stora,e capacity of the tapes you use! the avera,e number and the siNe of the redo 0o, fi0es created in
a backup cyc0e! and the freIuency of off0ine redo 0o, fi0e backup operations.
#n addition to the number of tapes you need based on your backup strate,y! you shou0d have a
reserve of 40F more tapes in each tape poo0. 'his is usefu0 in the case of database ,rowth!
e1ceptiona00y hi,h redo 0o, vo0ume! or if additiona0 backups need to be performed.
=C> SAP AG BC505 ::
5.12
SAP AG 1999
brback#p -i - *tape name+ or brarchie -i - *tape name+
8nitiali?e ne) tapesD nonA"A# tapesD or loc0ed tapes=
Rename nonAloc0ed tapes=
brback#p -i force or brarchie -i force
.tape.hdr0
2rite the label to the tape that also contains the tape name
...
%ol(meEbac0(p F 6G"8DHB0!DG"8DHB0...
%ol(meEarchi%e F 6G"8DHA0!DG"8DHA0...
...
#ro'ile init*SID+.sap contains the tape names=
+ape 8nitiali?ation
%urin, tape initia0iNation! an SAP8specific 0abe0 is written on the tape as the first fi0e =.tape.hdr0>.
'o initia0iNe the tapes! use the fo00owin, B3BACJ9P or B3A3C;#2( commandsG
7or 0ocked tapes! or tapes that were used by another app0ication
brbac/up 1i force or brarchi"e 1i force
7or renamin, tapes that are not 0ocked
brbac/up 1i or brarchi"e 1i
Lou can a0so use SAP%BA to initia0iNe tapes.
Lou can specify the tape name that you want to initia0iNe e1p0icit0y by usin, commandsG
brbac/up 1i 1" <tape name> or brarchi"e 1i 1" <tape name> respective0y.
#f you do not specify the tape name e1p0icit0y! B3BACJ9P or B3A3C;#2( wi00 automatica00y
se0ect the tape names from the poo0 of tape names specified in the confi,uration fi0e init<SID>$sap
by parameters "olume_bac/up and "olume_archi"e$
Su,,ested namin, conventions for your tapes areG
'apes used for B3BACJ9PG ?S#%@B0:!?S#%@B0-!...! ?S#%@B))
'apes used for B3A3C;#2(G ?S#%@A0:!?S#%@A0-!...! ?S#%@ALL
=C> SAP AG BC505 :-
5.13
SAP AG 1999
+ape label
contents=
+ape chec0s=
+ape name
4oc0 period
7se co(nt
+ape name
Database name
+imestamp o' last bac0(p
&(mber o' bac0(ps per'ormed
"ho) tape label contents=
brback#p -i sho% or brarchie -i sho%
...
e*pirEperiod F @
tapeE(seEco(nt F !00
...
#ro'ile init*SID+.sap=
+ape 4abel Contents and +ape Chec0s
,rror ,rror
2arning 2arning
'he tape 0abe0 contains the fo00owin, informationG
'he tape name
'he database name
'he timestamp of the 0ast backup recorded on the tape
'he number of backups performed with the tape
By defau0t! B3BACJ9P and B3A3C;#2( read the tape 0abe0 before they start writin, to a tape in
order to checkG
'he tape name
#f the tape is 0ocked
'he number of times the tape has a0ready been used
#f the tape name is wron, or if the tape is 0ocked! an error is reported and the tape is not used.
#f tape is used more often than the va0ue set in parameter tapeEuseEcount in fi0e init<sid>$sap! a
warnin, is ,enerated but the tape is used.
=C> SAP AG BC505 :4
5.14
SAP AG 1999
BRBAC/7#
+ables "DBAI
and "DBAD
4ogical tape loc0ing
4ist o' tapes (sed
in e*pirEperiod
...
C!!B05D
C!!B06D
...
#ro'ile= initG"8DH.sap
...
%ol(meEbac0(p F 6C!!...
%ol(meEarchi%e F 6C!!...
...
Days
! @ ; 30 3! 3 33
C!!B0! C!!B0
e*pirEperiod F 30
e*pirEperiod F 30
#hysical tape loc0ing
.tape.hdr0
BRARCI81,
+ape 4oc0ing
@ @
days days
Before writin, to tape! B3BACJ9P and B3A3C;#2( check that the tape is not 0ocked. 'o prevent
tapes from bein, overwritten too ear0y! ensure parameter expir_period in fi0e init<SID>$sap is set to
at 0east the 0en,th of your backup cyc0e =in days>.
A tape is 0ocked if the number of days passed since it was 0ast used is 0ess than va0ue of parameter
expir_period. 'here are two different types of 0ocks for a tapeG
'he physical loc/ is derived from the tape 0abe0. 'he timestamp of the 0ast backup and the
parameter expir_ period determine if a tape can be reused. #f the 0ast backup was performed too
recent0y! then the tape is 0ocked physica00y. 'he timestamp is written at the be,innin, of a backup.
'he lo2ical loc/ is derived from the timestamp written to certain database tab0es. B3BACJ9P
and B3AC;#2( a0so write information about the backup! inc0udin, a timestamp! to the database
tab0es S%BA; and S%BA% when the backup is successfu00y finished.
'o find the tapes that can be used for the ne1t backup! B3BACJ9P connects to the database and
searches tab0es S%BA; and S%BA% for the tapes that were used in the 0ock period. 'he tapes used
cannot be used for the ne1t backup. 'his is the 0o,ica0 0ock check for database backups.
'he 0o,ica0 0ock check for the off0ine redo 0o, fi0e backups is performed by B3A3C;#2( usin,
information from the summary 0o,. 'herefore! off0ine redo 0o, fi0es can be backed up when the
database is not avai0ab0e.
'he tape from the tape name 0ist in profi0e init<SID>$sap that fo00ows the tape that was 0ast recent0y
used! and is not contained in the 0ist of tapes used in the 0ock period! is se0ected for the ne1t backup.
=C> SAP AG BC505 :6
5.15
SAP AG 1999
@ days
O''line
Additional
Online
Online
Archi%es 6*:
Archi%es 6*:
+ape management acti%eD
BRBAC/7# 'inds tape names
S
+ape label chec0 acti%e
F
Only accepts tapes )ith reB(ested
names and )ith e*pired loc0 period
C!!B0! C!!A0!
BRBAC/7#
BRARCI81,
+ables "DBAI
and "DBAD
"cenario != A(tomatic +ape "election
'he SAP too0s provide three procedures for se0ectin, a tape for the backupG
Automatic tape se0ection by B3BACJ9P or B3AC;#2(
Manua0 tape se0ection by the operator
'ape se0ection by an e1terna0 too0
#f you want B3BACJ9P or B3AC;#2( to se0ect the tape=s> to be used for the ne1t backup run
automatica00y! you must define the parameters "olume_bac/up and "olume_archi"e in profi0e
init<SID>$sap.
(ach time you start a backup! B3BACJ9P or B3AC;#2( reIuests the ne1t un0ocked tape in the
order defined by parameters "olume_bac/up and "olume_archi"e. After the 0ast medium on the 0ist is
used! the first medium on the 0ist is reIuested a,ain. 'his medium must not be 0ocked at that time.
'o find out the name of the reIuested tape! ca00 B3BACJ9P or B3A3C;#2( with the option 1%.
'o check whether you have mounted the reIuested tape! ca00 B3BACJ9P or B3A3C;#2( with the
option 1% check.
=C> SAP AG BC505 :5
5.16
SAP AG 1999
C!!B0! C!!A0!
BRBAC/7#
BRARCI81,
"cenario = -an(al +ape "election
+ape loc0 e*piration )ill be chec0ed
S
+ape management is not acti%e
F
+o select any tape man(ally
+ape loc0 e*piration )ill be chec0ed
S
+ape name is changed to the
c(rrently reB(ired tape name
F
<o( can (se this option to replace
tapes in yo(r tape pool
+ape )ith label name "CRA+CI
@ days
O''line
Additional
Online
Archi%es 6*:
brback#p - SC,ATC- or
brarchie - SC,ATC-
'o se0ect the tape that is used for the backup! use option S0RA&06.
&ption S0RA&06 can be used in two waysG
As an option for B3BACJ9P or B3A3C;#2(
As a tape name
#f a tape is initia0iNed with the name SC3A'C;! it can be used for any backup re,ard0ess of the
name of the tape that is reIuired for the current backup. 'he tape name is chan,ed to the name of the
tape reIuired. 9se this option to rep0ace tapes in your tape poo0.
#f SC3A'C; is used as an option for B3BACJ9P or B3A3C;#2(! that is you issue the
commandG brbac/up 1" S0RA&06 or brarchi"e 1" S0RA&06! any initia0iNed tape with an e1pired
0ock period can be used for a data backup. ;owever! in this case! the tape name wi00 not be chan,ed.
Lou must ensure that the correct tape is inserted. 'his option can be used to se0ect a tape manua00y!
for e1amp0e! for a month end backup if you do not want this backup to be performed on your tape
poo0 tapes.
=C> SAP AG BC505 :/
5.17
SAP AG 1999
C!!B0! C!!A0!
BRBAC/7#
BRARCI81,
"cenario 3= +ape "election by an ,*ternal +ool
"earch
mechanism
+ape management is
deacti%ated
b(t tape name is chec0ed
S
+ape label chec0 acti%e
F
Only accepts tapes
A 2ith the speci'ied names
A 2ith e*pired loc0 period
brback#p - C..M/.0C..M/1
@ days
O''line
Additional
Online
Archi%es 6*:
'o e1p0icit0y specify the tape=s> to be used by B3BACJ9P or B3A3C;#2(! use the option 1". 'his
is usefu0 when usin, a she00 script or e1terna0 tape mana,ement too0 for determinin, the tapes to be
used at the ne1t backup run.
B3BACJ9P and B3A3C;#2( check that the tapes specified by option 1" have been mounted and
that they are not 0ocked. *ocked tapes are refused.
=C> SAP AG BC505 :P
5.1
SAP AG 1999
O''line
redo log n
Detail
log
"(mmary
log
BRBAC/7#=
BRARCI81,=
.tape.hdr0
initGsidH.ora
initGsidH.dba
initGsidH.sap DB 'ile !
DB 'ile n
Detail
log
"(mmary
log
reorg.log
str(ct.log
reorg.log
str(ct.log
.tape.hdr0
initGsidH.ora
initGsidH.dba
initGsidH.sap
O''line
redo log !
Control
'ile
+ape 4ayo(t
'he fi0es written to tape by B3BACJ9P and B3AC;#2( areG
.tape$hdr'G 'ape 0abe0
init<SID>$oraG %atabase confi,uration fi0e
init<SID>$dbaG SAP%BA confi,uration fi0e
init<SID>$sapG B3BACJ9P and B3A3C;#2( confi,uration fi0e
reor2<SID>$lo2GG #nformation about the creation! e1tension! or reor,aniNation of a tab0espace!
restorin, and recoverin, the database =0ocated in directory sapreor2>
struct<SID>$lo2GG ;istory of database structure chan,es =0ocated in directory sapreor2>
Detail lo2GG Comp0ete output of the B3BACJ9P or B3A3C;#2( run =0ocated in directories
sapbac/up or saparch>
Summary lo2 bac/<SID>$lo2GG *ist of a00 backups started with B3BACJ9P =0ocated in directory
sapbac/up>
Summary lo2 arch<SID>$lo2GG *ist of a00 off0ine redo 0o, fi0es backed up by B3A3C;#2(
=0ocated in directory saparch>
=C> SAP AG BC505 :H
5.1!
SAP AG 1999
7nit "(mmary
&o) yo( are able to=
Con'ig(re the tape management system 'or r(nning
database and o''line redo log bac0(ps
"et (p and manage tape pools
#er'orm the tape initiali?ation
Describe the proced(re o' tape selection by the tape
management system
Describe the tape layo(t
'he SAP backup too0s offer a basic method of tape mana,ement. 9sed in conOunction with a suitab0e
namin, convention! tape mana,ement with SAP backup too0s enab0es you to mana,e your backup
media secure0y and in a comprehensib0e manner.
'he tapes that are reIuired must be initia0iNed before the backup cyc0e can be imp0emented. #t is
important that you a00ow sufficient reserve capacity when initia0iNin, the tapes.
=C> SAP AG BC505 :5
5.20
SAP AG 1999
,*ercises
Q
"ol(tions
7nit Actions
=C> SAP AG BC505 -0
5.21Back8, 7trate"9 and Ta,e 2ana"ement: )6ercises
&o. ,*ercise
Bac0(p "trategy
! ,%al(ate the 'ollo)ing bac0(p strategy.
ec!nical s#eci(ications?
!e #lanned siGe o( t!e data.ase is ro4&!ly 100 G/
A ma1im4m o( '0 online redo lo& (iles o( 20 %/ are e1#ected to .e )ritten
daily
!ree ta#e devices are availa.le and eac! can )rite or read 4# to 6 G/ #er
!o4r
!e ta#es !ave a ca#acity o( 40 G/
"t ta,es on avera&e t!ree min4tes to a##ly an o((line redo lo& (ile d4rin& t!e
recovery
Strate&y?
An online .ac,4# is #er(ormed every ni&!t
!ree ta#es are reserved (or every ni&!t
!e data.ase administrator #er(orms a .ac,4# o( t!e o((line redo lo& (iles
daily< and deletes t!e o((line redo lo& (iles (rom dis, a(ter)ards
1.1 "s t!is a &ood .ac,4# strate&yH
1.2 Can a (4ll restore .e #er(ormed in >J !o4rsH
1.3 +!at is t!e si&ni(icance (or an instance recovery< i( t!e error t!at led to t!e
restore and recovery o#eration occ4rred d4rin& a lon& .ac,&ro4nd
#rocessin& Ko. )it!o4t a commitH
+ape -anagement
8nternal tape selection
2.1 +!at !a##ens i( yo4 4se command brbackup -i force -v Gtape
name< and enter t!e same ta#e name to re-initialiGe a ta#e t!at !as already
.een initialiGed 4nder t!at name and 4sed .e(ore in t!e .ac,4# cycleH
2.2 Can yo4 4se t!is met!od to release a loc,ed ta#eH
3 Compare the BRBAC/7# command option SC,ATC- )ith the tape
name "CRA+CI.
3.1 +!at !a##ens )!en /R/AC;0P or /RAC="6: is started 4sin& t!e o#tion -v
SCRATC and a ta#e )it! an ar.itrary name is 4sedH 37$:? ta#e name is
not SCRAC=.5
3.2 +!at !a##ens i( yo4 start t!e SAP 4tilities /R/AC;0P or /RAC="6:
)it!o4t enterin& a ta#e name 3brbacku!5 and insert a ta#e initialiGed )it! t!e
name SCRAC= 3brbacku! -i -v SCRATC5H
4 8nitiali?e a tape 'or BRBAC/7#.
=C> SAP AG BC505 -:
5.22Back8, 7trate"9 and Ta,e 2ana"ement: 7ol8tions
&o. "ol(tion
Bac0(p "trategy
!
1.1 !e #ro.lem )!en 4sin& t!is .ac,4# strate&y is t!at only one co#y o( t!e
arc!ived redo lo& (iles is )ritten to ta#e .e(ore deletion. +e recommend t!at
at least t"# co#ies are )ritten to di((erent .ac,4# media. !e data is
distri.4ted a4tomatically .y /R/AC;0P across t!e ta#e devices so t!at t!e
.ac,4# can .e #er(ormed in 4nattended mode< even i( t!e (iles are not
com#ressed.
1.2 "( t!e data vol4me is distri.4ted over t!e t!ree .ac,4# media< eac! ta#e )ill
contain a##ro1imately 33 G/. At a read rate o( 6 G/ #er !o4r< a restore
o#eration )o4ld ta,e a##ro1imately 'J !o4rs. 1 G/ o( o((line redo lo& (iles
can .e restored in 10 min4tes. "t ta,es a##ro1imately t!ree min4tes to a##ly
one redo lo& (ile to t!e data.ase. !ere(ore< it )o4ld ta,e a##ro1imately 1'0
min4tes to a##ly all o((line redo lo& (iles (rom one day.
o restore and recover t!e data.ase )o4ld ta,e 4# to > !o4rs and 10
min4tes. =o)ever< t!is time does not incl4de t!e time to analyGe and re#air
t!e error t!at led to t!e restore. Additionally< t!e time o( t!e instance recovery
t!at is #er(ormed at system start4# is not acco4nted (or in t!is calc4lation.
-4e to t!e times not acco4nted (or in t!e calc4lation< it is 4nli,ely t!at t!e (4ll
restore and recovery can .e #er(ormed in >J !o4rs.
1.3 An 4ncommitted transaction !as to .e rolled .ac, d4rin& instance recovery.
!ere(ore< t!e data.ase needs more time to com#lete t!e recovery.
+ape -anagement

2.1 +!en a ta#e t!at is already inte&rated into t!e .ac,4# cycle is re-initialiGed<
t!e la.el o( t!e ta#e la.el )ill .e reset incl4din& t!e in(ormation a.o4t t!e
n4m.er o( times t!e ta#e !as .een 4sed. !ere(ore< t!e ta#e may .e 4sed
more o(ten t!an t!e recommended n4m.er o( times.
2.2 A ta#e )ill remain loc,ed )it! a lo&ical loc, .4t not )it! a #!ysical loc,.
!e in(ormation a.o4t )!ic! ta#e s!o4ld .e 4sed is contained only in t!e
data.ase ta.les S-/A= and S-/A-. !ese data.ase ta.les are not reset
)!en yo4 re-initialiGe t!e ta#e )it! t!e o#tion -i $#rce.
=o)ever< t!e la.el o( t!e ta#e is reset. !ere(ore< t!ere is no date recorded
on t!e ta#e )!en it )as last recently 4sed and no t!e ta#e is not loc,ed )it!
a #!ysical loc,.
3
3.1 !e loc, e1#iration o( t!e ta#e is c!ec,ed.
"( t!e ta#e is not loc,ed< it is 4sed re&ardless o( its name.
!e name o( t!e ta#e )ill not .e c!an&ed.
!is o#tion can .e 4sed (or an 4nsc!ed4led .ac,4# or i( yo4 )ant to de(ine
t!e ta#e name 4sin& an e1ternal tool. +!en yo4 4se an e1ternal tool< (or
e1am#le< i( yo4 )ant t!e name to contain t!e correct day o( t!e )ee,< s)itc!
o(( t!e a4tomatic ta#e administration. -o not 4se t!e same ta#e name t)ice
=C> SAP AG BC505 --
in a .ac,4# cycle< and do not 4se t!e ta#e name SCRAC=.
3.2 !e loc, e1#iration o( t!e ta#e is c!ec,ed.
"( t!e ta#e is not loc,ed< it is 4sed.
!e name o( t!e ta#e is c!an&ed to t!e name o( t!e ta#e reF4ested (rom t!e
.ac,4# cycle .y /R/AC;0P or /RAC="6:.
!e ta#e name SCRAC= can .e 4sed )!en a ta#e needs to .e re#laced<
(or e1am#le )!en t!e ta#eB4seBco4nt is e1ceeded or )!en t!e ta#e is
de(ective. 7ote t!at yo4 m4st remove t!e old ta#e (rom yo4r ta#e #ool to
ens4re t!at ta#e names are 4niF4e in t!e #ool.
4 Copy the initG"8DH.sap.tape 'ile to initG"8DH.sap
brback#p 2i force 2 *SID+B/.
=C> SAP AG BC505 -4
6
SAP AG 1999
"ched(lingD #er'ormingD and -onitoring Bac0(ps
! Database O%er%ie) 6 Ad%anced Bac0(p +echniB(es
Bac0(p "trategy and
+ape -anagement
5 "torage -anagement
3 "ched(lingD #er'ormingD
and -onitoring Bac0(ps
@ #er'ormance -onitoring
4 Restore and Reco%ery ; +op !0 #roblems
5 Bac0(p "trategies
7sing R-A&
=C> SAP AG BC505 :
6.2
SAP AG 1999
"ched(lingD #er'ormingD and -onitoring Bac0(ps
Contents
Database bac0(ps
O''line redo log 'ile bac0(ps
ObCecti%es
At t!e end o( t!is 4nit< yo4 )ill .e a.le to?
"ched(le and per'orm a bac0(p (sing "A# tools
-onitor and %eri'y a bac0(p r(n
,%al(ateD implement and test the most s(itable bac0(p method
'or yo(r company
=C> SAP AG BC505 -
6.3
SAP AG 1999
BRBAC/7#
Data 'iles
BRBAC/7#
Data 'iles
4og 'iles 4og 'iles
....
....
.... ....
....
....
....
....
....
....
BRARCI81,
O''line redo
log 'iles
BRARCI81,
O''line redo
log 'iles
....
....
....
....
init*SID+.sap
sapr3."DBAI
sapr3."DBAD
4og 'iles 4og 'iles
....
....
.... ....
....
....
....
....
....
....
DBA #lanning Calendar
#lanning $oto 4isting Ielp "ystem
-O& -O& +7, +7, 2,D 2,D +I7 +I7 JR8 JR8 "A+ "A+ "7& "7&
-O& -O& +7, +7, 2,D 2,D +I7 +I7 JR8 JR8 "A+ "A+ "7& "7&
-O& -O& +7, +7, 2,D 2,D +I7 +I7 JR8 JR8 "A+ "A+ "7& "7&
-O& -O& +7, +7, 2,D 2,D +I7 +I7 JR8 JR8 "A+ "A+ "7& "7&
BRBAC/7# At ...
or
BRARCI81, ...
Command prompt A *
Io) "A# Bac0(p +ools 2or0 +ogether
A backup can be ca00edG
7rom CC27 in 3.4 R for periodic actions. 'o schedu0e periodic backups! use the %BA P0annin,
Ca0endar =transaction D)73>. #n 3.4! the reIuired tapes can be determined! and the 0o,s disp0ayed.
9sin, 7A:DBA R for one8time actions and e1ceptiona0 cases. Startin, from the command prompt!
you can use SAP%BA to administer the &rac0e database. "ith this pro,ram! backups are started
interactive0y.
9sin, B'BAC;(: or B'A'C-./) R for one8time actions and e1ceptiona0 cases. Lou can ca00
the SAP too0s for database backups =B3BACJ9P> and off0ine redo 0o, fi0e backups
=B3A3C;#2(> at the command prompt 0eve0. 'o schedu0e such backups! you can use operatin,
system commands =9$#)G cron! $'G at>.
"hen a backup is schedu0ed by CCMS! or started up by SAP%BA! these too0s ca00 B3BACJ9P
and.or B3A3C;#2( in order to back up the fi0es to tape or disk! and to 0o, backup actions in
database tab0es S%BA; and S%BA%. (ach too0 a0so backs up a summary 0o, and a detai0 0o, per
action. %efau0t va0ues are read from the parameter fi0e init<SID>$sap. ;owever! with these backup
a0ternatives! some of the defau0t va0ues can be overridden. 7or interna0 tape administration!
B3BACJ9P determines the reIuired tapes from tab0es S%BA; and S%BA%! whi0e B3A3C;#2(
does so on the basis of its summary 0o,.
=C> SAP AG BC505 4
6.4
SAP AG 1999
QQQ
Q
Q
Q
....
....
....
....
init*SID+.sap
compress compress F hard)are F hard)are
compress3 compress3cmd cmd F Tcompress F Tcompress A Ab ! b ! A Ac K H KU c K H KU
compress3 compress3dir dir F /oracle/G"8DH/ F /oracle/G"8DH/sapreorg sapreorg
tape3cop$3 tape3cop$3cmd cmd F F dd dd
disk3cop$3 disk3cop$3cmd cmd F F rman rman
exec3parallel exec3parallel F 0 F 0
tape3address tape3address F / F /de% de%/ /rmt rmt/0mn /0mn
tape3address3 tape3address3re% re% F / F /de% de%/ /rmt rmt/0m /0m
tape3address3arch tape3address3arch F / F /de% de%/ /rmt rmt/!mn /!mn
tape3address3 tape3address3re% re%3arch 3arch F / /de% de%/ /rmt rmt/!m /!m
back#p3 mode back#p3 mode F all F all
back#p3 t$pe back#p3 t$pe F online No''lineO F online No''lineO
ol#me3back#p ol#me3back#p F F 6G"8DHB0!D G"8DHB0D ...: 6G"8DHB0!D G"8DHB0D ...:
tape3 si)e tape3 si)e F 3$ F 3$
tape3#se3co#nt tape3#se3co#nt F !00 F !00
expir expir3period 3period F @ F @
back#p3 back#p3de de3t$pe 3t$pe F tape F tape
archie3f#nction archie3f#nction F copyEdeleteEsa%e
ol#me3archie ol#me3archie F 6G"8DHA0!D G"8DHA0D ...:
tape3si)e3arch tape3si)e3arch F 6000-
Bac0(p #ro'ile #arameters
'o choose the tape drives for the tape stations used for database or off0ine redo 0o, fi0e backups! set
parameters tape_address and tape_address_rew. 'he optiona0 parameters tape_address_arch and
tape_address_rew_arch are used to specify one =or two> tape drives for the tape station used for
off0ine redo 0o, fi0e backups. "hen the off0ine redo 0o, fi0e backup parameters have been set!
tape_address and tape_address_rew are on0y used for the database backup.
'he parameter tape_copy_cmd determines whether copy pro,ram cpio or dd is used to back up the
data fi0es to tape. 9sin, dd! the reIuired backup time can be reduced si,nificant0y. #f you use dd! you
must maintain the fo00owin, parameters =for $'! AobsMnkB or AibsMnk B do not app0y>G
dd_fla2s M Aobs M nk bs M nkB with n :/ =for %*'! for e1amp0e n M 4- or n M /6>
dd_in_fla2s M Aibs M nk bs M nkB with n :/ =for e1amp0e! dd_in_fla2s M Aibs M /6k bs M /6k B>
'he parameter compress_dir indicates which directory is bein, used with "erify or software
compression durin, a backup.
'he parameters compress_cmd and exec_parallel are discussed on the s0ide A;ardware
Compression.B
'he init<SID>$sap parameters shown in sma00er print are not discussed here. 'hese profi0e
parameters are on0y e1amp0esS they may differ on your system. 7or further parameter definitions! see
the 3.4 &n0ine %ocumentation.
=C> SAP AG BC505 6
6.5
SAP AG 1999
BRBAC/7#/BRARCI81,
cpio/dd
Data
...
dd= ,rror
cpio= ,rror or
cpio contin(ation
%ol(me
Data Data
cpio/dd cpio/dd
...
BRBAC/7#/BRARCI81,
cpio/dd
Data
...
Data
cpio/dd cpio/dd
...
BRBAC/7#=
"A#
'ollo)A(p
tape
Correct
#arameter tape3si)e
#hysical tape si?e
#arameter tape3si)e
Data
#hysical tape si?e
#ro'ile initG"8DH.sap #arameter tapeEsi?e
8ncorrect
'he data vo0ume to be backed up is determined by B3BACJ9P.B3A3C;#2(! and distributed
amon, SAP tapes! usin, parameter tape_si8e. #f a tape chan,e is reIuired! use an SAP follow1up
tape =for cpio! this is ca00ed a continuation "olume>. 'he fi0es are not sp0itS they are backed up to tape
in one piece. %urin, an off0ine redo 0o, fi0e backup! the ma1imum number of off0ine redo 0o, fi0es
that can fit on this tape =as defined by tape_si8e or tape_si8e_arch> is backed up. An SAP fo00ow8up
tape is not used.
#f the va0ue for tape_si8e is too 0ar,e! the copy pro,ram =cpio or dd> may start backin, up a fi0e to
tape! and may reach the physica0 end of the tape. 'he conseIuences depend on the copy pro,ram and
the type of backup.
'he copy pro,ram dd a0ways ,enerates an error messa,e when it reaches the end of the tape. 'he
error messa,e depends on the operatin, system. 7or "indows $'! it reads Physical end of tape has
been reached. 7or 9$#)! it reads I. 9rror.
%urin, a seria0 database or off0ine redo 0o, fi0e backup! cpio reIuests a cpio =not an SAP>
continuation vo0ume. 'he database backup terminates successfu00y. CautionG Since SAP too0s cannot
reIuest the cpio continuation vo0ume direct0y! prob0ems may arise durin, a restore from this database
backup.
%urin, a para00e0 database or off0ine redo 0o, fi0e backup! cpio terminates with an error messa,e! and
the backup terminates with an error.
'herefore! tape_si8e must be set to a va0ue somewhat sma00er than the physica0 tape capacity
=a00owin,! for e1amp0e! a :0F safety mar,in>.
=C> SAP AG BC505 5
6.6
SAP AG 1999
400 -B 400 -B 400 -B 400 -B
BRBAC/7#
400 %/
400 %/ 400 %/
400 %/
compress compress F no F no
tape3si)e tape3si)e F !@00- F !@00-
init*SID+.sap
400 -B
400 -B
+ape station )itho(t
hard)are compression
00
-B
00
-B
00
-B
00
-B
00 -B
400 -B
BRBAC/7#
00
-B
00
-B
00
-B
00
-B
400 %/
400 %/
400 %/
400 %/
400 %/
400 %/
400 %/ 400 %/
compress compress F hard)are F hard)are
compress3 compress3cmd cmd F Tcompress F Tcompress A Ab ! b ! A Ac K H KU c K H KU
exec3parallel exec3parallel F 0 F 0
tape3si)e tape3si)e F !600- F !600-
....
....
....
....
init*SID+.sap
+ape station )ith
hard)are compression
Once per cycle=
Determine
compression rate
400 %/ 400 %/
400 %/ 400 %/
Iard)are Compression
7or tape stations with hardware compression! parameter tape_si8e is set to a sma00er va0ue =as an
additiona0 safety mar,in! since the compression rate chan,es in the course of a backup cyc0e> than
for tape stations without hardware compression. 7or more information on settin, tape_si8e for
different tape stations! see SAP $ote HP0P.
'o be ab0e to distribute fi0es across the tapes! B3BACJ9P reIuires information on how we00 the
fi0es to be saved are bein, compressed by the tape station. ;owever! tape stations do not report a
compression rate. Lou must therefore determine the compression rate once per backup cyc0e.
%etermine this rate by usin, SAP%BA! or by usin, the operatin, system command brbac/up 1/.
'o determine the compression rate! for 9$#)! we recommend that you set parameter compress_cmd
as shown above in order to obtain more precise va0ues. 7or $'! the appropriate va0ue for
compress_cmd is ,iven in the 3.4 &n0ine %ocumentation.
#f parameter exec_parallel has been set to 0 durin, compression rate determination! one process per
0o,ica0 vo0ume is tri,,ered in order to determine the compression rate. #f parameter exec_parallel
has been set to a va0ue sma00er than the number of 0o,ica0 vo0umes! the number of processes reIuired
to determine the compression rate is 0imited to the number indicated by the parameter. 'his reduces
the CP9 0oad on the database server.
=C> SAP AG BC505 /
6.7
SAP AG 1999
DBA #lanning Calendar
#lanning $oto 4isting Ielp "ystem
-O& -O& +7, +7, 2,D 2,D +I7 +I7 JR8 JR8 "A+ "A+ "7& "7&
-O& -O& +7, +7, 2,D 2,D +I7 +I7 JR8 JR8 "A+ "A+ "7& "7&
-O& -O& +7, +7, 2,D 2,D +I7 +I7 JR8 JR8 "A+ "A+ "7& "7&
-O& -O& +7, +7, 2,D 2,D +I7 +I7 JR8 JR8 "A+ "A+ "7& "7&
BRBAC/7# At online Ad tape
Am all Ac A( system
Command prompt A *
"ched(ling and #er'orming a &ormal Database Bac0(p
tape3cop$3 tape3cop$3cmd cmd F F dd dd or or
tape3cop$3 tape3cop$3cmd cmd F F cpio cpio
....
....
....
....
init*SID+.sap
1
Calendar
Sc!ed4le an Action (or 4e 0'
1>?00?00 "tart time
#eriod 6)ee0s:=
J(ll database o''line S redo log bac0(p
J(ll database o''line bac0(p
J(ll database online S redo log bac0(p
J(ll database online bac0(p
Redo log bac0(p
#artial database o''line bac0(p
#artial database online bac0(p
Chec0 optimi?er statistics
Adapt ne*t e*tents
Chec0 database
h A Bac0(p database
"A#DBA A *
c A Bac0(p de%ice type tape
d A ObCects 'or bac0(p all
e A Bac0(p type online
g A 3(ery only no
" A "tart BRBAC/7#
"A#DBA A *
#f possib0e! schedu0e a00 periodic database backups in your backup strate,y usin, the %BA P0annin,
Ca0endar =transaction D)73>. 7or a00 further database backups! use SAP%BA! or ca00 B3BACJ9P
usin, the command prompt.
SAP recommends that you perform one on0ine database backup each workin, day. Schedu0e this
backup for periods with 0ow system activity.
'o schedu0e a full bac/up with redo bac/up from CCMS! the Aone8runB strate,y is used. 'his
strate,y is discussed at the end of this unit.
'o start a database backup with SAP%BA! se0ect h 1 )ac/up database. ;ere! you can temporari0y
override the parameters that have been preset for this backup by the parameter fi0e =defau0tG
init<SID>$sap>. 'he parameter fi0e is not chan,ed. 7or e1amp0e! to se0ect another type of backup
such as offline or offline_force! se0ect e 1 )ac/up type. Lou can then start the backup usin, s 1 Start
)R)A:;P.
7or purposes of interna0 tape administration! to determine which tapes are reIuired for the backup
parameters that are current0y set! se0ect 2 1 <uery only =se0ect the settin, with.without tape chec/>.
'he Iuery be,ins with S 1 Start )R)A:;P.
#f you ca00 B3BACJ9P from the command prompt! you can temporari0y override the parameters
that have been preset by the parameter fi0e =defau0tG init<SID>$sap>! by usin, the ca00 parameters.
'he parameter fi0e is not chan,ed. 'o disp0ay the 0ist of ca00 parameters! use the command prompt
brbackup -h H more! or check the 3.4 &n0ine %ocumentation.
=C> SAP AG BC505 P
6.
SAP AG 1999
#hases o' a 2hole Database Bac0(p
"a%e control 'ile to dis0
"a%e control 'ile to dis0
Bac0 (p sa%ed control 'ile
Bac0 (p sa%ed control 'ile
Jor all tablespaces to be bac0ed (p=
Begin tablespace bac0(p mode
Bac0 (p tablespace data 'iles
,nd tablespace bac0(p mode
Jor all tablespaces to be bac0ed (p=
Begin tablespace bac0(p mode
Bac0 (p tablespace data 'iles
,nd tablespace bac0(p mode
4og 'ile s)itch
4og 'ile s)itch
Bac0 (p control 'ile
Bac0 (p control 'ile
"tart database
"tart database
"h(t do)n database
"h(t do)n database
Bac0 (p data 'iles
Bac0 (p data 'iles
.Bac0 (p online redo log 'iles
.Bac0 (p online redo log 'iles
O''line
."tart database
."tart database
."h(t do)n database
."h(t do)n database
Retrie%e 'ile names o' data and online redo log 'iles 'rom database
and retrie%e names o' control 'iles 'rom init*SID+.ora
Retrie%e 'ile names o' data and online redo log 'iles 'rom database
and retrie%e names o' control 'iles 'rom init*SID+.ora
Bac0 (p tape headerD init*SID+.sapD init*SID+.dbaD and init*SID+.ora
Bac0 (p tape headerD init*SID+.sapD init*SID+.dbaD and init*SID+.ora
Bac0 (p reor!.lo!D str#ct.lo!D detail lo!D and s#mmar$ lo!
Bac0 (p reor!.lo!D str#ct.lo!D detail lo!D and s#mmar$ lo!
Online
Some! but not a00! steps of off0ine and on0ine backup procedures are identica0.
%urin, an off0ine backup! the steps marked above with an asterisk do not necessari0y have to be
performed. #n this way!
'he %B is on0y started if it is shut down at the start of the off0ine backup.
'he on0ine redo 0o, fi0es are on0y backed up durin, a comp0ete database backup.
'he %B is on0y shut down if it was shut down at the start of the off0ine backup.
%urin, an on0ine backup! the tab0espaces are set one by one to )e2in )ac/up ,ode or 9nd )ac/up
,ode. 'herefore! when a data fi0e is backed up! the associated tab0espace is in the backup mode. #f
a00 data fi0es have been backed up! and a00 tab0espaces have been reset to 9nd )ac/up ,ode! a lo2
file switch is performed. %urin, a subseIuent off0ine redo 0o, fi0e backup! a00 off0ine redo 0o, fi0es
reIuired for consistency of the on0ine backup can be backed up.
%urin, an on0ine backup! the contro0 fi0e cannot be backed up to tape durin, norma0 database
operation. 'herefore! at the start of the backup! a consistent copy of this contro0 fi0e is made to disk.
'his copy is backed up to tape after a00 data fi0es have been backed up.
At the start of a backup! a tape header is written. By readin, this tape header at the end of the
backup! B3BACJ9P checks whether the tape header was ab0e to be written correct0y to tape.
'his strate,y does not use 3MA$ =3ecovery Mana,er>.
=C> SAP AG BC505 H
6.!
SAP AG 1999
Data 'iles compress3dir
BRBAC/7# Ac A) (seEdb%
A
B
&
.
.
A
Q
Corr(ption
+ape readableQ
4og 'iles 4og 'iles
....
....
.... ....
....
....
....
....
....
....
Oracle
@A/B
Bloc0
F
Q
Jile
length
4ogical 1eri'ication o' a Database Bac0(p
Once per )ee0.
-inim(m= once
per cycle
"hen the tape header is checked! the tape station a0so under,oes a minima0 function check.
A0thou,h prob0ems occurrin, durin, a backup are revea0ed by the tape header check! these prob0ems
are not detected unti0 the end of the next backup performed on this tape station! at the ear0iest.
Systematic tape station errors cannot be detected in this way. 'o confirm tape readabi0ity! check
backups re,u0ar0y usin, the option "erify or 1w.
Corrupt data b0ocks are on0y detected when &rac0e processes access these data b0ocks. A database
backup may therefore contain corrupt b0ocks. "e recommend that you check a comp0ete database
backup for corrupt data b0ocks once each week! or at 0east once each backup cyc0e. %urin, a
database backup! use the option 8"erify use_db" or 8w use_db" toG
(nsure tape readabi0ity
%etect corrupt data b0ocks
'he fi0es are read from tape! and copied to the directory defined by the init<SID>$sap parameter
compress_dir. B3BACJ9P checks whether the fi0e read from tape is the same 0en,th as the one that
was backed up =fi0e 0en,th is specified by the sin,0e backup 0o,s>. #n addition! every data fi0e is
checked for corrupt data b0ocks! usin, the &rac0e uti0ity %BE2(3#7L. #f the B3BACJ9P 0o,
reports corrupt data b0ocks! see SAP $ote 555/-.
Ca8tion: A backup performed usin, "erify takes at 0east twice as 0on, as a backup performed
without "erify. Lou can therefore defer a "erify with B33(S'&3(. Lou can run a deferred "erify on
the database server or another server.
=C> SAP AG BC505 5
6.10
SAP AG 1999
Data 'iles compress3dir
BRBAC/7# At o''line Ac A)
A
B
& A
.
.
...
Chec0
database
bac0(p
8' possible=
Once each cycle
F
Q
O''line
6binary:
#hysical 1eri'ication o' O''line Database Bac0(ps
%urin, a database backup with the option 1"erify use_db"! B3BACJ9P checks whether the backup
contains corrupt data b0ocks. ;owever! it does not check whether the fi0es read from tape are
identica0 to the correspondin, fi0es in the database. =%urin, an on0ine database backup! these fi0es
may a0so differ.>
%urin, an off0ine database backup usin, the option 1"erify or 1w! the restored fi0es are compared at
the binary 0eve0 to the correspondin, fi0es in the database. #f a database backup has been terminated
usin, "erify! and no error messa,e has appeared! a00 fi0es were readab0e! and were identica0 to the
correspondin, fi0es in the database. Such a database backup takes at 0east twice as 0on, as a backup
performed without "erify. #f the reIuired time window for the off0ine backup with "erify is avai0ab0e!
we recommend that you perform an off0ine database backup usin, "erify once each backup cyc0e.
A binary "erify cannot be deferred usin, B33(S'&3(.
=C> SAP AG BC505 :0
6.11
SAP AG 1999
sapr3."DBAI
sapr3."DBAD
4og 'iles 4og 'iles
....
....
.... ....
....
....
....
....
....
....
DBA #lanning Calendar
#lanning $oto 4isting Ielp "ystem
-O& -O& +7, +7, 2,D 2,D +I7 +I7 JR8 JR8 "A+ "A+ "7& "7&
-O& -O& +7, +7, 2,D 2,D +I7 +I7 JR8 JR8 "A+ "A+ "7& "7&
-O& -O& +7, +7, 2,D 2,D +I7 +I7 JR8 JR8 "A+ "A+ "7& "7&
-O& -O& +7, +7, 2,D 2,D +I7 +I7 JR8 JR8 "A+ "A+ "7& "7&
cd /oracle/G"8DH/sapbac0(p
cat bac0G"8DH.log V more
cat bGtimestampH.and V more
Command prompt A *
4 A "ho)/Clean(p
"A#DBA A *
a A "ho) log 'iles / pro'iles
"A#DBA A *
e A BRBAC/7# log 'iles
"A#DBA A *
-onitoring a Database Bac0(p
Database Operations
-onitor 6DB4:
DBA Calendar
6DB!3:
B3BACJ9P writes 0o,s to SAP tab0es S%BA; and.or S%BA%! and to fi0es in directory sapbackup.
'herefore! by usin, SAB%BA or fi0e editors! you can check in 3.4 whether the backup has been
performed successfu00y.
#n 3.4! you can monitor database backups usin, the %BA P0annin, Ca0endar =transaction D)73>. 'o
se0ect the compressed data from tab0es S%BA; and S%BA%! choose the appropriate action. Lou can
branch to the detai0 0o,s at the operatin, system 0eve0.
7or an overview of a00 database backups that have been performed! use the D)A perations ,onitor
=ca00 transaction D)*(>. #n the D)A perations ,onitor! doub0e8c0ick the backup run! then choose
Display action lo2s.
9sin, SAP%BA! you can disp0ay 0o,s from database backups. Se0ect l 1 Show.0leanup! a 1 Show
lo2 files . profiles! e 1 )R)A0:;P lo2 files$
'he B3BACJ9P 0o,s are at the operatin, system 0eve0 in directory sapbackup. 7or every
B3BACJ9P action! the summary 0o, bac/<SID>$lo2 contains an entry with the date and name of
the correspondin, detai0 0o,. 'he detai0 0o,s b<time stamp>$<ext> contain a comp0ete description of
B3BACJ9P activity. 'he fi0e suffi1 <ext> depends on the B3BACJ9P function se0ected. 'he
summary 0o, and detai0 0o,s can be viewed usin, commercia0 editors or operatin, system
commands.
"ith the option brbackup -o distHtimeI5timeHdistJ! additiona0 information is entered
into the detai0 0o,. See a0so the database handbook in the 3.4 &n0ine %ocumentation.
Backups that have been terminated can be comp0eted. #n the unit AAdvanced Backups!B see the s0ide
APartia0 %atabase Backups.B
=C> SAP AG BC505 ::
6.12
SAP AG 1999
BRARCI81, option Acds 6copyD deleteD sa%e: "tat(s o' an o''line redo log 'ile
4
4
4
../saparch
G"8DHA0! G"8DHA0!
G"8DHA0 G"8DHA0
ARCI81,D
D,4,+,D
"A1,D
CO#8,D
../saparch
G"8DHA0! G"8DHA0!
G"8DHA0 G"8DHA0
43
4
44
46
45
G"8DHA03 G"8DHA03
4
44
43
4
BRARCI81, Acds
-on +(e 2ed
4
4
4
43
44
4
43
44
45
46
O''line Redo 4og Jiles= "tat(s and Option Acds
After a 0o, fi0e switch! the &rac0e process A3C; copies the on0ine redo 0o, fi0e that was the current
redo 0o, fi0e before the 0o, fi0e switch to directory saparch. An off0ine redo 0o, fi0e ,enerated in this
way can have various statuses for B3A3C;#2(. 'hese statuses are a0ways 0isted and updated in
summary 0o, arch<SID>$lo2 after a B3A3C;#2( run.
%urin, a backup to tape! an off0ine redo 0o, fi0e! when ,enerated! has the status AR06I=9. ='his
status is not disp0ayed unti0 the off0ine redo 0o, fi0e is backed up for the first time.> At first save! the
fi0e status is SA=9DS the second time! it is 0PI9DS and after de0etion! it is D9>9&9D.
%urin, a backup to disk! an off0ine redo 0o, fi0e! when ,enerated! has the status DIS:. =A,ain! this
status is not disp0ayed unti0 the off0ine redo 0o, fi0e is backed up for the first time.> A second copy is
not supported. 'he on0y statuses here are DIS:SA= =first save to disk> and DIS:D9> =de0etion after
a save to disk>.
%o not mi1 tape and dis/ backups.
B3A3C;#2( has a series of ca00 options that determine how the off0ine redo 0o, fi0es are processed.
SAP recommends the option 8cds becauseG =:> #f an off0ine redo 0o, fi0e has the status SA=9D! it is
saved to tape for a second time! and subseIuent0y de0eted from disk. 'his procedure is repeated unti0
no off0ine redo 0o, fi0e with status SA=9D is found. $e1t! a00 off0ine redo 0o, fi0es with status
AR06I=9 are backed up to tape for the first time. =-> After the backup! a00 off0ine redo 0o, fi0es e1ist
at two 0ocationsG either =a> in saparch and on tape! or =b> on two different tapes. 'hus! you can
achieve a hi,h fai08safe rate without drastica00y increasin, the tape reIuirement.
=C> SAP AG BC505 :-
6.13
SAP AG 1999
DBA#lanning Calendar
#lanning $oto 4isting Ielp "ystem
-O& -O& +7, +7, 2,D 2,D +I7 +I7 JR8 JR8 "A+ "A+ "7& "7&
-O& -O& +7, +7, 2,D 2,D +I7 +I7 JR8 JR8 "A+ "A+ "7& "7&
-O& -O& +7, +7, 2,D 2,D +I7 +I7 JR8 JR8 "A+ "A+ "7& "7&
-O& -O& +7, +7, 2,D 2,D +I7 +I7 JR8 JR8 "A+ "A+ "7& "7&
brarchi%e Acds Ad tape
Ac A( system
Command prompt A *
1
Calendar
Sc!ed4le an Action (or 4e 0'
1>?00?00 "tart time
#eriod 6)ee0s:=
J(ll database o''line S redo log bac0(p
J(ll database o''line bac0(p
J(ll database online S redo log bac0(p
J(ll database online bac0(p
Redo log bac0(p
#artial database o''line bac0(p
#artial database online bac0(p
Chec0 optimi?er statistics
Adapt ne*t e*tents
Chec0 database
i A Bac0 (p o''line redo log 'iles
"A#DBA A *
a A Archi%e '(nction CopyD deleteD and
sa%e archi%e logs
c A Archi%e de%ice type tape
s A "tart BRARCI81,
"A#DBA A *
#er'orming O''line Redo 4og Jile Bac0(ps
DB!3
'o schedu0e a00 periodic off0ine redo 0o, fi0e backups that are part of your backup strate,y! use the
%BA P0annin, Ca0endar =transaction D)73>. Back up off0ine redo 0o,s every day.
Lou can start an off0ine redo 0o, backup usin, SAP%BA by se0ectin, i 1 )ac/up offline redo lo2s. 'o
se0ect another type of backup! such as 0opy# delete and sa"e offline redo lo2s! se0ect a 1 Archi"e
function. 'o start the backup! se0ect s 1 Start )RAR06I=9.
#f you ca00 B3A3C;#2( usin, the command prompt! the parameters that have been preset usin, the
parameter fi0e =defau0tG init<SID>$sap> can be temporari0y overridden usin, ca00 options. 'o obtain
the 0ist of ca00 options! see the 3.4 &n0ine %ocumentation.
'o ensure that the tapes are readab0e! check backups re,u0ar0y usin, the option 1"erify or 1w.
SAP recommends that you perform an off0ine redo 0o, fi0e backup usin, "erify once per backup
cyc0e. #f the time window reIuired for the off0ine redo 0o, fi0e backup usin, "erify is avai0ab0e! the
tape readabi0ity check shou0d be performed durin, each off0ine redo 0o, fi0e backup.
#f you start B3A3C;#2( by choosin, 1f ?@illup-! a00 off0ine redo 0o, fi0es in saparch are initia00y
backed up accordin, to the se0ected backup function. B3A3C;#2( then periodica00y checks new0y
,enerated off0ine redo 0o,s and writes them to tape unti0 the tape is fu00.
'o cance0 brarchi"e 1f! use the command brarchi"e 1f stop on0y. $ever use TCtrl A 0B or the /ill
command =9$#)>.
=C> SAP AG BC505 :4
6.14
SAP AG 1999
sapr3."DBAI
sapr3."DBAD
4og 'iles 4og 'iles
....
....
.... ....
....
....
....
....
....
....
DBA #lanning Calendar
#lanning $oto 4isting Ielp "ystem
-O& -O& +7, +7, 2,D 2,D +I7 +I7 JR8 JR8 "A+ "A+ "7& "7&
-O& -O& +7, +7, 2,D 2,D +I7 +I7 JR8 JR8 "A+ "A+ "7& "7&
-O& -O& +7, +7, 2,D 2,D +I7 +I7 JR8 JR8 "A+ "A+ "7& "7&
-O& -O& +7, +7, 2,D 2,D +I7 +I7 JR8 JR8 "A+ "A+ "7& "7&
cd /oracle/G"8DH/saparch
cat archG"8DH.log V more
cat aGtimestampH.cds V more
Command prompt A *
4 A "ho) / Clean(p
"A#DBA A *
a A "ho) log 'iles / pro'iles
"A#DBA A *
' A BRARCI81, log 'iles
"A#DBA A *
-onitoring O''line Redo 4og Jile Bac0(ps
Database Operations
-onitor 6DB4:
CC-" Calendar
6DB!3:
DB!3
B3A3C;#2( writes 0o,s to SAP tab0es S%BA; and.or S%BA%! and to fi0es in directory saparch.
'herefore! you can check in 3.4 whether the off0ine redo 0o, fi0e backup was performed
successfu00y! by usin, SAP%BA or fi0e editors.
#n 3.4! you can monitor off0ine redo 0o, fi0e backups usin, the %BA P0annin, Ca0endar =transaction
D)73>. 'o se0ect the compressed data from tab0es S%BA; and S%BA%! choose the action you want.
Lou can branch to the correspondin, detai0 0o,s at the operatin, system 0eve0. #n addition!
transaction D)*( provides an overview of a00 e1ecuted off0ine redo 0o, fi0e backups.
9sin, SAP%BA! you can disp0ay 0o,s for the off0ine redo 0o, fi0e backups. Se0ect
l 1 Show.0leanup! a 1 Show lo2 files . profiles! f 1 )RAR06I=9 lo2 files.
'he B3A3C;#2( 0o,s are 0ocated at the operatin, system 0eve0 in directory saparch. 'he summary
0o, arch<SID>$lo2 specifies which off0ine redo 0o, fi0e was backed up usin, what action to which
tape. 'he detai0 0o, a<time stamp>$<ext@ contains a comp0ete description of B3A3C;#2( activity.
'he fi0e suffi1 <ext> depends on the B3A3C;#2( function se0ected. 'he summary 0o, and detai0
0o,s can be viewed usin, commercia0 editors or the appropriate operatin, system commands.
"ith the option brarchive -o distHtimeI5timeHdistJ! additiona0 information is entered
in the detai0 0o,. 7or more information! see the database handbook in the 3.4 &n0ine %ocumentation.
=C> SAP AG BC505 :6
6.15
SAP AG 1999
sapr3."DBAI
sapr3."DBAD
expir expir3period3SAPDBA3normal 3period3SAPDBA3normal F !! F !!
expir expir3period3dail$3check 3period3dail$3check F 5 F 5
expir expir3period3B,BAC4"P 3period3B,BAC4"P F 30 F 30
expir expir3period3B,A,C-I'5 3period3B,A,C-I'5 F 30 F 30
expir expir3period3oracle3trace 3period3oracle3trace F ! F !
....
....
....
....
init*SID+.dba
delete bGtimestampH.and
Command prompt A *
4og 'iles 4og 'iles
....
....
.... ....
....
....
....
....
....
....
4 A "ho)/Clean(p
"A#DBA A *
b A Clean(p log 'iles / directories
"A#DBA A *
a A "A#DBA log 'iles and d(mp directories
b A "A#DBA daily chec0 log 'iles
c A BRBAC/7# log 'iles
d A BRARCI81, log 'iles
' A ORAC4, traces and a(dits
"A#DBA A *
4og Jile Clean(p
'he 0o, fi0es of these SAP too0s are written to the correspondin, fi0es at operatin, system 0eve0 and
to the backup tapes. #n case of dama,e to the database! SAP%BA takes repair actions based on these
0o, fi0es.
;owever! you must de0ete 0o,! trace! and audit fi0es re,u0ar0y! especia00y those that are ,enerated by
the database. #f you do not do this! the fi0e systems overf0ow. As a resu0t of cryptic fi0e names! 0o,s
that are sti00 needed can easi0y be de0eted accidenta00y. 'herefore! you shou0d not de0ete these fi0es
usin, operatin, system commands. 'o use the SAP%BA de0ete function! se0ect l 1 Show.0leanup and
b 1 0leanup lo2 files . directories. 'his choice refers to 0o,s in directories sapreor,! sapcheck =both
SAP%BA 0o,s>! sapbackup =B3BACJ9P>! saparch =B3A3C;#2(>! saptrace.back,round!
saptrace.usertrace! and ?&3AC*(E;&M(@.rdbms.audit =a00 of which are &rac0e>. SAP%BAUs
defau0t va0ues for the minimum a,e of a 0o, before de0etion is permitted are derived from the
SAP%BA confi,uration fi0e init<SID>$dba. 'he parameters expir_period_C represent 0ower 0imits!
from which de0etion is permitted usin, SAP%BA. Lou shou0d adapt these 0imits to the backup cyc0e
used.
SAP%BA simu0taneous0y de0etes the correspondin, data in data tab0e S%BA%. 'he entries in header
tab0e S%BA; are retained. B3BACJ9P de0etes entries o0der than 600 days from tab0es S%BA; and
S%BA%. ='he operatin, system 0o,s are not de0eted.>
SAP%BA can be ca00ed in the command prompt mode usin, SAP%BA 8c0eanup. A00 directories are
then c0eaned up! accordin, to the parameters in init<SID>$dba.
=C> SAP AG BC505 :5
6.16
SAP AG 1999
Detecting an archier st#ck
-onitoring the directory saparch
' A Archi%e mode
"A#DBA A *
c A "ho) all archi%e in'ormation
"A#DBA A *
JR,, "#AC, = ...
"A#DBA A *
cd saparch
d' A0 .
Command prompt A *
../saparch
alert3*SID+.lo!=
+hread GnH cannot allocate ne) logD
All online logs needed archi%ing
BBBBBBBBBB
BBBBBBBBBB
BBBBBBBBBB
BBBBBBBBBB
"A#$78 A *
.W .W ....
Resol%ing an archier st#ck
Remo%e
d(mmy 'iles
and
R(n BRARCI81,
G"8DHA0! G"8DHA0!
D(mmy
Jreespace #roblems in Directory saparch
RL0
DB4
#n the A3C;#2(*&G mode! the 0o,writer process can override an on0ine redo 0o, fi0e on0y if it has
been backed up successfu00y to directory saparch! usin, the archiver process. 'herefore! for a
database in the A3C;#2(*&G mode! you must make sure that the archiver process is active! and
that sufficient freespace is avai0ab0e in saparch. Lou must monitor freespace dai0y.
'o monitor the freespace in saparch! use transaction D)7*. 'his transaction a0so shows an overview
of the backup status of the off0ine redo 0o, fi0es. #n SAP%BA! this freespace is disp0ayed in the
saparch directory under menu option f 1 Archi"e mode# c 1 Show all archi"e information. Lou can
a0so check the freespace usin, operatin, system commands.
#f the 0o,writer process attempts to switch to the ne1t on0ine redo 0o, fi0e! and this on0ine redo 0o,
fi0e has not been backed up by the archiver process! the database waits. 'his situation is ca00ed
archi"er stuc/ =see a0so the unit A'op :0 Prob0emsB>. A possib0e cause is missin, freespace in
saparch. 'he database a0ert 0o, then contains error messa,es. 'o reso0ve the archi"er stuc/! the
off0ine redo 0o, fi0es must be backed up to tape usin, the standard copy function! and then de0eted
from directory saparch. 'o do so! use SAP%BA or! if SAP%BA can no 0on,er 0o, on to the database!
use B3A3C;#2( at the command prompt 0eve0.
'#PG P0ace a dummy fi0e in directory saparch. #n case of an archi"er stuc/! the dummy fi0e is de0eted!
the archiver a,ain backs up off0ine redo 0o, fi0es! and the database keeps runnin, for a short time.
'his interva0 is sufficient to enab0e you to start off0ine redo 0o, fi0e backups as usua0 usin, SAP%BA.
=C> SAP AG BC505 :/
6.17
SAP AG 1999
&o) yo( are able to=
Describe the "A# bac0(p tools
-aintain the appropriate pro'ile parameters
"ched(leD per'ormD monitorD and %eri'y
database bac0(ps and o''line redo log 'ile bac0(ps
Clean (p the log 'iles )ritten d(ring a bac0(p
7nit "(mmary
=C> SAP AG BC505 :P
6.1
SAP AG 1999
J(rther Doc(mentation
/no)ledge #rod(ct CD
"A# Database Administration Oracle
Online Doc(mentation
Database Administration= Oracle
"A#&et
"A# &otes !;;0;D @505D 33630D ;;;6D
3345D !00400D !3446D !@56D !53;5D
!66;4D !064;5D !!55
=C> SAP AG BC505 :H
6.1!
SAP AG 1999
,*ercises
Q
"ol(tions
7nit Actions
=C> SAP AG BC505 :5
6.20:er3ormin" Back8,s: )6ercises
&o. ,*ercise
! Database Bac0(ps
+his e*ercise teaches yo( to (se "A# database bac0(p tools. +he
e*ercise re'ers to the play databasesD and is limited to the operating
system le%el.
1.1 0sin& SAP-/A< #er(orm a .ac,4# t!at meets t!e (ollo)in& criteria?
+!ole
$((line
o dis,
+it!o4t so(t)are com#ression
+it! a .inary veri(y
1.2 Per(orm a .ac,4# t!at meets t!e (ollo)in& criteria?
+!ole
$nline
o dis,
+it!o4t com#ression
+it!o4t 4sin& veri(y
0se eit!er SAP-/A or /R/AC;0P in t!e command #rom#t mode.
1.3 Con(irm t!at yo4r .ac,4# !as .een #er(ormed correctly .y c!ec,in& t!e lo&
(iles at t!e o#eratin& system level< and .y 4sin& SAP-/A. +!ere e1actly !as
t!e data .een .ac,ed 4#H
"ched(ling #eriodic Database Bac0(ps
+his e*ercise teaches yo( to (se the DBA #lanning Calendar in the R/3
"ystem.
2.1 +!ere in R/3 can yo4 sc!ed4le data.ase .ac,4#s #eriodically< and c!ec, a
.ac,4# a(ter it !as .een r4nH 3Please do not sc!ed4le a .ac,4#L5
3 Bac0ing 7p O''line Redo 4og Jiles
+his e*ercise teaches yo( to (se "A# bac0(p tools 'or o''line redo log
'iles. +he e*ercise re'ers to the play databasesD and is limited to the
operating system le%el.
3.1 0sin& SAP-/A< #er(orm an o((line redo lo& (ile .ac,4# t!at meets t!e
(ollo)in& criteria?
o dis,
+it! a veri(y
As an e1ce#tion< 4se t!e co#y (4nction save%delete.
3.2 Con(irm t!at yo4r o((line redo lo& (ile .ac,4# !as .een #er(ormed correctly .y
c!ec,in& t!e lo& (iles at t!e o#eratin& system level< and .y 4sin& SAP-/A.
+!ere e1actly !as t!e data .een .ac,ed 4#H
4 Optional ,*ercise= 4ogical Database Bac0(p Chec0
+his e*ercise teaches yo( to chec0 a logical database bac0(p (sing the
Oracle tool DBE1,R8J<.
=C> SAP AG BC505 -0
4.1 C!ec, t!e .ac,4# yo4 #er(ormed in e1ercise 1.1 (or lo&ical consistency 4sin&
-/B6:R"DC.
=C> SAP AG BC505 -:
6.21:er3ormin" Back8,s: 7ol8tions
&o. "ol(tion
!
1.1 Start SAP-/A. o &et to t!e .ac,4# men4< c!oose
h - &acku! database.
o start t!e .ac,4#< c!oose a - &acku! $uncti#n' (#r)al backu!. S#eci(y t!e
.ac,4# device ty#e .y c!oosin&
c - &acku! device ty!e' l#cal disk.
o de(ine )!ic! o.Kects are to .e .ac,ed 4#< c!oose
d - *b+ects $#r backu!? all.
o de(ine t!e .ac,4# ty#e< c!oose
e - &acku! ty!e #$$line.
0nder h - S!ecial #!ti#ns, c!oose
b - C#)!ress' n#
c - .eri$icati#n a$ter backu!' &inary (#$$line) #r by size (#nline)
o start t!e .ac,4# r4n< c!oose
S - Start &R&AC/01.
!e .ac,4# r4n is e1tended si&ni(icantly .y a veri$y. Additional dis, s#ace is
not reF4ired.
1.2 Sol4tion 4sin& SAP-/A?
Start SAP-/A. o &et to t!e .ac,4# men4< c!oose
h - &acku! database.
o start t!e .ac,4#< c!oose
a - &acku! $uncti#n' (#r)al backu!.
o s#eci(y t!e .ac,4# device ty#e< c!oose
c - &acku! device ty!e' l#cal disk.
o de(ine )!ic! o.Kects are to .e .ac,ed 4#< c!oose
d - *b+ects $#r backu!? all.
o de(ine t!e ty#e o( .ac,4#< c!oose
e - &acku! ty!e #nline.
0nder h - S!ecial #!ti#ns< c!oose
b - C#)!ress' n#
c - .eri$icati#n a$ter backu!' n#.
o start t!e .ac,4# r4n< c!oose S - Start &R&AC/01.
Sol4tion 4sin& /R/AC;0P?
At t!e o#eratin& system level< enter?
brbackup -c -d disk -t online -k no
o set /R/AC;0P to t!e non-monitored mode< 4se t!e o#tion -c. /e(ore
#er(ormin& t!is call< set t!e data.ase 4ser syste) #ass)ord to )ana2er
37$:? !is is only (or t!e #lay data.aseM do not 4se t!is settin& at !ome5. "(
yo4 !ave not done so< yo4 m4st enter t!e #ass)ord 4sin&
I-uH-user IGuser<I/Gpassword<JJ.
=C> SAP AG BC505 --
1.3 !e /R/AC;0P lo&s are in s4.directory sa#.ac,4# o( directory E=$%:?
cd
cd sa!backu!
!e detail lo& is named b3ti)e sta)!4.3e5t4< )it! 3e5t4 6 a$d si&ni(yin& $ull
#$$line #n disk< and 3e5t46and si&ni(yin& $ull #nline #n disk. 0sin& t!e time
t!e lo& )as created< select t!e a##ro#riate lo&< and vie) it .y enterin& 3(or
e1am#le5?
more bGtime stamp<'Ge8t<'
o vie) lo&s in SAP-/A< c!oose l - Sh#"/Cleanu!
a - Sh#" l#2 $iles / !r#$iles e - &R&AC/01 l#2 $iles.
!e (iles t!at !ave .een .ac,ed 4# are located in s4.directories o(
sa#.ac,4#. !e names o( t!ese s4.directories are identical to t!e
corres#ondin& names o( t!e detail lo&s 3)it!o4t e1tensions5.

2.1 Co4 can sc!ed4le .ac,4#s #eriodically (rom )it!in R/3 .y 4sin& t!e -/A
Plannin& Calendar 3transaction D&785.
o ma,e an entry< do4.le-clic, a (ree slot 3t!at is< day5. /y enterin& a #eriod
3(or e1am#le< 1 )ee,5 and &oin& t!ro4&! t!e )ee,days< a data.ase
administrator can F4ic,ly set 4# a .ac,4# strate&y. Dor every .ac,4# entry< a
corres#ondin& .ac,&ro4nd Ko. is created. o dis#lay t!ese .ac,&ro4nd Ko.s<
call transaction S98:.
!e mornin& a(ter t!e .ac,4#< t!e s4ccess(4l .ac,4# r4n s!o4ld also .e
c!ec,ed 4sin& transaction D&;< or D&78 3do4.le-clic, t!e .ac,4# action5.
3
3.1 Start SAP-/A. o &et to t!e desired men4< c!oose
i - &acku! #$$line red# l#2s.
o select t!e co#y (4nction< c!oose
a - Archive $uncti#n d - Save and delete archive l#2s.
o s#eci(y t!e .ac,4# device ty#e< c!oose
c - Archive device ty!e' l#cal disk.
0nder h - S!ecial #!ti#ns< c!oose
c - .eri$icati#n a$ter backu!' yes
o start t!e .ac,4# r4n< c!oose S - Start &RARCI.=.
7$:? !e .ac,ed 4# o((line redo lo& (iles cannot .e c!ec,ed at t!e .inary
level (or all co#y (4nctions. Dor an overvie) o( co#y (4nctions< see t!e R/3
online doc4mentation.
3.2 !e /RARC="6: lo&s are in s4.directory sa#arc! o( directory E=$%:?
cd
cd sa!arch
!e detail lo& is named b3ti)e sta)!4.3e5t4< )it! 3e5t4 6 svd si&ni(yin&
save % delete #n disk. 0sin& t!e time t!e lo& )as created< select t!e
a##ro#riate lo&< and vie) it .y enterin& 3(or e1am#le5?
more bGtime stamp<'Ge8t<'
o vie) lo&s in SAP-/A< c!oose
l - Sh#"/Cleanu! a - Sh#" l#2 $iles / !r#$iles $ - &R&AC/01 l#2 $iles.
=C> SAP AG BC505 -4
!e (iles t!at !ave .een .ac,ed 4# are located in directory sa#.ac,4#.
4
4.1 Co4 can #er(orm a de(erred lo&ical c!ec, o( a .ac,4# to ta#e< 4sin&
SAP-/A< .y c!oosin&
h - &acku! database a - &acku! $uncti#n $ - .eri$y &R&AC/01 ta!e.
!e .ac,4# yo4 ran (or e1ercise 1.1 )as #er(ormed to dis,. S4c! .ac,4#s
cannot .e c!ec,ed (rom )it!in SAP-/AM !o)ever< t!ey can .e c!ec,ed
4sin& /RR:S$R: at t!e command #rom#t level.
Dirst< determine t!e name o( t!e /R/AC;0P detail lo& (rom e1ercise 1.1.
o c!ec, t!e lo&< enter
brrestore -d disk -k no -w use0dbv Kb GBRB!C@"-detail
log<'
7$:? Dor .ac,4#s to dis,< -/B6:R"DC can only .e 4sed (or r4ns )it!o4t
so(t)are com#ression.
=C> SAP AG BC505 -6
7
SAP AG 1999
Restore and Reco%ery
! Database O%er%ie) 6 Ad%anced Bac0(p +echniB(es
Bac0(p "trategy and
+ape -anagement
5 "torage -anagement
3 "ched(lingD #er'ormingD
and -onitoring Bac0(ps
@ #er'ormance -onitoring
4 Restore and Reco%ery ; +op !0 #roblems
5 Bac0(p "trategies
7sing R-A&
=C> SAP AG BC505 :
7.2
SAP AG 1999
Restore and Reco%ery
Contents
Restore and reco%ery options (sing "A#DBA
"A#DBA '(nctions and their limitations
ObCecti%es
At t!e end o( t!is 4nit< yo4 )ill .e a.le to?
Analy?e the physical database str(ct(re (sing "A#DBA
Reco%er the database (sing the "A#DBA '(nction
Partial ,estore and Complete ,ecoer$
Reset the database (sing the "A#DBA '(nction ,eset Database
#er'orm a point in time reco%ery (sing the "A#DBA '(nction
6#ll ,estore and ,ecoer$
=C> SAP AG BC505 -
7.3
SAP AG 1999
,rror types=
"tatement
#rocess
8nstance
7ser
-edia
Database ,rrors
Most importantly,
be prepared for disasters.
Dont think you will never
see a failure. Every DBA will
experiene a database failure.
!ts "ust a matter of when...
#ood luk.$
Rama 1elp(ri
#n an &rac0e database! various kinds of errors can occur that reIuire the database administrator
=%BA> to take action. 'he different types of database error areG
7tatement errors! such as an attempt to enter incorrect data in a tab0e. &rac0e terminates the
statement with an error messa,e! and performs a statement ro00back.
:rocess errors! such as termination of the connection between a work process and a server
process. PM&$ ro00s back the open transaction! and re0eases occupied resources.
.nstance errors! such as when a back,round process fai0s. 'he ne1t time an instance is started! a
consistent status is restored by means of automatic instance recovery.
(ser errors! such as when a user accidenta00y enters the S+* statement drop table.
2edia errors! such as a head crash! or accidenta0 de0etion of a database fi0e.
#f user and media errors occur! the %BA must take action. 'his unit describes both of these error
types and the appropriate repair scenarios.
'o he0p you determine e1act0y when to app0y &rac0e too0s! the SAP%BA functions and their
0imitations are discussed in detai0 in this chapter.
7or further information about database errors! see the 3.4 &n0ine %ocumentation on database
administration.
=C> SAP AG BC505 4
7.4
SAP AG 1999
Control 'iles
!0
!0
!0
3@
3@
3@
O''line and online
redo log 'iles
!! ! 35 3@ . . .
Data 'iles
!0
!0
!0
3@
3@
J(ll bac0(p
!0 ; 36
3@
4egend=
4og seB(ence n(mber
;
"cenarios= 8ntrod(ction
#n an 3.4 System with an &rac0e database! most data fi0es have the status online and read.write. 7or
a functionin,! consistent database! a00 data fi0es as we00 as the contro0 fi0es must therefore be
synchronous R that is! they must match in terms of time.
&rac0e creates synchroniNation data usin, time stamps. 'ime stamps are inte,ers that are increased
durin, certain database actions! and entered in a00 data and contro0 fi0e headers by the 0o, writer or
checkpointer process at the checkpoint.
An e1amp0e of synchroniNation data is the 0o, seIuence number =*S$>! which is increased by :
durin, every 0o, switch. At a more sophisticated 0eve0! &rac0e can define synchroniNation on
transaction 0eve0 usin, the system chan,e number =SC$>! which is increased! for e1amp0e! after the
C&MM#' in a chan,e transaction! or at the checkpoint.
'he scenario shown in this s0ide =and the fo00owin, three s0ides> depicts a database that has been
saved comp0ete0y and error8free at time >S3D7'. At time >S3D35! a media or user error dama,es
the database so e1tensive0y that the database instance breaks down or the database is inconsistent.
'he off0ine and on0ine redo 0o, fi0es that were created between the be,innin, of the backup and the
occurrence of the error are avai0ab0e.
=C> SAP AG BC505 6
7.5
SAP AG 1999
3@
3@
3@
3@
3@
3@
3@
3@
3@
!0
3@
!0
#artial restore
!0 !! 35 3@ . . .
Complete
reco%ery
3; . . .
mo#nt open
"cenario= #artial Restore and Complete Reco%ery
Control 'iles
O''line and online
redo log 'iles
Data 'iles
7cenario: Because of a head crash! data has been 0ost durin, business operation. 'he database is
inconsistent! and is no 0on,er runnin, proper0y.
A partial restore and complete reco"ery is performed to ,et the database runnin, proper0y a,ain! and
to recover the database to its status Oust before the error occurred.
%urin, a restore! database fi0es are copied from the backup medium back to the disk. %urin, a
partial restore and complete reco"ery! on0y the reIuired minimum of data is copied. 'he database
fi0es that are to be copied back can be combined from different backups. Because the database fi0es
are no 0on,er synchronous after a partia0 restore! the database is inconsistent and wi00 not run
proper0y after the copy8back procedure has terminated.
'o synchroniNe the fi0es! the database eva0uates the synchroniNation data that has been saved in the
fi0e headers. 'he database reIuests a00 off0ine redo 0o, fi0es that have accumu0ated since the Ao0destB
database fi0e =in 0o,ica0 terms>! in uninterrupted seIuence. %urin, a reco"ery! a00 data chan,es
0o,,ed by these off0ine redo 0o, fi0es are rep0icated in the fi0es that have been copied back. "ith a
partial restore and complete reco"ery! a00 chan,es are performed a,ain unti0 a00 data fi0es are at the
same SC$ =a procedure ca00ed media reco"ery>. "hen the database is subseIuent0y started up!
durin, the instance reco"ery! a00 transactions that are not committed are taken back! usin, the
ro00back se,ments! which are 0ikewise recovered. 'he database is now consistent! capab0e of runnin,!
and back to its data status Oust before the error occurred.
=C> SAP AG BC505 5
7.6
SAP AG 1999
J(ll restore
!0
!0
!0
!0
!0
!0
;
!0 !! 35 3@ . . .
!0 !! . . .
open
"cenario= Database Reset
Control 'iles
O''line and online
redo log 'iles
Data 'iles
7cenario: %urin, an up,rade! e1tensive software or hardware prob0ems have arisen. As a resu0t! the
up,rade must be terminated. 'he database is inconsistent! and is no 0on,er runnin, proper0y.
7ortunate0y! a fu00 off0ine backup was performed immediate0y before the up,rade.
A database reset is performed to ,et the database runnin, proper0y a,ain! and to reset the database to
its status immediate0y before the up,rade.
'he database is reset usin, a full restore. "ith a full restore! a00 data fi0es as we00 as the o0der on0ine
redo 0o, fi0es and contro0 fi0es are copied back from the backup medium. Since these fi0es must
ori,inate from the same va0id off0ine backup! the database is consistent and ready to run after the
copy8back procedure has terminated. 'herefore! a reco"ery is not reIuiredS the database can be
started up at once.
After the database startup! new off0ine redo 0o, fi0es are ,enerated which! at the technica0 0eve0! AfitB
the fu00 backup as precise0y as the o0d off0ine redo 0o, fi0es. #f an additiona0 fu00 restore is reIuired!
you risk makin, a recovery possib0e in two different 0o,ica0 directions.
A database reset a0ways resu0ts in data 0oss. 'he data that has been ,enerated between the fu00
backup and the prob0em situation is 0ost. &f course! the database as such does remain consistent.
=C> SAP AG BC505 /
7.7
SAP AG 1999
!0
!0
!0
!0
!0
!0
!0 !! 5 . . .
! . . .
6 35 . . .
mo#nt Open resetlogs
4
4
5
5
5
5
5
5
!
!
!
!
!
!
8ncomplete
reco%ery
"cenario= #oint in +ime Reco%ery
Control 'iles
O''line and online
redo log 'iles
Data 'iles
J(ll restore
7cenario: %urin, an up,rade! a user accidenta00y enters the command drop table. As a resu0t!
the up,rade must be terminated. A fu00 backup is avai0ab0e! but was not performed immediate0y
before the up,rade process be,an.
A point in time reco"ery is performed to ,et the database runnin, proper0y a,ain! and to reset the
database to the status at a certain point in time before the up,rade. 7rom that point on! the data is
recovered up to a certain point! for e1amp0e! up to the start of the up,rade! or up to the tab0e drop.
#nitia00y! a00 data fi0es are rep0aced by copies of on0ine.off0ine backups! usin, a full restore. 'he
termination point of the recovery determines whether the contro0 fi0es shou0d a0so be rep0aced. A00
data fi0es and on0ine redo 0o, fi0es are entered in the contro0 fi0es with specified paths. 'he contro0
fi0es must reproduce this fi0e structure at the operatin, system 0eve0 accordin, to the status of the
structure at the end of the recovery procedure.
%urin, the recovery phase! the chan,es to the dataset are performed a,ain. Incomplete reco"ery
refers to the end point of recovery! which can be anywhere between the end of the copied backup and
the 0ast entry in the current on0ine redo 0o,. 'he recovery end point can be defined by the redo 0o,
fi0e seIuence number! or by specifyin, either a point in time or an SC$.
After a point in time reco"ery! the database is norma00y opened usin, alter database open
resetlogs! un0ess a comp0ete recovery is performed. Since a recovery cannot be performed after
usin, open resetlogs! a who0e backup must be tri,,ered immediate0y.
=C> SAP AG BC505 P
7.
SAP AG 1999
Io) to Iandle #roblems
Do not ma0e any rash decisions
Analy?e the problem in detail
Create a problemAsol%ing strategy
Be'ore restoring any 'ilesD chec0=
2hat is ca(sing the problem
2hether there is eno(gh dis0 space to sa%e and restore 'iles
2hether a hard)are e*tension is necessary
+he 'ile system and mo(nt points
+he a%ailability o' bac0(ps
+he a%ailability o' o''line redo log 'iles
#f a database prob0em occurs! you must ana0yNe the prob0em and create a prob0em8so0vin, strate,y.
'o ana0yNe the database prob0em! check the database a0ert 0o, and the trace fi0es be0on,in, to the
back,round processes in directory D&3AC*(E;&M(.saptrace.back,round.
Lour prob0em8so0vin, strate,y depends on the answers to the fo00owin, IuestionsG "hat is the status
of the database R avai0ab0e or not avai0ab0eV #s this a user error or a media errorV "hich fi0es are
corruptedV "hich fi0e types =data fi0es! contro0 fi0es! on0ine redo 0o, fi0es> are affectedV #s software
or hardware mirrorin, avai0ab0eV
'o be on the safe side =and time permittin,>! perform a full offline bac/up be3ore the fi0es are copied
back! usin, B3BACJ9P or operatin, system =&S> backup too0s.
#n the event of a hard disk prob0em! such as a head crash! hardware must be rep0aced. #n this unit! we
assume that! at the &S 0eve0! a fi0e system has been created and mounted at the o0d 0ocation.
#f you fo00owed the backup cyc0e recommended by SAP! you wi00 have a number of database
backups and off0ine redo 0o, fi0e backups for a restore and recovery. Lour prob0em8so0vin, strate,y
wi00 determine which backup and off0ine redo 0o, fi0es are copied back! and how they need to be
app0ied.
Do not make an9 ras$ decisions. #f you make mistakes or act care0ess0y! you can drastica00y
a,,ravate the restore and recovery situation. 'he costs incurred by a consu0tin, session provided by
SAP or an SAP partner are ne,0i,ib0e compared to the business conseIuences of data 0oss! even for a
sin,0e day of production operation.
=C> SAP AG BC505 H
7.!
SAP AG 1999
Detail logs
back*SID+.lo!
arch*SID+.lo! Reco%ery
script
saparch
Jind o''line
redo log 'iles
Restore
data 'iles
Reco%er
database
Restore o''line
redo log 'iles
Jind
bac0(ps
Chec0
Database
Database
#artial Restore and Complete Reco%ery 6!:
'he SAP%BA function partial restore and complete reco"ery rep0aces 0ost data fi0es by usin,
appropriate backups! and subseIuent0y recovers the restored data fi0e status usin, redo 0o, fi0es. 'o
be ab0e to use this function! your on0ine redo 0o, fi0es and contro0 fi0es must be va0id. 'he partial
restore and complete reco"ery procedure consists of si1 phases that are e1ecuted either manua00y or
automatica00y! in a predetermined seIuence R that is! a particu0ar phase can on0y be se0ected after the
previous one has been comp0eted successfu00y =statusG finished or not needed>.
#n the 0hec/ Database phase! the status of a00 fi0es in the database =that is! the contro0 fi0es! on0ine
redo 0o, fi0es! and data fi0es> as we00 as the tab0espace status =on0ine.off0ineS on0ine backup mode> are
checked. 0hec/ Database can be e1ecuted re,u0ar0y with the database runnin,S thus! it provides an
overview of the physica0 status of the database.
#n the 0hec/ Database phase! SAP%BA refers to entries in &rac0es 2D2iews =such as
2D%A'A7#*(! 2D3(C&2(3E7#*(>. #f an error is detected durin, this phase! a safe chec/ must be
performed R that is! the database must be shut down =initia00y usin, shutdown immediateS if
this is unsuccessfu0! SAP%BA su,,ests shutdown abort>. $e1t! to update the 2D2iews! the
database is set to status mount. SAP%BA 0o,s any recorded errors in data fi0es in directory sapreor,
with the suffi1 =rc"> for recovery. A safe check is a prereIuisite for any subseIuent restore and
recovery activities.
Missin, sapdata directories are not created automatica00yS rather! they are mount points. ;owever!
missin, subdirectories are created automatica00y.
=C> SAP AG BC505 5
7.10
SAP AG 1999
Detail logs
back*SID+.lo!
arch*SID+.lo! Reco%ery
script
Chec0
Database
Jind o''line
redo log 'iles
Restore
bac0(p 'iles
Reco%er
database
Restore o''line
redo log 'iles
Jind
bac0(ps
saparch
Database
#artial Restore and Complete Reco%ery 6:
#n the @ind )ac/up @iles phase! backups are determined usin, the entries in the B3BACJ9P
summary 0o, fi0e bac/<SID>$lo2 =return code ' or 7>. 'he associated detai0 0o,s show whether the
reIuired data fi0es were in the backup. 'he data fi0es can be compi0ed from various backups. 'o
minimiNe the subseIuent recovery time! SAP%BA a0ways su,,ests the most recent backup.
#n the Restore )ac/up @iles phase! the data fi0es are restored to their ori,ina0 0ocation. #f on0y inde1
fi0es are missin,! SAP%BA can recreate and bui0d up these fi0es usin, %atabase %ictionary
information.
#n the @ind ffline Redo >o2 @iles phase! the off0ine redo 0o, fi0es reIuired for a comp0ete recovery
are determined. 'he B3A3C;#2( summary 0o, fi0e arch<SID>$lo2 0ists the tapes where the off0ine
redo 0o, fi0es have been saved. Lou can choose between a first or second backup =for e1amp0e! when
saved! with brarchi"e 1cds>. SAP%BA takes e1istin, on0ine redo 0o, fi0es and off0ine redo 0o, fi0es in
saparch into consideration. After the appropriate backups have been found for a00 reIuired off0ine
redo 0o, fi0es! the @ind Archi"e @iles phase ends with the status finished.
#n the Restore ffline Redo >o2 @iles phase! the off0ine redo 0o, fi0es that have been found are read
=from tape> back to directory saparch.
#n the Reco"er Database phase! SAP%BA creates recovery scripts in a subdirectory of sapreor,.
9sin, these scripts! a contro0 fi0e is saved! and a reco"er database statement =that is! a comp0ete
recovery> is transmitted to &rac0e. 'he SAP%BA messa,e Reco"er database terminated successfully
indicates that the database has been recovered comp0ete0y.
=C> SAP AG BC505 :0
7.11
SAP AG 1999
#artial Restore and Complete Reco%ery 4imitations
4ogs
&o data or o''line redo
log 'ile bac0(ps a%ailable
&o BRBAC/7#/BRARCI81,
logs a%ailable
Control 'iles damaged
Online redo log 'iles damaged
init*SID+.7
&o init*SID+.7
'iles a%ailable
#roblem "ol(tions
#er'orm a database reset
#er'orm a point in time
reco%ery
7se the "A#DBA '(nction
,estore indiid#al files
Restore these 'iles 'rom
tape (sing command
brrestore -n init0ora
Copy one o' its mirrors
"ee R/3 Online Ielp
'he SAP%BA function partial restore and complete reco"ery can be used to restore 0ost data and to
hand0e the most freIuent0y occurrin, database prob0ems. #n some cases! however! partial restore
and complete reco"ery reIuires additiona0 manua0 tasks! or the use of &rac0e too0s.
#f there are no appropriate data backups! or if a00 off0ine redo 0o, fi0es ,enerated since the 0ast backup
are not avai0ab0e! you cannot run a partial restore and complete reco"ery. #n this case! you must
perform a database reset or a point in time reco"ery up to the 0ast e1istin, off0ine redo 0o, fi0e.
#f other database fi0es are corrupted! in addition to data fi0es! the partial restore and complete
reco"ery function terminates and you must restart this function once the additiona0 error has been
reso0ved.
#f the B3BACJ9P.B3A3C;#2( 0o,s cannot be found! you can restore them from the 0ast backup
usin, the SAP%BA function Restore indi"idual files.
#f the fi0es init<SID>$dba and init<SID>$ora cannot be found! you can restore them from tape. At
the command prompt! enter brrestore -n init0ora.
#f init<SID>$sap has been 0ost! SAP too0s can no 0on,er access the tape drive. #n this case! adapt a
samp0e init<SID>$sap =directory SAP8()(>! or use &S command cpio to restore it from the third
position on a B3BACJ9P or B3A3C;#2( tape.
#f a contro0 fi0e is dama,ed! you can copy one of its mirrors.
#f a00 the contro0 fi0es or on0ine redo 0o, fi0es are 0ost! see 3.4 &n0ine ;e0p! section D)A racle.
=C> SAP AG BC505 ::
7.12
SAP AG 1999
Database
sapreorg
"a%e c(rrent
online redo log 'iles
and control 'ile
O%er)rite all
data 'ilesD control 'ilesD
and online redo log 'iles
Jind
'(ll o''line
bac0(ps
Detail logs
back*SID+.lo!
Database
mo#nt
Database
open
Database Reset 7sing a J(ll O''line Bac0(p
"hen you perform a database reset! the database is reset to its previous consistent status R that is! its
status at the time of a fu00 backup. 'o determine the 0ast possib0e fu00 backup! SAP%BA is ,uided by
the entries in the B3BACJ9P summary 0o, fi0e bac/<SID>$lo2 and the associated detai0 0o,s.
3esettin, the database a0ways invo0ves data 0oss. 'herefore! SAP recommends performin, a full
offline bac/up be3ore resettin, the database. =#f the database is runnin, proper0y! use SAP too0sS
otherwise! use operatin, system too0s.>
'he SAP%BA function Reset Database can be se0ected with a fu00 off0ine backup =choose Restore
database and startup open or Restore database and startup mount>! or a fu00 on0ine consistent
backup =choose Restore database usin2 online consistent bac/ups>.
%ependin, on the function chosen! SAP%BA sets the database ether to status open =that is! no reset
lo2s> or to status mount. #f the database has status mount! you can recover data usin, &rac0e too0s!
such as the Server Mana,er. #f the database has the status open! you cannot perform a retroactive
recovery. 7or a retroactive recovery! use Restore database and startup mount instead of Restore
database and startup open.
"ith a database reset usin2 a full offline bac/up! the data fi0es! contro0 fi0es! and online redo 0o,
fi0es are overwritten usin, the appropriate =taped> backups. 7or security reasons! these fi0es are
copied immediate0y to a subdirectory of sapreor,. ='o enab0e these copies to be made! the database
must have the status mount.>
=C> SAP AG BC505 :-
7.13
SAP AG 1999
Reco%ery
script
saparch
Database
sapreorg
"a%e online
redo log 'iles
and control 'ile
Jind
OnlineECons
bac0(ps
Detail logs
back*SID+.lo!
Reco%er
database
(ntil cancel
Database
open
resetlogs
Database Reset 7sing a Consistent Online Bac0(p
O%er)rite all
Data 'iles and
control 'iles
O''line
redo log 'iles
"hen you perform a database reset usin2 a full online consistent bac/up! the database is reset to a
consistent status from the end =point in time> of the fu00 backup.
"ith a database reset usin2 a full online consistent bac/up! data fi0es! contro0 fi0es! and o33line redo
0o, fi0es are overwritten by the appropriate =taped> backups. 'herefore! you must save a00 off0ine redo
0o, fi0es in saparch usin, B3A3C;#2( and perform a fu00 backup be3ore you reset the database
usin, &n0ineECons. %urin, this process! note the messa,es disp0ayed by SAP%BA.
After a fu00 restore! durin, a point in time reco"ery =recover database using backup
controlfile until cancel>! on0y the off0ine redo 0o, fi0es created durin, the on0ine
consistent backup are restored and app0ied. $o other point in time can be chosen. 'he database is
then started usin, option resetlo2s. 'he on0ine redo 0o, fi0es are new0y initia0iNed or new0y created.
%ata cannot be recovered after openin, the database with the option resetlo2s! therefore! you must
perform a backup. $one of the backups performed before the database reset usin2 online consistent
bac/ups can be used for a partial restore and complete reco"ery. $oteG After a successfu0 database
reset! any off0ine redo 0o, fi0es that have been restored shou0d be de0eted manua00y from saparch.
#f SAP too0s have been used! reworkin, is reIuired after a database reset. Since 0o, tab0es S%BA;
and S%BA% are reset to an obso0ete status! B3BACJ9P may reIuest tapes that have been re0eased
=in 0o,ica0 terms>! but which are physica00y sti00 0ocked. B3A3C;#2( may not reco,niNe the new
off0ine redo 0o, fi0es as needin, to be saved. 7or more detai0s! see 3.4 &n0ine ;e0p! chapter D)A
racle.
After a successfu0 database reset! the data fi0es can be searched for corrupt b0ocks! usin, the &rac0e
too0 %BE2(3#7L.
=C> SAP AG BC505 :4
7.14
SAP AG 1999
Jind o''line
redo log 'iles
Jind '(ll o''line/
online bac0(ps
Detail logs
back*SID+.lo! arch*SID+.lo!
Reco%er
(ntilQ
"tat(s=
allo)edQ
reor!*SID+.lo!
Database
8np(t=
time
&ot allo)ed i' (for example8=
A &o bac0(p speci'ied
A &o o''line redo log 'iles 'o(nd
A Reco%ery o%er tablespace reorg
A Bac0(p be'ore open resetlo!s
J(ll Restore and Reco%ery 6!:
"ith a full restore and reco"ery! the database is reset to a consistent status between the =end> point in
time of the fu00 backup! and the current point in time. 'his SAP%BA function corresponds to the
point in time recovery.
A full restore and reco"ery usua00y invo0ves data 0oss. 'herefore! SAP recommends that you perform
a full offline bac/up be3ore any full restore and reco"ery. =#f the database is runnin, proper0y! use
SAP too0sS otherwise! use operatin, system too0s.> #n addition! a00 off0ine redo 0o, fi0es in saparch
shou0d be saved usin, B3A3C;#2(.
A full restore and reco"ery can be performed usin, SAP%BA if the database can be set to status
mount or open. 7irst! a fu00 on0ine =or! if app0icab0e! &n0ineECons>! or a fu00 off0ine backup must be
se0ected. A,ain! SAP%BA is ,uided by the B3BACJ9P summary 0o, fi0e bac/<SID>$lo2 and the
correspondin, detai0 0o,s. $e1t! enter the recovery end point. 7or a comp0ete recovery! enter B#L.
'he off0ine redo 0o, fi0e backups reIuired for this point in time recovery are determined usin, the
entries in the B3A3C;#2( summary 0o, fi0e arch<SID>$lo2.
9nder Show Status! SAP%BA indicates whether the intended recovery is a00owed =statusG allowed>.
A recovery may be reOected ifG
$o fu00 backup has been specified! or the reIuired off0ine redo 0o, fi0es have not been found
'he recovery to be run contains a tab0espace reor,aniNation with data fi0es
'he se0ected backup is dated before the 0ast time the database was opened usin, the option
resetlo2s.
=C> SAP AG BC505 :6
7.15
SAP AG 1999
Reco%ery
script
saparch sapreorg
"a%e online
redo log 'iles
and control 'ile
Reco%er
database
6(ntil time:
Database
Database
open
6resetlogs:
O%er)rite all
Data 'iles and
control 'iles
6i' necessary:
O''line redo
log 'iles
J(ll Restore and Reco%ery 6:
7or security reasons! the current on0ine redo 0o, fi0es and a contro0 fi0e are copied to a subdirectory
of sapreor,. A00 data fi0es are restored from the backup medium =full restore>. 'he contro0 fi0es may
a0so be restored! dependin, on whether a tab0espace was e1tended at the recovery time point.
After a fu00 restore! SAP%BA can rep0icate the tab0espace e1tension in the database! usin, alter
database add data file... #nformation about fi0e specifications is contained in directory sapreor, in
the SAP%BA 0o,s struct<SID>$lo2 and reor2<SID>$lo2. After a tab0espace e1tension! or after
movin, data fi0es to another 0ocation! ensure you back up the new0y chan,ed structure.
'he off0ine redo 0o, fi0es reIuired for the indicated recovery time point are restored to directory
saparch. 9sin, a recovery script! the database is recovered to the desired point in time =recover
database until time 88yy77 Iusing backup controlfileJ>.
#f recovery was incomp0ete! the database must be opened usin, the option resetlo2s. 9sin, the
&rac0e too0 %BE2(3#7L! the database can be searched for corrupt data b0ocks. #n addition!
SAP%BA automatica00y ,oes to the backup menu! since the database has been opened usin,
resetlo2s.
'he copied off0ine redo 0o, fi0es shou0d be de0eted from directory saparch. #f you have used SAP
too0s! reworkin, is reIuired after an incomp0ete recovery. 7or more detai0s! see 3.4 &n0ine ;e0p!
chapter D)A racle.
=C> SAP AG BC505 :5
7.16
SAP AG 1999
7nit "(mmary
&o) yo( are able to=
Analy?e the physical database str(ct(re (sing
"A#DBA
Reco%er the database (sing the "A#DBA '(nction
Partial ,estore and Complete ,ecoer$
Reset the database (sing the "A#DBA '(nction
,eset Database
#er'orm a point in time reco%ery (sing the "A#DBA
'(nction 6#ll ,estore and ,ecoer$
=C> SAP AG BC505 :/
7.17
SAP AG 1999
J(rther Doc(mentation
/no)ledge #rod(ct CD
"A# Database Administration Oracle
R/3 Online Ielp
Basis Database interface DBA 9racle
"A# +ech&et
Information Media Center S$stem
Mana!ement CCMS
R. 1elp(riD A. Ad0oli
Oracle@ Bac0(p and Reco%ery Iandboo0.
Oracle #ressD Osborne
=C> SAP AG BC505 :P
7.1
SAP AG 1999
,*ercises
Q
"ol(tions
7nit Actions
=C> SAP AG BC505 :H
7.1!'estore and 'eco%er9: )6ercises
&o. ,*ercise
! Partial ,estore and Complete ,ecoer$ 7sing "A#DBA
!is e1ercise demonstrates data.ase .e!avior a(ter accidental loss o( data<
)it! t!e aim o( (amiliariGin& t!e #artici#ant )it! 4se o( t!e SAP-/A (4nction
1artial rest#re and c#)!lete rec#very< and o( #ointin& o4t t!e limitations o(
t!is #ro&ram.
1.1 :ns4re t!at at least one valid (4ll .ac,4# 3online/o((line5 is availa.le< and t!at
yo4r o((line redo lo& (ile c!ain is .ac,ed 4# )it!o4t any &a#s.
1.2 Sim4late a !ead cras! .y deletin& t!e entire contents o( directory sa#data3
3s4.directories #rotdB1< sta.iB1< 4ser1iB15.
Restore yo4r data.ase com#letely 4sin& one o( t!e .ac,4#s yo4 #er(ormed
(or t!e 4nit NSc!ed4lin&< Per(ormin&< and %onitorin& /ac,4#sN. 0se t!e
SAP-/A (4nction 1artial rest#re and c#)!lete rec#very.
1.3 Sim4late a !ead cras! .y deletin& directory sa#data2 3s4.directories #rotiB1<
sta.dB1< 4ser1dB1< cntrl5.
Restore yo4r data.ase com#letely 4sin& one o( t!e .ac,4#s yo4 #er(ormed
(or t!e 4nit NSc!ed4lin&< Per(ormin&< and %onitorin& /ac,4#sN. 0se t!e
SAP-/A (4nction 1artial rest#re and c#)!lete rec#very. C!oose t!e o#tion
1artial rest#re and c#)!lete rec#very a second time a(ter yo4 !ave
eliminated t!e error.
=C> SAP AG BC505 :5
7.20'estore and 'eco%er9: 7ol8tions
&o. "ol(tion
!
1.2 C!an&e to directory sa#data3< 4sin& cd /#racle/3SID4/sa!data8.
o con(irm t!at only s4.directories #rotdB1< sta.iB1< 4ser1iB1 are located in
sa#data3< enter ls Kl'
o delete t!ese directories< enter
rm Kr protd0/5 stabi0/5 user/i0/'
Start SAP-/A. 0nder +' Rest#re/Rec#very< c!oose a' 1artial rest#re and
c#)!lete rec#very. o determine t!e (4nction o( eac! o( t!e si1 #!ases< r4n
t!ro4&! eac! o( t!em man4ally and in seF4ence.
"n t!e a' Check #!ase, t!e loss o( data (iles is detected. 7e1t< SAP-/A
attem#ts to s!4t do)n t!e data.ase< 4sin& shutdown immediate' Since a
consistent data (ile stat4s can no lon&er .e ac!ieved< t!is attem#t (ails. !e
-/A m4st s4.seF4ently con(irm t!e shutdown abort. SAP-/A .rin&s t!e
data.ase to t!e )#unt stat4s< and detects t!e loss o( a total o( t!ree data
(iles.
"n t!e b' Find &acku! Files #!ase< 4nder d' Select a backu! run $#r rest#re<
yo4 can c!oose one o( t!e .ac,4#s yo4 #er(ormed (or t!e 4nit NSc!ed4lin&<
Per(ormin&< and %onitorin& /ac,4#sN. SAP-/A a4tomatically s4&&ests t!e
most recent .ac,4#. 0nder c' Select a backu! $ile $#r rest#re< con(irm t!at t!e
.ac,4# yo4 !ave c!osen is .ein& 4sed (or t!e restore.
A(ter t!e desired data (iles !ave .een s4ccess(4lly restored d4rin& t!e c'
Rest#re &acku! Files #!ase< t!e reF4ired o((line redo lo& (iles are determined
d4rin& t!e d' Find Archive Files !hase.
"( .ac,4#s !ave .een #er(ormed to several ta#es 3(or e1am#le< brarchive
-cds5< t!e individ4al r4ns can .e selected 4nder e' Rest#re Archive $iles.
Recovery is started 4sin& $' Rec#ver Database. !e messa&e Rec#ver
database ter)inated success$ully indicates s4ccess(4l com#letion o( a re#air
action.
1.3 C!an&e to t!e $racle !ome directory 4sin& cd /#racle/3SID4. -elete t!is
directory .y enterin& rm Kr sapdata6'
As )it! e1ercise 1.2< c!an&e to t!e e5!ert mode. 0nder +' Rest#re/Rec#very<
start t!e (4nction a' 1artial rest#re and c#)!lete rec#very.
"n t!is scenario< alon& )it! directory SAP-AA< a control (ile !as also .een
lost in addition to data (iles. +!en t!is error occ4rs< t!e -/A m4st ta,e
man4al action. -4rin& t!e c!ec, #!ase< 1artial rest#re and c#)!lete
rec#very is a.orted.
"n (ile init3SID4.#ra< c!ec, )!ere t!e data.ase e1#ects control (iles< and
enter?
cd /oracle/GS1D</dbs
more initGS1D<'ora
C!ec, t!e val4e set (or #arameter c#ntr#l$iles.
0sin& SAP-/A< s!4t do)n t!e data.ase< .y c!oosin&
a' Startu!/Shutd#"n instance b' Shutd#"n d' Shutd#"n ab#rt
Create directory sa#data2 once a&ain 3normally< t!is is t!e mo4nt #oint in t!e
=C> SAP AG BC505 -0
data.ase system5.
S!4t do)n t!e data.ase 4sin& SAP-/A )it! Shutd#"n ab#rt. "n (ile
init3SID4.#ra< con(irm t!e location o( yo4r data.ase control (iles< and t!eir
names 34nder #arameter c#ntr#l>$iles5. "n directory sa#data2< create a
s4.directory (or t!e control (ile< and co#y a mirror o( t!e control (ile to t!is
s4.directory. 37$:? Co#yin& a control (ile (rom one o( yo4r .ac,4#s leads
to an 4nnecessary recovery sit4ation t!at can only .e resolved .y a $ull
rest#re and $ull rec#very< or .y 4sin& $racle commands.5
7e1t< t!e SAP-/A (4nction !artial rest#re and $ull rec#very can .e restarted.
"t t!en r4ns a4tomatically.
"n t!e $racle !ome directory< create a ne) sa#data2 directory. Dor t!is
directory< create a s4.directory (or t!e control (ile .y enterin&?
cd /oracle/GS1D<
mkdir sapdata6
cd sapdata6
mkdir cntrl
Co#y a mirrored control (ile @so4rceA to t!e ne) directory.
cd cntrl
cp Gsource<
7$:? Co#yin& a control (ile (rom one o( t!e .ac,4#s leads to a recovery
sit4ation t!at can no lon&er .e resolved 4sin& 1artial rest#re and c#)!lete
rec#very.
As (or e1ercise 1.2< in SAP-/A 4nder +' Rest#re/Rec#very< start t!e (4nction
a' 1artial rest#re and c#)!lete rec#very. !e data.ase re#air is no)
#rocessed as descri.ed in e1ercise 1.2.
=C> SAP AG BC505 -:

SAP AG 1999
Bac0(p "trategies 7sing R-A&
! Database O%er%ie) 6 Ad%anced Bac0(p +echniB(es
Bac0(p "trategy and
+ape -anagement
5 "torage -anagement
3 "ched(lingD #er'ormingD
and -onitoring Bac0(ps
@ #er'ormance -onitoring
4 Restore and Reco%ery ; +op !0 #roblems
5 Bac0(p "trategies
7sing R-A&
=C> SAP AG BC505 :
.2
SAP AG 1999
Contents
Bac0(p strategies (sing R-A&
ObCecti%es
At t!e end o( t!is 4nit< yo4 )ill .e a.le to?
,*plain the %ario(s bac0(p strategies (sing R-A&
Decide )hether R-A& bac0(p strategies 'it the
needs o' yo(r company
Bac0(p "trategies 7sing R-A&
3MA$ =3ecovery Mana,er> is de0ivered with &rac0e. 'his chapter describes the various 3MA$
backup options that are avai0ab0e for use with SAP too0s.
=C> SAP AG BC505 -
.3
SAP AG 1999
J(ll Bac0(p 64e%el 0: )ith R-A& and "A# +ools 6!:
cpio/dd
brbac0(p
R-A&
Control (iles
-ata.ase (iles
! ! !

3 3 3
le%el 0=
back#p3mode back#p3mode F '(ll F '(ll
tape3 tape3cop$3cmd cop$3cmd F cpioVdd F cpioVdd
cpio/dd
#f you use SAP too0s for a database backup with 3MA$! you cannot perform a native backup with
3MA$.
'wo types of backup usin, 3MA$ can be performedG
7u00 backup =a0so ca00ed 0eve0 0 backup>
#ncrementa0 backup =a0so ca00ed 0eve0 : backup>. An incrementa0 backup is based on the 0ast fu00
backup! and wi00 be discussed 0ater in this chapter.
7or more information about full! incremental and whole backup types! see SAP $ote :P00:4.
A fu00 backup is a0ways performed with backupEmode M fu00. #n a fu00 backup! there are two ways of
writin, data to tapeG
Backin, up data with 3MA$
Backin, up data with &S too0s
#f SAP too0s are used! no recovery cata0o, is reIuired. 'he backed up data fi0es are cata0o,ed in the
contro0 fi0e.
"ith 38ll back8, with O7 tools! the tapeEcopyEcmd parameter is set to cpio or dd and the data fi0es
are saved to tape with the command specified. After that! brbackup starts 3MA$. 3MA$ cata0o,s
the backed up data fi0es to the contro0 fi0e as 0eve0 0 backup. A contro0 fi0e is then backed up to tape
with the &S too0 specified =cpio or dd>.
=C> SAP AG BC505 4
.4
SAP AG 1999
J(ll Bac0(p 64e%el 0: )ith R-A& and "A# +ools 6:
Oracle
shado)
process

3 3 3
R-A&
le%el 0=
"B+ 4ib
back#p3mode back#p3mode F '(ll F '(ll
tape3cop$3 tape3cop$3cmd cmd F rman F rman

Control (iles
-ata.ase (iles
cpio
brbac0(p
! ! !
"ith 38ll back8, with '2A< the tapeEcopyEcmd parameter is set to rman. Brbackup starts
3MA$! which backs up the data fi0es. 3MA$ reads a00 data fi0e b0ocks! and on0y backs up those
b0ocks that are no 0on,er in initia0 status. ConseIuent0y! b0ocks from dropped tab0es are a0so backed
up. 'he b0ocks are backed up by the &rac0e shadow process direct to tape. A backup 0ibrary for
&rac0e must therefore be insta00ed =see SAP $ote :6-/45>. %urin, the data fi0e backup! 3MA$
cata0o,s the 0eve0 0 backup to the contro0 fi0e. After the data fi0e backup! a contro0 fi0e =with a00 0eve0
0 information> is saved to tape.
Advanta,es of backin, up with 3MA$G
A00 b0ocks are checked for b0ock corruption
'he tab0espaces are not set to be,in.end backup mode. 'hus! usua00y! fewer off0ine redo 0o, fi0es
are created.
*ess data to be backed up
Ca8tionG A who0e or partia0 backup with 3MA$ =tapeEcopyEcmdMrman! backupEmode M a00> is
possib0e! but is not a 0eve0 0 backup. ;owever! a00 other advanta,es mentioned above app0y.
7u00 backups to disk can a0so be performed =backupEdevEtypeMdisk>. 'he parameter diskEcopyEcmd
is used instead of the parameter tapeEcopyEcmd! with the correspondin, settin,s. 'he method differs
on0y where 3MA$ is usedG $o backup 0ibrary for &rac0e is needed! and data fi0es instead of savesets
are saved =as is the case when usin, &S too0s>.
=C> SAP AG BC505 6
.5
SAP AG 1999
sa%eset
Ieader
+railer
"a%esets
sa%esetEmembers F !V V 3V 4 sa%esetEmembers F tsp sa%esetEmembers F all
sa%eset
Ieader
+railer
sa%eset
Ieader
+railer
btabd.data!
btabd.data9
sa%eset
Ieader
+railer
sa%eset
Ieader
+railer
data'ileA
data'ileB
data'ileC
data'ileD
data'ile!
data'ile&
#n a backup usin, 3MA$! the tape 0ayout is the same as with a backup usin, &S too0s. 'he
difference is that savesets are backed up instead of data fi0es.
A saveset consists of a header! a trai0er! and the b0ocks of at 0east one data fi0e. Savesets are on0y
used when the backup is performed with 3MA$.
'he init?S#%@.sap parameter savesetEmembers determines the number of savesets. 'his parameter
can be overridden in sapdba or by ca00in, up brbackup.
'he fo00owin, settin,s are possib0eG :! -! 4! 6! tsp or a00. 7or e1amp0eG
#f savesetEmembers M 6! four data fi0es are ,rouped to,ether to form one saveset. #n a comp0ete
database backup! severa0 savesets are formed! each with the data from four data fi0es. 'hese
savesets are backed up to tape.
#f savesetEmembers M tsp! a saveset is formed for every tab0espace that is to be backed up. 'he
saveset contains the data of a00 data fi0es per tab0espace.
#f savesetEmembers M a00! on0y one saveset is formed. 'his saveset contains the data of a00 data
fi0es.
#f savesets are formed from more than one data fi0e! 3MA$ reads the data in para00e0 from the
appropriate data fi0es.
Advanta,eG ;i,her output to the tape station=s>. 7ast tape stations can be kept in streamin, mode!
thus reducin, the time reIuired for a backup.
%isadvanta,eG #n a restore.recovery situation! if the data from one data fi0e is needed! the comp0ete
saveset must be read from the tape. #f a disk that contains severa0 data fi0es is dama,ed! these data
fi0es must be restored from severa0 savesets for the restore.recovery.
=C> SAP AG BC505 5
.6
SAP AG 1999
#reparation R(n
brbac0(p
! ! !

R-A&
/de%/n(ll
compression
rate
sa%esetEmembers F ! sa%esetEmembers F !
sa%esetEmembers F 4 sa%esetEmembers F 4
sa%eset != compressratio * sa%eset != compressratio *
data'ileA data'ileA
data'ileB data'ileB
data'ileC data'ileC
data'ileD data'ileD
sa%eset = compressratio y sa%eset = compressratio y
sa%esetEmembers F tsp sa%esetEmembers F tsp
sa%esetEmembers F all sa%esetEmembers F all
3 3 3
4 4 4
data 'ile
"tart preparation
r(n once
per cycle
"tart preparation
r(n once
per cycle
Oracle
shado)
process
"B+ 4ib
brtools
#f tape stations with hardware compression! or savesets with more than one member! are used! you
must perform a preparation run.
#n the preparation run! brbackup starts an 3MA$ backup of every data fi0e to a saveset of its own.
'he data is compressed by brtoo0s! and sent to .dev.nu00. 'herefore! no additiona0 space on the hard
disk is reIuired. 'he compression rate of every saveset with one member is verified by brtoo0s! and
sent to brbackup.
At this point! brbackup determines how data fi0es are a00ocated to savesets for every possib0e va0ue of
savesetEmembers! and ca0cu0ates the compression rate of each saveset. 'he a00ocation cannot be
contro00ed! and on0y chan,es =if necessary> when a further preparation run is performed. 'herefore!
between two preparation runs! if the savesetEmembers parameters are the same! the savesets contain
the same data fi0es.
#f data fi0es e1ist that were not inc0uded in the preparation run =for e1amp0e! because a data fi0e was
added>! each one of these fi0es is put in its own saveset.
"e recommend that you perform a preparation run once per backup cyc0e! or after maOor database
chan,es! for e1amp0e! reor,aniNation! mass data transfer! or an SAP or database re0ease up,rade.
=C> SAP AG BC505 /
.7
SAP AG 1999
8ncremental 64e%el !: Bac0(p
4e%el 0 bac0(p
!0
!0
!0
5
5
5
brbac0(p
Oracle
shado)
process
R-A&
4e%el ! bac0(p
! ! !

3 3 3
le%el 0= X !0 le%el 0= X !0
Control (iles
-ata.ase (iles
"B+ 4ib
cpio/dd
!0
!0
!0
5
5
5
#ncrementa0 backup =a0so known as 0eve0 : backup> is a0ways based on the last le%el 0 backup =fu00
backup>. "ith SAP too0s! on0y cumu0ative 0eve0 : backup is supported as incrementa0 backup.
3MA$ retrieves information about the 0ast 0eve0 0 backup from the contro0 fi0es. An incrementa0
backup is a0ways a backup of the who0e database! not of individua0 data fi0es.
#n an incrementa0 backup! all b0ocks of a00 data fi0es are a0ways read. ;owever! on0y those b0ocks
that have chan,ed since the 0ast 0eve0 0 backup are backed up. 'herefore! if 0on, backup runtime was
caused by 0ow throu,hput on the tape stations! incrementa0 backup can reduce the backup time.
&n0y one saveset =endin, in .#$C3> is created for an incrementa0 backup 'he parameter
savesetEmembers is set to a00. Since on0y one saveset is created! the backup must fit on one tape.
7o00ow8up tapes cannot be used. After the incrementa0 backup is comp0ete! a contro0 fi0e is saved to
tape.
#f data fi0es have been added to the database between the 0ast 0eve0 0 backup and the 0eve0 : backup!
a 0eve0 0 backup is performed for these new data fi0es before the 0eve0 : backup starts. A00 new data
is backed up to one saveset =endin, in .79**>! even if the data was partia00y backed up.
=C> SAP AG BC505 P
.
SAP AG 1999
4e%el ! Bac0(p= 8mportant Considerations 6!:
"at/"(n
4e%el 0
bac0(p
4e%el !
bac0(p
4e%el !
bac0(p
4e%el !
bac0(p
-on +(e Jri
. . .
. . .
4e%el 0
bac0(p
-on Jri
4e%el !
bac0(p
4e%el !
bac0(p
. . .
. . .
data 'iles data 'iles
#artial restore and complete reco #artial restore and complete reco%ery )ith %ery )ith sapdba sapdba
reco%ery )ith o''line redo log 'iles 4e%el ! bac0(p based on 4e%el 0 bac0(p
"at/"(n
"ith SAP too0s! on0y cumu0ative incrementa0 backups are supported at 0eve0 :. 'his means that
incrementa0 backups contain a00 b0ocks that have chan,ed since the most recent 0eve0 0 backup =in
re0ation to the time the 0eve0 : backup was performed>.
#f a restore.recovery is necessary =for e1amp0e! due to a disk crash>! a 0eve0 : backup is not sufficient
to repair the database. 'he 0eve0 0 backup of the dama,ed data fi0es are al5a9s needed. 'hese data
fi0es must be restored from the 0eve0 0 backup. 'hen the chan,ed b0ocks from the 0eve0 : backup
=which must be based on t$is 0eve0 0 backup> can be imported to the data fi0e. $ow you on0y need to
perform a recovery from the time the 0eve0 : backup was made. #f no 0eve0 : backup is avai0ab0e for
this 0eve0 0 backup! then you must perform a recovery based on the 0ast avai0ab0e 0eve0 0 backup.
'his usua00y takes 0on,er than usin, the 0eve0 : backup as a basis.
#f the 0atest 0eve0 0 backup is dama,ed! then you must use the previous 0eve0 0 backup as a basis for
recoverin, the data fi0e. &n0y 0eve0 : backups can be used that are based on t$is =that is! previous>
backup. 'he 0eve0 : backups that are based on the dama,ed 0eve0 0 backup cannot be used.
=C> SAP AG BC505 H
.!
SAP AG 1999
4e%el ! Bac0(p= 8mportant Considerations 6:
Recommended?
! le%el 0 bac0(p
per )ee0
Stron&ly recommended?
4 le%el 0 bac0(ps
per cycle
6i' necessaryD increase
bac0(p cycle:
As basis 'or a
le%el ! bac0(p
"e recommend that you
Perform at 0east one 0eve0 0 backup per week
"e stron,0y recommend that you
(nsure that each backup cyc0e contains four 0eve0 0 backups. #f necessary! increase the backup
cyc0e. &therwise! the who0e backup strate,y is dependent on one or two 0eve0 0 backups. #f the
most recent 0eve0 0 backup was not performed in the current backup cyc0e! a warnin, appears
when the 0eve0 : backup is performed. Ca8tion: #f the most recent 0eve0 0 backup was not
performed in the current backup cyc0e! then it cannot norma00y be used for a restore because it has
been overwritten. 'herefore! if a disk error occurs! the resu0t can be a com,lete loss o3 data.
"e recommend that you verify a 0eve0 0 backup at 0east once per backup cyc0e! but preferab0y once a
week. A de0ayed verification with brrestore is on0y possib0e on the database host with an open or
mounted database.
=C> SAP AG BC505 5
.10
SAP AG 1999
Reco%ery 7sing 8ncremental Bac0(p )ith sapdba
Database
Restore
data 'iles
Jind
bac0(ps
Detail logs
back*SID+.lo!
Chec0
Reco%er
database
Reco%ery
script
saparch
Jind
o''line
redo log
'iles
arch*SID+.lo!
Restore
le%el !
bac0(p
Detail logs
back*SID+.lo!
Jind
le%el !
bac0(ps
Jind
le%el 0
bac0(ps
Restore
o''line redo
log 'iles
Restore
le%el 0
bac0(p
A partia0 restore and comp0ete recovery with 0eve0 0 and 0eve0 : backup is on0y s0i,ht0y different than
a partia0 restore and comp0ete recovery of a who0e backup.
'he check and repair phase is performed as norma0.
#n the find backup phase! the 0eve0 0 backup is se0ected. #n the restore backup phase! the data fi0e=s>
is.are restored.
#n the find 0eve0 : backup phase! a 0eve0 : backup is se0ected that is based on the 0eve0 0 backup
se0ceted. #n the restore 0eve0 : backup! the b0ocks that were backed up in the 0eve0 : backup are
written to the restored data fi0es.
'he phases that fo00ow are performed as norma0.
=C> SAP AG BC505 :0
.11
SAP AG 1999
7nit "(mmary
&o) yo( are able to=
,*plain the %ario(s bac0(p strategies (sing R-A&
Recogni?e the ad%antages and limitations o' these
strategies
Decide )hether R-A& bac0(p strategies 'it the
needs o' yo(r company
=C> SAP AG BC505 ::
.12
SAP AG 1999
J(rther Doc(mentation
/no)ledge #rod(ct= "A# Database
Administration Oracle
,&: 9nline Doc#mentation; BC
SAP Database Administration;
9racle
SAPTech<et DB Admin. 9racle
4no%led!e Base
"A# &ote !500!3
=C> SAP AG BC505 :-
.13
SAP AG 1999
,*ercises
Q
"ol(tions
7nit Actions
=C> SAP AG BC505 :4
.14Back8, 7trate"ies (sin" '2A<: )6ercises
3$#tional5
&o. ,*ercise
! J(ll Bac0(p 64e%el 0:
8n these e*ercises yo( per'orm a '(ll bac0(p )ith the "A# database
bac0(p tools. +he e*ercise re'ers to the play databasesD and is limited
to the operating system le%el.
1.1 %aintain t!e standard settin&s (or (4ll .ac,4#s in t!e (ile init@S"-A.sa#.
-ecide )!et!er to #er(orm t!e (4ll .ac,4# )it! $S tools or )it! R%A7 and
maintain t!e a##ro#riate #arameter. 3:ns4re t!at t!e .ac,4# is made to
dis,.5
1.2 Per(orm a (4ll .ac,4# to dis, )it! SAP-/A.
1.3 Con(irm t!at yo4r (4ll .ac,4# !as .een #er(ormed correctly .y c!ec,in& t!e
lo& (iles at t!e o#eratin& system level< and .y 4sin& SAP-/A.
1.4 $#tional? Dorce several lo& (ile s)itc!es 3ca. 35
8ncremental Bac0(p 64e%el !:
2.1 Per(orm an incremental .ac,4# to dis, )it! SAP-/A.
2.2 Con(irm t!at yo4r incremental .ac,4# !as .een #er(ormed correctly .y
c!ec,in& t!e lo& (iles at t!e o#eratin& system level< and .y 4sin& SAP-/A.
2.3 +!ic! (ile contains t!e .ac,ed-4# .loc,sH
+!ere can yo4 (ind t!is (ileH
3 Partial ,estore and Complete ,ecoer$ 7sing 8ncremental Bac0(p )ith
"A#DBA
3.1 :ns4re t!at at least one valid (4ll .ac,4# 3*evel 0< online/o((line5 is availa.le<
and t!at yo4r o((line redo lo& (ile c!ain is .ac,ed 4# )it!o4t any &a#s.
3.2 Sim4late a !ead cras! .y deletin& t!e entire contents o( directory sa#data3
3s4.directories #rotdB1< sta.iB1< 4ser1iB15.
3.3 Re#air yo4r data.ase 4sin& t!e (4ll and incremental .ac,4#s yo4 #er(ormed
in :1ercises 1 and 2. 0se t!e SAP-/A (4nction 1artial rest#re and c#)!lete
rec#very.
=C> SAP AG BC505 :6
.15Back8, 7trate"ies (sin" '2A<: 7ol8tions
&o. "ol(tion
!
1.1 0sin& t!e $S editor< in (ile /oracle/@S"-A/d.s c!an&e t!e (ollo)in&
#arameters o( (ile init@S"-A.sa#?
.ac,4#Bmode O (4ll
.ac,4#BdevBty#e O dis,
dis,Bco#yBcmd O co#y
or dd or rman
1.2 Start SAP-/A. o &et to t!e .ac,4# men4< c!oose
h - &acku! database.
o start t!e .ac,4#< c!oose a - &acku! $uncti#n' (#r)al backu!. S#eci(y t!e
.ac,4# device ty#e .y c!oosin&
c - &acku! device ty!e' l#cal disk.
o de(ine )!ic! o.Kects are to .e .ac,ed 4# and )!ic! ,ind o( .ac,4# is to
.e #er(ormed< c!oose
d - *b+ects $#r backu!? $ull.
o de(ine t!e .ac,4# ty#e c!oose (or e1am#le
e - &acku! ty!e #nline.
0nder h - S!ecial #!ti#ns< c!oose
b - C#)!ress' n#
o start t!e .ac,4# r4n< c!oose
S - Start &R&AC/01.
1.3 !e /R/AC;0P lo&s are in s4.directory sa#.ac,4#.
cd /oracle/GS1D</sapbackup
!e detail lo& is named b3ti)e sta)!4.3e5t4< )it! 3e5t4 6 $nd si&ni(yin& $ull
#nline #n disk< and 3e5t46$$d si&ni(yin& $ull #$$line #n disk. 0sin& t!e time t!e
lo& )as created< select t!e a##ro#riate lo&< and vie) it .y enterin& 3(or
e1am#le5
more bGtime stamp<'Ge8t<
o vie) lo&s in SAP-/A< c!oose l - Sh#"/Cleanu!
a - Sh#" l#2 $iles / !r#$iles e - &R&AC/01 l#2 $iles.
!e (iles t!at !ave .een .ac,ed 4# are located in s4.directories o(
sa#.ac,4#. !e names o( t!ese s4.directories are identical to t!e
corres#ondin& names o( t!e detail lo&s 3)it!o4t e1tensions5.
1.4 Start t!e $racle server mana&er 4sin&? svrm&rl
-is#atc! t!e (ollo)in& commands in t!e order s!o)n .elo)?
connect internalM
alter system s)itc! lo&(ileM
alter system s)itc! lo&(ileM
alter system s)itc! lo&(ileM
e1itM

=C> SAP AG BC505 :5


2.1 Start SAP-/A. o &et to t!e .ac,4# men4< c!oose
h - &acku! database.
o start t!e .ac,4#< c!oose a - &acku! $uncti#n' (#r)al backu!. S#eci(y t!e
.ac,4# device ty#e .y c!oosin&
c - &acku! device ty!e' l#cal disk.
o de(ine )!ic! o.Kects are to .e .ac,ed 4# and )!ic! ,ind o( .ac,4# to
#er(orm< c!oose
d - *b+ects $#r backu!? incr.
o de(ine t!e .ac,4# ty#e< c!oose (or e1am#le
e - &acku! ty!e #nline.
0nder h - S!ecial #!ti#ns< c!oose
b - C#)!ress' n#
o start t!e .ac,4# r4n< c!oose
S - Start &R&AC/01.
2.2 !e /R/AC;0P lo&s are in s4.directory sa#.ac,4#.
cd /oracle/GS1D</sapbackup
!e detail lo& is named b3ti)e sta)!4.3e5t4< )it! 3e5t4 6 ind si&ni(yin&
incre)ental #nline #n disk< and 3e5t46i$d si&ni(yin& incre)ental #$$line #n
disk. 0sin& t!e time t!e lo& )as created< select t!e a##ro#riate lo&< and vie)
it .y enterin& 3(or e1am#le5
more bGtime stamp<'Ge8t<
o vie) lo&s in SAP-/A< c!oose l - Sh#"/Cleanu!
a - Sh#" l#2 $iles / !r#$iles e - &R&AC/01 l#2 $iles.
!e (iles t!at !ave .een .ac,ed 4# are located in s4.directories o(
sa#.ac,4#. !e names o( t!ese s4.directories are identical to t!e
corres#ondin& names o( t!e detail lo&s 3)it!o4t e1tensions5.
2.3 !e .loc,s are .ac,ed 4# to a (ile named &3ti)e sta)!4.I(CR. "( ne) data
(iles !ave .een added to t!e data.ase since t!e last (4ll .ac,4#< t!en t!ose
.loc,s are .ac,ed 4# to a (ile named &3ti)e sta)!4.F0??.
!e (iles t!at !ave .een .ac,ed 4# are located in s4.directories o(
sa#.ac,4#. !e names o( t!ese s4.directories are identical to t!e
corres#ondin& names o( t!e detail lo&s 3)it!o4t e1tensions5.
3
3.1 See 1.3
3.2 C!an&e to directory sa#data3< 4sin& cd /#racle/3SID4/sa!data8.
o con(irm t!at only s4.directories #rotdB1< sta.iB1< 4ser1iB1 are located in
sa#data3< enter ls Kl'
o delete t!ese directories< enter
rm Kr protd0/5 stabi0/5 user/i0/'
3.3 Start SAP-/A. 0nder +' Rest#re/Rec#very< c!oose a' 1artial rest#re and
c#)!lete rec#very. o determine t!e (4nction o( eac! o( t!e ei&!t #!ases<
r4n t!ro4&! eac! o( t!em man4ally and in seF4ence.
"n t!e a' Check #!ase, t!e loss o( data (iles is detected. 7e1t< SAP-/A
attem#ts to s!4t do)n t!e data.ase< 4sin& shutdown immediate' Since a
consistent data (ile stat4s can no lon&er .e ac!ieved< t!is attem#t (ails. !e
-/A m4st s4.seF4ently con(irm t!e shutdown abort. SAP-/A .rin&s t!e
=C> SAP AG BC505 :/
data.ase to t!e )#unt stat4s< and detects t!e loss o( a total o( t!ree data
(iles.
"n t!e b' Find &acku! Files #!ase c!oose S' Start $indin2 backu! $iles<
4nder d' Select a backu! run $#r rest#re< yo4 can c!oose one o( t!e
.ac,4#s yo4 #er(ormed in :1ercise 1. SAP-/A a4tomatically s4&&ests
t!e most recent .ac,4#.
"n t!e c' Select a backu! $ile $#r rest#re #!ase< con(irm t!at t!e .ac,4#
yo4 !ave c!osen is .ein& 4sed (or t!e restore.
"n t!e i' Find incr. backu! #!ase< c!oose S' Find a!!r#!riate incre)ental
backu! runs< 4nder a' Select an incr. backu! run $#r rest#re< yo4 can
c!oose one o( t!e incremental .ac,4#s yo4 #er(ormed in :1ercise 2.
SAP-/A a4tomatically s4&&ests t!e most recent .ac,4#.
"n t!e +' Rest#re incr. backu! #!ase< con(irm t!at t!e incremental .ac,4#
yo4 !ave c!osen is .ein& 4sed (or t!e restore.
A(ter t!e desired data !ave .een s4ccess(4lly restored< t!e reF4ired
o((line redo lo& (iles are determined d4rin& t!e d' Find Archive Files
#!ase. C!oose S' Find #$$line red# l#2s
in t!e e' Rest#re Archive $iles #!ase< con(irm t!at t!e redo lo& (iles yo4
!ave c!osen are .ein& 4sed (or t!e restore.
Recovery is started 4sin& $' Rec#ver Database. !e messa&e Rec#ver
database ter)inated success$ully indicates s4ccess(4l com#letion o( a
re#air action.
=C> SAP AG BC505 :P
!
SAP AG 1999
Ad%anced Bac0(p +echniB(es
! Database O%er%ie) 6 Ad%anced Bac0(p +echniB(es
Bac0(p "trategy and
+ape -anagement
5 "torage -anagement
3 "ched(lingD #er'ormingD
and -onitoring Bac0(ps
@ #er'ormance -onitoring
4 Restore and Reco%ery ; +op !0 #roblems
5 Bac0(p "trategies
7sing R-A&
=C> SAP AG BC505 :
!.2
SAP AG 1999
Ad%anced Bac0(p +echniB(es
Contents
Ad%anced Bac0(p +echniB(es
ObCecti%es
At t!e end o( t!is 4nit< yo4 )ill .e a.le to?
,*plain the %ario(s bac0(p strategies s(pported by "A#
Decide )hich strategies 'it yo(r needs
=C> SAP AG BC505 -
=C> SAP AG BC505 4
!.3
SAP AG 1999
... ... *o&s
init
(iles
a#e
!eader
Data 'iles
O''line redo log 'iles
in saparch
Database
bac0(p
O''line redo log 'ile
bac0(p
brbac0(p Am all Ac Aa Acds Ac
BRBAC/7# and BRARCI81,= OneAR(n "trategy
'he advanta,e of the one=r8n strate"9 is that for a complete bac/up! B3BACJ9P and
B3A3C;#2( are ca00ed to,ether rather than individua00y. &n0y one tape poo0 =in this e1amp0e
"olume_bac/up> is used. 'he off0ine redo 0o, fi0es are backed up to the tapes where the database fi0es
are backed up. As a resu0t! tapes can be saved! and the administrative work0oad reduced.
SAP recommends that you use the one8run strate,y for B3BACJ9PG
B3BACJ9P ?database backup options@ 1a ?off0ine redo 0o, backup options@
"ith this procedure! B3BACJ9P backs up a00 fi0es =as usua0> and then starts B3A3C;#2( usin,
the options entered after 1a. B3A3C;#2( first backs up the correspondin, off0ine redo 0o, fi0es =as
usua0>! and then backs up a00 0o,s =inc0udin, B3BACJ9P 0o,s>. "hen a comp0ete backup is p0anned
usin, CCMS! the recommended one8run strate,y is used.
"ith the one8run strate,y! the ma1imum number of off0ine redo 0o, fi0es that can be backed up is the
number that can sti00 fit on the tape after the database backup. #f more off0ine redo 0o, fi0es are
,enerated dai0y than can be backed up! for e1amp0e because the database has ,rown! or the number
of off0ine redo 0o, fi0es is increasin,! an archi"er stuc/ occurs. 'herefore! you must re,u0ar0y check
whether the tape capacity is sufficient. #f necessary! you shou0d use 0ar,er tapes! an e1tra tape
station! or another backup strate,y.
'he one8run strate,y cannot be used to reso0ve an archi"er stuc/! since B3BACJ9P attempts to
connect to the database. #f an archi"er stuc/ is to be reso0ved usin, B3A3C;#2(! tapes must be
avai0ab0e in tape poo0 "olume_archi"e =that is! the Aemer,ency tape poo0B>.
=C> SAP AG BC505 6
=C> SAP AG BC505 5
!.4
SAP AG 1999
DD"
DD"
D4+ D4+
D4+
BRBAC/7#
init*SID+.sap
exec3parallel F 0
tape3address F 6de%!D de%D de%3:
archie3f#nction F do(bleEsa%eEdelete
tape3address3arch F 6de%4D de%5:
BRARCI81,
Control 'iles
O''line redo log 'iles
in saparch
#arallel +ape "(pport
'o reduce the time reIuired for backin, up and restorin, the data fi0es and off0ine redo 0o, fi0es! the
SAP backup too0s support the para00e0 use of severa0 tape stations.
B3BACJ9P uses a00 tape stations defined in parameter tape_address in fi0e init<SID>$sap$
Parameter exec_parallel shou0d be set to '! since this tri,,ers a copy process =cpio! dd> for each tape
station.
'o reduce the backup time! the database fi0es are distributed across the tape stations. 7or tape
stations with hardware compression! the backup time does not necessari0y corre0ate direct0y with the
data vo0ume. 'herefore! B3BACJ9P refers to the times reIuired by previous backup runs. #f time
optimiNation wou0d resu0t in an additiona0 tape chan,e! time optimiNation is not performed. 'o keep
backup times to a minimum! the tota0 tape station capacity shou0d be si,nificant0y 0ar,er than the
tota0 vo0ume of data to be backed up.
B3A3C;#2( supports para00e0 backups of off0ine redo 0o, fi0es on two separate tape stations! which
is defined in parameter tape_address_arch. #f this parameter is not set! B3A3C;#2( uses the first
two tape stations defined in tape_address. As backup options for archi"e_function! you can choose
double_sa"e or double_sa"e_delete.
#f data must be restored from tape to disk! B33(S'&3( a0so uses a00 tape stations defined in
tape_address?_arch- in para00e0! which minimiNes the restore time.
=C> SAP AG BC505 /
=C> SAP AG BC505 P
!.5
SAP AG 1999
"ystemD rollD and
temp tablespace
brbac0(p
Am allEdata
Data
tablespaces
#(re inde*
tablespaces
Bac0ing 7p Data +ablespaces Only
Another method of reducin, backup times is to 0imit backups to data tab0espaces. #f inde1
tab0espaces are 0ost! the inde1es must be rebui0t usin, information from the &rac0e %ictionary. 'o be
ab0e to use this procedure! the database administrator must have e1tensive back,round information.
"hen choosin, tab0espaces! B3BACJ9P does not refer to tab0espace namin, conventionS instead it
eva0uates &rac0e tab0es. 'herefore! B3BACJ9P ensures that on0y those tab0espaces that are either
empty or on0y contain inde1es are e1c0uded from the backup procedure. 'his ensures that tab0espaces
SLS'(M! PSAP3&**! and =un0ess empty> PSAP'(MP! which are reIuired to run the database! are
a0ways backed up as we00.
Lou can perform a backup 0imited to data tab0espaces by ca00in, SAP%BA =choose d 1 bEects for
bac/up! and enter all0data>! or by runnin, B3BACJ9P direct0y =usin, the command prompt
option 8m all0data>.
#f inde1 tab0espaces are affected by a database fai0ure! SAP%BA rebui0ds the data fi0es and inde1es.
'o do this! S+* scripts that contain the inde1 definitions usin, the &rac0e %ictionary are ,enerated.
'he missin, data fi0es are created! and the inde1es bui0t up =simi0ar0y to the reor,aniNation of inde1
tab0espaces and data fi0es>. See a0so the unit AStora,e Mana,ement and Monitorin,.B
$oteG "hen data fi0es are restored! you can a0so 0imit the restore to data tab0espaces. 9sin,
B33(S'&3(! enter -m all0data.
=C> SAP AG BC505 H
=C> SAP AG BC505 5
!.6
SAP AG 1999
KORAC4,EIO-,
.
.
.
mirrlogA
sapbac0(p
sapchec0
saptrace
origlogA
dbs
sapdataGnH
sapreorg
mirrlogB
saparch
origlogB
sapdata! btabdE!
&,2EDBEIO-,
.
.
.
mirrlogA
sapbac0(p
origlogA
dbs
sapdataGnH
mirrlogB
origlogB
sapdata! btabdE!
init*SID+.sap
ne%3db3home F /oracle/&,2
brbac0(p
Ad dis0Ecopy
"tr(ct(reARetaining Database Copy
'he structure1retainin2 database copy is a backup to disk that retains the ori,ina0 directory structure.
'his type of backup can be used in combination with the two1step dis/ bac/up method in a norma0
backup cyc0e.
#n case of a disk fai0ure! it may suffice to remount the fi0e system mount points. 'his procedure is
faster than copyin, the fi0es. Additiona0 uses of the structure8retainin, database copy inc0ude =a> for
bui0din, up new 3.4 Systems from a database copy! =b> for an &rac0e standby database! or =c> for
movin, the fi0e system =for e1amp0e! in order to move the data fi0es from the fi0e system to raw
devices! or vice versa>.
'he parameter settin, for new_db_home in fi0e init<SID>$sap defines the home directory of a
database copy. 'his directory! in addition to directories dbs! sapdata<n>! ori2lo2A.)! mirrlo2A.)!
and sapbac/up! must first have been created by the database administrator. 'he subdirectories of
these directories are created automatica00y durin, the copy process. Additiona0 fi0es in the database
environment! such as e1ecutab0es and 0o, fi0es! are not copied durin, this process.
A backup to remote disks can be performed without $7S mount. (nsure the fo00owin, parameters
are setG
bac/up_de"_type D sta2e_copy
sta2e_copy_cmd D rcp or ftp
sta2e_db_home D <dir_name>! whereG ?dirEname@ is the new &3AC*( home on a remote disk
B33(S'&3( a0ways writes database fi0es back to the ori,ina0 directories.
=C> SAP AG BC505 :0
!.7
SAP AG 1999
!. "plit mirror
. -o(nt
3. Bac0(p
4. 7nmo(nt
5. Resync
brbac0(p
At online/o''lineEsplit
Ad tape
#rod(ction ser%er Bac0(p ser%er
-
i
r
r
o
r
"plit -irror Dis0 Bac0(ps
Split mirror dis/ bac/ups can si,nificant0y reduce backup time. At the start of a backup! the disk
mirror is broken up where the data fi0es are 0ocated! by a predefined command. 'he first ha0f =that is!
one mirror> is backed up from a separate server! whi0e the Aproduction ha0fB is sti00 runnin,! without
impairin, performance. $e1t! the disk mirror is resynchroniNed.
A backup is performed as fo00owsG
Online. :. Brin, the tab0espaces into the backup mode. -. #f your mirror system has prob0ems with
sp0ittin, a mirror whi0e disk writes are occurrin,! issue the A*'(3 SLS'(M S9SP($%
statement. 4. Break up the mirror. 6. #ssue the A*'(3 SLS'(M 3(S9M( statement to resume
your database. 5. Stop the backup mode in the production ha0f. /. Perform an on0ine backup of the
mirror. P. 3esynchroniNe the mirror.
Offline. :. Stop the database. -. Break up the mirror. 4. Start the database in the production ha0f.
6. Perform an off0ine backup of the mirror. 5. 3esynchroniNe the mirror.
'he fo00owin, settin,s in init<SID>$sap app0y to the confi,uration of a sp0it mirror disk backup =7or
"indows $' refer to SAP $ote :--4/4 >G
primary_db defines the server where the production database is runnin, =for 0oca0 disks>.
ori2_db_home M <dir_name># whereG <dir_name> M ori,ina0 &rac0e home directory of the
productive database =for remote disks>.
split_cmd contains the commands for breakin, up the mirror! and for mountin, the fi0e system on
the backup server.
resync_cmd has the ana0o,ous commands for unmountin, and resynchroniNation =optional>.
'he confi,uration must enab0e B3BACJ9P to connect from the backup server to the database.
%urin, norma0 operation! disk mirrorin, protects a,ainst database fai0ure. #f such protection is a0so
reIuired durin, the backup procedure! an additiona0 mirror is reIuired for the production ha0f.
=C> SAP AG BC505 ::
!.
SAP AG 1999
#rod(ction ser%er
saparch
Database open
sapr3."DBAI
sapr3."DBAD
brarchi%e Asd
Ad dis0 A' A)
"A# +ools and the Oracle "tandby Database
"tandby ser%er
Database mo(nted standby
or o''line 'or bac0(p
Reco%ery
brarchi%e Assd
A' Am 60
brbac0(p
At o''lineEstandby
saparch
'tp
'tp
&J"
&J"
OR
An &rac0e standby database consists of two database servers. 'he production database has the status
open. %urin, norma0 operation! the standby database has the status mount! and is continua00y
app0yin, the off0ine redo 0o, fi0es from the production server. #n case of a production server fai0ure!
the standby database can be opened! and can take on the ro0e of the production database.
'he data fi0es are saved to tape on the standby server! usin, either SAP%BA =choose e 1 )ac/up
type# e 1 offline_standby> or B3BACJ9P =enter -t offline0standby>. 'hese actions are
0o,,ed on the production server =tab0e entries in the database! and 0o, fi0es in directory sapbac/up!
which both servers have in common due to $7S mount>.
B3A3C;#2( runs on both serversG 7rom the production server! a continua0 backup to disk is
performed =usin, "erify! with option 8w> throu,h $7S mount in directory saparch on the standby
server. &n the standby server! the backup to tape is performed.
'he off0ine redo 0o, fi0es are app0ied on the standby database when the option -m Gdelay< has
been entered. 'he optiona0 entry delay determines whether the connection is AhotB =that is!
rep0icated with no de0ay> or AwarmB =that is! rep0icated with a de0ay>. 'he 0atter makes it possib0e to
stop app0yin, off0ine redo 0o, fi0es before a user error is rep0icated on the standby server.
Lou can perform backups without $7S mount on a remote hard disk with parameter
bac/up_de"_type M sta2e_standby. 'he parameter sta2e_copy_cmd shou0d be confi,ured proper0y.
$oteG Severa0 structura0 chan,es on the production database are not automatica00y rep0icated on the
standby database. #n this case! the recovery is stopped! and the database administrator must take
action manua00y.
=C> SAP AG BC505 :-
!.!
SAP AG 1999
BAC/8&+
,*ternal
bac0(p ser%er
initG"8DH.sap
brbac0(p
KORAC4,EIO-,
.
.
.
saparch
sapdataGnH
sapdata! btabdE!
"A#DBA
brarchi%e brrestore
Bac0(p Restore 8nB(ire
brbac0(p
init*SID+.#tl
init*SID+.sap
back#p3de3t$pe F (tilE'ileEonline
#til3par3file F initG"8DH.(tl
,*ternal Bac0(p +ools 7sing BCABR8
Backups can a0so be performed usin, e1terna0 too0s. Communication with SAP too0s takes p0ace
throu,h an interface defined by SAP =BC8B3#>.
'he backups must continue bein, started by SAP too0s. 'his ensures that a00 actions are 0o,,ed! and
that backups can be monitored usin, the CCMS. #n addition! this a00ows you to use the SAP%BA
restore and recovery features.
7or interface confi,uration! in fi0e init<SID>$sap! set parameter bac/up_de"_type to util_file or
util_file_online. =#n the 0atter case! on0y the tab0espace to be backed up is set to the backup mode.>
'he settin, util_par_file refers to the confi,uration fi0e init<SID>$utl! which contains parameters for
the interface pro,ram BACJ#$'.
"ith 3.4 3e0ease 6.5B and hi,her! the *e,ato Stora,e Mana,er =*SM> and the imp0ementation of
the BACJ#$' interface is de0ivered free of char,e by &rac0e. But this is a 0imited version of the
*e,ato $et"orker. 'he native B3BACJ9P with cpio or dd! you can a0so use the BACJ#$'
pro,ram from *e,ato for norma0 backups. 'wo methods are avai0ab0e for incrementa0 backupsG
9sin, the SAP backup 0ibrary! or
9sin, the *SM backup 0ibrary with BACJ#$'
7or more information about the *e,ato insta00ation! see SAP $ote :6-/45. 'his note describes the
insta00ation of the SAP backup 0ibrary and *SM backup 0ibrary.
7or an overview of certified providers! see SAP$et =0omplementary Software Pro2ram>.
=C> SAP AG BC505 :4
!.10
SAP AG 1999
7nit "(mmary
&o) yo( are able to=
4ist the bac0(p strategies that are s(pported by "A#
Recogni?e the ad%antages and limitations o' these
strategies
Decide )hich strategies 'it yo(r needs
=C> SAP AG BC505 :6
!.11
SAP AG 1999
J(rther Doc(mentation
/no)ledge #rod(ct CD
SAP Database Administration 9racle
R/3 Online Doc(mentation
BC SAP Database Administration; 9racle
"A# +ech&et
DB Admin. 9racle 4no%led!e Base
=C> SAP AG BC505 :5
!.12
SAP AG 1999
,*ercises
Q
"ol(tions
7nit Actions
=C> SAP AG BC505 :/
!.13Ad%anced Back8, Tec$ni>8es: )6ercises
3$#tional5
&o. ,*ercise
! Consistent online bac0(p
1.1 Per(orm a .ac,4# o( yo4r local data.ase t!at meets t!e (ollo)in& criteria?
Com#lete
$nlineBcons
o dis,
+it! o((line redo lo& (iles .ac,ed 4# .y /R/AC;0P
1.2 0sin& t!e lo& (iles< c!ec, )!et!er t!e .ac,4# )as s4ccess(4l.
#artial database bac0(p
2.1 Per(orm a .ac,4# o( yo4r local data.ase t!at meets t!e (ollo)in& criteria?
Partial? )it! c4stomer ta.les#aces PSAP0S:R1- and PSAP0S:R1" .ac,ed
4#
$nline
o dis,
2.2 0sin& t!e lo& (iles< c!ec, )!et!er t!e .ac,4# )as s4ccess(4l.
3 Optional= Bac0ing (p Data +ablespaces Only
3.1 Per(orm a .ac,4# o( yo4r local data.ase t!at meets t!e (ollo)in& criteria?
P4re inde1 ta.les#aces are e1cl4ded
$nline or o((line
o dis,
3.2 0sin& t!e lo& (iles< c!ec, )!et!er t!e .ac,4# )as s4ccess(4l.
=C> SAP AG BC505 :P
!.14Ad%anced Back8, Tec$ni>8es: 7ol8tions
&o. "ol(tion
!
1.1 !e #arameters in (ile init3SID4.sa! s!o4ld !ave .een maintained correctly<
accordin& to t!e instr4ctions &iven in t!e #recedin& 4nit.
Sol4tion 4sin& SAP-/A? C!oose
h - &acku! database e - backu! ty!e c - #nline (c#nsistent).
C!ec, t!e settin& (or
c - &acku! device ty!e.
o start t!e .ac,4#< c!oose
S - Start &R&AC/01.
Sol4tion 4sin& /R/AC;0P? At t!e o#eratin& system level< enter
brbackup Kd disk Km all Kt online0cons'
1.2 !e detail lo&
b3ti)esta)!4.and
is in directory sa#.ac,4#. "n SAP-/A< c!oose
l - Sh#"/Cleanu! a - Sh#" l#2 $iles/!r#$iles e - &R&AC/01 l#2 $iles.

2.1 Sol4tion 4sin& SAP-/A? C!oose


h - &acku! database,
d - *b+ects $#r backu!,
2 - a tables!ace na)e@
and enter "S!"S*R/D5 "S!"S*R/1. C!ec, t!e settin&s (or
c - &acku! device ty!e and
e -backu! ty!e.
o start t!e .ac,4#< c!oose
S - Start &R&AC/01.
Sol4tion 4sin& /R/AC;0P? At t!e o#eratin& system level< enter
brbackup Kd disk Km psapuser/d5psapuser/i Kt online.
2.2 !e detail lo&
b3ti)esta)!4.!nd
is in directory sa#.ac,4#. "n SAP-/A< c!oose
l - Sh#"/Cleanu! a - Sh#" l#2 $iles/!r#$iles e - &R&AC/01 l#2 $iles.
3
3.1 Sol4tion (or SAP-/A? C!oose
h - &acku! database d - *b+ects $#r backu!.
:nter all0data' C!ec, t!e settin&s (or
c - &acku! device ty!e and
e - backu! ty!e.
o start t!e .ac,4#< c!oose
=C> SAP AG BC505 :H
S - Start &R&AC/01.
Sol4tion (or /R/AC;0P? At t!e o#eratin& system level< enter
brbackup Kd disk Km all0data Kt online.
3.2 !e detail lo&
b3ti)esta)!4.and
is in directory sa#.ac,4#. "n SAP-/A< c!oose
l - Sh#"/Cleanu! a - Sh#" l#2 $iles/!r#$iles e - &R&AC/01 l#2 $iles.
=C> SAP AG BC505 :5
10
SAP AG 1999
"torage -anagement
! Database O%er%ie) 6 Ad%anced Bac0(p +echniB(es
Bac0(p "trategy and
+ape -anagement
5 "torage -anagement
3 "ched(lingD #er'ormingD
and -onitoring Bac0(ps
@ #er'ormance -onitoring
4 Restore and Reco%ery ; +op !0 #roblems
5 Bac0(p "trategies
7sing R-A&
=C> SAP AG BC505 :
10.2
SAP AG 1999
"torage -anagement
Contents
"torage management basics
-onitoring 'reespace and space critical obCects
8nternal and e*ternal 'ragmentation
Reorgani?ation
ObCecti%es
At t!e end o( t!is 4nit< yo4 )ill .e a.le to?
Adapt storage parameters o' tables and inde*es
R(n and analy?e the res(lts o' sapdba Achec0 and sapdba Ane*t
Determine i' a reorgani?ation sho(ld be per'ormed
#er'orm a reorgani?ation
=C> SAP AG BC505 -
10.3
SAP AG 1999
Dis0s
Jile system
Data'ile! Data'ile
. . .
"pace -anagement= Re%ie)
@/ @/ @/ @/
@/ @/ @/ @/
@/ @/ @/ @/
@/ @/ @/ @/
@/ @/ @/ @/
@/ @/ @/ @/
,*tent
!44/
,*tent
4@/
,*tent
!44/
"egment
!;/
!
8nitial
,*tent
"egment
6table/inde*:
Data
bloc0
+able ABC
+able 9<L
+able D,J
,*tent
!;/
,*tent
640/ . . .
. . .
. . .
,*tent
!;/
,*tent
4/
,*tent
@0/
,*tent
56/
Data'ile Data'ile
Data'ile! Data'ile!
+ablespace
&e*t
,*tent

&e*t
,*tent
(ach tab0e and inde1 is assi,ned to a tab0espace! which consists of one or more data fi0es at the
operatin, system 0eve0. A00 tab0e and inde1 data is stored in the data fi0es of the tab0espace.
&rac0e stores tab0es and inde1es in individua0 data b0ocks. #n an 3.4 insta00ation! data b0ocks are H
JB in siNe. "hen new stora,e space is reIuired for a tab0e or inde1! one or more conti,uous data
b0ocks of a data fi0e are a00ocated to form an extent. #f there is not enou,h conti,uous freespace to
a00ocate a new e1tent! the &rac0e error messa,e &3A8:/54 =for a tab0e> or &3A8:/56 =for an inde1>
occurs.
&rac0e data obOects have severa0 stora,e parameters that inf0uence ,rowthG
'he first e1tent =initial extent> shou0d be 0ar,e enou,h for the e1pected tab0e or inde1 siNe. #f an
e1tent of a data obOect becomes fu00 durin, an insert or update operation! the &rac0e stora,e
mana,ement system attempts to a00ocate another e1tent in the tab0espace.
An obOect can a00ocate e1tents up to the 0imit MA)()'($'S. #f the ma1imum number of e1tents
for each obOect is reached! the error messa,e &3A8:/4: =for a tab0e> or &3A8:/4- =for an inde1>
is disp0ayed. #f this occurs! you must increase the parameter MA)()'($'S and check the siNe of
the tab0eQs $()' parameter.
PC'73(! PC'9S(%! and PC'#$C3(AS( are three additiona0 stora,e parameters. &n0y chan,e
them under specia0 circumstances and after consu0tin, SAP for support.
=C> SAP AG BC505 4
10.4
SAP AG 1999
. . .
0 0 ! ! 3 3 4 4 5 5
ObCects 6tables/inde*es:
+ablespace
GtablespaceH.data!

3
! 0
3
0
0
!
0
4
!

4
5
Ga#s
Oracle bloc0 8nternal
'ragmentation
7sed
Jree
3 5
! 4
,*ternal
'ragmentation

"pace -anagement= Jragmentation +ypes


Critical
obCect
:1tents
%ependin, on the siNe of each data record! severa0 data records can be stored in an H JB data b0ock.
7or fie0ds of inde1es and for 0on, raw fie0ds! &rac0e compresses the contents of each data record. As
a resu0t! the data records of an inde1 or a tab0e with one or more 0on, raw fie0ds wi00 usua00y differ in
0en,th.
"hen a data record is de0eted! a ,ap of unused stora,e space resu0ts within the correspondin, data
b0ock. 'he e1istence of such ,aps within data b0ocks is ca00ed internal fra2mentation. &rac0e can
reor,aniNe interna00y fra,mented data b0ocks so that wasted stora,e space is re8used.
'he e1tents! which be0on, to the different data obOects of a tab0espace! a00ocate stora,e space within
data fi0es of this tab0espace. "hen a database obOect is dropped! the e1tents are re0eased. Gaps of
unused stora,e space resu0t. 'he e1istence of one or more of these ,aps is ca00ed external
fra2mentation of a tab0espace. $ew0y a00ocated e1tents can on0y be inserted into such a ,ap if they
are sma00er than or eIua0 to the siNe of the ,ap.
#f the $()' e1tent siNe of an obOect is 0ar,er than the 0ar,est free conti,uous stora,e area of its
tab0espace! it is ca00ed a space critical obEect. 'he a00ocation of a new e1tent for this obOect wi00 fai0 if
you have not e1tended the tab0espace.
=C> SAP AG BC505 6
10.5
SAP AG 1999
*Timestamp.chk+ in
/oracle/G"8DH/sapchec0
DBA #lanning Calendar R/3
*
#lanning $oto 4isting Ielp "ystem
-O& -O&
Chec0DB Chec0DB
+7, +7,
Chec0DB Chec0DB
2,D 2,D
Chec0DB Chec0DB
+I7 +I7
Chec0DB Chec0DB
JR8 JR8 "A+ "A+
Chec0DB Chec0DB
"7& "7&
sapdba sapdba
A Ane*t ne*t
-O& -O&
Chec0DB Chec0DB
+7, +7,
Chec0DB Chec0DB
2,D 2,D
Chec0DB Chec0DB
+I7 +I7
Chec0DB Chec0DB
JR8 JR8 "A+ "A+
Chec0DB Chec0DB
"7& "7&
sapdba sapdba
A Ane*t ne*t
-O& -O&
Chec0DB Chec0DB
+7, +7,
Chec0DB Chec0DB
2,D 2,D
Chec0DB Chec0DB
+I7 +I7
Chec0DB Chec0DB
JR8 JR8 "A+ "A+
Chec0DB Chec0DB
"7& "7&
-O& -O&
Chec0DB Chec0DB
+7, +7,
Chec0DB Chec0DB
2,D 2,D
Chec0DB Chec0DB
+I7 +I7
Chec0DB Chec0DB
JR8 JR8 "A+ "A+
Chec0DB Chec0DB
"7& "7&
sapdba sapdba
A Ane*t ne*t
Daily -onitoring= sapdba Achec0
Database table
DB-"$ORA
1
Calendar
Sc!ed4le an Action (or 4e 0'
1>?00?00
"tart time
#eriod 6)ee0s:=
J(ll database o''line S redo log bac0(p
J(ll database o''line bac0(p
J(ll database online S redo log bac0(p
J(ll database online bac0(p
Redo log bac0(p
#artial database o''line bac0(p
#artial database online bac0(p
Chec0 optimi?er statistics
7pdate optimi?er statistics
Adapt ne*t e*tents
Chec0 database
- ^
Start immediately
"tart chec0
2arnings
,rrors
+otal
Con'ig(re chec0 Database operations monitor Iistory "tandard
Database table
DB-"$ORA
Re'resh e%ery
Delete a'ter
1ie) the last
Chec0 res(lts "ettings
!0 seconds ina0ti%
!00 days a0ti%
!0 days
Iistory= All messages
6
5
!!
Res4lt -ate ime -ays :rror ty#e :rror name e1t
+
:
:
:
0>/21/1999 22?00?00 10 PR$D *$GBS%A**B:7... *$GBS%A**B:7RCB%A9BS"I:
0>/21/1999
0>/21/1999
0>/21/1999
22?00?00
22?00?00
22?00?00 10
10
10 -/$
-/$
-/A
$P
A*C
7$B$PBSAS
-/ $#eration o#t never started or (inis!ed s4ccess(4l
-/ $#eration aly never started or (inis!ed s4ccess(4l
6 "7-:9:3S5 --9D0<--90< AAD 0< ... +"=$0
Database Check; 9erie% of ,es#lts
sapdba Achec0
DB.=
9se the 3.4 too0 SAP%BA with the option 8check to check the fo00owin,G
(1tents of tab0es and inde1es
'ab0espace fi00in,
Physica0 consistency of the database. 'hat is! the consistency of the contro0 fi0es! redo 0o, fi0es!
and data fi0es
Severe error messa,es in the a0ert 0o,
init<SID>$ora parameter settin,s
%atabase prob0ems specific to the 3.4 environment
Schedu0e SAPD)A 1chec/ to run dai0y durin, periods of 0ow system activity! by usin, either the
%BA P0annin, Ca0endar =transaction D)73> or by enterin, command sapdba -check at the
command prompt.
Command sapdba -check ,enerates a 0o, fi0e ca00ed <Date&ime>$ch/. which is written to
directory ......sapchec/. 'he 0o, information is a0so written to the database tab0e %BMSG&3A! and
can be viewed usin, the 3.4 %atabase System Check Monitor =transaction D)7F>. 'his 0o,
information shou0d be monitored after each SAPD)A 1chec/ run.
#f a database or system error occurs! use command sapdba -check to check the 0o, information.
'o monitor your sapdba 8check run! you can a0so use transaction D)*(.
=C> SAP AG BC505 5
10.6
SAP AG 1999
Con'ig(ration table
DBCI,C/ORA
Con'ig(ring sapdba Achec0
+ype
#arameter
ObCect
Act%.
Condition
Description
Chan!e Database Check Parameter
Database analysis tool 6"A#DBA:
ARCI81,E"+7C/
<es
,rror
ARCI81, "+7C/ A J" "#AC, X! -OR, +IA& X J744
greater than 6old @0 #ercentage
Re#eat #eriod
Corrective meas4re
C!an&ed .y
-4ration
y#e
0ser
ime 0nit
$#eration
-ate
#rogram "A#DBA= BAC/7# ARCI81, 4O$"
i'
DB.>
&(mber o' "A#DBA chec0 parameters
ARCHIVE_STUCK DBA E P P 80 H SAPDBA= BACKUP ARCH... ARCHIVE STUCK - FS SPAC...
Total
Status
Profile ara!.
"ra#le alerts
"eratio$s
%&
'(
)8
'*
&
%%
'
A#ti+e
I$a,ti+
DBA
DBA
DBA
DBA
DBA
DBA
DBA
DBA
C"-TR"._FI.E_/ISSI-0
C"-TR"._/IRR"R
CRITICA._SE0S
DF_"FF.I-E
FI.E_/IS/ATCH
FI.E_/ISSI-0
FI.E_T1PE_U-K-"2-
FS_FU..
E
E
E
E
E
E
2
2 H
H
P
P
'
(3
I-IT4SID5."RA
SAPDBA6 TAB.ESPACE A...
D" A 7CREATE C"-TR"....
SAPDBA6 REST"RE8REC"...
E9TE-D FI.ES1STE/ "R... 0' 8 )) 8 '(((
P
E
CA...
C"-TR". FI.ES ARE /ISSI...
C"-TR". FI.E:S; ARE -"T...
SE0/E-T:S; <' 2"U.D CAU...
DATAFI.E:S; <' "FF.I-E
FI.E T1PE D"ES -"T /ATC...
DATA FI.ES ARE /ISSI-0
FI.E T1PE : DATAFI.E = RA...
< ' FI.E S1STE/:S; < ) ARE...
T> Para!eter "... A#t+. S.. "... Val. U... Per... U$it Date U... C Des#ritio$ Corr/easure
'o confi,ure the checks performed by SAPD)A 1chec/! choose &ools 00,S D)
administration 0hec/ 0onfi2uration =transaction D)7G>.
'he system checks are identified by an error type and name =(rr 'ype! Parameter #%>G
%BAG 'he checks that report these errors are pro,rammed into SAP%BA. Lou can chan,e the
thresho0ds specified for these checks. Lou can activate and deactivate these checks.
&3AG &rac0e a0ert80o, messa,es =important administrative and error messa,es> that the 3.4
System check wi00 report to you. Lou can add additiona0 A&3AB8entries.
P3&7G Prob0ems in the &rac0e init<SID>$ora initia0iNation profi0e. Lou can add additiona0
parameters.
'he co0umns in the confi,uration tab0e %BC;(CJ&3A mean the fo00owin,G
Acti"eG Activate =H> or deactivate =3> the check for the prob0em
Se"erityG "arnin, =I> or error =9>. (rrors reIuire immediate attention.
0hec/ per# 0hec/ =al# 0hec/ ;nitG 'he thresho0d va0ue for tri,,erin, a warnin, are defined in
these co0umns. 7or e1amp0e! Check &per @! Check 2a0ue 5'! and Check 9nit P indicates that a
warnin, or messa,e shou0d be tri,,ered when the database va0ue e1ceeds H0 percent.
0orr,easureG 'his provides a Iuick! editab0e tip for so0vin, the prob0em. #f these fie0ds are
empty! first ana0yNe the prob0em in detai0! and then choose a measure to correct it.
=C> SAP AG BC505 /
10.7
SAP AG 1999
ADD A DA+A J84,=
Dile siGe de#ends on t!e estimated increase o( t!e
ta.les#ace o.Kects. C!ec, (or t!e n4m.er o( data
(iles in t!e data.ase.
GtablespaceH.data!
Critical obCect
,*tents
&e) 'ile
GtablespaceH.data
Bac0 (p e*tended
tablespace and control 'iles
+ablespace ,*tension
R,"8L, +I, DA+A J84,=
:1tend t!e siGe o( t!e data (ile de#endin&
on t!e s#ace availa.le on t!e (ile system
and siGe o( critical o.Kect.
GtablespaceH.data!
Critical obCect
Original si?e
A'ter Resi?e
OR
#f the database tries to a00ocate another e1tent but finds that there is no more freespace in the
correspondin, tab0espace! the S+* operation fai0s. 'he avai0ab0e stora,e space of a tab0espace can be
e1tended in on0ine operation by addin, another data fi0e.
'o add a data fi0e! use the SAP%BA. Se0ect c 1&ablespace administration.
Specify the name of the tab0espace to be e1tended in the submenu a 1 &ablespace
#n the submenu f 1 Alter tablespace <tablespace name> add data file defau0t recommendations for
fi0e name and data fi0e siNe are a0ready ,iven. Adapt them accordin, to your reIuirements.
Se0ect s 1 Start to start the Add data fi0e action. SAP%BA performs a check on the avai0ab0e
stora,e space in the specified fi0e system before the data fi0e is added.
SAP%BA continues with the backup menu and asks you to back up the e1tended tab0espace.
Backin, up the e1tended tab0espace ensures that the new state of the database can be recovered.
SAP%BA stores the o0d version and the new version of the contro0 fi0e in directory
sapreor2.<timestamp>. 'he action 0o, <timestamp>$ext is written to directory sapreor2.
'o resiNe a data fi0e! use SAP%BA. Se0ect d 1 Reor2ani8ation$
'hen se0ect option h 1 Resi8e data file of a tablespace.
Specify the name of the tab0espace to be e1tended in the submenu a 1 &ablespace
Se0ect s 1 Start to start the resiNin, process. SAP%BA ,ives a 0ist of data fi0es! from which you can
se0ect which data fi0e you want to resiNe. #n the submenu b 1 3ew si8e defau0t recommendations for
the data fi0e siNe are a0ready ,iven. Adapt them accordin, to your reIuirements and se0ect s 1 Start
and execute chan2es. SAP%BA performs a check on the avai0ab0e stora,e space in the specified
fi0e system before the data fi0e is resiNed. #t a0so writes a 0o, fi0e with <timestamp>$rrs name in
the sapreor, directory.
=C> SAP AG BC505 P
10.
SAP AG 1999
+able +$ORA 6storage parameters 'or R/3 tables:
Category 8&8+ &,9+ -8&,9+,&+ -A9,9+,&+
0 16 40 1 300
1 16 160 1 300
2 16 640 1 300
3 16 2'60 1 300
4 16 10240 1 300
' 16 204>0 1 300
6 16 40960 1 300
8 16 >1920 1 300
> 16 163>40 1 300
9 16 3286>0 1 300
10 16 6''360 1 1'0
11 16 1310820 1 1'0
12 16 2621440 1 1'0
13 16 '242>>0 1 1'0
14 16 104>'860 1 1'0
+able 8$ORA 6storage parameters 'or R/3 inde*es:
Category 8&8+ &,9+ -8&,9+,&+ -A9,9+,&+
0 16 40 1 300
1 16 >0 1 300
2 16 160 1 300
3 16 640 1 300
4 16 2'60 1 300
' 16 '120 1 300
6 16 10240 1 300
8 16 204>0 1 300
> 16 40960 1 300
9 16 >1920 1 300
10 16 163>40 1 1'0
11 16 3286>0 1 1'0
12 16 6''360 1 1'0
13 16 1310820 1 1'0
14 16 2621440 1 1'0
R/3 *
A/AP -ictionary? -is#lay tec!nical settin&s
*o,ica0 stora,e parameters
$ame WP3&G3AM 'ransparent 'ab0e
Short te1t 'est 'ab0e for technica0 settin,s
*ast chan,ed '$% -6.0H.:555
Status Active Saved
%ata c0ass APP*: 'ransaction data. transparent tab0es
SiNe cate,ory 6 %ata records e1pectedG 45.000 to 4.:00.000
"torage Categories o' "A# Database ObCects
%efau0t va0ues are used for #$#'#A*! $()'! and MA)()'($' when creatin, an SAP tab0e or
inde1 durin, insta00ation of an 3.4 System. 'hese defau0ts are derived from the obOects cate,ory.
'he cate,ory assi,nment for each 3.4 tab0e and inde1 is a technica0 settin,. Lou can access the
technica0 settin,s of 3.4 tab0es and inde1es usin, the viewin, =S97*> and editin, =S977> transactions
for ABAP %ictionary obOects.
'he #$#'#A*! $()'! and MA)()'($' va0ues used for a specific cate,ory are defined in tab0e
'G&3A for 3.4 tab0es and in #G&3A for 3.4 inde1es.
$()' siNes ran,e from 60 JB! for tab0es in cate,ory 0! to -05P:5-0 for tab0es in cate,ory :6
'he $()' siNe for a cate,ory is either twice or four times the siNe of the $()' siNe for the
previous cate,ory. 'his he0ps to prevent e1terna0 fra,mentation.
'he MA)()'($' for 3.4 tab0es and inde1es is usua00y set to 400. #f the number of e1tents for a
database obOect approaches 400! you must increase this parameter. As of &rac0e re0ease P.4! you
can set this parameter to 9$*#M#'(%.
9ncontro00ed ,rowth of the number of e1tents present in the database can increase the number of
disp0acements in the &rac0e shared poo0. Because it is essentia0 to 0imit the ,rowth of the e1tents! we
do not recommend settin, the MA)()'($' to 9$*#M#'(% for a00 obOects. 'he ,rowth of an
obOect! such as a tab0e! inde1! or ro00back se,ment is determined by the siNe specified in parameter
$()'.
=C> SAP AG BC505 H
10.!
SAP AG 1999
DBA #lanning Calendar R/3
*
#lanning $oto 4isting Ielp "ystem
-O& -O& +7, +7, 2,D 2,D +I7 +I7 JR8 JR8 "A+ "A+ "7& "7&
sapdba sapdba
A Ane*t ne*t
-O& -O& +7, +7, 2,D 2,D +I7 +I7 JR8 JR8 "A+ "A+ "7& "7&
sapdba sapdba
A Ane*t ne*t
-O& -O& +7, +7, 2,D 2,D +I7 +I7 JR8 JR8 "A+ "A+ "7& "7&
sapdba sapdba
A Ane*t ne*t
-O& -O& +7, +7, 2,D 2,D +I7 +I7 JR8 JR8 "A+ "A+ "7& "7&
sapdba sapdba
A Ane*t ne*t
,*ample sapdba -next=
+able si?e= ;00 -B
!0 P %al(e= ;0000/B
C(rrent &,9+= 04@0/B
&,9+ candidate= ;0000/B
&e*t larger
+$ORA %al(e= !63@40
&,9+ candidate= ;0000
&e*t smaller
+$ORA %al(e= @!;0
C(rrent &,9+= 04@0
+echnical settings=
Category 3= 560
!04@5560
54@@0
6!440
!3!050
655360
356@0
!63@40
@!;0
40;60
04@0
!040
560
640
!60
40
+$ORA
%al(es 6/B:
&e) %al(e 'or &,9+= !63@40
7sing sapdba Ane*t
Database table
DB-"$ORA
1
Calendar
Sc!ed4le an Action (or 4e 0'
1>?00?00
"tart time
#eriod 6)ee0s:=
J(ll database o''line S redo log bac0(p
J(ll database o''line bac0(p
J(ll database online S redo log bac0(p
J(ll database online bac0(p
Redo log bac0(p
#artial database o''line bac0(p
#artial database online bac0(p
Chec0 optimi?er statistics
7pdate optimi?er statistics
Adapt ne*t e*tents
Chec0 database
- ^
Start immediately
'he SAP%BA option 1next a00ows you prevent uncontro00ed e1tent ,rowth for a00 database tab0es and
inde1es. 'he siNe of parameter $()' for a00 3.4 database obOects is ca0cu0ated accordin, to the
fo00owin, a0,orithmG
'he stora,e space a00ocated for the database obOects =in JB> is determined and divided by :0. 'his
va0ue is compared to the current settin, for $()'. 'he 0ar,er of the two va0ues! which is ca00ed
the A$()' candidateB! is used to perform the fo00owin, comparisonsG
'he $()' va0ue derived from the technica0 settin,s of the obOect is used if it is 0ar,er than the
$()' candidate
#f it is not! the ne1t sma00er va0ue found in 'G&3A or #G&3A is used if it differs by not more than
5 b0ocks from the $()' candidate
#f it does not! the ne1t 0ar,er va0ue found in 'G&3A or #G&3A is used
#f no 0ar,er va0ue is found in 'G&3A or #G&3A! parameter $()' is set to the va0ue of the
$()' candidate
Schedu0e SAPD)A 1next usin, the 3.4 %BA P0annin, Ca0endar. Schedu0e SAPD)A 1next to run at
0east once a week! and after maOor database chan,es. 'he action 0o, is written to fi0e
?timestamp@.n1t in the directory ......sapchec/.
#t may be the case that not enou,h conti,uous stora,e space is avai0ab0e to a00ocate a new e1tent for
tab0es that have an increased settin, of parameter $()'. After each SAPD)A 1next run! you must
check for space critica0 obOects in the database.
=C> SAP AG BC505 5
10.10
SAP AG 1999
Daily -onitoring= +ables and 8nde*es
-ata.ase $RAC*: -ate/time o( t!is analysis 0>/24/1999 08?01?30
7ame CC
-ata.ase System
Re(res!
Re(res!
C!ec,s
C!ec,s
S#ace statistics
S#ace statistics
otal n4m.er 28
otal siGe/,. 12.123.016
otal (ree/,. 3.0'0.320 2'P
%inim4m (ree/,. 4.024
%a1. a4toe1tensi.le/,. A4to:1tend o((
a.les#aces
C4rrent siGes
C4rrent siGes
Drees#ace statistics
Drees#ace statistics
S#ace statistics
S#ace statistics
a.les "nde1es
otal n4m.er 13.064 1'.30'
otal siGe/,. '.91'.664 2.989.432
%ore t!an 1 e1tent 1.0>2 1.'91
%issin& in data.ase 0 1
%issin& in R/3 --"C 0 0
S#ace-critical o.Kects 0 0
a.les and inde1es
-etailed analysis
-etailed analysis
S#ace critical o.Kects
S#ace critical o.Kects
%issin& inde1es
%issin& inde1es
S#ace statistics
S#ace statistics
Day Time
M T W T F S S 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3
------------------------------------------------------------------------------- RSDBPREV 1 C
XXXXXXX XXXXXXXXXXXXXXXXXXXXXXXX
RS!R"TDB 1 C
XXXXXXX X X
-aintain table= +CO44
'o perform a detai0ed ana0ysis of stora,e re0ated issues! use the 'ab0es and #nde1es Monitor
=transaction D)'*>.
'he 'ab0es and #nde1es Monitor has three 0eve0s of reso0utionG %atabase 0eve0! 'ab0espace 0eve0! and
the 'ab0es and #nde1es 0eve0. #n any one of the ,enerated views! doub0e8c0ick the 0ine of an obOect to
disp0ay the e0ements of the obOect. 7rom the 0owest 0eve0! that is from the 'ab0es and #nde1es 0eve0!
you can access a history view for this obOect. $avi,atin, to hi,her 0eve0s of reso0ution works for
most of the avai0ab0e views.
'he ABAP report 3S&3A'%B co00ects the data reIuired for the 'ab0es and #nde1es Monitor and
stores it in the database tab0e M&$#. 'he contents of this tab0e are eva0uated when the 'ab0es and
#nde1es Monitor is disp0ayed. 'o refresh the va0ues! choose Refresh.
'o set the freIuency of the e1ecution of report 3S&3A'%B =and other reports re0evant for
monitorin,> maintain tab0e 'C&** usin, transaction S,37. A0so schedu0e Oob
C&**(C'&3E7&3EP(37&3MA$C(M&$#'&3 to run hour0y within your production system.
7or further information! see SAP $otes :-:04 and :/0H4.
'he &rac0e autoe1tend option is supported in 3.4 3e0ease 6.5B and hi,her.
=C> SAP AG BC505 :0
10.11
SAP AG 1999
+ables and 8nde*es= 8mportant Reports
09#05#1999 104026 DB$SERVER
C%i&i'a( &a)(e#i*+e, -%./&0
1*&e%2a(3 08#06#1999 - 09#05#1999 Mea34%eme*&3 29
Ta)(e 5ame Ty6e Si7e89B: 5e,&E,&Si7e E,&e*&3 Ma,E,&e*&3 Fi%3&E,&e*& Ta)(e36a'e
T.&a( ;%./&0 89)y&e: T.&a( ;%./&0 +e<i*e+ =43e+ 89)y&e:
"T"B>0 15DEX 72.720 10.880 160 168 68 300 56 45.936 PS"PP!!?1
SME515TT> 15DEX 2.416 2.400 80 31 30 300 10 16 PS"PST"B1
S9"T>001 15DEX 9.960 2.080 80 89 26 300 30 2.904 PS"PST"B1
Critical gro)th o' tables/inde*es in the last 4 )ee0s
+able "pace Iistory
09#05#1999 104026 DB$SERVER
1*&e%2a(3 08#06#1999 - 09#05#1999 Mea34%eme*&3 30 S'a(e Day
S'a(e Day Si7e 89B: F%ee89B: @3e+ 89B: =-@3e+ Ta)(e3#1*+e,e3 E,&e*&3
Ta)(e36a'e T.&a( C0-#+ay T.&a( T.&a( C0-#+ay T.&a( C0- T.&a( C0-#+ay T.&a( C0-#+ay
PS"PP!!?D 747.512 0 38.944 708.568 2.415 94 0 6.619 0 8.692 22
PS"PP!!?1 563.200 0 97.888 465.312 1.793 82 0 6.751 0 9.296 21
PS"PST"B1 921.600 0 70.288 851.312 1.909 92 0 4.404 0 6.156 10
PS"PST"BD 1.013.744 0 31.024 982.720 3.384 96 0 3.325 0 4.307 8
PS"PR!?? 307.200 0 182.392 124.808 3.084 40 1 15 0 120 3
PS"PBT"BD 735.216 0 231.336 503.880 1.249 68 0 2.344 0 2.471 1
PS"PBT"B1 409.600 0 125.768 283.832 157 69 0 3.222 0 3.542 1
PS"PS!@RCED 102.400 0 69.296 33.104 6 32 0 47 0 49 0
PS"PS!@RCE1 102.400 0 47.520 54.880 3 53 0 54 0 60 0
PS"PTEMP 307.200 0 307.192 8 36 0 0 0 0 0 0
PS"P@SER1D 8.192 0 4.024 4.168 36 50 0 4 0 4 0
PS"PPR!T1 33.792 0 16.592 17.200 52 50 0 114 0 131 0
'o disp0ay a 0ist of obOects with the stron,est ,rowth of e1tents or with more than H0F of
MA)()'($'S a00ocated! ca00 transaction %B0-! and choose 0hec/s 0hec/ next extent si8e. 'o
disp0ay a history view for a sin,0e tab0e or inde1! doub0e8c0ick a 0ine describin, an obOect and choose
6istory per wee/s.
'o monitor the siNe! free space! and usa,e of stora,e space for a00 tab0espaces! choose Space
statistics from the tab0espace section. 'o disp0ay the history of a specific tab0espace! doub0e8c0ick the
tab0espace 0ine. %ai0y! week0y! and month0y histories are avai0ab0e.
'o disp0ay a detai0ed ana0ysis of the current stora,e usa,e of a tab0e or an inde1! choose Detailed
Analysis from the tab0es and inde1es section! and enter a name of a tab0e or inde1. Lou can a0so
specify the name of a tab0espace to disp0ay a 0ist of its e0ements.
'o ana0yNe critica0 stora,e8re0ated prob0ems! choose Space critical obEects$
'o disp0ay a 0ist of inde1es that are defined in the 3.4 %ata %ictionary but do not e1ist on the
database! choose ,issin2 indexes in the &ables and indexes section.
=C> SAP AG BC505 ::
10.12
SAP AG 1999
De&ai( (.- 9908221023.a(y
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
812690 &a)(e3 a*a(y7e+ - 3.%&e+ )y em6&y 36a'e i* +e3'e*+i*- .%+e%:
T"B?ESP"CE$5"ME T"B?E$5"ME EMPTB8C): 5EVER$BEE5$@SED8C): @SED8C):
PS"PST"BD E0719 42032 42032 5128
PS"PE?40"D D010? 31112 31112 3168
PS"PP!!?D "T"B 17112 17112 58368
PS"PES40"D D!9C?@ 13136 13136 323448
PS"PES40"D D010S 10088 10088 774848
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
CD"RTS !F 20 EMPTB 15DEXES - @S15; V"?1D"TE STR@CT@RE
86751 i*+e,e3 a*a(y7e+. 3.%&e+ )y em6&y 36a'e /i&0i* BTREE E
@SED$BB$BTREE - @SED:
T"B?ESP"CE$5"ME 15DEX$5"ME T!T"?8C): @SED$BB$BTREE8C): @SED8C):
PS"PP!!?1 "T"B>0 72720 72648 50563
PS"PP!!?1 T512T>0 7280 7200 4641
PS"PP!!?1 RTXT?>0 11920 10072 7745
PS"PP!!?1 T800B>0 8800 8744 6726
"A#DBA Detail 4og
sapdba Aanaly?e
DB0
HH Detail Analysis
Da&a <%.m DB"$SE;ME5TS#DB"$15DEXES
S6a'e
"((.'a&e+ 36a'e..9)y&e 72.720
)(.'C3...... 9.090
e,&e*&3..... 168
B(.'C 3&%4'&4%e
B(.'C3i7e.........)y&e 8.192
P'&$<%ee.............. 10
T%a*3a'&i.*3 i*i&ia(.. 2
ma,im4m.. 255
Dea+e% mi*im4m....)y&e 159
Da&a ma,im4m......)y&e 7.230
P%.'e33 <%ee(i3&3..... 1
F%ee(i3& -%.463....... 1
De&ai(e+ a*a(y3i3 <.% 1*+e, "T"B>0
Analy?ing 8nternal Jragmentation
'he SAP%BA option 1analy8e provides information about the stora,e a00ocation for a tab0e or an
inde1. Lou can use it to determine the de,ree of interna0 fra,mentation of the database obOect! and to
ana0yNe a sin,0e tab0e usin, SAP%BA.
'o disp0ay the 0o,s of the SAP%BA actions performed to refresh the optimiNer statistics! use the
D)A peration ,onitor =transaction D)*(>. 'o disp0ay on0y the action 0o,s of SAPD)A 1analy8e!
choose @unction IDs =function #% aly>.
9S(% space is stora,e space consumed by the tab0e or inde1 contents. (MP'L is the difference
between stora,e space a00ocated for a tab0e and 9S(% space.
$(2(3EB(($E9S(% space is stora,e space that has been a00ocated for a tab0e but has not yet been
used by the tab0e. 9S(%EBLEB'3(( is the stora,e space a00ocated by the BXtree.
#n the sapdba 1analy8e detai0 0o,! check forG
'ab0es that have a 0ar,e difference between (MP'L and $(2(3EB(($E9S(%. 'his difference
indicates interna0 fra,mentation of a tab0e.
#nde1es that have a 0ar,e difference between 9S(%EBLEB'3(( and 9S(%. 'his difference
indicates interna0 fra,mentation of an inde1.
'he 'ab0es and #nde1es Monitor =transaction D)'*> provides detai0ed information about tab0es and
indices. Ca00 transaction D)'*! choose Detailed Analysis and! in the dia0o, bo1 disp0ayed! specify
the name of the obOect you want to ana0yNe. Se0ect the obOect and choose Detail Analysis$ B0ock 0eve0
detai0s for that obOect are then disp0ayed.
=C> SAP AG BC505 :-
10.13
SAP AG 1999
,*ample 'or a table reorgani?ation
!: ,*port table
: Drop table
3: 8mport table
Recreate inde*
sapreorg
DataE!
0 0
!

!
,*ample 'or an inde* recreation
!: Drop inde*
: Recreate inde*
#"A#+,-#
Additional storage
space reB(ired
Additional storage
space reB(ired
DataE!
0 0
!

!
DataE!
0
0

!
DataE!
0
!
0

Reorgani?ation= Basics
'o e0iminate stora,e8re0ated prob0ems! perform a reor,aniNation. 'he obOects that can be reor,aniNed
inc0ude tab0es! inde1es! and data fi0es of the database.
After a tab0e or inde1 is reor,aniNed! b0ock usa,e for the reor,aniNed obOect is optima0. (1tents can
be mer,ed to,ether to reduce the number of e1tents present in the database. Stora,e space reIuired
for the obOect can a0so be minimiNed.
"hen data fi0es of a tab0espace are reor,aniNed! some data fi0es are mer,ed to,ether. 'his means
the number of data fi0es present in the database can be minimiNed.
'o perform a reor,aniNation! additiona0 stora,e space is reIuired to store intermediate data. 'his
stora,e space is either reIuired in the database or in directories created for this purpose. #ntermediate
data can a0so be stored on tape. SAP%BA tries to forecast the amount of additiona0 stora,e space
reIuired. "hen a reor,aniNation is performed! bott0enecks can occur in the fo00owin, areasG
'he data fi0es of the tab0espace where the reor,aniNed obOect resides. 'ypica0 errorG $o data fi0e
has enou,h freespace to ho0d the new 0ar,er e1tents or a temporary second copy of the obOect.
'he directory sapreor2. 'ypica0 errorG 'his directory is too sma00 to ho0d the e1port sets
'he tab0espace PSAP'(MP. 'ypica0 errorG 'his tab0espace is too sma00 for an inde1 recreation
#f an error occurs durin, a reor,aniNation! data can be 0ost. #f a va0id and up8to8date data backup
e1ists! the risk of data 0oss is minimiNed. After the data fi0es of a tab0espace have been reor,aniNed
successfu00y! you must immediate0y perform a backup.
=C> SAP AG BC505 :4
10.14
SAP AG 1999
Dis0E4
! 0
3
0
!
0
4

5
3
! 0
3
0
!
0
4

5
3
Dis0E3
! 0
3
0
!
0
4

5
3
! 0
3
0
!
0
4

5
3
Dis0E
! 0
3
0
!
0
4

5
3
! 0
3
0
!
0
4

5
3
Dis0E!
! 0
3
0
!
0
4

5
3
! 0
3
0
!
0
4

5
3
Dis0
Yhot spotsY
D
i
s
0

a
c
c
e
s
s
e
s

N
P
O
Dis0
Reorgani?ation= Reasons
De&ai( (.- 9909050715.a(y
CD"RTS !F 20 EMPTB 15DEXES - @S15; V"?1D"TE STR@CT@RE
86751 i*+e,e3 a*a(y7e+. 3.%&e+ )y em6&y 36a'e /i&0i* BTREE
E @SED$BB$BTREE - @SED:
T"B?ESP"CE$5"ME 15DEX$5"ME T!T"?8C): @SED$BB$BTREE8C): @SED8C):
PS"PP!!?1 "T"B>0 72720 72648 20563
PS"PP!!?1 T512T>0 7280 7200 4641
PS"PP!!?1 RTXT?>0 11920 10072 7745
PS"PP!!?1 T800B>0 8800 8744 6726
PS"PP!!?1 T52C5>0 5480 5424 3760
PS"PP!!?1 @S!BX$C>0 4160 4032 2627
"A#DBA Detail 4og
Jragmented
8nde*es
. . .
0 0 ! ! 3 3 4 4 5 5
Oracle
bloc0
8nternal
'ragmentation
Jree
7sed
3eor,aniNin, physica0 data obOects is cost0y! both in terms of time and resources! and shou0d be
performed on0y in e1ceptiona0 cases. 'o minimiNe the need for reor,aniNations! monitor the database
re,u0ar0y.
'he 3.4 System is not avai0ab0e durin, a reor,aniNation. 'herefore! reor,aniNe physica0 data obOects
for the fo00owin, reasons on0yG
%isk hot spotsG 9nfavorab0e physica0 distribution of tab0es! inde1es! or data fi0es resu0ts in non8
uniform distribution of disk accesses on avai0ab0e disks
;eavi0y fra,mented inde1esG 7ra,mented inde1es can affect performance. 7ra,mented tab0es wi00
on0y affect performance in specia0 cases =check for SAP $otes indicatin, this prob0em>.
'o avoid havin, to perform reor,aniNationsG
3un sapdba 1next week0y to adapt the stora,e parameters of a00 tab0es and inde1es. 'his prevents
database obOects from a00ocatin, a hi,h number of e1tents. #f a tab0e has a hi,h number of e1tents!
chan,e the parameters $()' and MA)()'($'S. %o not perform a reor,aniNation.
'ry to estimate ,rowth of a critica0 tab0espace before e1tendin, it with a data fi0e of an appropriate
siNe. 9se SAP archivin, to archive obso0ete data. 'his prevents the number of fi0es in your
database system from approachin, the 0imit %BE7#*(S. #f there is a hi,h number of data fi0es! try
to increase the parameters MA)%A'A7#*(S =number of fi0es your &S can hand0e> and
%BE7#*(S. %o not reor,aniNe a tab0espace.
=C> SAP AG BC505 :6
10.15
SAP AG 1999
-o%ing / Renaming data 'iles
Dis0 *
! 0
3
0
!
0
4

5
3
! 4
0
Dis0 y
! 0
3
0
!
0
4

5
3
! 4
0
Reorgani?ation o' a tablespace
Data 'ileE!
! 0
3
0
!
0
4

5
3
Data 'ileE
5 6
@ ;
!
5
4
!0
6
!!
5
Data 'ileE
0
Data 'ileE!
0
0
0
Reorgani?ation o' a tablespace )ith data 'iles
Data 'ileE!
Data 'ileE
! 0
3
0
!
0
4 5
5 6
@ ;
!
5
4
!0 !!
Data 'ileEne)
0
0
0 0
0
Reorgani?ation o' a single
obCect or a list o' obCects
#hases Directories
OCreate script and restart 'ile sapreorg/GtimestampH/GtimestampH.Ge*tensionH.
Chec0 the 'ree space sapreorgD #"A#+,-#.
O#er'orm a reorgani?ation #"A#RO44D obCects tablespace
#hases Directories
OCreate script and restart 'ile sapreorg/GtimestampH/GtimestampH.Ge*tensionH.
Chec0 the 'ree space sapreorgD #"A#+,-#.
O#er'orm a reorgani?ation #"A#RO44D obCects tablespace
Data 'ileE!
0 0
!

!
Data 'ileE!
0
0

!
Dis0 Yhot spotsY
Jragmented inde*es
8nternal 'ragmentation
8nternal and e*ternal 'ragmentation
Jragmented inde*es
Dis0 Yhot spotsY
Reorgani?ation= #hases and +ypes
SAP%BA reor,aniNations are performed in two phasesG
#n phase one! the S+* script for the reor,aniNation process is created in the subdirectory
<timestamp> of the workin, directory. 'he fi0e restart$<extension> is created in this subdirectory
to enab0e a restart of the reor,aniNation =first e0iminate the cause of the error>. 3eversib0e actions
can be reset. SAP%BA checks if there is enou,h stora,e space avai0ab0e to perform the
reor,aniNation.
#n phase two! the reor,aniNation script is e1ecuted. =Action 0o, nameG <timestamp>$<extension>>
Reor2ani8ation of a sin2le obEect =tab0e or inde1>G 9se this function to e0iminate interna0
fra,mentation! to reduce the number of e1tents a00ocated for a tab0e or inde1! and to move a tab0e or
inde1 to another tab0espace in order to e0iminate a disk hot spot =e1tension rsi>
Reor2ani8ation of a list of obEectsG 9se this function to reor,aniNe a ,roup of severa0 obOects. An
ASC## fi0e must be created in the workin, directory with the reIuired 0ist of obOects. =e1tension rli>
Reor2ani8ation of a tablespaceG 9se this function to reor,aniNe a00 obOects be0on,in, to this
tab0espace. 'he directory and fi0e structure of the tab0espace wi00 remain unchan,ed. =e1tension rtc>
Reor2ani8ation of a tablespace with data filesG 9se this function to chan,e the data fi0e structure and
to reor,aniNe the obOects contained in the tab0espace. 'he number of data fi0es e1istin, in the
database can be minimiNed. =e1tension rtd>
,o"in2 and renamin2 data filesG 9se this function to move fi0es to another disk. 'his is not
c0assified as a reor,aniNation because the action is performed on fi0e 0eve0 =e1tension rm">.
=C> SAP AG BC505 :5
10.16
SAP AG 1999
4egend=
SS F %ery goodD S F goodD o F a%erageD &A F &ot applicable
8 F #arallel on inde*D + F #arallel on table. 6Oracle #ARA44,4 cla(se:
# F #arallel on process le%el 6"A#DBA creates se%eral processes:
Reor&aniGation o( ta.les
%et!od R4ntime Sec4rity Additional s#ace R3C!o# Parallel Com#ress Restrictions
Create ta.le QQ QQ $.Kects ta.les#ace 7A 7A 7o ta.les )it!
as select PSAPR$** *$7G/RA+ (ields
SAP-/A 4nload. Q Q sa#reor& 7$ P 7$ e1#ort @ ma1B(ileBsiGe
S2*Rloader PSAP:%P 34s4ally 2 G.yte5
$racle o Q sa#reor& C:S P C:S
e1#ort/im#ort PSAP:%P
Reorgani?ation o' inde*es
-ethod R4ntime Sec4rity Additional s#ace Parallel
Alter inde* QQ QQ $.Kects ta.les#ace "
reb(ild PSAP:%P
8nde* Q Q PSAP:%P "
recreate
Reorgani?ation= -ethods
'here are two methods to e1port and import tab0e data. #n both cases! because tab0es are dropped
before they are recreated! data may be 0ost G
export . import uses &rac0e ()P&3' and #MP&3' commands. Additiona0 stora,e space for the
e1port dump is reIuired in directory sapreor2 and in PSAP'(MP =inde1 recreation>.
SAPD)A unload . load uses either the too0 SAP%BA *&A% or the &rac0e S+*X0oader. Additiona0
stora,e space for the *&A% fi0e is reIuired in directory sapreor2 and in PSAP'(MP =inde1
recreation>.
'he fo00owin, methods do not reIuire the e1port and import of database dataG
0reate table $$$ as selectG SAP%BA first ,enerates the tab0e to be reor,aniNed with the new
parameters under a new name =by addin, the character Y>. 'he data is copied direct0y from the o0d
tab0e to the new. 'he o0d tab0e is dropped and the new tab0e is renamed. 'his option cannot be
used for tab0es with *&$G co0umns or for reor,aniNin, tab0espaces with data fi0es. Additiona0
stora,e space is reIuired as the tab0e temporari0y e1ists twice in the same tab0espace. (nou,h
space must be avai0ab0e in PSAP3&** to ho0d ro00back information.
Alter index . RebuildG 'he inde1 is first rebui0t in tab0espace PSAP'(MP usin, the e1istin, inde1.
'hen it is copied into the correspondin, tab0espace. 'he o0d inde1 is dropped and the optimiNed
inde1 is activated. 'ab0e and inde1 are 0ocked durin, this process. Additiona00y reIuired stora,e
space can be up to twice the siNe of the inde1.
Recreate indexG 'he inde1 is dropped and recreated. Stora,e space is reIuired in PSAP'(MP.
=C> SAP AG BC505 :/
10.17
SAP AG 1999
Compress extents;
<es &o
0
0 !
!
0
0
3
! 4
0 ! 3 4
,ed#ce ob?ect si)e;
<es &o
0
0 !
!
0
0
3
! 4
0
Jreespace
Chop (export d#mp8;
<es &o
sapreorg
$B $B
sapreorg
4 $B
Compress (export d#mp8;
<es &o
sapreorg
! $B
$B
sapreorg
$B
$B
Parallel export & import
6,*ample= processes in parallel:
e*pEimpEdegree F
sapreorg!
d(mp!
sapreorg
d(mp
Database
#rocess !
#rocess
Both conditions reB(ired=
e*pEimpEdegree F
and
d(mp destinations
#ossibleQ #ossibleQ
Reorgani?ation= Options
'o define a reor,aniNation! you can specify the fo00owin, optionsG
0ompress extents D Hes. SAP%BA mer,es the e1tents occupied by the tab0e or inde1 to one
e1tent. #f this option is not used! the e1tents are a00ocated usin, the current stora,e parameters of
the obOect. AdOacent free stora,e fra,ments in the entire tab0espace are mer,ed.
Reduce obEect si8e D Hes. SAP%BA automatica00y tries to reduce the siNe of the obOects =a00ocated
stora,e space> durin, the reor,aniNation for an e1port or import. 'o determine the actua0 stora,e
space occupied! SAP%BA uses the &rac0e A$A*LW( command. Script ,eneration reIuires a
specific amount of time and 0ocks the tab0es to be reor,aniNed.
0hop D Hes. SAP%BA sends the e1ported data to the chop too0 throu,h a named pipe. 'he chop
too0 then sp0its the e1port data into severa0 fi0es. 'his option is on0y avai0ab0e if parameter
chop_util_name is entered in the profi0e init?S#%@.dba. 'his option is not avai0ab0e for "indows
$'. #f the e1port dump fi0es are 0ar,er than the ma1imum fi0e siNe =usua00y - GB> for the operatin,
system! use this option.
0ompress D Hes. 'he e1port dump is compressed usin, &S faci0ities =not for dump to tape>.
Parallel export.importG 'he e1port and the import are distributed to severa0 para00e0 processes. 'he
init?S#%@.sap parameter exp_imp_de2ree determines the ma1imum number of processes that are
created for the reor,aniNation. 'he number of directories and.or tape devices specified for the
e1port dump fi0es a0so 0imits the number of processes created.
racle PARA>>9> clauseG 'he reor,aniNation is acce0erated with the he0p of the &rac0e
PA3A**(* +9(3L functiona0ity.
=C> SAP AG BC505 :P
10.1
SAP AG 1999
7nit "(mmary
&o) yo( are able to=
,*plain the concepts o' Oracle storage management
&ame the problems o' data storage
-onitor and a%oid problem sit(ations
"ol%e storage related problems e''iciently
#n an &rac0e database! the way physica0 hard disk space is a00ocated for a tab0e or inde1 is contro00ed
by the obOects stora,e parameters. Stora,e parameters that are set incorrect0y can 0ead to unwanted
,rowth behavior.
'he fo00owin, 3.4 System too0s provide you with an effective means of preventative monitorin,! and
shou0d be used to avoid uncontro00ed database ,rowthG
'he SAP%BA checks the database for possib0e stora,e re0ated prob0ems
Lou can e1tend the database usin, the SAP%BA
'he SAP%BA adapts stora,e parameters of ,rowin, obOects to optimiNe ,rowth behavior
'he SAP%BA provides comprehensive support for the reor,aniNation of &rac0e database obOects
Lou can monitor the current status of the database usin, the CCMS %atabase Monitors =D)'*#
S&'(# D)*(>.
Lou can 0imit ,rowth of the database by archivin, obso0ete data. 3.4 provides you with the reIuired
archivin, functiona0ity.
=C> SAP AG BC505 :H
10.1!
SAP AG 1999
,*ercises
Q
"ol(tions
7nit Actions
=C> SAP AG BC505 :5
10.207tora"e 2ana"ement: )6ercises
&o. ,*ercise
! 7se sBlpl(s to r(n the script createtab.sBlD )hich is located in directory
scripts=
4og on as (ser oraG"8DH. 8' the database is not openD open it (sing
"A#DBA. ")itch to directory scripts. "tart sBlpl(s. 4og on to the
database as (ser "A#R3 )ith pass)ord "A#. "tart the script
createtab.sBl by entering the sBlpl(s command line Zcreatetab.sBl
R(n sapdba Rchec0 on yo(r database.
2.1 C!ec, t!e lo& (ile o( sa#d.a Sc!ec, (or messa&es re&ardin& ta.le
/C'0'C=:C; and inde1 /C'0'C=:C;T0.
3 Adapt the storage parameters o' table BC505CI,C/ (sing "A#DBA.
,ns(re that the ne) -A9,9+,&+" %al(e is larger than n(mber o'
e*tents c(rrently allocated S 30P. Do not (se the "A#DBA
recommendation 'or &,9+D b(t set it bac0 to the c(rrent %al(e.
3.1 R4n sa#d.a Sc!ec, a&ain. :1#lain t!e di((erence in t!e lo& (iles o( t!e
sa#d.a Sc!ec, r4ns .e(ore and a(ter yo4 ada#ted %A9:9:7S o( ta.le
/C'0'C=:C;.
4 7se "A#DBA to a(tomatically adapt the &,9+ e*tent si?es 'or all "A#
tablespaces.
4.1 C!ec, (or #ro.lems in t!e sa#d.a Sne1t lo&.
4.2 R4n sa#d.a Sc!ec, a&ain and c!ec, (or #ro.lems related to ta.le
/C'0'C=:C; in t!e lo& (ile. +!y s!o4ld yo4 al)ays r4n sa#d.a Sc!ec,
a(ter a sa#d.a Sne1tH
5 "ol%e the problems 'o(nd 'or tablespace #"A#7",R!D by adding a
ne) data 'ile 6! -B in si?e:.
'.1 Solve t!e #ro.lems (o4nd (or ta.les#ace PSAP0S:R1" .y addin& a ne) data
(ile 3200 ;/ in siGe5.
'.2 Restart sa#d.a Sc!ec, and c!ec, (or #ro.lems in t!e sa#d.a Sc!ec, lo&.
:1#lain )!at !a##ened to t!e entries (or ta.le /C'0'C=:C; and inde1
/C'0'C=:C;T0.
6 2hy is it important to r(n a bac0(p a'ter yo( ha%e changed the 'ile
str(ct(reQ
5 Chec0 'or internal 'ragmentation o' tablespace #"A#7",R!D
8.1 0sin& Uestimate sam#le 10 #ercentV
8.2 0sin& Ucom#4te statistics / validate str4ct4reV
8.3 C!ec, t!e lo& (iles o( t!e analyGe actions. +!at is t!e di((erence .et)een
.ot! met!odsH
@ Reorgani?e the inde* tablespace #"A#7",R!8 (sing Alter 8nde*
Reb(ildD the storage options compress e*tent and red(ce obCect si?eD
and hide the table d(ring reorgani?ation.
>.1 C!ec, t!e lo& (ile o( t!e reor&aniGation.
=C> SAP AG BC505 -0
; Reorgani?e tablespace #"A#7",R!D incl(ding the data 'ilesD (sing the
"A#DBA (nloader / ORAC4, "34.loaderD )ith option red(ce obCect
si?eD red(ce data 'ile si?e 6accept the de'a(lt:.
9.1 C!ec, t!e lo& (ile o( t!e reor&aniGation.
!0 Optional= Reorgani?e tablespace #"A#7",R!D incl(ding the data 'iles
(sing the Oracle e*port/importD red(ce obCect si?e and hide table d(ring
reorgani?ation.
10.1 C!ec, t!e lo& (ile o( t!e reor&aniGation.
!! Optional= R(n script extent.s@l 'rom "34.#l(s to create an e*tent
problem in tablespace #"A#7",R!D. &o) e*ec(te the script
extent3r#n.s@l. Analy?e the error message.
11.1 Correct t!e error and try to s4ccess(4lly com#lete t!e scri#t e5tent>run.sAl.
! Optional= R(n script ts3oer.s@l 'rom "34.#l(s. Analy?e the error
message.
12.1 Solve t!e #ro.lem.
=C> SAP AG BC505 -:
10.217tora"e 2ana"ement: 7ol8tions
&o. "ol(tion
!
As (ser ora*SID+D iss(e command sapdba Kcheck.
2.1 A(ter SAP-/A !as (inis!ed< s)itc! to directory sa!check and loo, (or t!e (ile
3ti)esta)!4.chk. :dit t!e (ile 34sin& command more Gcheck file
name<< and 4se t!e s#ace.ar to &o to t!e ne1t #a&e5. !e (ollo)in&
messa&es are dis#layed?
S:G%:7B%A7CB:9:7S ? /C'0'C=:C;
A/*:SPAC:BD0** ? PSAP0S:R1"
3!is #ro.lem )ill .e solved later.5
3 "tart "A#DBAD and choose= d 2 ,eor!ani)ation b - Alter&sho% table
or index stora!e parameters b - specif$ table name BCA/AC-5C4
s - Alter&sho% parameters b - <5BTD enter c(rrent %al(e d 2
MAB5BT5<TSD enter ne) %al(e s 2 commit.
3.1 A(ter SAP-/A !as (inis!ed< s)itc! to directory sa!check and loo, (or t!e (ile
3ti)esta)!4.chk. :dit t!e (ile 34sin& command more Gcheck file
name<5. !e (ollo)in& messa&e s!o4ld no lon&er .e dis#layed?
S:G%:7B%A7CB:9:7S ? /C'0'C=:C;
4 R(n sapdba Kne8t "S!"M. +hen r(n sapdba Kcheck again.
4.1 A(ter SAP-/A !as (inis!ed< s)itc! to directory sa!check and loo, (or t!e (ile
3ti)esta)!4.n5t. 7:9 (or /C'0'C=:C; !as .een c!an&ed .y sa#d.a S
ne1t.
4.2 /C'0'C=:C; is no) re#orted as a critical o.Kect .eca4se PSAP0S:R1- is
too small to !old a 7:9 e1tent o( t!is ta.le. As sa#d.a Sne1t can increase
t!e 7:9 siGe o( ta.les or inde1es< t!e lar&er 7:9 e1tents may not (it into
t!e ta.les#ace anymore. R4n sapdba Kcheck to detect t!ese #ro.lems.
5 "tart "A#ADBA and choose= c - Tablespace administration a 2
TablespaceD enter "S!"S*R/D f 2 Alter tablespace PSAP"S5,.D
add data file c 2 <e% si)eD enter /3 s 2 Start.
<o( can s0ip the bac0(p action recommended by "A#DBA.
'.1 Start SAPA-/A and c!oose c - Tables!ace ad)inistrati#n a -
Tables!ace< enter "S!"S*R/1 $ - Alter tables!ace 1SA10S=R7I add
data $ile c S (e" size< enter 6--@B s - Start
Co4 can s,i# t!e .ac,4# action recommended .y SAP-/A
'.2 As PSAP0S:R1-/PSAP0S:R1" are no) lar&e eno4&! to !old a 7:9
e1tent o( /C'0'C=:C;/ /C'0'C=:C;T0< t!e critical o.Kect entries are no
lon&er dis#layed.
6 <o( sho(ld al)ays sa%e the e*tended tablespace and the ne) %ersion
o' the control 'ile a'ter the e*tension so that the complete reco%ery
'(nctionality o' the "A#DBA is a%ailable 6partial restore and complete
reco%ery:. +o do thisD yo( can (seD 'or e*ampleD the "A# tool
BRBAC/7#. Jor this reasonD a'ter a tablespace e*tensionD "A#DBA
=C> SAP AG BC505 --
a(tomatically branches to the bac0(p database men( to enable yo( to
start the appropriate bac0(p immediately.
5
8.1 R4n command sapdba Kanaly7e "S!"S*R/D -method * Koption
"/-
8.2 R4n command sapdba Kanaly7e "S!"S*R/D -method C1
8.3 *o& (iles are )ritten in directory sa#c!ec,.
!e lo& (ile name o( an analyGe action is @timestam#A.aly.
Dor t!e estimate met!od< em#ty and neverB.eenB4sed al)ays !ave t!e
same val4e.
Dor t!e com#4te statistics/validate str4ct4re met!od< t!e val4es (or em#ty
and neverB.eenB4sed di((er< as t!is met!od is more acc4rate.
@ "tart "A#DBA and choose d 2 ,eor!ani)ation e 2 ,eor!ani)e
tablespace a 2 TablespaceD and enter "S!"S*R/1. +hen choose ! 2
Stora!e parameters d 2 ,ed#ce ob?ect si)e @ 2 ret#rn @ 2 ret#rn
h - 9b?ect handlin! a 2 -ide tables d#rin! reor! c 2 ,eb#ild
indexes @ 2 ret#rn s 2 Start.
A'ter generating a scriptD start the script immediately (sing option !.
>.1 C!ec, t!e (ile 3ti)esta)!4.rtc in directory sa!re#r2.
; "tart "A#DBA and choose d 2 ,eor!ani)ation f 2 ,eor!ani)e
tablespace and data files a 2 TablespaceD and enter "S!"S*R/D.
+hen choose f 2 9,ACC5 exp&imp. +hen choose b to toggle to "nload &
load @ 2 ret#rn ! 2 Stora!e parameters d 2 ,ed#ce ob?ect si)e
@ 2 ret#rn h 2 9b?ect handlin! d 2 ,ed#ce data file si)e 6(se
!0P de'a(lt: @ 2 ret#rn s 2 Start.
A'ter generating a scriptD start the script immediately (sing option !.
9.1 C!ec, t!e (ile 3ti)esta)!4.rtd in directory sa!re#r2.
!0 "tart "A#DBA and choose d 2 ,eor!ani)ation f 2 ,eor!ani)e
tablespace and data files a 2 TablespaceD and enter "S!"S*R/D.
+hen choose ! - Stora!e parameters d 2 ,ed#ce ob?ect si)e @ 2
ret#rn @ 2 ret#rn h - 9b?ect handlin! a 2 -ide tables d#rin!
reor! @ 2 ret#rn s 2 Start.
A'ter generating a scriptD start the script immediately (sing option !.
10.1 C!ec, t!e (ile 3ti)esta)!4.rtc in directory sa!re#r2.
!! Change to directory &*9,ACC53-9M5+&scriptsD start "34#47"D log on
as (ser SAP,:D and r(n Ze*tent.sBl. &o) e*ec(te the script
e*tentEr(n.sBl. A -A9,9+,&+ problem is displayed 'or table
BC505CI,C/.
11.1 "ncrease #arameter %A9:9:7S (or ta.le /C'0'C=:C; 3see e1ercise 35.
! Change to directory &*9,ACC53-9M5+&scriptsD start "34#47"D log on
as (ser SAP,:D and r(n Zts3oer.s@l. &o) e*ec(te the script
tsEo%erEr(n.sBl. A tablespace o%er'lo) )ill be displayed 'or tablespace
#"A#7",R!D.
=C> SAP AG BC505 -4
12.1 Add a data (ile to ta.les#ace PSAP0S:R1- 3see e1ercise '5.
=C> SAP AG BC505 -6
11
SAP AG 1999
#er'ormance -onitoring
! Database O%er%ie) 6 Ad%anced Bac0(p +echniB(es
Bac0(p "trategy and
+ape -anagement
5 "torage -anagement
3 "ched(lingD #er'ormingD
and -onitoring Bac0(ps
@ #er'ormance -onitoring
4 Restore and Reco%ery ; +op !0 #roblems
5 Bac0(p "trategies
7sing R-A&
=C> SAP AG BC505 :
11.2
SAP AG 1999
#er'ormance -onitoring
Contents
CostAbased optimi?er
-emory con'ig(ration
Application design
#hysical and logical layo(t
ObCecti%es
At t!e end o( t!is 4nit< yo4 )ill .e a.le to?
8denti'y per'ormance problems
Re'resh the statistics (sed by the costAbased optimi?er
"hen you have comp0eted this unit! you wi00 be ab0e toG
#dentify performance prob0ems by monitorin, theG
Cost8based optimiNer
Memory confi,uration
App0ication desi,n
Physica0 and 0o,ica0 0ayout
3efresh the statistics used by the cost8based optimiNer
=C> SAP AG BC505 -
11.3
SAP AG 1999
#er'ormance iss(es
#er'ormance iss(es
CostAbased optimi?er
CostAbased optimi?er
-emory con'ig(ration
-emory con'ig(ration
Application design
Application design
#hysical and logical layo(t
Database Related #er'ormance 8ss(es
Poor database performance can resu0t from prob0ems with the cost8based optimiNer! database
memory confi,uration! app0ication desi,n! or the physica0 and 0o,ica0 0ayout.
'his unit focuses on how to use 3.4 to monitor and identify these performance prob0ems.
=C> SAP AG BC505 4
11.4
SAP AG 1999
CostAbased optimi?er
CostAbased optimi?er
-odi'ying the
standard
proced(re
-odi'ying the
standard
proced(re
Re'reshing the
obCect statistics
Re'reshing the
obCect statistics
Reasons 'or
per'ormance
problems
Reasons 'or
per'ormance
problems
CostABased Optimi?er
'he fo00owin, section describesG
"hat cost8based optimiNation means
;ow to check for performance prob0ems ori,inatin, from the cost8based optimiNer environment
;ow to refresh the statistics used by the cost8based optimiNer
;ow to modify the standard procedure used for refreshin, the optimiNer statistics
=C> SAP AG BC505 6
11.5
SAP AG 1999
O#+8-8L,R O#+8-8L,R
2hich is the optimal access pathQ 2hich is the optimal access pathQ
Database
table
ADDR
8nde* A
J(ll
table
scan
8nde* B
",4,C+ . JRO- ADDR ",4,C+ . JRO- ADDR
2I,R, name F [miller[ 2I,R, name F [miller[
A&D A&D pn(m pn(m F !3 F !3
A&D city F [Io(ston[ A&D city F [Io(ston[
initG"8DH.ora
O#+8-8L,RE-OD, F choose
KK KK
KKK KKK
KKKK KKKK
#ossible access paths #ossible access paths
Costs Costs
Oracle CostABased Optimi?er= Re%ie)
'he cost8based optimiNer determines the most effective strate,y for retrievin, database data. 'he
access strate,y used depends on the information in theG
+ueried tab0e =or tab0es! for a view or Ooin>
7ie0ds specified in the ";(3( c0ause of the S+* statement
#nde1es defined for the tab0es Iueried
'he cost8based optimiNer computes the cost of severa0 strate,ies for accessin, the tab0es! and
chooses the one that reIuires the sma00est amount of data accesses. 'o ca0cu0ate the cost of a
strate,y! the optimiNer reIuires statistica0 information about the tab0es and inde1es of the database!
such asG
$umber of tab0e or inde1 rows and number of b0ocks a00ocated for the obOect
$umber of distinct va0ues in each co0umn of the tab0e
'he statistica0 information for a tab0e or inde1 is stored in the %ata %ictionary of the database. 'o
co00ect the statistica0 information! use the &rac0e S+* command analy7e table.

=C> SAP AG BC505 5
11.6
SAP AG 1999
"<"+,-
"tatistic
in'ormation
Old statistic in'ormation
&o precise statistic
in'ormation
8ncorrect ass(mptions
&ot (sing "A#Atools to
re'resh the statistics
CostABased Optimi?er #er'ormance #roblems
Performance prob0ems can occur if the cost8based optimiNer usesG
&0d or non8e1istent statistic information
$o precise statistic information
#ncorrect assumptions! such as uniform0y distributed data within the obOect
Lou can so0ve performance prob0ems re,ardin, o0d! non8e1istent! or no precise statistic information
byG
3efreshin, the obOect statistics by usin, the SAP two8phase strate,y
#ncreasin, the precision by modifyin, the SAP standard procedure
Lou can so0ve performance prob0ems re,ardin, incorrect optimiNer assumptions byG
9sin, optimiNer hints or histo,rams =as of 3.4 3e0ease 6.5A>. See SAP $otes :-54H5 and :406H0
9sin, the ru0e8based optimiNer access for some tab0es by modifyin, the SAP standard procedure
Chan,in, the app0ication access to the data
Performance prob0ems can a0so occur if SAP too0s =SAP%BA or CCMS> are not used to refresh the
obOect statistics. Statistic updates performed by non8SAP too0s can create severe performance
prob0ems if the precision of the update is not set correct0y.
=C> SAP AG BC505 /
11.7
SAP AG 1999
#hase !
SAP-/A determines )!ic! o.Kects in t!e
data.ase need re(res!in&
ObCect needs to be re'reshed i'=
+he n(mber o' ro)s in the table
'rom last the chec0
di''er 'rom
+he act(al n(mber o' ro)s
in the table
by more than the threshold
2able * "/- 8
Control table
6DB"+A+C:
$.Kect name
$#tion
7e) statistics
needed
%et!od
Re'reshing the ObCect "tatistics= #hase !
'o minimiNe the time and system overhead necessary to refresh the cost8based optimiNer statistics!
SAP provides the fo00owin, two8phase strate,yG
Phase :G SAP%BA determines which database obOects need refreshin,
Phase -G SAP%BA refreshes on0y the obOects determined in phase :
'he contro0 tab0e %BS'A'C stores information about the obOects that need to be refreshed. %urin,
phase :! SAP%BA determines which obOects need to be refreshed by the fo00owin, ru0eG
#f the number of rows in a tab0e found durin, the 0ast check differs from the actua0 number of rows
by more than a specific thresho0d number! then the obOect needs to be refreshed. By defau0t! the
thresho0d number is :0F for sma00 tab0es and :00F for 0ar,e tab0es.
3ows for obOects in the contro0 tab0e %BS'A'C that need to be refreshed are either updated or new
rows are created! then they are f0a,,ed as 3ew statistics needed.
'he four important co0umns in contro0 tab0e %BS'A'C for phase : areG
bEect nameG 'he name of the obOect that needs to be refreshed
,ethodG 'he method used to ana0yNe the obOect. (ither C =compute> or ( =estimate>. %efau0t va0ueG
9 =estimate>
ptionG Percenta,e =P?n@> or number of rows =3?n =X :000>@> to be ana0yNed if method (
=estimate> is chosen. %efau0t va0ueG 7' percent.
3ew statistics neededG A f0a, that indicates that the statistics need to be refreshed
=C> SAP AG BC505 P
11.
SAP AG 1999
"A#BDA
Reads entries in the control table
6DB"+A+C:
Chec0s the 'lag 'or ne) statistics
needed
#hase
SAP-/A re(res!es t!e o.Kects
7n'lagged
Control table
6DB"+A+C:
2able * "/- 8
$.Kect name
$#tion
7e) statistics
needed
%et!od
Re'reshing the ObCect "tatistics= #hase
&n0y the statistics of tab0es that are f0a,,ed with new statistics needed in the contro0 tab0e
%BS'A'C are refreshed durin, phase -.
After the statistics are refreshed! the row remains in the contro0 tab0e %BS'A'C! but the co0umn
3ew statistics needed is unf0a,,ed.
'he SAP standard procedure does not create statistics for poo0 and c0uster tab0es and de0etes any
statistics that a0ready e1ist. 'his ensures that the ru0e8based optimiNer access is used for poo0 and
c0uster tab0es. #f the &rac0e parameter optimi8er_mode is set to 0hoose and no statistics e1ist for any
database obOect part of an S+* statement! &rac0e chooses the ru0e8based optimiNer access instead of
the cost8based optimiNer access.
=C> SAP AG BC505 H
11.!
SAP AG 1999
Control table DB"+A+C
DB obCect +ODO 'lag W
A7J/ * W
,/#O W
/&1/ * W
48#" W
-/#J W
1B7/ * W
R,"B * W
"A# +)oA#hase "trategy
sapdba
Aanaly?e DB"+A+CO
"A#DBA A *
+he statistics 'or the
database obCects that are
mar0ed in table
DB"+A+C are (pdated
#IA",
sapdba
Achec0opt #"A#P
"A#DBA A *
Database obCects reB(iring an
(pdate o' optimi?er statistics
are determined and mar0ed in
table DB"+A+C
#IA", !
sapdba
Astatistics all
"A#DBA A *
,*ec(te both phases in
one stepD
once a )ee0
A4+,R&A+81,4<
&n0y up8to8date statistica0 information can ensure that the &rac0e cost8based optimiNer chooses the
optima0 access path. ;owever! ,atherin, optimiNer statistics is e1pensive and reduces system
performance.
"e recommend the fo00owin, two8phase strate,yG
#n the first phase! the SAP too0s determine which tab0es reIuire a statistica0 update. 'he command
sapdba 1chec/opt PSAPJ determines which database obOects contain obso0ete statistics! and
modifies the contro0 tab0e %BS'A'C accordin,0y.
#n the second phase! the statistics of the tab0es marked '&%& in the contro0 tab0e %BS'A'C are
refreshed usin, command sapdba 1analy8e D)S&A&0$
As of 3.4 3e0ease 6./B! you can use the command sapdba 1statistics$ 'his command runs both of the
phases in ,arallel. 'hat is! you do not have to schedu0e the second phase separate0y. Lou shou0d
schedu0e command sapdba 1statistics to be run once a week! durin, periods of 0ow system activity.
=C> SAP AG BC505 5
11.10
SAP AG 1999
-odi'ying the "tandard #roced(re
...
7e) :ntries? -etails o( Created :ntries
$.Kect in(ormation
-/ o.Kect BC.-.2S
-/ o.Kect ty#e -/
$)ner
-ata.ase
-e(a4lt settin&s
0se - Analysis met!od
Analysis o#tion
Active !
-ate c!an&ed
$-$ settin&s
$-$ (la& 8 C4stomer -
$-$ date
a.le vie) :dit Goto Selection criteria 0tilities System =el#
!ct Short te8t
! !ctive =generating statistics?
1 1gnore
" "ositive =active with priority?
Forced =statistics are constantly updated?
R Restrictive =only active for the appl' tab' monitor?
Control (la& (or analysis

X
*
"4-
=istory C4stomer
Analysis
'o modify the standard procedure used for refreshin, the optimiNer statistics! use the CB& Contro0
Pane0 =transaction D)*7>.
'here are two ways you can modify the standard procedureG
#ncrease the precision of the statistics for a sin,0e tab0e =inc0udin, the inde1>
%e0ete statistics for a sin,0e tab0e =inc0udin, the inde1>
'o increase the precision! you must enter the name of the D) obEect! the D) obEect type ='7 for a
tab0e>! the &ype of usa2e = for optimiNer>! Acti"e =A for active or P for active with priority>! the
Analysis method =9 for estimate! 0 for compute! 96 for estimate with histo,rams or 06 for compute
with histo,rams>! and the ption =percenta,e =P?n@> or number of rows =3?n =X :000>@> to be
ana0yNed if method estimate is chosen>.
7or every customer defined entry in the contro0 tab0e %BS'A'C! you must se0ect the fie0d 0ustomer.
#f the fie0d 0ustomer is not se0ected! entries defined as &ype of usa2e D that are not chan,ed for
more than 40 days are removed from contro0 tab0e %BS'A'C automatica00y.
Lou can de0ete statistics for a sin,0e tab0e so that the ru0e8based optimiNer is used. Specify the va0ue
for Acti"e as I =i,nore> if you do not want the obOect to be ana0yNed! or specify the va0ue as R
=restrictive> to a00ow the obOect to be ana0yNed for space purposes.
"hen you modify the standard procedure! se0ect the '&%& f0a, so that the modifications are used
the ne1t time the statistics are refreshed.
=C> SAP AG BC505 :0
11.11
SAP AG 1999
...
Database Checks
2ablespaces
2ables/1nde8es
Database per'ormance= +ables and 8nde*es A *
+ables and 8nde*es -onitor
CO"+ABA",D O#+8-8L,R Actions
A *
,dit "ystem Ielp
Begin of action *nd of action Fct #bject RC
66'-4'/DDD -6+-/+66 66'-4'/DDD -6+6,+/6 aly DBS2!2C# ---6
6/'-4'/DDD -6+-/+/E 6/'-4'/DDD -6+6&+.& opt "S!"M ---/
/.'-4'/DDD -6+-/+/, /.'-4'/DDD -6+6/+-D aly DBS2!2C# ----
/&'-4'/DDD -6+-/+/D /&'-4'/DDD -6+6E+/E opt "S!"M ----
"elect options "elect options "ort "ort
DBA 4ogging -onitor
"A# &ote "earch
Search Criteria+
F&a)(e *ameG
Pe%<.%ma*'e
A *
"A# &otes
7se "A# tools only to re'resh 7se "A# tools only to re'resh
R/3 table statistics R/3 table statistics
7sing R/3 to -onitor #er'ormance #roblems
7or ,enera0 performance prob0ems! use the %BA *o,,in, Monitor =transaction D)7(> to check
whether the statistics are up8to8date.
#f a specific S+* statement causes performance prob0ems! you must check whetherG
'he statistics of a00 the tab0es accessed by the S+* statement are up8to8date with the correct
precision! usin, the 'ab0es and #nde1es Monitor =transaction D)'*>
'here is an SAP $ote re0ated to the prob0em
A statistica0 update is necessary for any of the tab0es accessed
'he ru0e8based optimiNer wou0d use a better access path
#f no so0ution can be found or if you have to switch back to the ru0e8based optimiNer! create a
customer messa,e in SAP$et usin, the component BC8%B8&3A.
3ememberG "hen you refresh the statistics of 3.4 tab0es! use SAP too0s on0y. SAP too0s ensure that
the statistica0 update is performed usin, the method and option defined for the obOect in the contro0
tab0e %BS'A'C. Statistica0 updates performed by non8SAP too0s can create severe performance
prob0ems if the precision of the update is not set correct0y.
=C> SAP AG BC505 ::
11.12
SAP AG 1999
-emory Con'ig(ration -emory Con'ig(ration -emory Con'ig(ration
Data b(''er Data b(''er Data b(''er
"hared pool "hared pool "hared pool
-emory Con'ig(ration
'he fo00owin, section describesG
'he &rac0e memory confi,uration
"hat the data buffer is used for
;ow the siNe of the data buffer is determined
"hat the shared poo0 is used for
;ow the siNe of the shared poo0 is determined
=C> SAP AG BC505 :-
11.13
SAP AG 1999
+he data b(''er '(nctions as a cache 'or the database
Database
RDB-"
"$A "$A Data b(''er Data b(''er
"hared pool
parsed "34
statements and
e*ec(tion path
dc in'ormation
abo(t obCects
o' the database
Data
'iles
...
System PSAP/A/" PSAP/A/" PSAPSA/-
-emory
area
"hared "34 Area Ro) Cache
R/3 )or0
process
",4,C+ .
JRO- -ARA
2I,R, ...
"hado)
process
4ogical 4ogical
reads reads
#hysical reads #hysical reads
Data B(''er 7tili?ation
A physica0 read must ,o to the disk to access the database data. "hen a physica0 read occurs! a copy
of the data b0ock is written to the data buffer and then read and ana0yNed by the shadow process.
A 0o,ica0 read does not need to ,o to the disk to access the database data! instead! it reads the data
b0ock from the data buffer.
Accessin, the data buffer is :000 times faster than accessin, the disk. 'o minimiNe disk access! the
data buffer must be tuned.
"hen a database update occurs! the data b0ocks are updated in the data buffer immediate0y! and
written to disk at 0ater time.
=C> SAP AG BC505 :4
11.14
SAP AG 1999
"+04= Database per'ormance analysis= Oracle database o%er%ie)
q q Q Q
Re'resh Detailed Analysis -en(
q q
q q
q q
q q q q
ORAC4, -onitor
Data B(''er
"hared #ool
Calls
"i?e
3(ality
56D000
;5
4og b(''er
Reads
#hysical reads
)rites
3@;D4
!0D@0;
D35
0b
P
...
...
...
...
;4
8denti'ying the Data B(''er Iit Ratio
'he hit ratio =<uality> of a database is defined as the percenta,e of data b0ocks accessed =Reads>
compared with the tota0 number of data b0ocks read from disk =Physical reads>. 'he Reads are the
sum of the 0o,ica0 and physica0 reads.
'he hit ratio is disp0ayed in the %atabase Performance Monitor =transaction S&'(>! and shou0d be at
0east 56F.
Since the hit ratio is poor in the first few hours after startup! you shou0d on0y eva0uate the hit ratio
after your system has been up for some time. As a ,enera0 ru0e! wait unti0 the number of Reads
e1ceeds -0!000!000.
Before you increase the siNe of the database buffer! check for poor0y Iua0ified S+* statements.
Prob0ems in the app0ication can cause poor hit ratios in even the 0ar,est of database buffers! for
e1amp0e! in the case of inefficient S+* codin,! many b0ocks may be read into memory
unnecessari0y.
=C> SAP AG BC505 :6
11.15
SAP AG 1999
-/B/*$C;B/0DD:RS
#arameter in init@sidA.ora
7se the Operating "ystem -onitor
to analy?e the
operating system paging statistics
be'ore and a'ter increasing
DBEB4OC/EB7JJ,R"
$our "ages in "ages out "aged in "aged out
/h /h I@b/hJ I@b/hJ
/4 // - && -
/6 66E - D-, -
// 65/(6 65.&6 ,5(&, /-5/(,
/- (6( &(& 65.-& /5,.(
D 66 - ,, -
, 66 - ,, -
E &6 (& /(, 6.(
( E& (& 6D( 6.(
. 45-4& 654(4 /65/4( D5&.6
& /5(&, /5/-( (5.D6 &5&6&
4 66 - ,, -
6 6D - //( -
/ ,D - 4.( -
- ,4 - 446 -
64 44 - /46 -
66 /5-(4 - &56.6 -
6/ 66 - ,, -
6- ,5/.E 65&4. 465(6, D5E&-
/D 66 - ,, -
/, /6, - ./6 -
/E &5-&( 45-.( /(5/,& /6566&
/( .4 - 6/6 -
/. 6,/ - /5/6& -
/& 4D - /.( -
8ncreasing the "i?e o' the Data B(''er
#f the hit ratio is 0ower than 56F! consider increasin, the database buffer. But before you increase
the siNe of the database buffer! check for poor0y Iua0ified S+* statements. Prob0ems in the
app0ication can cause poor hit ratios in even the 0ar,est of database buffers! for e1amp0e! in the case
of inefficient S+* codin,! many b0ocks may be read into memory unnecessari0y.
'o increase the siNe of your database buffer! chan,e the init<sid>$ora parameter
%BEB*&CJEB977(3S =which is specified in units of b0ocks>. 'his parameter specifies the number
of database b0ocks buffered in memory. $oteG "hen you increase this parameter! you reduce the
memory avai0ab0e to other processes in the system! which may cause &S pa,in, and.or swappin, to
occur.
'o check the &S pa,in, use the &S Monitor =transaction S&'F > and choose Detailed Analysis
Pre"ious 6oursK ,emory.
(ach hardware p0atform has an upper 0imit on the tota0 amount of shared memory that can be
a00ocated. 'he sum of the fi1ed and variab0e portions =data buffer cache! shared poo0! and 0o, buffer>
of the System G0oba0 Area cannot e1ceed this amount.
'o monitor chan,es in any &rac0e initia0iNation parameters! use transaction D)'3.
=C> SAP AG BC505 :5
11.16
SAP AG 1999
+he shared pool caches parsed "34 statements and
Data Dictionary in'ormation 'rom the database
Database
RDB-"
"$A "$A
Data b(''er Data b(''er
"hared pool "hared pool
Data 'iles
-emory
area
"hared "34 Area Ro) Cache
...
R/3 )or0
process
"hado)
process
",4,C+ .
JRO- -ARA
2I,R, ...
7ser calls 7ser calls
Rec(rsi%e calls Rec(rsi%e calls
#"A#B+AB8 #"A#"+ABD "ystem
#arsed "34
statements and
e*ec(tion path
dc in'ormation
abo(t obCects
o' the database
8denti'ying 7sage o' the "hared #ool
'he shared poo0 consists of theG
Shared S<> Area! where parsed S+* statements are cached for shared access to a00 shadow
processes
Row 0ache! which ho0ds the &rac0e %ata %ictionary information! inc0udin, the cost8based
optimiNer statistics. $oteG "ith the cost8based optimiNer! the 3ow Cache wi00 have substantia00y
more information to ho0d than with the ru0e8based optimiNer
A user call refers to a shadow process accessin, the Shared S+* Area for parsed S+* statements.
A recursi"e call refers to the 3ow Cache makin, a physica0 read to 0oad &rac0e %ata %ictionary
obOects from the system tab0espace.
=C> SAP AG BC505 :/
11.17
SAP AG 1999
8denti'ying the ,''iciency o' the "hared #ool
"+04= Database per'ormance analysis= Oracle database o%er%ie)
q q Q Q
Re'resh
q q
q q
q q
q q q q
ORAC4, -onitor
Data B(''er
"hared #ool
Calls
"i?e 0b
DDAcache B(ality P
...
7ser calls
...
...
!@D000
;5
...
;6
!@D!3!
...
...
4og b(''er
Rec(rsi%e calls
...
...
D33@
...
...
7ser calls / Rec. calls
...
pinratio P
...
5.55
...

0.03 reloads/pins P
0.04
> @0
;5
#re%io(s Days Detailed Analysis -en(
'he ratio of user calls to recursi"e calls shou0d be at 0east - to :.
'he %ata %ictionary cache Iua0ity shou0d a0so be ,reater than H0F.
'he pin ratio shou0d be 0ar,er or eIua0 55F.
'he ratio of reloads to pins shou0d be at ma1imum 0.06.
Since these ratios are poor in the first few hours after startup! you shou0d on0y eva0uate them after
your system has been up for some time. As a ,enera0 ru0e! you shou0d wait unti0 the number of Reads
e1ceeds -0!000!000.
$oteG Creatin, new optimiNer statistics is heavi0y based on recursive ca00s. Lou shou0d therefore first
make sure that creatin, statistics is not responsib0e for the va0ues. 'o do this! check the history by
choosin, the Pre"ious days button.
=C> SAP AG BC505 :P
11.1
SAP AG 1999
"IAR,DE#OO4E"8L,
parameter in initGsidH.ora
,*amine the operating system paging statistics (sing the
Operating "ystem -onitor
be'ore and a'ter increasing "IAR,DE#OO4E"8L,
$our "ages in "ages out "aged in "aged out
/h /h I@b/hJ I@b/hJ
/4 // - && -
/6 66E - D-, -
// 65/(6 65.&6 ,5(&, /-5/(,
/- (6( &(& 65.-& /5,.(
D 66 - ,, -
, 66 - ,, -
E &6 (& /(, 6.(
( E& (& 6D( 6.(
. 45-4& 654(4 /65/4( D5&.6
& /5(&, /5/-( (5.D6 &5&6&
4 66 - ,, -
6 6D - //( -
/ ,D - 4.( -
- ,4 - 446 -
64 44 - /46 -
66 /5-(4 - &56.6 -
6/ 66 - ,, -
6- ,5/.E 65&4. 465(6, D5E&-
/D 66 - ,, -
/, /6, - ./6 -
/E &5-&( 45-.( /(5/,& /6566&
/( .4 - 6/6 -
/. 6,/ - /5/6& -
/& 4D - /.( -
8ncreasing the "i?e o' the "hared #ool
#f any of these ratios are 0ower then the thresho0d mentioned! increase the siNe of the shared poo0.
'here are no specific &rac0e parameters for increasin, the siNe of the 3ow Cache or the siNe of the
Shared S+* Area. By increasin, the area for the entire shared poo0! you a0so increase the amount of
space avai0ab0e for both areas.
'o increase the entire shared poo0! chan,e the init$ora parameter S;A3(%EP&&*ES#W( =which is
specified in units of bytes>. %o not cause e1cessive operatin, system pa,in, by usin, too much
memory.
=C> SAP AG BC505 :H
11.1!
SAP AG 1999
Application design Application design Application design
4oc0)ait sit(ations 4oc0)ait sit(ations 4oc0)ait sit(ations
,*pensi%e "34 statements ,*pensi%e "34 statements ,*pensi%e "34 statements
#oorly B(ali'ied statements #oorly B(ali'ied statements #oorly B(ali'ied statements
Application Design
'his section describes how to identi39 the fo00owin, app0ication desi,n prob0emsG
*ockwait situations
(1pensive S+* statements
Poor0y Iua0ified S+* statements
=C> SAP AG BC505 :5
11.20
SAP AG 1999
2or0
#rocess !
2or0
#rocess 3
2or0
#rocess 4
2or0
#rocess
AcB(ires
-ARA 4oc0
A long period
o' processing
Commit
7pdate
-ARA
2or0ing...
2A8+8&$\
7pdate
-ARA
ReB(ests
-ARA 4oc0
AcB(ires
-ARA 4oc0
Commit
2or0ing...
2A8+8&$\
7pdate
-ARA
ReB(ests
-ARA 4oc0
AcB(ires
-ARA 4oc0
2A8+8&$ ...
7pdate
-ARA
ReB(ests
-ARA 4oc0
-ARA
4oc0ed
by
2# ! 2# 2# 3
2hen a 4oc0)ait "it(ation Occ(rs
A 0ockwait situation occurs when numerous work processes reIuest a 0ock on the same obOect. #n
order for the 3%BMS to maintain transactiona0 consistency! the obOect is 0ocked by the process that
reIuested it first.
#f a user starts a 0o,ica0 unit of work and updates an obOect! such as the most often used materia0
number of the company! then a00 other users who want to update the same materia0 must wait unti0
the first user has committed the chan,es before they can ,et the record.
A user ho0din, a 0ock wi00 occupy an 3.4 work process. &ther users tryin, to app0y the same 0ock
must wait and at the same time occupy their own 3.4 work process. As the number of 0ockwaits
increases! fewer and fewer 3.4 user reIuests can be processed by avai0ab0e 3.4 work processes. #n a
worst8case scenario! the 0ock ho0ders and waiters wou0d eIua0 the number of 3.4 work processes!
and a sma00 number of users cou0d cause the entire 3.4 system to AfreeNeB.
=C> SAP AG BC505 -0
11.21
SAP AG 1999
7sing the ,*cl(si%e 4oc0)ait -onitor
ObCect Iolder 6OracleA"8DD A"#8D] ClientAIostD A#8D: 4e%el +ime 6s:
2aiters 6OracleA"8DD A"#8D] ClientAIostD A#8D: Ro)A8D
+!00 ; D ;.6@5 ] hs5@! D ;.6@! ! !
4!
30.05.!;;; !4=45=5@ +C! hs5@!
,*cl(si%e sessionAloc0 sit(ations
4e%el +ime 6s:
!4 D 5530 ] hs5@! D !6.4; ! 6
Do(bleAclic0
#rimary 0ey
%al(es
Oracle "essionA8D 0
4oc0ed obCect -O&8
4oc0ed Ro) 68D: AAAA@mAA4AAAA30AAJ
1al(es=
R,48D DB
"R+JD +C! snapshot!
"R+J
30.05.!;;; !4=5;=00 +C! hs5@!
,*cl(si%e sessionAloc0 sit(ations
9se the 9xclusi"e >oc/wait ,onitor =transaction D)'7> to identify e1c0usive 0ockwait situations and
to disp0ay information about theG
*ock ho0der
$umber of 0ock waiters
Primary key 0ocked
=C> SAP AG BC505 -:
11.22
SAP AG 1999
Red(cing ,*cl(si%e 4oc0)aits
Redesign the application to red(ce the loc0ing period by=
8ncreasing the commit 'reB(ency in the application
&ot allo)ing a single process to hold a loc0 'or a long period
4oc0ing the obCect as late as possible
AdC(st the Cob sched(ling cycle so that loc0 sit(ations do
not occ(r
#f e1c0usive 0ockwait situations occur because a user ho0ds the 0ock too 0on,! ana0yNe the app0ication
and determine whetherG
More commits can be safe0y bui0t into the app0ication
'he 0ock period can be shortened by acIuirin, the 0ock 0ater
#f e1c0usive 0ockwait situations occur because many users want to access the same record in hi,h8
vo0ume processin,! you can schedu0e the Oobs to be performed at different times.
=C> SAP AG BC505 --
11.23
SAP AG 1999
+otal Reads / B(''er $ets 5 P
8denti'ying ,*pensi%e "34 "tatements 6!:
B(''er
$ets
!D5D0;0
!D04D054
504D054
443D6;4
"hared "34 Area
6.!P
"orted
by
Database #er'ormance -onitor
q q Q Q
Re'resh Detailed Analysis -en(
q q
q q
q q
q q q q
ORAC4, -onitor
"hared #ool 4og b(''er
Reads
#hysical reads
)rites
0D@53D;34
5@!D@0;
4D35
... ...
Data B(''er
... ...
Reads / 7ser calls 5.@ < 0
An indicator for havin, e1pensive S+* statements in the system is the ratio of Reads to ;ser calls.
'his va0ue shou0d be 0ess than -0. #f this va0ue is ,reater than -0! you must check the S+* statements
in detai0.
(1pensive S+* statements have a hi,h number of )uffer 2ets compared to &otal reads.
#f the ratio of )uffer 2ets to &otal reads is ,reater or eIua0 than 5F! the S+* statement is e1pensive.
&nce a statement has been identified as e1pensive in the Shared S+* Area! run an 9xplain plan on
the statement.
After you have run an 9xplain plan on an e1pensive S+* statementG
Check the cost8based optimiNer settin,s for the tab0es bein, used in the S+* statement
Create a customer messa,e in SAP$et if the statement is identified as part of the SAP code
3edesi,n the app0ication if the statement is identified as part of the customer code
Check if the statement is poor0y Iua0ified
=C> SAP AG BC505 -4
11.24
SAP AG 1999
"+04 A Detailed Analysis A "34 ReB(est A Database #er'ormance= "hared "34
q q Q Q
Sort Reset Since Reset Since -/ Start
q q
q q
q q
q q q q
-etail stats.
5.05.!;;;!6=54=36 "hared C(rsor Cache 6last reset at 5.05.!;;; !5=!5=55 :
+otal C(rrent Dis0 Reads/ B(''er $ets/ Records Records/ B('gets/ "34
,*ec(tion ,*ec Reads ,*ec(tion $ets ,*ec(tion processed ,*ec(tion record "ort
5D456 0 !D46@ !.5 !D5D0;0 !50. 6D336 0.@ 00.@ 0
@! 0 !4;D60! !D@46.; 5D50;D3 ;5D!55.6 5@3 ;.5 ;D@45.@ 0
5 0 D5;4 4D5!@.@ !D04D054 40D@!4.@ !4D! @D444. @.5 0
3 0 !0D604 3D534.5 443D6;4 !45D@;@.0 0 0.0 443D6;4.0 !
&(mber o'
e*ec(tions
"orted by
&(mber o'
b(''er gets
per record
8denti'ying ,*pensi%e "34 "tatements 6:
'o identify e1pensive S+* statements! use the %atabase Performance Monitor =transaction S&'(>
and choose Detailed analysis S<> re%uest.
Ana0yNe the Shared S+* Area statistics co00ected since the 0ast startupG
'he co0umn &otal 9xecution refers to the number of times the S+* statement was e1ecuted
'he co0umn )uffer Lets refers to the tota0 number of buffers accessed by the statement
'he co0umn )uf2ets.record refers to the avera,e number of buffers accessed per record retrieved
Sort by the co0umn )uffer Lets. Check for statements that are e1ecuted very often with a 0ow number
of )uf2ets.record. 'hese statements shou0d be ana0yNed.
'o identify which pro,ram an S+* statement be0on,s to! you can checkG
'he ";(3(89S(% 0ist in the %ata %ictionary =transaction S97*>
'he System"ide "ork Process &verview =transaction S,FF> and the &rac0e Session Monitor
=transaction S&'( Detailed analysis>
=C> SAP AG BC505 -6
11.25
SAP AG 1999
+otal Dis0 Reads/ B(''er $ets/ "34
,*ec(tion Reads ,*ec(tion $ets ,*ec(tion +e*t
+otal Dis0 Reads/ B(''er $ets/ "34
,*ec(tion Reads ,*ec(tion $ets ,*ec(tion +e*t
55 554 ;.5 5D00D0@; ;!D;.6 ",4,C+ Y#$-8DY D YOB^,C+Y D Y D,1C4
"peci'y hint=
Jor testing only\
&o change to the "A# code
"34 "tatement
",4,C+
.
JRO-
Y+AD8RY
2I,R,
Y#$-8DY F =A0 A&D YOB^,C+Y F =A! A&D YD,1C4A""Y F =A A&D RO2&7- GF =A3 X
,*ec(tion #lan
",4,C+ "+A+,-,&+ 6 ,stimated Costs F ;5 :
' CO7&+ "+O#/,<
' +AB4, ACC,"" B< 8&D,9 RO28D +AD8R
8&D,9 RA&$, "CA& +AD8R_!
*8plain with hint *8plain with hint #ptimi7er trace #ptimi7er trace
S#eci(y =int
:nter t!e !int )it!o4t t!e comment
si&ns /RQ ... R/ 3(or t!e synta1 o(
!ints see t!e $RAC*: t4nin& &4ide5
Cancel Contin4e
R(nning an ,*plain #lan
Do(bleAclic0
'o run an 9xplain plan for an e1pensive S+* statement! doub0e8c0ick the appropriate 0ine in the
Shared S+* Area and choose 9xplain.
'he output of the 9xplain plan shows how the cost8based optimiNer has decided to access the data.
'he option 9xplain with hint a00ows you to check a possib0e chan,e in the access path usin, &rac0e
hints! such as checkin, the access path chosen by the ru0e8based optimiNer =;int 39*(>. "hen you
use a hint! on0y a new e1p0ain p0an is created! the actua0 S+* statement is not chan,ed.
7or further information about &rac0e hints! refer to &rac0e documentation.
;ere are the definitions of some 9xplain plan output for S+* statementsG
I3D9M RA3L9 S0A3G 'he database retrieves a number of records usin, an inde1 to 0imit the
resu0t set before ,oin, to the data pa,es
I3D9M ;3I<;9 S0A3G 'he database retrieves a sin,0e row from an uniIue inde1
I3D9M 3A,9G 'he name of the inde1 that the database uses for retrievin, data
030A&93A&I3G 'he database unites a set of rows retrieved for the Iuery
39S&9D >PSG 'he database Ooins one tab0e to a second tab0e! usin, the information found in
the first tab0e to check second tab0e! and bui0ds a resu0t set out of both tab0es
&A)>9 A009SS @;>>G 'he database retrieves a00 rows from the tab0e to bui0d the resu0t set
SR&G 'he database sorts the data before returnin, it
=C> SAP AG BC505 -5
11.26
SAP AG 1999
+otal B(''er B('gets/
,*ec(tion $ets Record
+otal B(''er B('gets/
,*ec(tion $ets Record
@ !D333D65 666D@!.5
+able -ARA
J(ll table scan 8nde* scan
",4,C+ . JRO- -ARA 2I,R, -A+,R8A4 F !000!
8nde* -ARA`O
#oorly 3(ali'ied "34 "tatements
Poor0y Iua0ified S+* statements do not use an inde1 correct0y to access the data. #f an inde1 is used
correct0y! data access is more efficient.
'o identify poor0y Iua0ified S+* statements! check the Shared S+* Area for e1pensive statements
with a hi,h number of )uf2ets.record. Poor0y Iua0ified statements usua00y occur ifG
$o inde1 is associated with the tab0e bein, accessed
A secondary inde1 is reIuired for the Iuery bein, performed
'he incorrect inde1 is bein, uti0iNed
An inde1 is bein, used a0thou,h a fu00 tab0e scan wou0d be more effective! for e1amp0e! in the case
of sma00 tab0es or a hi,h number of records retrieved
'he inde1 bein, used is defined incorrect0y
#f a statement is identified as a poor0y Iua0ified S+* statement because of an SAP report! create a
customer messa,e in SAP$et.
$oteG %o not chan,e the standard 3.4 inde1 desi,n. 'his is considered an Ae1pertB tunin, measure.
Contact SAP for support.
=C> SAP AG BC505 -/
11.27
SAP AG 1999
"34 5xplain Plan
&o inde* being (sed
J(ll +able "can
,*ec(tion #lan
",4,C+ "+A+,-,&+6 ,stimated Costs F 5; :
+AB4, ACC,"" J744 -ARA
+able -ARA
4ast statistics date 05.06.!;;@
&(mber o' ro)s 53D!@!
&(mber o' bloc0s allocated 6!0
&(mber o' empty bloc0s ;
A%erage space !D!33
Chain co(nt 0
A%erage ro) length 56
7&837, 8nde* -ARAEEEEE0
Col(mn &ame XDistinct
-A&D+ !
-A+&R 4D405
&O&7&837, 8nde* -ARAEEE4
Col(mn &ame XDistinct
-A&D+ !
-A+/4 5
Contin4e S!o) statistics
S!o) "nde1es o( a.le %ARA
Analy?ing #oorly 3(ali'ied "34 "tatements
'o check if an inde1 is bein, used to access data! run an 9xplain Plan on the S+* statement.
'o disp0ay the information about the inde1 structure or the structure of the tab0e and a00 inde1es!
doub0e8c0ick the inde1 or tab0e name. #nformation is a0so disp0ayed about the statistics that the cost8
based optimiNer used to create the access! and the date the statistics for this tab0e was 0ast refreshed.
=C> SAP AG BC505 -P
11.2
SAP AG 1999
#hysical and logical layo(t
8/O contention
Chec0point not complete
Rollbac0 statement problems
Jragmented inde*es
#hysical and 4ogical 4ayo(t
'his section describes the fo00owin, physica0 and 0o,ica0 0ayout prob0emsG
#.& contention
Checkpoint not comp0ete =for on0ine redo 0o, fi0es>
&3A8:555 Snapshot too o0d =for ro00back se,ments>
7ra,mented inde1es
=C> SAP AG BC505 -H
11.2!
SAP AG 1999
Occ(rs )hen n(mero(s shado) processes and the
database )riter access the same dis0 at the same time
"hado)
process
"hado)
process
"hado)
process
"hado)
process
"hado)
process
#"A#B+ABD
#"A#"+ABD #"A##OO4D
#"A#7",R!D #"A#B+AB8
#"A#"+ABD
Database
)riter
DB2R
R,AD
2R8+,
8/O Contention
#.& contention refers to the hi,h #.& wait times for processes accessin, the database. "hen
numerous &rac0e shadow processes and the database writer access the same disk at the same time!
#.& contention is 0ike0y to occur.
#.& contention occurs ifG
'he app0ication desi,n is inefficient! due to e1pensive! unnecessary! or poor0y Iua0ified S+*
statements
'he #.& is not even0y distributed across many disks
'he disks are not fast enou,h to hand0e the hi,h #.& activity
;eavi0y accessed tab0es or inde1es are not distributed or striped across many disks
'he hardware confi,uration is incorrect =for e1amp0e! many disks and not enou,h contro00ers>
#.& contention is often caused by app0ication desi,n prob0ems! therefore! check this first.
=C> SAP AG BC505 -5
11.30
SAP AG 1999
8/O per path
Chec0 'or=
A%erage read times H 0ms
De%iations 'rom the median %al(e H 0P
//'-,'/DDD /E+4.+66 2C/ hs.,6/
Statistics of physical accesses on #racle database
Blk Reads !vg=ms? !vg=ms?
,.5E./
/6E54,/
6(5D(65(D-
4.&
4445(4.
D45(6D
/E,5466
6&,56--
66566(
Filename
/oracle/2C//sapdata/
/oracle/2C//sapdata/-
/oracle/2C//sapdata6
/oracle/2C//sapdata4
/oracle/2C//sapdata&
/oracle/2C//sapdata.
/oracle/2C//sapdata(
/oracle/2C//sapdataE
/oracle/2C//sapdata,
/oracle/2C//sapdataD
Reads
6-54&(
,54.,
&56EE54--
D(
/445(&/
,D5E(/
,45/E4
6&45D,/
45&E,
/45E(&
Lrites
/65-.(
/(
45,(,
&4
(.5/6-
/5-(-
.-(
66/
&(
4- /,/5446
4
/
4
.
4
&
4
.
6
/
Blk Lrites
/65-.(
/(
45,(,
&4
&D45-(&
/5-(-
.-(
66/
&(
4-
E
(
(
/.
.
(
.
.
(
4
"orted by
8denti'ying 8/O Contention in the Database
'o identify #.& contention in the database! use the %atabase Performance Monitor =transaction S&'(>
and choose Detailed analysis @ile system re%uests I. per path.
'he I. per path a00ows us to identify the sapdata mount points where #.& contention is occurrin,.
Check the A"era2e ms co0umns for b0ock reads =)>: Reads> and b0ock writes =)>: writes>! and use
these va0ues to identify Ahot disksB.
#f the tota0 number of reads and writes is re0ative0y 0ow! there is no #.& contention.
#f the tota0 number of reads and writes is hi,h! check if the avera,e read time is hi,her than -0 ms.
Lou can a0so identify Khot disksK by checkin, for va0ues that deviate by more than -0F from the
median va0ue of the avera,e read or write times.
$oteG %ue to the various hardware confi,urations and disk speeds! the actua0 va0ues can differ
si,nificant0y from system to system. Contact your hardware vendor for specific information.
Because &rac0e writes data b0ocks asynchronous0y! the avera,e write time is not important.
;owever!the avera,e write time becomes important if &rac0e is not ab0e to hand0e the vo0ume
anymore. Lou can identify this situation by checkin, the write complete waits and the free buffer
waits in view vDsystemEevent.
=C> SAP AG BC505 40
11.31
SAP AG 1999
+otal per de%ice
Statistics of physical accesses on #racle database
Filename Reads Lrites Blk Reads!vgms Blk Lrites !vgms
docud0/
loadi0/
poold0/
poold06
protd0/
roll0/
/oracle/2C//sapdata/
es&-bd06
/oracle/2C//sapdata/-
ddicd06
docui0/
system0/
/oracle/2C//sapdata6
protd06
/oracle/2C//sapdata4
btabd0/
clui0/
4-4
6D
/&5D/&
65//4
/56D&
/5(D4
6-54&(
,54.,
,54.,
65//4
/5(D.
/56E45&D6
/56EE54--
D(
D(
/D-
//
//
&&
/4
(E4
//54-&
/65-.(
/(
/(
//
//
45,&(
45,(,
&4
&4
ED.
//
/5ED(
6D
(654E6
/&5D,6
&5,ED
/5(D4
,.5E./
/6E54,/
/6E54,/
/-5&-4
/5(D.
D.-5.D6
D(65(D-
4.&
4.&
&-5.D-
/D-
6
.
4
6
4
/
4
/
/
6
E
-
4
.
.
6
,
//
//
&&
/4
(E4
//54-&
/65-.(
/(
/(
//
//
45,&(
45,(,
&4
&4
ED.
//
-
-
/&
4
/.
/6
E
(
(
-
-
/D
(
/.
/.
/.
-
"ol%ing the 8/O Contention #roblem
'o so0ve the prob0em of #.& contention! you canG
%istribute the #.& even0y on the disks avai0ab0e
%istribute the #.& even0y on more disk =then wou0d be necessary to ho0d the database fi0es>
Purchase faster disks
Move Ahot spotB tab0es or inde1es to their own tab0espaces on their own disks =may be striped>
'o identify the tab0espace and the data fi0e that has a bott0eneck! you can break down the tota0 #.&
reIuests per fi0e system by choosin, &otal per de"ice. 'he tab0espace and the data fi0e can then be
moved to another physica0 disk in the system.
%ifferent hardware p0atforms may have bott0enecks in disk contro00er ports! motherboards! and back
p0anes. 3efer to your hardware vendor for #.& distribution ,uide0ines.
=C> SAP AG BC505 4:
11.32
SAP AG 1999
Online redo
log 'iles
. DBR2
)rites data
to dis0s
3. Redo log )riter
)rites to the online
redo log in parallel
4. 4ast online redo
log 'ile is '(ll b(t
the chec0point is
not completed
Data 'iles
Data b(''er
Redo log b(''er
saptrace/bac0gro(nd
alertEG"8DH.log
Chec0point not
complete
!. Online redo log 'ile
s)itch occ(rs
Chec0point not Complete
;ow the error 0hec/point not 0omplete occursG
:. An on0ine redo 0o, switch occurs and the check point process ta,s the on0ine redo 0o, ,roup bein,
written to unti0 the checkpoint tri,,ered by the on0ine redo 0o, switch is comp0ete.
-. A checkpoint is tri,,ered. 'hat means! dirty pa,es from the data buffer are bein, written to disk
by the database writer =%B"3>.
4. 'ransactions are sti00 occurrin, and committin,! so data is written from the redo 0o, buffer to the
on0ine redo 0o,s in para00e0 to the checkpoint.
6. (ventua00y! after some 0o, switches! a00 the on0ine redo 0o,s are in use before the checkpoint
tri,,ered has finished. $o data can be f0ushed from the redo 0o, buffer to an on0ine redo 0o, fi0e
because a00 on0ine redo 0o, fi0es are necessary for instance recovery.
'he &rac0e 3%BMS automatica00y hand0es this situation! no further chan,es are processed unti0 the
checkpoint is comp0ete and the on0ine redo 0o, fi0e can be overwritten.
'he messa,e ACheckpoint not comp0eteB is written to the &rac0e a0ert 0o, alert_<SID>$lo2. 'his
prob0em ,enera00y occurs durin, hi,h database activity and durin, peak hours.
#f the messa,e appears freIuent0y! increase the number of on0ine redo 0o, ,roups. #ncreasin, the siNe
of the on0ine redo 0o, fi0es is not recommended! un0ess the time between the two 0o, switches is 0ess
than three minutes.
$oteG 'his prob0em shou0d on0y be of concern if it occurs freIuent0y.
=C> SAP AG BC505 4-
11.33
SAP AG 1999
Reading B(ery
#ersA&o. "alary
!......... 350
......... 436
@......... 3040
4......... 5@5
;......... 4!60
+able
Ro)s changed
and committed
Rollbac0 "egments
+ransaction +! 67pdate:
+ransaction + 6"elect:
Commit
430
5550
30!0
4!!;
Rollbac0 segment
O%er)rite
or
shrin0
ORA
!555
'he ro00back se,ments are used by the &rac0e 3%BMS toG
Save before ima2es of uncommitted transactions
Provide read consistency durin, the runtime of a Iuery
#f rows of a tab0e are modified! the before ima,es of the data are copied to a ro00back se,ment. After
the commit! this information is no 0on,er needed! and the ro00back se,ment is freed by the process.
#f a tab0e is modified between the time a Iuery is issued and when the records are de0ivered by the
Iuery! the data is read from the ro00back se,ments. ;owever! ro00back se,ments are overwritten or
shrunk in a cyc0e and are not 0ocked for Iueries. #f a Iuery is not finished unti0 the ro00back se,ment
is overwritten or shrunk! the Iuery does not receive the data.
"hen this occurs! &rac0e issues error :555 Snapshot too old! and the Iuery is aborted. A short dump
then occurs! and an entry in the 3.4 System 0o, is ,enerated.
=C> SAP AG BC505 44
11.34
SAP AG 1999
"ol%ing Rollbac0 "egment #roblems
Database b(''er pool
. 4ong processing time
bet)een t)o data 'etches
A##lication server
4arge n(mber o'
b(''ers (sed on the
database ser%er
Database b(''er pool
A##lication server
Iigh processing
time on the
application ser%er
"nap
d(mp
ORA
!555
ORA
!555
!. ,*pensi%e B(ery
'here are two main reasons why this error occursG
(1pensive Iueries
*on, processin, time between the fetches
Because a S(*(C' does not norma00y read a00 the data at one time! 0on, processin, times between
the fetches can cause error &3A8:555! even if the statement is not e1pensive. 'he ne1t fetch is
processed on the database when it is reIuested. 'herefore! even if the statement is not e1pensive! the
time it takes unti0 the statement is finished is 0on,.
'o avoid error &3A8:555G
%ecrease the runtime of the statement! by tunin, the statement causin, the Snapshot too old
%ecrease the processin, time between two fetches of an S+* statement
Schedu0e the reports and the updates at different times
#f none of these tunin, methods are successfu0! increase the number or the siNe of ro00back
se,ments =preferab0y! increase the number>
3o00back data fi0es have the hi,hest amount of write activity in the database. 'o reduce bott0enecks
in the ro00back se,ments! distribute the #.& for the data fi0e even0y.
=C> SAP AG BC505 46
11.35
SAP AG 1999
... ... ... ... ... ... ... ... ... ... ... ...
... ... ... ...
8nde* 8nde*
... ... ... ...
... ... ... ...
... ...
+able +able
... ... ... ...

!
3 4 5 6 5 @ ;
8nde* )ith a
lo) 'ill le%el
-any b(''er gets per
e*ec(tion altho(gh the
correct inde* is (sed
Jragmented 8nde*es
7ra,mented inde1es have a 0ow fi00 0eve0.
#nde1es can become fra,mentedG
After data has been archived
After many records have been de0eted
#n hi,h0y dynamic tab0es
An inde1 that is fra,mented consists of empty b0ocks or branch and 0eaf pa,es with on0y a few va0id
entries. #f an inde1 is fra,mented! a Iuery that scans a ran,e in the inde1 must read many inde1
b0ocks. 'his affects the performance of the entire database! since data or inde1 b0ocks of other tab0es
are swapped out of the buffer by the new0y read inde1 b0ocks that contain on0y a few records.
#n this e1amp0e! 5 inde1 b0ocks and 5 data b0ocks are read in order to retrieve five rows of the tab0e.
=C> SAP AG BC505 45
11.36
SAP AG 1999
7se the +ables and 8nde*es -onitor
Jill le%el
+ables and 8nde*es= Detailed Analysis o' +!00_0 R/3
*
DB Analysis ,*tents +able Col(mns Detailed Analysis Iistory
14.05.1999 113620 "*a(y3i3 .< BA-&%ee
Da&a <%.m 15DEX$ST"TS
Storage summary "erformance summary
?e2e(3................ 3 ;e&3 6e% a''e33........ 4
B(.'C3 a((.'a&e+...... 1H315 Di3&i*'& Cey3.......... 517H152
"2ai( i* &%ee.....)y&e 10H477H868 M.3& %e6ea&e+ Cey...... 1
@3e+ i* &%ee......)y&e 9H856H219 R./3 6e% Cey........... 1
...................= 95
/i&0.4& +e(. %./3..= 94
B>-tree branch blocks B>-tree leaf blocks
B%a*'0 )(.'C3......... 4 ?ea< )(.'C3........... 1H309
e*&%ie3........ 1H308 e*&%ie3........... 517H152
3i7e.......)y&e 19H406 3i7e..........)y&e 9H836H813
3i7e#)(.'C.)y&e 8H012 3i7e#)(.'C....)y&e 7H980
+e(e&e+........... 6
+e(. 3i7e.....)y&e 114
Analy?e 8nde*
1alidate "tr(ct(re H
"torage 3(ality
1alidate "tr(ct(re HDialog
Bac0gro(nd
Dialog
8denti'ying a Jragmented 8nde*
'o ana0yNe the fi00 0eve0 of an inde1! use the 'ab0es and #nde1es Monitor =transaction D)'*> and
choose Detailed analysis.
#nde1es that have a fi00 0eve0 0ess than 50F shou0d be reor,aniNed if they are freIuent0y accessed.
'o create or refresh the inde1 statistics! choose Analy8e index =alidate structure Dialo2 or
)ac/2round.
%urin, the runtime of the 2a0idate structure! the re0ated tab0e remains 0ocked for chan,es.
7or further information about detectin, and recreatin, fra,mented inde1es refer to the artic0e about
Reor2ani8ation in SAP &ech3et.
=C> SAP AG BC505 4/
11.37
SAP AG 1999
7nit "(mmary
&o) yo( are able to=
De'ine a strategy 'or re'reshing the statistics (sed by
the costAbased optimi?er
8denti'y per'ormance problems ca(sed by the=
CostAbased optimi?er
-emory con'ig(ration
Application design
#hysical and logical layo(t
=C> SAP AG BC505 4P
11.3
SAP AG 1999
J(rther Doc(mentation
"A# +ech&et
Comm#nication SAP Tech<etDB Admin.
9racle
"A#&et
Information SAP Sol#tions SAP ,&:
Basis Technolo!$ S$stem Mana!ement
CCMS - Comp#ter Center Mana!ement
S$stem Database Mana!ement
"A# &otes !0;034D !55!5D !@!
=C> SAP AG BC505 4H
12
SAP AG 1999
+op !0 #roblems
! Database O%er%ie) 6 Ad%anced Bac0(p +echniB(es
Bac0(p "trategy and
+ape -anagement
5 "torage -anagement
3 "ched(lingD #er'ormingD
and -onitoring Bac0(ps
@ #er'ormance -onitoring
4 Restore and Reco%ery ; +op !0 #roblems
5 Bac0(p "trategies
7sing R-A&
=C> SAP AG BC505 :
12.2
SAP AG 1999
+op !0 #roblems
Contents
+he most 'reB(ent problems that occ(r )hen R/3 is installed on
an Oracle database
ObCecti%es
At t!e end o( t!is 4nit< yo4 )ill .e a.le to?
Recogni?e and sol%e these problems
#re%ent these problems 'rom occ(rring
'his unit e1p0ains the ten prob0ems that most freIuent0y occur when 3.4 is insta00ed on an &rac0e
database.
&nce you have comp0eted this unit you wi00 be ab0e toG
3eco,niNe and so0ve these prob0ems
Prevent many of these prob0ems from occurrin,! before they become prob0em
=C> SAP AG BC505 -
12.3
SAP AG 1999
R4n S!"DB! -check
R4n S!"DB! -check
Chec0 'or
error messages
in=
Chec0 'or
error messages
in=
R/3 "yslog
"A# &ote
"earch
Oracle bac0gro(nd
process trace 'iles
in directory=
saptrace/bac0gro(nd
Oracle bac0gro(nd
process trace 'iles
in directory=
saptrace/bac0gro(nd
Oracle (ser trace 'iles
in directory=
saptrace/(sertrace
Oracle (ser trace 'iles
in directory=
saptrace/(sertrace
R/3 startdb.log
in the home directory
o' (ser G"8DHadm
R/3 startdb.log
in the home directory
o' (ser G"8DHadm
Oracle alert log 'ile=
saptrace/bac0gro(nd
/alertEG"8DH.log
Oracle alert log 'ile=
saptrace/bac0gro(nd
/alertEG"8DH.log
Chec0 "A#&et
'or sol(tions
+ro(bleshooting "teps
"hen a prob0em occurs! run sapdba -check and check the 0o, fi0e in directory sapchec/.
'o be,in troub0eshootin,! you can check the 3.4 System 0o, or the fo00owin, &rac0e fi0esG
'he &rac0e a0ert 0o, fi0e &3AC*(E;&M(.saptrace.back,round.a0ertE?S#%@.0o,! which often
contains further information! such as the &3A8)))) return code that may identify the prob0em
'he &rac0e back,round process trace fi0es in directory saptrace.back,round
'he &rac0e user trace fi0es in directory saptrace.usertrace
'he startdb.0o, fi0e in the home directory of user <SID>adm! which contains error information in
the case of database instance startup fai0ure
'o check the 3.4 System 0o,! use transaction S,*7.
Lou shou0d a0so search for re0ated SAP $otes in SAP$et. #f you cannot find an app0icab0e SAP
$ote! create a customer messa,e in SAP$et! and provide the SAP hot0ine with the fo00owin,
informationG
Sys0o, messa,es and the short dump =transaction S&**> re0ated to the error
(rror messa,es from the &rac0e a0ert 0o, fi0e
(rror messa,es from the &rac0e back,round process and user trace fi0es
(rror messa,es from the fi0e startdb.0o,
*o, fi0es of SAP%BA or B3X too0s
=C> SAP AG BC505 4
12.4
SAP AG 1999
+he most 'reB(ently occ(rring problems are=
An archi%er st(c0 sit(ation
+he incorrect tape si?e on tape dri%es )ith hard)are compression
A missing Yend bac0(pY
A tablespace o%er'lo)
A table or inde* reaching the -A9,9+,&+" limit
Oracle error ORAA!555D snapshot too old
&et@ +C#/8# delay
Oracle error ORAA!55@D data bloc0 corr(ption
Oracle error ORAA600D internal database error
#oor per'ormance o' the costAbased optimi?er
+op !0 #roblems
'he ten most freIuent prob0ems that occur when 3.4 is insta00ed on an &rac0e database areG
An archiver stuck situation
'he incorrect tape siNe on tape drives with hardware compression
A missin, Aend backupB
A tab0espace overf0ow
A tab0e or inde1 reachin, its MA)()'($'S 0imit
&3A8:555! snapshot too o0d
$etH 'CP.#P de0ay
&3A8:5PH! data b0ock corruption
&3A8/00! interna0 database error
Poor performance of the cost8based optimiNer
=C> SAP AG BC505 6
12.5
SAP AG 1999
"A#$78 is hanging
Database in
ARCI81,4O$
mode
Archi%er
st(c0
O''line redo log
directory saparch
4og 'ile
s)itches
,rror
ORAA55 or
ORAA5
DB-"
Online redo logs
Archi%er "t(c0 "it(ation
'he database of a production system shou0d a0ways be operated in A3C;#2(*&G mode with an
active Archi"er process.
"hen the database is in A3C;#2(*&G mode! an on0ine redo 0o, fi0e can on0y be reused after it has
been comp0ete0y archived to the off0ine redo 0o, archive directory saparch. #f the directory saparch
is fu00! the on0ine redo 0o, fi0es cannot be comp0ete0y archived! and the database wi00 enter the
archi"er stuc/ state. 'his means that no further chan,es are possib0e to the system.
#f this occurs! the &rac0e error messa,e &3A8-55 or &3A8-P- is written to the database a0ert 0o,.
'he fo00owin, is an e1amp0e of the &rac0e a0ert 0o, fi0e alert_<SID>$lo2G
'ue May :5 :0G-5G:: :55H
&3A800-55G error archivin, 0o, :: of thread :! seIuence Y :44P
&3A8004:-G on0ine 0o, :: thread :GU.orac0e.'C:.ori,0o,A.0o,E,::m:.dbfQ
&3A8004:-G on0ine 0o, :: thread :G U.orac0e.'C:.mirr0o,A.0o,E,::m-.dbfQ
&3A800446G archived 0o,G U.orac0e.'C:.saparch.'C:arch:E:44P.dbfQ
&3A8:550-G write error on fi0e K.orac0e.'C:.saparch.'C:arch:E:44P.dbfK
"hen an archiver stuck situation occurs! the 3.4 Systems han,s! and you cannot perform
transactions unti0 the on0ine redo 0o, fi0e has been comp0ete0y archived to directory saparch.
=C> SAP AG BC505 5
12.6
SAP AG 1999
-onitor directory saparch
Do not delete
or mo%e
o''line redo
log 'iles
Create a Yd(mmy 'ileY
5 times the si?e o' an
online redo log 'ile
O''line redo log
directory saparch
Reser%e three times the
amo(nt o' the space
reB(ired 'or the daily
o''line redo log 'iles
Database
Administration
logEarchi%eEstart F tr(e
in initG"8DH.ora
A%oiding an Archi%er "t(c0 "it(ation
'o avoid an archiver stuck situationG
3eserve some disk space by creatin, a Adummy fi0eB in the archive directory saparch. Make the
siNe of the dummy fi0e five times the siNe of the off0ine redo 0o, fi0e. #f saparch becomes fu00!
remove the dummy fi0e and run B3A3C;#2( immediate0y.
#f B3A3C;#2( is schedu0ed to run dai0y! ensure that saparch has enou,h disk space to ho0d at
0east three times the amount of the dai0y off0ine redo 0o, fi0es.
Monitor how fu00 saparch is.
Check the fi0e init<SID>$ora to see if parameter lo2_archi"e_start M true.
Check if user ora<SID> has write authoriNation to saparch.
"arnin,G %o not de0ete or move fi0es from the archive directory saparch.
=C> SAP AG BC505 /
12.7
SAP AG 1999
cpio or dd error=
end o' tape
reached
Rede'ine the parameter tapeEsi?e
in 'ile initG"8DH.sap
Recalc(late the compression ratio
once per bac0(p cycle
Rede'ine the parameter tapeEsi?e
in 'ile initG"8DH.sap
Recalc(late the compression ratio
once per bac0(p cycle
,rror
8ncorrect +ape "i?e 6Iard)are Comp. +ape Dri%es:
'he physica0 tape siNe =tape 0en,th X write density> is specified in the parameter tape_si8e in the fi0e
init<SID>$sap. 'he physica0 tape siNe is the tota0 vo0ume of data that can actua00y be written to a
vo0ume without compression =in MB or GB>.
#f parameter tapeEsiNe is confi,ured too 0ar,e! cpio or dd reaches the physica0 end of the tape. 'his
causes severe prob0ems when database restoration is reIuired.
"hen usin, tape devices with hardware compression! a0ways 0eave a reserve of appro1imate0y -00
MB to take account of any errors in the ca0cu0ation of the compression rate.
"hen hardware compression is used! B3BACJ9P does not receive any information about the
compression ratios for the individua0 fi0es. Lou can obtain this information from B3BACJ9P by
runnin, a dummy compression. 'o do this! run command brbackup -compressH-k only .
3eca0cu0ate the dummy compression ratios at 0east once per backup cyc0e! and after a 0ot of data
chan,e activity in the database! such as re0ease up,rades and insertin, 0ar,e amounts of data.
'o ca0cu0ate the compression ratio! use the 1b 7* option of the compression command for the
correspondin, init<SID>$sap parameter. 7or e1amp0e! the compression command parameter shou0d
be defined as fo00owsG compress_cmd D Ncompress 1b 7* 1c ! > !O$
See a0so SAP $ote HP0P.
=C> SAP AG BC505 P
12.
SAP AG 1999
Online tablespace bac0(p
ORAA!!4; or
ORAA!!!3
-issing Yend bac0(pY
Restoring data 'iles
is not necessary
alter tablespace'''begin backup
'''in backup mode'''
alter tablespace'''end backup
7se the "A#DBA to=
Chec0 )hich tablespaces are
in Be!in back#p mode
"h(tdo)n the database 'or
error ORAA!!4;
Reco%er the database 'or
error ORAA!!!3
,rror
-issing Yend bac0(pY
#f you back up a tab0espace on0ine without 3MA$! the tab0espace must be in be2in bac/up mode
durin, the backup. 'his ensures that the &rac0e data fi0e headers of the data fi0es be0on,in, to the
tab0espace in the on0ine backup mode are not updated.
#f a tab0espace is in be2in bac/up mode and the command shutdown immediate is issued in
SAP%BA! SAP%BA puts every tab0espace into end bac/up mode before the database is shutdown.
#f a tab0espace remains in be2in bac/up mode and the command shutdown immediate is issued
in svrmgrl =or command stopsap db is issued>! the database returns error &3A8::65 =missin, end
backup>.
'o check which tab0espaces are sti00 in be2in bac/up mode! use SAP%BA and choose D) 0hec/
"erification D) System 0hec/. 'he system then prompts the user whether SAP%BA shou0d set
the end bac/up automatica00y.
#f the database crashes durin, an on0ine backup! or is powered down! or is shutdown by usin,
shutdown abort! some tab0espaces may remain in the be2in bac/up mode. #n this situation!
because the tab0espaces are in online bac/up mode when you try to open the database! error &3A8
:::4 is returned.
7or &3A8:::4! you must perform a database recovery. 'o perform the recovery! use SAP%BA and
choose Partial restore and complete reco"ery database.
#f a missin, end backup error occurs! you do not need to restore any data fi0es.
'he missin, end backup error does not occur if the backup is performed with 3MA$.
=C> SAP AG BC505 H
12.!
SAP AG 1999
GtablespaceH.data
&e) dis0
Add data 'ile
+ablespace
GtablespaceH.data!
Jile si?e depends
on the estimated
increase in the
tablespace
obCects
$aps
&ot
eno(gh
'ree space
'or this
e*tent
Data obCects
8nsertions
+ablespace
#er'orm a bac0(p
a'ter e%ery change in
'ile str(ct(re
ORAA!653 or
ORAA!654
,rror
+ablespace O%er'lo)
,*tents
#f an e1tent of a ,iven siNe is reIuired in a tab0espace! but there is not enou,h conti,uous freespace
avai0ab0e in the tab0espace! &rac0e returns error &3A8:/54 =for tab0es> or &3A8:/56 =for inde1es>.
'he error messa,es are disp0ayed in both the Sys0o, fi0e and the ABAP short dump.
'o so0ve this prob0em! use SAP%BA to e1tend the tab0espace with one e1tra data fi0e. 7rom the
SAP%BA! choose &ablespace administration Alter tablespace Add Data file. #f you e1tend
severa0 tab0espaces! make sure that you p0ace the data fi0es on different disks! otherwise there may be
prob0ems with the #.& speed of disk access.
Lou must perform a backup after every chan,e in the fi0e structure.
=C> SAP AG BC505 5
12.10
SAP AG 1999
AdC(st the
ne*t e*tentQ
Chec0
300 5 4 3 ! 0
. . . . . .
ObCect
8nitial
e*tent
&e*t
e*tents
-a*,*tents
. . .
. . .
ORAA!63! or
ORAA!63
,rror
8ncrease
-a*,*tents
by 50
S
AdC(st the
ne*t e*tentQ
-onitor the n(mber o'
e*tents reg(larly
R(n sapdba -ne8t )ee0ly
AdC(st the Max5xtents
parameters
-a*,*tents 4imit is Reached
#f the number of e1tents a00ocated to an obOect reaches the ma1imum number specified in the
,ax9xtents stora,e parameter! then this obOect cannot reIuest any more e1tents. "hen this
ma1imum va0ue is reached! &rac0e reports error &3A8:/4: =for tab0es> and &3A8:/4- =for inde1es>.
'he error messa,es are disp0ayed in both the Sys0o, fi0e and the ABAP short dump.
'o avoid this prob0emG
Monitor the number of e1tents re,u0ar0y
3un sapdba -ne8t once a week
AdOust the ,ax9xtents parameters as reIuired
'o chan,e the va0ues of the ne1t parameter for tab0es and inde1es! run sapdba -ne8t.
'o chan,e the va0ues of the ,ax9xtents parameter for tab0es and inde1es! use the SAP%BA and
choose Reor2ani8ation Alter.show table or index stora2e parameters Alter.show parameters$
#f the stora,e parameter ,ax9xtents is set to unlimited! the ma1imum number of e1tents is actua00y
-!:6P!6H4!/65.
%o not chan,e ,ax9xtents to unlimited for a00 se,ments in your database. %o not set the ,ax9xtents
to unlimited on ro00back se,ments.
=C> SAP AG BC505 :0
12.11
SAP AG 1999
7pdate...
Data a'ter
(pdate
S*)*C2'''
-< fetch
*BDS*)*C2
4ong r(nning B(ery
S*)*C2'''
4ong processing time
!
O%er)ritten
rollbac0
segment
data
7pdate 3 records and commit
!

3
+ables
3

ORAA!555
!
Data be'ore
(pdate
Rollbac0 segments
,rror
ORAA!555= "napshot +oo Old
&rac0e enforces statement80eve0 read consistency. 'his ensures that the data returned by a sin,0e
Iuery is consistent with respect to the time when the Iuery be,an. 'herefore! a Iuery never sees the
data chan,es made by transactions that commit durin, the course of e1ecution of the Iuery. 9sua00y!
a 0on, runnin, Iuery has error &3A8:555 if the data accessed by the Iuery is updated and
committed by another user or session after the Iuery has been started.
'he most common reasons for error &3A8:555 =snapshot too o0d> areG
A 0on, runnin, Iuery due to a poor0y Iua0ified data access
A hi,h processin, time between fetches of the same Iuery
#ncorrect ro00back se,ment setup
A 0on, run Iuery can cause some activities in the ABAP pro,ram 0oop to take too 0on,! even if the
S+* statement is correct. 7or e1amp0eG
S*)*C2 '''
Fetch =a 0on, runnin, activity>
*BDS*)*C2
Before you try to chan,e the number or siNe of the ro00back se,ments! check if the prob0em is caused
by e1pensive Iueries! such as inefficient app0ication desi,n! wron, inde1 desi,n! or insufficient cost8
based optimiNer statistics. Lou can adOust the ro00back se,ment setup by addin, more ro00back
se,ments or makin, them 0ar,er.
=C> SAP AG BC505 ::
12.12
SAP AG 1999
tnsnames.ora
sBlnet.ora
listener.ora
protocol.ora
ORAC4,EIO-,
/net)or0/admin
&et@ &et@
+C#/8# +C#/8#
Database ser%er
4istener process
"hado) process
"hado) process
"hado) process
"hado) process
2ait 'or 00ms to
'ill the &et@ +C#/8#
pac0ets ca(sing
poor per'ormance
&et@ +C#/8# pac0et
tnsnames.ora
sBlnet.ora
protocol.ora
ORAC4,EIO-,
/net)or0/admin
Remote
application ser%er
R/3 )or0 processes
R/3 )or0 processes
R/3 )or0 processes
R/3 )or0 processes
Delay
&et@ +C#/8# Delay
$etH is the &rac0e communication 0ayer between the c0ient =app0ication servers> and the database
server. *oca00y! it uses inter process communication =#PC>S remote0y! it uses 'CP.#P.
"hen you confi,ure $etH! you can choose to open the connection with de0ay or no8de0ay for
'CP.#P. By defau0t! &rac0e opens the connection in delay mode! which a00ows the 'CP.#P
imp0ementation on the operatin, system to de0ay sendin, ha0f8empty 'CP packets. 'he wait cyc0e is
appro1imate0y -00ms! which s0ows down the communication speed in 3.4.
'o so0ve this prob0em! perform the fo00owin, stepsG
%own0oad the fi0e protocol$ora from sapser"M
As user ora<SID>! copy this fi0e into the &3AC*(E;&M(.network.admin directory of the
database server and every app0ication server =even thou,h '$SEA%M#$ may point to a different
directory>
Give read permission for fi0e protocol$ora to users <SID>adm and ora<SID>
3estart the $etH 0istener on the database server
Stop and start a00 the app0ication servers.
7or further information! see SAP $ote P-/4H =9ni1> and SAP $ote :4-54P ="indows $'>.
=C> SAP AG BC505 :-
12.13
SAP AG 1999
Data 'ile
"A# &ote "earch
BC-DB-!R" C.m6.*e*&
Sea%'0 C%i&e%ia
!R"-1578
A *
Oracle
bloc0
ORAA!55@
,*tents
,rror
ORAA!55@= Data Bloc0 Corr(ption
(rror &3A8:5PH indicates a data b0ock corruption. %ata b0ock corruption usua00y occurs because of a
hardware error! and in most cases! remains undetected unti0 the corrupted information is reIuired.
7or further information! see SAP $otes :455- and -4465 or search for 0atest SAP $otes about error
&3A8:5PH.
&nce the hardware prob0em that caused the data b0ock corruption has been so0ved! you may need to
restore and recover parts of the database. #f an inde1 b0ock is corrupted! you can drop and re8create
the inde1.
"hen a norma0 backup is performed! a corrupted data b0ock wi00 remain undetected. 'o detect data
b0ock corruption ear0y! perform a database verification at 0east once in your backup cyc0e.
'o detect the corrupted data b0ock! do one of the fo00owin,G
9se command brbackup -verifyH-w only0dbvHuse0dbv durin, a norma0 backup! or
use the SAP%BA and choose / 1 D) chec/."erification D) "erification usin2 D) =9RI@H
9se profi0e parameter dis/_copy_cmdDrman to do the backup! because 3MA$ automatica00y does
a verify when it copies the b0ocks.
=C> SAP AG BC505 :4
12.14
SAP AG 1999
saptrace/bac0gro(nd
alertEG"8DH.log
"A# &ote "earch
BC-DB-!R" C.m6.*e*&
Sea%'0 C%i&e%ia
!R"-600
12700
A *
3on 3ay // /4+&.+-/ /DD,
*rrors in file
/oracle/B1B/rdbms/log/ora0/6-E'trc+
#R!---(--+ internal error code5
arguments+ I/6E--J5I66/.J5 I/-E4EEE,/&J5
I&J5 IJ5 IJ5 IJ5 IJ
3on 3ay // /4+&.+-/ /DD,
*rrors in file
/oracle/B1B/rdbms/log/ora0/6-E'trc+
#R!---(--+ internal error code5
arguments+ I/6E--J5I66/.J5 I/-E4EEE,/&J5
I&J5 IJ5 IJ5 IJ5 IJ
Create Original -essage *
BC-DB-!R" C.m6.*e*&
S0.%& Te,&
"%-4me*&
!R"-600 +e&e'&e+
12700
A
ORAA600
,rror
ORAA600= 8nternal Database ,rror
&3A8/00 indicates an interna0 database error.
3ecord the first ar,ument of the &3A8/00 error messa,e. #n this e1amp0e! the first ar,ument is
:-P00.
Search for any SAP $otes re0ated to &3A8/00 and the first ar,ument.
#f no SAP $otes correspond to the particu0ar &3A8/00 prob0em! create a customer messa,e in
SAP$et! and attach the re0ated trace fi0es! a0ertE?S#%@.0o,! and 3.4 Sys0o,.
(rror &3A8/00 is often fo00owed by a state dump in the trace fi0es. 'hese trace fi0es are found in
directory saptrace.bac/2round or saptrace.usertrace. 'he a0ertE?S#%@.0o, is in the directory
saptrace.bac/2round.
=C> SAP AG BC505 :6
12.15
SAP AG 1999
#er'ormance -emory "tr(ct(re Bac0(p/Reco%ery All database operations
All #er'ormance operations 6 :
8n'l(ence o' the CostABased Optimi?er
Old statistic
in'ormation can ca(se
serio(s per'ormance
problems
'he cost8based optimiNer determines the most efficient access path based on ana0yNed statistics for
tab0es and inde1es. &utdated or incorrect statistics can cause severe performance prob0ems.
'o prevent the cost8based optimiNer usin, an inefficient access path that cou0d cause performance
prob0ems! you must update the statistics re,u0ar0y.
#n case of ,enera0 performance prob0ems! check whether the statistics are up8to8date first. 'o do this!
disp0ay the D) peration ,onitor =transaction D)*(> and choose Performance.
=C> SAP AG BC505 :5
12.16
SAP AG 1999
7nit "(mmary
&o) yo( are able to=
Recogni?e and pre%ent the problems that occ(r most
'reB(ently )hen R/3 is installed on an Oracle database
=C> SAP AG BC505 :/
13
SAP AG 1999
Concl(sion
! Database O%er%ie) 6 Ad%anced Bac0(p +echniB(es
Bac0(p "trategy and
+ape -anagement
5 "torage -anagement
3 "ched(lingD #er'ormingD
and -onitoring Bac0(ps
@ #er'ormance -onitoring
4 Restore and Reco%ery ; +op !0 #roblems
5 Bac0(p "trategies
7sing R-A&
=C> SAP AG BC505 :
13.2
SAP AG 1999
<o( are no) able to=
De'ineD per'orm and monitor an appropriate
bac0(p strategy
-onitor and administrate yo(r R/3 Oracle system
by (sing the
R/3 database monitors
Database administration tools o''ered by "A#
8denti'y per'ormance problems by monitoring the
R/3 "ystem
Concl(sion
=C> SAP AG BC505 -
13.3
SAP AG 1999
+echnical Core Competence A
/no)ledge #rod(ct
Online Doc(mentation
&otes in the application area BCA
DBAORA
"A# +ech&et
"A#&et
Delta0ios0 in the "A#&et
J(rther Doc(mentation
=C> SAP AG BC505 4
13.4
SAP AG 1999
-en( #aths
Contents=
Appendi*
=C> SAP AG BC505 6
13.5?re>8entl9 (sed 2en8 :at$s
+ransA
action
+itle -en( #ath
-/01 AnalyGe :1cl4sive *oc,)aits ools Administration %onitor
Per(ormance -ata.ase :1cl4sive
loc, )aits
-/02 AnalyGe a.les and "nde1es ools CC%S Con(i&4ration *o&on
&ro4#s
-/03 Parameter C!an&es in
-ata.ase
ools Administration %onitor
Per(ormance -ata.ase Parameter
C!an&es
-/12 -/ /ac,4# %onitor ools CC%S -/ Administration
/ac,4# lo&s
-/13 -/A Plannin& Calendar ools CC%S -/ Administration
-/A Plannin& Calendar
-/16 -/ System C!ec,? %onitor ools CC%S -/ Administration
-/ System C!ec, -is#lay alerts
-/18 -/ System C!ec,?
Con(i&4ration
ools CC%S -/ Administration
-/ System C!ec, Con(i&4ration
-/21 -/ Cost-/ased $#timiGer?
Con(i&4ration
ools CC%S -/ Administration
Cost-.ased o#timiGer Con(i&4ration.
-/24 -ata.ase $#erations %onitor ools CC%S -/ Administration
$#erations monitor
RI20 CC%S %onitorin& ools CC%S Control/%onitorin&
Alert monitor
S:12 A/AP/4 -ictionary -is#lay 0se transaction S:11
S:11 A/AP/4 -ictionary -is#lay ools A/AP +or,.enc!
-evelo#ment A/AP -ictionary
S%21 $nline System *o& Analysis ools Administration %onitor
System lo&. $r? est System lo& 3(rom
t!e A/AP/4 -evelo#ment +or,.enc!
initial screen5
S%31 %aintain a.le 6ie)s System Services a.le maintenance
:1tended ta.le maintenance
S%66 System)ide +or, Process
$vervie)
ools CC%S Control/%onitorin&
All )or, #rocesses
S04 Select -/ Activities ools Administration %onitor
Per(ormance -ata.ase Activity
S06 $#eratin& System %onitor Drom t!e Per(ormance %onitorin& screen?
$#eratin& system *ocal Activity
=C> SAP AG BC505 5
+ransA
action
+itle -en( #ath
S22 A/AP -4m# Analysis ools A/AP +or,.enc! est
+or,.enc! -4m# Analysis
=C> SAP AG BC505 /