Sunteți pe pagina 1din 101

BC555 liveCache Administration

liveCache Administration

R/3 Release 4.6C R/3 Release 4.6C


SAP AG 1999

50040750 50040750

R/3 Release 4.6 C Material Number 5004 0750

Copyright

Copyright 2002 SAP AG. All rights reserved. No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice. All rights reserved.

SAP AG 2002

Trademarks:

Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors. Microsoft, WINDOWS, NT, EXCEL, Word, PowerPoint and SQL Server are registered trademarks of Microsoft Corporation. IBM, DB2, OS/2, DB2/6000, Parallel Sysplex, MVS/ESA, RS/6000, AIX, S/390, AS/400, OS/390, and OS/400 are registered trademarks of IBM Corporation. ORACLE is a registered trademark of ORACLE Corporation. INFORMIX-OnLine for SAP and INFORMIX Dynamic ServerTM are registered trademarks of Informix Software Incorporated. UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group. HTML, DHTML, XML, XHTML are trademarks or registered trademarks of W3C, World Wide Web Consortium, Massachusetts Institute of Technology. JAVA is a registered trademark of Sun Microsystems, Inc. JAVASCRIPT is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented by Netscape. SAP, SAP Logo, R/2, RIVA, R/3, ABAP, SAP ArchiveLink, SAP Business Workflow, WebFlow, SAP EarlyWatch, BAPI, SAPPHIRE, Management Cockpit, mySAP.com Logo and mySAP.com are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other products mentioned are trademarks or registered trademarks of their respective companies.

0   &         )('%$ #"!    


LiveCache Administration 2 days

IUuisQ GaiW p x VaUUy I e Q`X r qI PQT t P cXWgxwv X P t Q`X r qI I aiVUSVUI ufUUsQ GVVW p R iShfd @aW VVUSQ "H Y R g e c b ` Y X W I T R PP I

7 7 7 2 %(AA1 7 4 7 2 %(AA1 6 4 7 2 %(AA1 7 E 7 2 %(AA1 6 E 7 2 %(AA1

 Qw r TP I ~ d H sh ! ## nsag is3sa)he } | as cd j e ysa)he u |d H g y sa j e ysa)he u pd H e f t yc u t exd H h@%Vv hysa)he "I VW Uv hzVa)he Y P { u c u t x d H Q Vag Vv hysa)he rw P dc u t xd H e e fcw u t R qIX Y q pd H u)UVuv ))Uc s%UVUW ' ri)he PiQVo Vn3y k aaW 5ihi)he PQ y m ly j R qIX Y gd H e f t y R qIX Y ed H @iic aaW 5i)he Q asg ic aaW 5i)he rw P d R qIX Y d H RW Y PQ QwW xQT I H P I Hrg YWw VI iR isViQ SV)GQ Vaw UUisQ 6 7 4 2 RgX e a%(AA1 ssUGaad j
Software Logistics
Workplace TCC Workplace
3 days

7 F 4 2 )G531

7 E 4 2 ((5A1
Technical Core Competence

7 6 7 2 %(AA1

6$3 %DVLV $GPLQLVWUDWLRQ 7UDLQLQJ 

2 days R/3-Technical Implementation and Operation Management

&RUH &RPSHWHQFH

([SHUW &RPSHWHQFH

5 days Database Administration Informix 2 days Database Administration SAP DB 3 days Database Administration MS SQL Server 3 days Database Administration DB2/400 5 days Database Administration DB2/390 3 days Database Administration DB2 UDB

7 F 7 2 )GAA1

F F 7 2 %GAA1

7 6 4 2 %(531

6 4 2 1 %'@98

SAP AG
SAP AG 1999

5 days

3 days

Workload Analysis

3 days Advanced R/3 System Administration

BC555
3 days 3 days Database Administration Oracle

1-1

D DB 2 (#CA1

 $   %"#"!         

 " "  X %      H ' S F T S S FA GB) #UGE W IR5 V 3 T S ' Q E 5 RUE 9RR79P

HF E D 6 ) A IG7B2CB@ 5 8 6 3 1 ) ' 0975 420(&        "s sr 9"   # 

""0b! b"#                     ##  % "U b"#         d b"#            b"#    t          #U  2 b"#   

FA ) a D i @ i T 5 Iq7a 9(9e2G9P H 5 S sUE b A q0' #F 9R7q) V 5 i 8 S 3 D H ' @ bi

F 3 Q E F T 3 A 5 %RCGG XA T bi Y @ 5 S A 5 i Q E F T 3 GE 9RBRCGG XA T bi Y @ h E 5 20GQ V 7 RB7' qpbi 5 S 8 S ) @


SAP AG ( SD) KTM mySAP.com for Te chn. Imp l , IT Cons ,Sys. I ntegration UH / 7 . . 1 day ( SD) 2 da ys

r ofpq lemnfh ukg j hi e defg v #  " X" b"       vww u H ) H h ) GaB7Q9Ab vws u vsw u 6 T 2'082' S ' S TgP%RTUE 9'RRE75 P A 3 S Q uv vw u vwxw u vww u uv y y y z} xz} } ~z ~x y z z} | { u y z y x w v u t
B C3 10 W in do ws NT / Oracl e BC3 14 Wi n dow s NT MS SQ Se rv er L BC3 17 (W ind ow s N T / U N IX ) / D B2 (SD) 2 d a ys BC3 60 UNI X / Ora cle BC3 62 UNI X / SAP DB

t        #"sr b    H S A 5 i h U5 RqpB) gf ) 5 8 75 e02dcF A 7b2Y 6 3 1 ) ' & 5 a `

SAP AG
SAP AG 1999
Techni cal C ore Com petence
Techn i cal C or e Co mp ete nce Ve rsi o ns (SD) 2 d a ys

6$3V .QRZOHGJH 7UDQVIHU 0RGHO

2 days R /3-Techni cal I mp lementa tion and O pe rati on M an agem ent

SAP AG 199 f lena (autho da2 s 9 i ( SD) me r) 2 / y

Soft wa re L ogis tics

(SD)

( SD)

( SD)

5 days

3 days

2 d a ys

1 day

1 day

3 days Advanced R /3 System Admi nis tratio n

( PP)

( SD/ PP )

( PP)

( SD/ PP ) 2 da ys

2 da y s

2 da y s

2 da y s

2 days D atabase Administrat ion SA P DB

3 days D atabase Administrat ion D B2 UD B

3 days D atabase Administrat ion M S SQ L S erver

3 days D atabase Administrat ion O RAC LE

(PP/ CO) 2 da ys

( C O)

2 da ys

BC555

2-1

&RXUVH 3UHUHTXLVLWHV  7DUJHW *URXS  'XUDWLRQ

l &RXUVH 3UHUHTXLVLWHV

l 5HOHDVH GHSHQGHQF\ l 7DUJHW *URXS


%& RU VLPLODU 6$3 V\VWHP DGPLQLVWUDWLRQ FRXUVH DOWHUQDWLYHO\ 'DWDEDVH $GPLQLVWUDWLRQ FRXUVH OLNH %& %& $32 5HOHDVH $ DQG OLYH&DFKH UHOHDVH 

l 'XUDWLRQ  GD\V

3URMHFW WHDP PHPEHUV UHVSRQVLEOH IRU WKH LQVWDOODWLRQ DQG PDLQWHQDQFH RI D OLYH&DFKH

SAP AG 1999

SAP AG

BC555

3-1

&RXUVH *RDO

7KLV FRXUVH ZLOO HQDEOH \RX WR

l 'HILQH $32 V\VWHP UHTXLUHPHQWV

l ,GHQWLI\ WKH VSHFLILF OLYH&DFKH FRQILJXUDWLRQ LQ WKH 6$3 HQYLURQPHQW l 3HUIRUP OLYH&DFKH PRQLWRULQJ DQG PDLQWHQDQFH

l /LVW DQG SHUIRUP ZRUN ZLWK '%0*8, DQG 6$3 DGPLQLVWUDWLRQ WRROV l 8QGHUVWDQG EDFNXS DQG UHFRYHU\ FRQFHSWV RI OLYH&DFKH LQ WKH $32 V\VWHP

SAP AG 1999

SAP AG

BC555

3-2

&RXUVH &RQWHQWV

&RXUVH 2YHUYLHZ

Unit 1 Unit 2 Unit 3

OLYH&DFKH $GPLQLVWUDWLRQ
&RQFOXVLRQ

OLYH&DFKH $UFKLWHFWXUH DQG 5HTXLUHPHQWV

OLYH&DFKH &RQFHSWV

Unit 4 Unit 5 Unit 6

OLYH&DFKH %DFNXS DQG 5HVWRUH IRU $32

OLYH&DFKH %DFNXS DQG 5HVWRUH 7HFKQLTXHV

OLYH&DFKH 0RQLWRULQJ

SAP AG 1999

SAP AG

BC555

3-3

OLYH&DFKH &RQFHSWV

 OLYH&DFKH &RQFHSWV  OLYH&DFKH $UFKLWHFWXUH DQG 5HTXLUHPHQWV  OLYH&DFKH $GPLQLVWUDWLRQ  OLYH&DFKH 0RQLWRULQJ  OLYH&DFKH %DFNXS DQG 5HVWRUH 7HFKQLTXHV  OLYH&DFKH %DFNXS DQG 5HVWRUH IRU $32
SAP AG 1999

SAP AG

BC555

4-1

OLYH&DFKH &RQFHSWV

$W WKH FRQFOXVLRQ RI WKLV XQLW \RX ZLOO EH DEOH WR


l 'HVFULEH WKH SXUSRVH RI OLYH&DFKH l 'HVFULEH WKH DUFKLWHFWXUH RI 6$3 V\VWHPV l 'HVFULEH KRZ OLYH&DFKH LQWHUIDFHV ZLWK l ([SODLQ ZKLFK GDWD DUH VWRUHG LQ OLYH&DFKH

XVLQJ OLYH&DFKH WHFKQRORJ\ 6$3 EDVLV WHFKQRORJ\

DQG KRZ WKH\ JHW WKHUH

SAP AG 1999

SAP AG

BC555

4-2

$SSOLFDWLRQ DQG %DVLV &RPSRQHQWV RI 6$3 $32


6XSSO\ &KDLQ $YDLODEOH 'HPDQG 7R 3ODQQLQJ &RFNSLW 3URPLVH XVHV %: 9HQGRU 0DQDJHG ,QYHQWRU\ 6XSSO\ 1HWZRUN 3ODQQLQJ &DSDEOH 3URGXFWLRQ 7R 3ODQQLQJ 0DWFK 'HWDLOHG 6FKHGXOLQJ

'DWDEDVH ZLWK %: WHFKQLTXHV DYDLODEOH

4XHXHG 5)& T5)&  6\QFKURQRXV 5)& V5)&  %$3,


Model Generator, mapping, connectivity

5 5 3,
SAP AG 1999

n n

liveCache is a component of the SAP New Dimension Product APO (Advanced Planner and Optimizer). As of Release 4.5A, the SAP system can connect to multiple databases. The APO system utilizes this functionality and connects to two database systems: the liveCache system which uses object-oriented and memory-based computing the APO relational database management system (RDBMS), which contains persistent data and is comparable to the RDBMS of a standard SAP system. It provides Business Information Warehouse (BW) functionality that is mainly used by the application module Demand Planning.

APO modules SNP, CTM and PP/DS use additional standalone programs called optimizers which also communicate with the liveCache. These programs provide sophisticated optimization algorithms. SAP R/3 uses the APO-CIF interface to handle data transfer to APO. APO-CIF is part of R/3 Plug In, a collection of interfaces to the different components of the mySAP.com system landscape. The APO system and APO-CIF communicate through qRFC (asynchronous RFC call with secure transfer (tRFC) and guaranteed sequence as defined in the OUT-queue) and sRFC (synchronous RFC, used by ATP) calls with SAP systems. This allows for a seamless integration of APO functions into the customers SAP system landscape. APO can also communicate with legacy systems that may include Online Transaction Processing (OLTP) systems and non-OLTP systems (for example, batch processing systems).

SAP AG

OLYH&DFKH

$32 2SWLPL]HUV

6$3 %:

/HJDF\ 2/73

1RQ 6$3 2/73

1RQ 6$3 2/73

BC555

4-3

OLYH&DFKH 7HFKQRORJ\ OLYH&DFKH


$SSOLFDWLRQ 6HUYHU OLYH&DFKH 6HUYHU

$%$3 $%$3 !  PV 5'%06 5'%06


'DWDEDVH 6HUYHU

&
  V

OLYH&DFKH OLYH&DFKH

l OLYH&DFKH LV DQ REMHFWRULHQWHG GDWDEDVH PDQDJHPHQW V\VWHP GHYHORSHG E\ 6$3 WKDW UHVLGHV LQ D YHU\ ODUJH PHPRU\

l 2SWLPL]HG & SURJUDPV UXQ RQ WKH OLYH&DFKH VHUYHU DQG KDYH DFFHVV WR OLYH&DFKH GDWD l 7KH PDLQ REMHFWLYH LV WR RSWLPL]H SHUIRUPDQFH

OLYH&DFKH UHVLGHV LQ PDLQ PHPRU\ DQG WKHUHIRUH DYRLGV GLVN ,2 2EMHFW RULHQWDWLRQ HQDEOHV HIILFLHQW SURJUDPPLQJ WHFKQLTXHV OLYH&DFKH SURFHVVHV SURYLGHV VFDODELOLW\ &DFKH

SAP AG 1999

In a standard SAP system, typical database request times are above 1 ms. For data intensive applications, a new technology is required in order to achieve better response times. liveCache has been developed to reduce typical database request times to below 10 s. Key factors in achieving these response times are: Accesses to liveCache data usually do not involve any disk I/O The processes accessing the data are optimized C++ routines that run in the process context of the liveCache on the liveCache server Object orientation enables the use of efficient and versatile programming techniques

n n

APO is the first product to use liveCache technology. In principle, multiple liveCache instances can be used in parallel to increase performance for various applications. APO does not yet use this possibility. Currently two logical connections to liveCache are used by APO. Both connections point to the same physical liveCache. Logical connection LCA is used by all APO application modules but GATP. Logical connection LDA is used by GATP only.

SAP AG

BC555

4-4

$FFHVVLQJ OLYH&DFKH

'DWDEDVH LQWHUIDFH RI 6$3 NHUQHO

&RPPDQG DQDO\]HU

2SWLPL]HUV 613 &70 DQG 33'6

1DWLYH 64/

1DWLYH 64/

O L Y H & D F K H

64/ FODVV 64/ 64/ EDVLV


% WUHHV

)UDPHZRUN IRU PHWKRG HPEHGGLQJ

206

7\SH OLEUDU\ &20 REMHFWV '//

SDJH FKDLQV

206 EDVLV

5HJLVWU\

'DWD &DFKH

64/ GDWD 2EMHFW GDWD

64/ /RJ

SAP AG 1999

ABAP Programs and the APO optimizers use native SQL for communicating through the standard SAP database interface to liveCache. liveCache has an SQL interface that is used to communicate with the SAP instances. With native SQL, ABAP programs call stored procedures in the liveCache that point to Component Object Model (COM) routines written in C++. An SQL class provides access from the COM routine to the SQL data. In an SQL trace of an APO application, the statements for calls to COM routines contain the string DBPROC SAPR3."SAPAPO_. The COM routines are part of a dynamic link library that runs in the process context of the liveCache instance. In the Windows NT implementation of liveCache, COM routines and their interface are registered in the NT Registry. For the Unix implementation, a registry file is provided by liveCache. A persistent C++ class provides the COM routines with access to the corresponding Object Management System (OMS) data that is stored in the liveCache. All liveCache data are stored in the caches as well as, if necessary, on disk in 8 Kbyte blocks called pages. liveCache stores the OMS objects in page chains, the pages in the chain linked by pointers. SQL table data are stored in the form of B* trees. SQL and OMS data reside together in the data cache of the liveCache. Each page in liveCache is marked as an SQL page or an OMS page.

n n

n n

SAP AG

BC555

4-5

OLYH&DFKH 3URJUDPPLQJ &RQFHSWV


l 7UDQVDFWLRQ &RQFHSW
/RFNLQJ &RPPLW

5ROOEDFN

l OLYH&DFKH VXSSRUWV WKH IROORZLQJ REMHFWRULHQWHG FRQFHSWV


(QFDSVXODWLRQ

5HDG FRQVLVWHQF\

OLYH&DFKH OLYH&DFKH

8QLTXH REMHFW LGHQWLW\


l 7KH IROORZLQJ FRQFHSWV DUH LPSOHPHQWHG LQ WKH & DSSOLFDWLRQ OD\HU


$EVWUDFW FODVVHV ,QKHULWDQFH

0HWKRGV VXFK DV LQVWDQFH DQG FODVV OHYHO

3RO\PRUSKLVP $JJUHJDWLRQ

SAP AG 1999

The transaction concept common to relational database systems is also available for liveCache objects. liveCache supports read-consistency, that is, the data returned by liveCache represent the state of the data at the time, when the transaction that issued the read operation was started, even if some of these data have changed during retrieval by liveCache. The liveCache concept incorporates both SQL data access and object orientation. The COM routines have direct access to the objects stored in the liveCache and can manipulate them. This manipulation includes creation and deletion of objects in the liveCache . On the liveCache level, the following object-oriented features are implemented: Encapsulation: keeping together data structures and the methods which act on them Methods: procedures or routines associated with one or more classes

Unique object identity: each object has its own set of variables belonging to its class

The following object-oriented features can be implemented on the C++ routine level:

Abstract classes: parent classes from which sub-classes may be derived (cannot be instantiated) Inheritance: derived subclasses inherit instance variables and methods of the superclass Polymorphism: variables may refer at run-time to objects of different classes Aggregation: a technique for building a new object from one or more existing objects

SAP AG

BC555

4-6

$32 'DWD LQ OLYH&DFKH


$32 )URQWHQG
$SS 6HUYHU

OLYH&DFKH 6HUYHU

$SSOLFDWLRQ OLYH&DFKH OLYH&DFKH 'DWD PXVW EH FRQVLVWHQW

0DVWHU GDWD

7UDQVDFWLRQ GDWD

$32 'DWDEDVH
SAP AG 1999

OLYH&DFKH GHYVSDFHV

Some APO data only exist in the APO DB, others only in liveCache, some data are stored in APO database and liveCache. Data in APO DB and liveCache have to be in a consistent state. It is not acceptable, if redundant data are only present in liveCache and not in APO DB or vice versa.

The APO DB contains master data like resources, materials, PPMs (Production Process Models), setup matrices, location definitions, transportation lanes, planning books and customizing data. The APO DB also contains some transaction data including texts As of APO release 3.0A, liveCache contains time series of current planning data from Demand Planning.

liveCache stores master data in compressed form (information like material texts is not required by COM routines). Transaction data (e. g. sales order, confirmed shipments, purchase orders including items and schedule lines and stock) is stored only in liveCache to improve performance. For planned and production orders, this is almost all data which is generated during BOM explosion and routing (PPM and PPU, Production Planning Unit). SQL tables /SAPAPO/ORDKEY and /SAPAPO/ORDMAP are stored in liveCache as well.

SAP AG

BC555

4-7

/RDGLQJ 'DWD LQWR OLYH&DFKH


$32 )URQWHQG
$SS 6HUYHU  ,QLWLDOL]H OLYH&DFKH

OLYH&DFKH 6HUYHU

 5HORDG PDVWHU DQG WUDQVDFWLRQ GDWD IURP $32 $SSOLFDWLRQ '% WR OLYH&DFKH  5HORDG '3 GDWD OLYH&DFKH OLYH&DFKH

0DVWHU GDWD

$32 'DWDEDVH
SAP AG 1999

7UDQVDFWLRQDO GDWD  'HOHWH GHUHIHUHQFHG GDWD LQ $32 '%

OLYH&DFKH GHYVSDFHV

liveCache can be re-initialized. As a result, all data in liveCache are deleted. This is, e.g., required if a new version of COM routines with a modified interface to the objects in liveCache is installed. After such an initialization, report /SAPAPO/DELETE_LC_ANCHORS synchronizes APO database and liveCache. SQL tables /SAPAPO/ORDKEY and /SAPAPO/ORDMAP are re-created in liveCache Data in the APO database is deleted, which refers to orders stored in the liveCache

All required data must be transferred from APO database into liveCache. These include resources (biggest part of data, can be loaded in parallel), setup matrices and product-location combinations. You can use the Copy Management of Demand Planning to copy one or more key figures from planning areas in liveCache into a pre-defined backup info cube. If you have backed up Demand Planning data into such a backup infocube, reload these data into liveCache.

SAP AG

BC555

4-8

OLYH&DFKH $GPLQLVWUDWLRQ '%0*8, DQG /&

SAP AG 1999

liveCache, like the standard SAP RDBMS, can be administered from within the SAP system. You can use the administration tools DBMGUI, dbmcli and the SAP transaction LC10 to monitor, configure and administer liveCache. As the basic functionalities of an SAP system are still available without liveCache, LC10 allows for additional actions like starting and stopping the liveCache. DBMGUI is a graphical user interface to the liveCache management client interface dbmcli. Both DBMGUI and dbmcli can be used for all liveCache administration tasks including backup and restore. From the initial screen of transaction LC10, you can access the: liveCache administration menu (for liveCache administration) liveCache configuration menu (for liveCache administration) liveCache console menu (for liveCache monitoring using calls to x_cons) liveCache monitor (for statistics about calls to database procedures) liveCache performance menu (for monitoring the performance of the liveCache)

SAP AG

BC555

4-9

OLYH&DFKH &RQFHSWV 8QLW 6XPPDU\

<RX DUH QRZ DEOH WR

l 'HVFULEH KRZ OLYH&DFKH FRQFHSWV DUH XVHG WR DFKLHYH IDVW UHVSRQVH WLPHV LQ DSSOLFDWLRQV ZLWK D KLJK GDWD YROXPH l ([SODLQ WKH REMHFW RULHQWDWLRQ RI OLYH&DFKH l 'HVFULEH KRZ OLYH&DFKH LQWHUIDFHV ZLWK WKH 6$3 V\VWHP l 1DPH WKH OLYH&DFKH DGPLQLVWUDWLRQ WRROV

SAP AG 1999

SAP AG

BC555

4-10

([HUFLVHV 6HUYHU /DQGVFDSH

8QL[ 6HUYHU __________ R/3 System '(9 (4.6C) Check, if bc555-NN exists. If not: Copy user training/bc555 to bc555-NN L01: l01adm
LC10: user bc555-NN attaches LNN

7UDLQLQJ JURXSV NN 01 02
telnet: user l02adm password l02adm

17 7HUPLQDO6HUYHU ________ APO System 202 (3.0A) Check, if bc555-NN exists. If not: Copy User Training/bc555 to bc555-NN LCA OMO DBMGUI

. .

Start DBMGUI using TS Client

15
Register

L02: l02adm . . L15: l15adm

SAP AG 1999

Each group NN logs on to unix server ___________ with telnet and lNNadm/lNNadm as user password/combination. On this server, a liveCache LNN is available for the group NN, lNNadm is the <SID<adm> liveCache administration user.

1 R/3 system DEV is available, administered by devadm user. Attach your liveCache to transaction LC10 and make user and password for user lNNadm known to R/3 adminstrator devadm.

Each group calls DBMGUI application. The NT application DBMGUI actually runs on the terminal server _________ and is called with the help of a terminal server client. Register your liveCache LNN in DBMGUI. Depending on the terminal server setup, you will have to repeat this registration after each startup of DBMGUI, as log on to terminal server happens with a temporary user. See section Preliminaries in the exercises for further details on the server landscape and available users for operating system and SAP systems.

SAP AG

BC555

4-11

)RU WKH H[HUFLVHV DQG VROXWLRQV SOHDVH XVH WKH QHZ H[HUFLVHV DQG VROXWLRQV LQ WKH DSSHQGL[ RI WKLV FRXUVH
Due to the particular requirements of this course, its actual implementation may vary between individual training centres. Before commencing the following exercises, please ensure your instructor has explained in detail the network and hardware topology in place for your particular training environment. You will be assigned a number that uniquely identifies the resources that are assigned to you during this course network login id, APO system login id, logical OLYHCache. The default configuration is the following:

([HUFLVHV

On a Unix server (instructor will let you know the name at the beginning of the course), the SAP system DEV (Rel 4.6C) is available. In addition, 15 OLYHCaches with SID ranging between L01 and L15 are available for the groups. On a Windows NT terminal server, program DBMGUI is available for administration of the OLYHCaches installed on the Unix server. In addition, APO system OMO (APO release 3.0A) is available for APO specific topics. Each two course attendees that share a training PC, form a group. Each group is assigned a number ranging from 01 to 20 in the following way Group 01 is the rightmost group in the first row (as seen from the instructor). Example of group number assignment in other rows: If group 04 is the leftmost group in row 1, then the rightmost group in row 2 is assigned number 05. $V VHHQ IURP WKH WUDLQHU 07 08 09 10 11 12 01 02 03 04 05 06 Trainer $V VHHQ E\ FRXUVH DWWHQGHHV Trainer 01 02 03 04 05 06 07 08 09 10 11 12

Logon to Unix server: Group NN can log on to Unix server using telnet as lNNadm with password lNNadm (Example for group 01: user l01adm, password l01adm). On this server a liveCache LNN is available and will be administered by group NN (Example: group 01 will administer OLYHCache L01) Logon to Windows Terminal server: Simply click the DBMGUI server icon and DBMGUI will be started in a separate window. Group NN has to register OLYHCache LNN for administration purposes. SAP Systems DEV and OMO: You can log on info with user training, password bc555. After loging on, copy user training to user BC555-<NN> (Example BC555-01 for group 01) with the help of transaction SU01. If user BC555-NN is already defined, change the password to bc555NN. Group NN has to register OLYHCache LNN for administration with transaction LC10

SAP AG

BC555

4-12

([HUFLVHV )RU WKH H[HUFLVHV DQG VROXWLRQV SOHDVH XVH WKH QHZ H[HUFLVHV DQG VROXWLRQV LQ WKH DSSHQGL[ RI WKLV FRXUVH
To perform the following exercises, you will need to logon to the SAP systems OMO and DEV. To do this, please follow the instructions given to you by your course instructor. 1R  1.1 1.2 1.3 1.4  2.1 2.2 2.3 2.4  6KRZ EDVLF $32  OLYH&DFKH UHODWLRQVKLS ([HUFLVH

What OLYHCache(s) are defined to APO system OMO?

Which logical OLYHCache is used by the majority of APO application components? Which logical OLYHCache is used by ATP (Available To Promise)? On what server is logical OLYHCache LCA of the APO system OMO running? Via which tool(s) can you administer and monitor a OLYHCache? Start transaction LC10

OLYH&DFKH DGPLQLVWUDWLRQ  PRQLWRULQJ WRROV 8VH 6$3 V\VWHP '(9

Register your OLYHCache <LNN> for usage with LC10. Is LC10 is already fully functional for your OLYHCache? If not: see exercises for chapter 4. Start DBMGui 7KH IROORZLQJ TXHVWLRQV DUH LQWHQGHG WR VKRZ \RX KRZ WR H[WUDFW VRPH EDVLF LQIRUPDWLRQ DERXW WKH OLYH&DFKH

3.1 3.2 3.3 3.4 3.5

How can you tell if a particular OLYHCache is active and ready to use? What is the version and build level of the OLYHCache kernel. Can a physical OLYHCache be identical to the DBMS used by APO?

)RU WKH PRPHQW SUHIHUDEO\ XVH $32 V\VWHP 202 &DOO WUDQVDFWLRQ /& IRU ORJLFDO OLYH&DFKH /&$

Can a physical OLYHCache be identical to the DBMS used by APO, when the DBMS is SAP DB? Does a physical OLYHCache have to run on the same server as the APO DBMS?

SAP AG

BC555

4-13

6ROXWLRQV )RU WKH H[HUFLVHV DQG VROXWLRQV SOHDVH XVH WKH QHZ H[HUFLVHV DQG VROXWLRQV LQ WKH DSSHQGL[ RI WKLV FRXUVH
To perform the following exercises, you will need to logon to the SAP systems OMO and DEV. To do this, please follow the instructions given to you by your course instructor. 1R  1.1 6ROXWLRQ Table DBCON contains the relationship between logical and physical name of all OLYHCaches accessible from an SAP system. Use either of the following methods to display the contents of this table. Method #1: Run transaction SE16 from the command line ( /NSE16 ) or use menu path Menu SAP menu , then select from the resulting menu tree "Tools ABAP/4 Workbench Overview Data Browser . then Input DBCON as the table name and press the ENTER key. Method #2: Menu path of Menu SAP menu , then select from the resulting menu tree "Tools CCMS DB administration Database connection maintenance . LCA Start transaction LC10. Specify a logical OLYHCache of LCA and select any of the pushbuttons. The server name can be found in field OLYHCache server at the top LHS (Left hand Side) of the resulting screen. Within SAP System: Via transaction LC10 Outside SAP System: Method #1: Via the SAP DB Database Manager Gui (DBMGui) Method #2: Via the SAP DB Database Client Interface (DBMCLI). 2.2 Method 1: Input /NLC10 in the command line and press the ENTER key. Method 2: Menu path of Menu SAP menu , then select from the resulting menu tree "Tools APO Administration OLYHCache / COM Routines Monitor . 2.3 Call LC10. In the field Logical connection, enter the value of your group for <LNN>. Push the Edit button and enter the required info 3K\VLFDO OLYH&DFKH 1DPH and OLYH&DFKH VHUYHU QDPH. On your desktop, double click the Icon called GEPJXL,&$
BC555

1.2 1.3 1.4  2.1

LDA

2.4

SAP AG

4-14

 3.1 3.2

The traffic light attached to field OLYHCache status should be GREEN. Select any of the following pushbuttons: OLYHCache administration , OLYHCache console or OLYHCache performance .

Select any pushbutton except OLYHCache monitor .

The relevant information can be found attached to field OLYHCache version . 3.3 3.4 No. It must run in its own object oriented DBMS. This must be OLYHCache.

No. It must run in its own object oriented DBMS. /LYHCache installation is different to a standard DBMS installation No In fact, for mid-range to large APO systems, SAP recommends that the OLYHCache runs on its own server.

3.5

SAP AG

BC555

4-15

OLYH&DFKH $UFKLWHFWXUH DQG 5HTXLUHPHQWV

 OLYH&DFKH &RQFHSWV  OLYH&DFKH $UFKLWHFWXUH DQG 5HTXLUHPHQWV  OLYH&DFKH $GPLQLVWUDWLRQ  OLYH&DFKH 0RQLWRULQJ  OLYH&DFKH %DFNXS DQG 5HVWRUH 7HFKQLTXHV  OLYH&DFKH %DFNXS DQG 5HVWRUH IRU $32
SAP AG 1999

SAP AG

BC555

5-1

OLYH&DFKH $UFKLWHFWXUH DQG 5HTXLUHPHQWV

$W WKH FRQFOXVLRQ RI WKLV XQLW \RX ZLOO EH DEOH WR GHVFULEH


l $32 EDVLV DUFKLWHFWXUH l OLYH&DFKH SURFHVVHV DQG WDVNV l OLYH&DFKH PHPRU\ UHJLRQV l OLYH&DFKH GLVN DUFKLWHFWXUH

l ,PSRUWDQW OLYH&DFKH SDUDPHWHUV

l +DUGZDUH UHTXLUHPHQWV RI DQ $32 V\VWHP

SAP AG 1999

SAP AG

BC555

5-2

%DVLV $UFKLWHFWXUH RI 6$3 $32

3UHVHQWDWLRQ OHYHO
6$3 *8, 'LVSDWFKHU 'LVSDWFKHU 6$3 *8,

$SSOLFDWLRQ OHYHO
:3 :3 :3 :3 :3

$32 2SWLPL]HUV

'DWDEDVH OHYHO

OLYH&DFKH OLYH&DFKH

SAP AG 1999

The 3-tier client/server architecture of a standard SAP system consists of presentation, application, and database levels. On the SUHVHQWDWLRQ OHYHO, SAP users communicate with the SAP system using the SAP GUI. Events like the user choosing ENTER or Save, trigger the execution of a dialog step. On the DSSOLFDWLRQ OHYHO, the SAP dispatcher process receives the users request for the processing of a dialog step and dispatches it for processing to an available SAP work process (WP). The SAP WP retrieves the current transactional information from the user session and processes the ABAP instructions corresponding to the dialog step. The work process sends ABAP SQL database instructions to the appropriate database and receives the answer from that database. When the work process has finished the processing of the dialog step, it sends its data directly to the user' SAP GUI. The WP issues a database COMMIT just before sending the screen output. s In the standard SAP system, the SAP system appears to the databases as a group of processes of a single user, called SAPR3. Work processes connect to the relational database at SAP instance startup and disconnect at SAP instance shutdown. As of SAP Release 4.5A, a work process can open not only the standard SAP database connection, but can also dynamically open additional database connections. The connection is closed when it is no longer required. Work processes use such an additional database connection to communicate with liveCache. APO optimizers communicate via RFC with the SAP instance. Some, but not all, optimizers directly communicate with liveCache by establishing a liveCache session.

n n

SAP AG

9 78 '242 1) '%#!    0 $6 72 6&53"0( &$"   


BC555

5-3

7KH 6$3 6\VWHP DQG OLYH&DFKH &RPPXQLFDWLRQ


'LVSDWFKHU :3 :3 'LVSDWFKHU :3 :3

6$3 LQVWDQFHV

OLYH&DFKH WKUHDGV

8VHU

WDVNV 5HTXHVWRU

&RRUGLQDWRU

OLYH&DFKH PHPRU\ DUHDV

'DWD &DFKH

64/ 5ROOEDFN &DFKH 64/ /RJ ,2 4XHXH

&RQYHUWHU &DFKH

SAP AG 1999

n n

A liveCache consists of main memory areas, a group of database threads and various files. SQL and object data are buffered in the data cache to avoid physical read and write operations on the hard disks. Changes to objects are logged into transaction specific rollback and history files in data cache. Before images of OMS data are required for rollback and consistent reads. The converter cache caches information regarding the disk location of liveCache data. Changes to SQL objects are logged in the rollback cache. The resulting log data is copied to the log I/O queue and then written to the archive log. This data is required in case of a rollback of SQL data, since it contains before images of changed SQL data. APO tables /SAPAPO/ORDKEY and /SAPAPO/ORDMAP are stored as SQL tables in liveCache. The database threads perform all database activities. Some threads are separated into smaller units called tasks. Each of the tasks performs specialized functions. The thread hosting tasks is called user kernel thread (UKT). The UKT can coordinate its own tasks more efficiently than the operating system. Tasks called user tasks are used to establish and maintain liveCache sessions. As soon as liveCache functionality is required, an SAP work process logs on to liveCache and is assigned to a user task in a UKT.

n n

SAP AG

BC555

AH X V Q C  TQ`YWWUTQFSR AH GE C A Q PIFD B@
5-4

OLYH&DFKH 7KUHDGV DQG WKHLU 7DVNV


8VHU  8VHU  8VHU  8VHU  8VHU  8VHU  8VHU Q 8VHU Q 8VHU Q 8VHU 8VHU 6HUYHU  8VHU 8VHU 6HUYHU  8VHU 8VHU 6HUYHU Q 8VHU 8VHU 'DWD:ULWHU   Q 'DWD:ULWHU   Q 8VHU 8VHU $ORJ:ULWHU 8VHU 8VHU *DUEDJH&ROOHFWRU 8VHU 8VHU &RQY6FDQQHU 8VHU 8VHU 7UDFH:ULWHU 8VHU 8VHU 8WLOLW\ 6HUYHU 6HUYHU 6HQGHU 6HUYHU 6HUYHU 5HFHLYHU GDWDZULWHU GDWDZULWHU 7LPHU &RRUGLQDWRU Initialization / UKP coordination 5HTXHVWRU Connect processing &RQVROH Diagnosis &ORFN Time monitoring 'HY 7KUHDG Master for I/O on DEVSPACE 'HY,! VODYH WKUHDGV $V'HYL WKUHDGV $V\QF! WKUHDG I/O on DEVSPACE

8VHU .HUQHO 7KUHDG 8.7 

8VHU .HUQHO 7KUHDG 8.7 

SAP AG 1999

n n n

Coordinator controls initialization of the liveCache. During runtime, the Coordinator coordinates the user kernel threads (UKTs) and their tasks. The Requestor receives a connect request and establishes connection to a user task within a UKT. The Console thread receives messages from the liveCache kernel and writes them to log files at the operating system level. On Windows NT, the console thread provides information for the x_cons diagnosis tool. The Clock thread measures the time consumed by liveCache components. The Device threads, Dev1, Dev2, and so on, perform I/O operations on the data and log disks. Dev0 coordinates the Dev threads. The liveCache starts a configurable number of dev processes for each devspace. One or more user kernel threads (UKTs) can be configured (with parameter MAXCPU) to establish and maintain user sessions. The AsDev processes are created temporarily during a backup to perform backup-related I/O operations. Their number depends on the number of data devspaces and backup devices. They are coordinated by an additional thread called Async0.

n n

n n

SAP AG

8VHU .HUQHO 7KUHDG 8.7 

BC555

5-5

8.7 7DVN 'HVFULSWLRQ


8VHU 8VHU 8VHU 8VHU 6HUYHU 6HUYHU 2/RJ:ULWHU  &RQY6FDQQHU 7UDFH:ULWHU 8WLOLW\ 7LPHU *DUEDJH&ROOHFWRU  *DUEDJH&ROOHFWRU Q
SAP AG 1999

([HFXWHV FRPPDQGV IURP DSSOLFDWLRQV DQG LQWHUDFWLYH FRPSRQHQWV 3HUIRUPV ,2 GXULQJ EDFNXSV :ULWHV WKH ORJV WR WKH ORJ GHYVSDFHV :ULWHV GLUW\ SDJHV IURP WKH GDWD FDFKH WR GLVN 6FDQV IRU IUHH FRQYHUWHU SDJHV :ULWHV WKH NHUQHO WUDFH WR WKH NHUQHO WUDFH ILOH +DQGOHV OLYH&DFKH DGPLQLVWUDWLRQ OLYH&DFKH 0RQLWRUV /2&. DQG 5(48(67 7,0(287V

8.7 7DVNV

$/RJ:ULWHU 

'DWD:ULWHU   Q

5HPRYHV KLVWRU\ ILOHV RI RXWGDWHG REMHFW GDWD

Each UKT makes various tasks available, including: user tasks, that is, tasks that users connect to in order to work with the liveCache tasks with specific internal functions

The total number of of tasks is determined at start-up time and they are then distributed dynamically over the configured UKTs according to defined rules. Task distribution is controlled by support parameters like, e.g., _TASKCLUSTER_02. UKT tasks allow for a more effective synchronization of actions involving several components of the liveCache, and minimize expensive process-switching.

SAP AG

BC555

5-6

OLYH&DFKH 5RRW 'LUHFWRU\

FRQWDLQV FRQILJXUDWLRQ GLUHFWRU\ FRQILJ DQG 'LDJQRVLV GLUHFWRU\ '%1$0(!

VDS 6$3VSHFLILF OLYH&DFKH XWLOLWLHV OLYH&DFKH


SAP AG 1999

n n n n

The path to the DBROOT directory is assigned to the environment variable DBROOT which is defined for the operating system user "<liveCache SID>adm". In its standard subdirectories, the DBROOT directory contains all the operating system files necessary to operate the liveCache. You should not change the names of these subdirectories. In a predominant directory (Default /sapdb), predominant instance information and programs are stored like the downward compatible network server program. Three important liveCache kernel diagnostics files exist in the run directory /sapdb/wrk/<SID>". Kernel parameter RUNDIRECTORYspecifies the path to the current liveCache rundirectory: Diagnosis file knldiag is recreated after each liveCache restart, and the previous version is copied to knldiag.old Trace file knltrace contains the liveCache developer trace that can be switched on for low level diagnosis Dump file knldump is written if the liveCache crashes unexpectedly Backup related information can be found in the RUNDIRECTORY as well.

Parameters adapted using the the liveCache administration tools, are stored in a parameter file with the name <SID>. This file can be found under: /sapdb/config. Previous versions are available under the name <SID>.<version#>

SAP AG

BC555

a f1 2

h  ! & '1 c ic $g

OLE /LEUDULHV IRU SUHFRPSLOHU FDOOLQWHUIDFHV LQFO ,QFOXGH ILOHV IRU SUHFRPSLOHU GHPR 'HPRQVWUDWLRQ SURJUDPV ZUN 'HIDXOW GLUHFWRU\ IRU 581',5(&725< DQG %$&.83',5(&725<
7! &f '% rq rq ddt d`x ``v T s`x 7'8 ! e0 T 0Pv dt d`x yw u rq w u rq `v dt s6p 4% d$ cb &a % 8 '

SW

ELQ 6KHOOVFULSWV IRU OLYH&DFKH V\VWHP SURJUDPV OLYH&DFKH SJP OLYH&DFKH V\VWHP SURJUDPV WRROV OLYH&DFKH HQY 0HVVDJH DQG KHOS ILOHV PLVF 0LVF ILOHV FRQILJ SJP ELQ HWF OLVW RI LQVWDOOHG ILOHV <SID>

 VDSGE ZUN YHUV! 6,'!

5-7

OLYH&DFKH 'LVN 5HJLRQV

'DWD &DFKH 'DWD &DFKH &RQYHUWHU &DFKH &RQYHUWHU &DFKH ',6.' ',6.' ',6.'

Converter Page Header: Version # data page# devno offset type filler Converter Page Header: Version # 4711 1 240 f 0 data page# devno offset type filler 4712 3 219 t 1 4711 3 140 p 0 4712 2 191 t 1

SAP AG 1999

The entire liveCache disk area is divided into 8 Kbytes blocks called pages. Disk areas used by liveCache are called devspaces and include: a system devspace up to 1024 data devspaces up to 32 log devspaces for the archive log

The pages located in the data devspaces are called data pages. They are distributed by the liveCache onto existing data devspaces using a 64 Kbyte striping mechanism to ensure balanced I/O. Data pages are cached in the data cache in main memory. liveCache administers the disk storage location of the logical pages in the converter. The logical pages are consecutively numbered data pages that are available to store data. Each logical page can exist in two versions on disk. Different versions are stored in different converter pages. For each version of a logical page, a converter entry describes the location on a data devspace. Since a converter entry is 35 bits long, 2000 converter entries make up one converter page. Converter version numbers are incremented by a checkpoint. The size of the system devspace is approximately 0.1% of the size of the liveCache. When you extend the liveCache, converter entries are created and the system devspace grows. Converter pages are cached in the converter cache. The optimal size of the converter cache is 0.05% of the sum of sizes of the liveCache data devspaces.

n n

SAP AG

BC555

l C m  A V W WDE y

l ~ } k| l   l   l   l   

C  o  o C l Q  G g f e Q phnmC kjih&d  W e A R e w g &o ji3 } w y r SB {y f w y r SB {y e w y r iB {y  V  o o mi z y x w t r q {S Bvu s3

&RQYHUWHU 6<67(0

5-8

&DFKHV DQG .HUQHO 3DUDPHWHUV

8.7 7KUHDGV DQG 7DVN &RQILJXUDWLRQ 0$;&38 8.7 8.7Q 8.7 8.7Q 0$;86(57$6.6 B7$6.&/867(5B &ORFN 'HY &ORFN 'HY &DFKHV DQG 0HPRU\ 6L]HV '$7$B&$&+( &$7B&$&+(B6833/< &219(57(5B&$&+( 206B+($3/,0,7

5HTXHVWRU &RRUGLQDWRU 5HTXHVWRU &RRUGLQDWRU 'HY 'HYQ &RQVROH 'HY 'HYQ &RQVROH

&DWDORJ &DFKH &DWDORJ &DFKH 64/ 5ROOEDFN &DFKH 64/ 5ROOEDFN &DFKH /2*


'DWD &DFKH 'DWD &DFKH &RQYHUWHU &DFKH &RQYHUWHU &DFKH

'DWD 

$1$/<6,6 581',5(&725<
SAP AG 1999

The above parameters are given default values during installation. These values can be adapted to the specific requirements of the customer system. Storage-related parameters are adapted in units of 8 Kbytes, which is the smallest storage unit on disk and in memory. Changes to kernel parameters become effective only after liveCache has been stopped and restarted. Parameter OMS_HEAPLIMIT is important for a proper functioning of the liveCache. It represents an upper limit for heap allocation of COM routines. 50% of allocatable shared memory should be available for heap memory of COM routines. Set OMS_HEAPLIMIT to 0 (parameter disabled) to allow for maximum ressource usage by the COM routines. Performance-related liveCache parameters include: DATA_CACHE: the data cache stores data pages using an LRU mechanism. Recommendation: use a value equivalent to 60% of the physical memory available for liveCache. The configured database size in pages must exceed 2*DATA_CACHE. The physical memory required for your liveCache server should be the result of a sizing. MAXCPU: Usually,this parameter determines the number of UKTs with user tasks. If support parameter _TASKCLUSTER_02 contains the string 1*us, MAXCPU parameter is disabled and 1 UKT is created for each configured user task. Sufficient hardware ressources must be available. MAXUSERTASKS: determines the maximum number of simultaneous liveCache sessions. CONVERTER_CACHE: the converter holds information about the disk location of logical data pages. Recommendation: use a value equivalent to 0.05% of configured liveCache size.

SAP AG

BC555

6<67(0

8SSHU OLPLWV 0$;'$7$'(963$&(6 'DWD 1 0$;'$7$3$*(6

5-9

+DUGZDUH 5HFRPPHQGDWLRQV IRU $32 6\VWHPV


1HWZRUN &RQQHFWLRQ - High speed (FDDI, High Performance Switch) - Ethernet or equivalent $32 6\VWHP  6WDQGDUG &RQILJXUDWLRQ APO DB server l Database with BW -like configuration l APO SAP instance APO server l APO SAP instance On separate servers l SNP Optimizer l PP/DS Optimzer l CTM Optimizer APO OLYHCache server l OLYHCache l COM routines

$32 )URQWHQG l APO GUI with OCX functionality, known WAN issues
SAP AG 1999

$32 )URQWHQG l APO GUI with OCX functionality, known WAN issues

$32 )URQWHQG l APO GUI with OCX functionality, known WAN issues

n n n

liveCache requires adequate main memory to support fast response times, and scales very well with the available CPU resources. Allow 30% of the available CPU and RAM resources for the COM routines, which run on the liveCache server. The other components of an APO system ideally reside on servers separate from the liveCache and include: SAP application instances. These usually require at least 1 Gbyte of RAM and are highly scalable with respect to the CPU power they can provide to the application users who are logged on. SAP RDBMS, which consumes between 500 Mbyte and 2 Gbyte of RAM and is also highly scalable with respect to CPU power. SNP, PP/DS and CTM optimizers. These are standalone programs consuming 1 CPU and around 512 Mbyte of RAM per active SNP, PP/DS and CTM optimizer.

Install and configure RFC SAPOSCOL on the servers without SAP instances as described in SAP Notes 19227, 202934, 20624, 210890 and 20624 to allow for operating-system monitoring with transactions OS07 and RZ20 in the SAP system.

SAP AG

BC555

5-10

6XPPDU\ OLYH&DFKH $UFKLWHFWXUH DQG 5HTXLUHPHQWV <RX DUH QRZ DEOH WR GHVFULEH
l 7KH OLYH&DFKH LQWHUIDFH ZLWK WKH $32 6$3 l OLYH&DFKH FDFKH WKUHDG DQG WDVN l 7KH OLYH&DFKH GLUHFWRU\ VWUXFWXUH l ,PSRUWDQW OLYH&DFKH SDUDPHWHUV l +DUGZDUH UHTXLUHPHQWV IRU OLYH&DFKH

LQVWDQFHV

WHFKQRORJ\

SAP AG 1999

SAP AG

BC555

5-11

([HUFLVHV )RU WKH H[HUFLVHV DQG VROXWLRQV SOHDVH XVH WKH QHZ H[HUFLVHV DQG VROXWLRQV LQ WKH DSSHQGL[ RI WKLV FRXUVH
To perform the following exercises, you will again need to logon to the APO system OMO. To do this, please follow the instructions given to you by your course instructor. Unless directed otherwise, whenever you are requested to extract OLYHCache information, please use transaction LC10 specifying logical liveCache LCA 1R   2.1 2.2 2.3 2.4  3.1 3.2 3.3  4.1 4.2 4.3  5.1 1.1 OLYH&DFKH SURFHVV DUFKLWHFWXUH ([HUFLVH

Display the threads and active tasks of OLYHCache.

List all the cache types in a OLYHCache. How can you see cache types in transaction LC10? In which cache is information stored about the physical location of logical data pages on disk? Where are the contents of the Converter cache stored during a checkpoint? Where are the contents of the Data cache stored during a checkpoint? OLYH&DFKH SURILOH SDUDPHWHUV What is the value of the OLYHCache parameter OMS_HEAP_LIMIT ? What does the parameter in the previous exercise control?

OLYH&DFKH PHPRU\ DUFKLWHFWXUH

What is the path name of the directory containing the OLYHCache kernel diagnostic files? OLYH&DFKH GLVN DUFKLWHFWXUH What is the size (in KB) of the data area? How many devspaces does it consist of? What is the size (in KB) of the log area? How many devspaces does it consist of? What block-size is used to store information in all devspaces? OLYH&DFKH RSHUDWLRQ What logmode is being used by the OLYHCache? Can you explain why?

SAP AG

BC555

5-12

6ROXWLRQV )RU WKH H[HUFLVHV DQG VROXWLRQV SOHDVH XVH WKH QHZ H[HUFLVHV DQG VROXWLRQV LQ WKH DSSHQGL[ RI WKLV FRXUVH
To perform the following exercises, you will again need to logon to the APO system OMO. To do this, please follow the instructions given to you by your course instructor. Unless directed otherwise, whenever you are requested to extract OLYHCache information, please use transaction LC10 specifying logical liveCache LCA 1R  1.1 6ROXWLRQ Select pushbutton OLYHCache console . To display db threads, select the radio button ProcessOverview and press the ENTER key. To display active tasks, select the radio button Active tasks and press the ENTER key.  2.1 The main caches are: Data , SQL Log Queue , SQL Rollback , Converter , Catalog , FBM , USM , and Sequence . To access this information, select pushbutton OLYHCache monitor from the initial screen of transaction LC10 , then select the Caches tab. Converter cache. System devspace. Data devspace(s). Select pushbutton OLYHCache configuration , then select pushbutton Parameter and read the value of the given parameter. This parameter limits the maximum amount of heap memory allocated by all COM routines. Recommendation: disable, but other memory parameters (DATA_CACHE) must allow for sufficient amount of heap memory for COM rotines. Select pushbutton OLYHCache configuration , then select pushbutton Parameter . The value of parameter RUNDIRECTORY contains the required pathname.

2.2 2.3 2.4  3.1 3.2

3.3

SAP AG

BC555

5-13

 4.1 4.2 4.3  5.1

Select pushbutton OLYHCache configuration , then select tab Data area . The required information can be found in the section Size of data area . Select pushbutton OLYHCache configuration , then select tab Log area . 8KB. Select pushbutton OLYHCache configuration , then select tab Log area . The required information can be found in the section Size of log area attached to field Log mode . The required information can be found in the section Size of log area .

SAP AG

BC555

5-14

OLYH&DFKH $GPLQLVWUDWLRQ

 OLYH&DFKH &RQFHSWV  OLYH&DFKH $UFKLWHFWXUH DQG 5HTXLUHPHQWV  OLYH&DFKH $GPLQLVWUDWLRQ  OLYH&DFKH 0RQLWRULQJ  OLYH&DFKH %DFNXS DQG 5HVWRUH 7HFKQLTXHV  OLYH&DFKH %DFNXS DQG 5HVWRUH IRU $32
SAP AG 1999

SAP AG

BC555

6-1

OLYH&DFKH $GPLQLVWUDWLRQ

$W WKH FRQFOXVLRQ RI WKLV XQLW \RX ZLOO EH DEOH WR


l 'HVFULEH OLYH&DFKH RSHUDWLQJ PRGHV l ([SODLQ WKH VWDUWLQJ DQG VWRSSLQJ SURFHGXUHV IRU

OLYH&DFKH

l 'HVFULEH WKH SXUSRVH RI WKH OLYH&DFKH LQLWLDOL]DWLRQ l 2XWOLQH WKH IXQFWLRQV RI '%0*8,

SURFHVV

l $GPLQLVWHU OLYH&DFKH UHPRWHO\ DQG IURP ZLWKLQ WKH

6$3 V\VWHP

SAP AG 1999

SAP AG

BC555

6-2

5HPRWH OLYH&DFKH $GPLQLVWUDWLRQ

l'DWDEDVH 0DQDJHU '%0 FOLHQW LQWHUIDFH FRPPDQGV

dbmcli -d <SID> -n <lc server> [-i script file] [-V] db_warm db_offline show <SHOW command> exec_command <command> help <command> dbmgetf -d <lc name> -n <lc server> -k <file id>
file id: KNLDIAG KNLDIAGOLD KNLDIAGERR LCTRC#<token>

l'DWDEDVH 0DQDJHU '%0 JHW ILOH FRPPDQGV

SAP AG 1999

liveCache can be administered remotely using the client-server based liveCache tool DBM, with its components DBM GUI and DBM server. Commands are transmitted from a remote DBM GUI via the interface dbmapi to the DBM server. The DBM server runs on the liveCache server. dbmapi consists of 2 interfaces: dbmcli: a command-line based interface that transmits administration commands

dbmgetf: a command-line based interface that gives access to liveCache diagnosis files like knldiag and knltrace The DBM user has the default user ID control with password control. This user permits the interface dbmcli to connect to the DBM server (with the option -u control,control). The DBM user settings are stored in the registry on the client. Use the option -us control,control to store the DBM user registry entry for the liveCache instance (the syntax of releases before 7.1.3 Build 6 is -uDBMs control,control). The operating system user has the default user <SID>adm with his/her operating system password. This user permits the DBM server to run operating system commands via the command exec_command. To store the settings in the file %DBROOT%\conf\<SID>.upc, use the option user_put control SYSTEMNAME=<SID>adm SYSTEMPASSWORD=< ospwd> (the old syntax is -uOSs <SID>adm,<password>).

The DBM server distinguishes between the DBM user and the operating system user as follows:

SAP AG

BC555

6-3

OLYH&DFKH $GPLQLVWUDWLRQ LQ WKH 6$3 6\VWHP

SAP AG 1999

liveCache can be administered and monitored using Transaction LC10, and entering the logical name of the liveCache. Table DBCON correlates the logical and physical names of the liveCaches accessible from the SAP system. liveCache connection info can be created and maintained using the Edit button From the initial screen of transaction LC10, you can access the: liveCache administration menu (for liveCache administration) liveCache console menu (for liveCache monitoring)

n n

liveCache configuration menu (for changes to liveCache configuration) liveCache monitor (for statistics about calls to database procedures)

liveCache performance menu (for monitoring the performance of the liveCache)

SAP AG

BC555

6-4

6WDUWLQJ ,QLWLDOL]LQJ DQG 6WRSSLQJ WKH OLYH&DFKH

SAP AG 1999

To start, stop and initialize the liveCache, use transaction LC10 and choose liveCache administration.

Starting liveCache only starts liveCache into warm mode. liveCache has the state of the latest checkpoint (usually the one connected to the liveCache shutdown). Initialization deletes the complete contents of the liveCache. The next slide describes the initialization process in more detail.

Stop stops the liveCache. Before liveCache memory and processes are deleted, a checkpoint is triggered. As a result all information contained in the caches is written to disk.

If the SAP system is not available and liveCache shall be restarted for maintenance purposes only, you can use the dbmcli command exec_lcinit. No application can use the liveCache after such a restart as additional activities are required to make the liveCache fully functional.. Note that without proper shutdown, all changes to liveCache objects since the last successful checkpoint is lost.

SAP AG

BC555

6-5

6WDUWLQJ ,QLWLDOL]LQJ DQG 6WRSSLQJ WKH OLYH&DFKH

SAP AG 1999

The liveCache initialization process involves: Stopping liveCache without saving data Restarting liveCache into warm mode

Registering user sapr3 and also the DCOM routines which load the database procedures Deleting all SQL and object data stored persistently in the liveCache devspaces Deleting information about references to orders previously contained in the liveCache in the database of the APO system and reloading of master data from the APO database into liveCache with the help of ABAP report /sapapo/delete_lc_anchors. Writing a checkpoint, which becomes a restart point for the next start.

n n

LC10 allows to define Preparation and Postprocessing steps using ABAP reports for Start, Stop and Initialization actions. liveCache initialisation usually is required after an upgrade of COM routines, if the structure of objects called by COM routines has changed from the old to the new release.

SAP AG

BC555

6-6

OLYH&DFKH 2SHUDWLRQ 0RGHV


6+87'2:1 &2/'
7 7 7 7 &2/' 7 7 7 7
SAP AG 1999

6+87'2:1 2))/,1(
        

&2/'

n n

It is strongly recommended that you use transaction LC10 to start, stop and initialize the liveCache. If the APO system is not available, you can use DBMGUI to change the liveCache operation modes. There are three liveCache operating modes: OFFLINE: liveCache kernel processes and caches do not exist. COLD: The liveCache kernel is active, but data and log are not yet synchronized. Only in this operating mode can you initialize or alter the configuration, or restore disk areas.

WARM: The liveCache kernel is active and data and log information is synchronized. Users can connect to the liveCache.

The command Shutdown cold switches the liveCache server to cold mode after all open transactions have completed. Then a checkpoint is written and all data is flushed from the caches to the devspaces. New transactions are not allowed when this command has been issued. Without Shutdown cold, all changes to liveCache data that occurred after the last checkpoint was performed are lost. Such a loss of data can, e.g., occur if the liveCache crashes because of hardware errors.

SAP AG

BC555

%#$   %$ "" !!  #  

2))/,1(

6-7

OLYH&DFKH ,QVWDOODWLRQ

l (QWHU WKH QDPH RI WKH OLYH&DFKH LQVWDQFH WR EH LQVWDOOHG

l (QWHU WKH SDWK RI WKH '%5227 GLUHFWRU\ 7KH LQVWDOODWLRQ ZLOO FRS\ WKH OLYH&DFKH VRIWZDUH WR WKLV GLUHFWRU\ l 5HERRW WKH V\VWHP 5HTXLUHG HQYLURQPHQW YDULDEOHV ZLOO EH VHW E\ WKH LQVWDOODWLRQ URXWLQH l 6WDUW /&6(783 l (QWHU WKH QDPH RI WKH OLYH&DFKH LQVWDQFH WR EH LQVWDOOHG l (QWHU WKH QDPH RI WKH ORFDO PDFKLQH l &RQILJXUH SDUDPHWHUV IRU GLVN SURFHVV DQG PHPRU\
SAP AG 1999

n n

liveCache can be installed with the help of file lcsetup.bat in directory livecach/<OS>/common the on Kernel CD. Installation is carried out with installation tool LCSETUP. During liveCache installation, the following information has to be entered with the help of installation tool: Password of the owner of the liveCache software (<sid>adm) Number of data devspaces. NT only: specify, if you want to enable PSE (36bit extension) support For each data devspace, dialog boxes appear in which you must specify the: - Path for the data devspace, for example, /sapdb/<SID>/sapdata Path for the system devspace, for example, /sapdb/<SID>/dbsys. liveCache Path for the log devspace, for example, /sapdb/<SID>/saplog - Size in MB of the data devspace. LCSETUP shows the free space of the drive.

Size in MB of the log devspace. LCSETUP suggests the free space of the drive.

Main memory in MB used by liveCache. LCSETUP proposes a reasonable value. This adapts parameters DATA_CACHE and CONVERTE_CACHE.

SAP AG

BC555

6-8

,QVWDOOLQJ D 1HZ OLYH&DFKH 3DWFK


l *HW QHZ OLYH&DFKH SDWFK IURP VDSVHUY[ l /RJ RXW $32 XVHUV ORDG GDWD IURP OLYH&DFKH WR $32 '% IRU LQLWLDOLVDWLRQ VHH XSJUDGH QRWH l 6WRS WKH OLYH&DFKH WKHQ VWRS WKH $32 V\VWHP l 6WRS WKH 5HPRWH 64/ 6HUYHU with command [BVHUYHU VWRS

l 8QLQVWDOO WKH 5HPRWH 64/ 6HUYHU with command [BVHUYHU UHPRYH

l %DFNXS WKH ROG DQG WKHQ LQVWDOO WKH QHZ OLYH&DFKH VRIWZDUH &20 URXWLQHV in directory DBROOT (DBROOT/sap) l 0LJUDWH OLYH&DFKH SDUDPHWHUV IRU WKH QHZ NHUQHO with command [BSDUDP X FRQWUROFRQWURO G OF QDPH! %&+(&. l ,QVWDOO WKH QHZ 5HPRWH 64/ 6HUYHU with command [BVHUYHU LQVWDOO l 6WDUW WKH 5HPRWH 64/ 6HUYHU with command [BVHUYHU VWDUW l 5HVWDUW WKH 6$3 V\VWHP

l SAP AG 1999 ,QLWLDOL]H VHH XSJUDGH QRWH OLYH&DFKH ZLWK WUDQVDFWLRQ /& 5HVWDUW 

liveCache patches are usually part of an APO Support Package. You should never upgrade your liveCache version without checking the compatibility of the upgrade with the registered COM routines. The upgrade note tells you whether you have to initialize or simply restart liveCache after an upgrade of the COM rotines. An initialization is only required if new COM routines expect a different object structure. SAP Note 325449 describes the installation of a new liveCache patch (APO 3.0A SP3 and SP4). SAP Note 157265 describes the installation of a patch for the COM routines (APO 3.0A).

n n

SAP AG

BC555

6-9

OLYH&DFKH 'LDJQRVLV )LOH NQOGLDJ

SAP AG 1999

The knldiag file logs messages about current liveCache activities. The actions logged include liveCache start, user logons, writing of checkpoints, and liveCache shutdown. To access the data, in the Control menu choose Diagnose Operating messages. The knldiag file resides in DBROOT\wrk\<SID>\knldiag and is recreated at liveCache start. The old copy is saved under knldiag.old . A knldiag file containing a fatal error is deleted after two consecutive startup failures. To avoid losing this information, the errors are also appended to file knldiag.err in the same directory. To view knldiag , knldiag.old , and knldiag.err , use Transaction LC10. Alternatively, from the main APO system menu, choose: liveCache performance Detail Analysis System Messages.

SAP AG

BC555

6-10

OLYH&DFKH 'LDJQRVLV .HUQHO 7UDFH

l l l l l

6ZLWFK RQ WKH NHUQHO WUDFH '%0*8,  &KHFN  .HUQHO 7UDFH  2Q 5HSURGXFH WKH SUREOHP 7KHQ IOXVK WKH NHUQHO WUDFH ZLWK WKH )OXVK EXWWRQ 6HQG WKH RXWSXW ILOH WR WKH VXSSRUW WHDP

8VH WKH IXQFWLRQV LQ WKH 3URWRFRO VHFWLRQ RI '%0*8, WR SUHSDUH D UHDGDEOH RXWSXW RI WKH NHUQHO WUDFH

SAP AG 1999

Kernel trace is a function for analyzing liveCache kernel problems during user transactions. The output of the kernel trace is intended for the SAP development support team and is typically not able to be interpreted by liveCache users or even administrators. Thus, to enable the support team to provide you with an efficient analysis in case of liveCache problems or system crashes, you must be able to: switch on the kernel trace flush it to disk locate the flushed file

prepare it for transfer it to the support team

SAP AG

BC555

6-11

6XPPDU\ OLYH&DFKH $GPLQLVWUDWLRQ

<RX DUH QRZ DEOH WR

l 'HVFULEH OLYH&DFKH RSHUDWLQJ PRGHV

l 'HVFULEH WKH GLIIHUHQFH EHWZHHQ OLYH&DFKH LQLWLDOL]DWLRQ DQG VWDUW

l 6WDWH WKH VWDUWLQJ DQG VWRSSLQJ SURFHGXUHV IRU OLYH&DFKH

SAP AG 1999

SAP AG

BC555

6-12

([HUFLVHV )RU WKH H[HUFLVHV DQG VROXWLRQV SOHDVH XVH WKH QHZ H[HUFLVHV DQG VROXWLRQV LQ WKH DSSHQGL[ RI WKLV FRXUVH
1R  ,Q RUGHU WR SHUIRUP WKH IROORZLQJ H[HUFLVHV \RX ZLOO QHHG WR VWDUW WKH '%0*XL 3OHDVH XVH WKH LQVWUXFWLRQV RXWOLQHG LQ WKH VROXWLRQV IRU 8QLW  RI WKLV FRXUVH 3OHDVH HQVXUH \RX XVH RQO\ <285 OLYH&DFKH IRU WKH IROORZLQJ H[HUFLVHV Register YOUR OLYHcache for use by DBMGui. Start your OLYHCache What is the operational state of your OLYHCache? How can you Start / Stop / Initialise the OLYHcache used by your APO system from within the APO system Do NOT do this in APO system OMO but wait until you have configured your OLYHCache <LNN> for usage with LC10 8VH '%0*XL WR SHUIRUP WKH IROORZLQJ H[HUFLVHV Initialise your liveCache <LNN>. %DVLF IXQFWLRQDOLW\ RI '%0*XL ([HUFLVH

1.1 1.2 1.3 1.4

 2.1 2.2 2.3 2.4 2.5

What is the version and build level of the OLYHCache kernel. What is the size (in KB) of the data area? How many devspaces does it consist of? What are the values of the OLYHCache kernel parameter that define a) the maximum number of DATA Devspaces and b) the maximum size of the database. Remember these values for a later exercise. What logmode is being used by the OLYHCache? What is the size (in KB) of the log area? How many devspaces does it consist of?

2.6 2.7

Examine the database message file. Find the messages pertaining to the startup of your liveCache. What message indicated that the system is in state WARM? What are the values of: - kernel shared memory size (KB) - available physical memory?

2.8  3.1 3.2

([WHQG OLYHFDFKH GLVN VL]H E\  LQ FKDSWHU  ZLWK /&

Start trace of OLYHCache kernel.

 <RX FDQ DOWHUQDWLYHO\ SHUIRUP WKLV H[HUFLVH

Check the current size of the data area and ensure there is enough space on that disk to increase. Add another devspace to the data area in order to increase the total size of the data area by approximately 10%.
BC555 6-13

SAP AG

3.3  4.1  5.1 5.2 5.3

Check whether the parameter values noted above for MAXDATAPAGES and MAXDATADEVSPACES changed. When do the modifications at the parameters become actively? OLYH&DFKH SURILOH SDUDPHWHUV Check and adapt the value of the OLYHCache parameter MAXUSERTASKS? How can you issue commands directly to the OLYHCache instance? Get complete list of valid DBMCLi commands. Get the current value of parameter MAXUSERTASKS.

&RPPDQG /LQH FOLHQW ,QWHUIDFH

SAP AG

BC555

6-14

6ROXWLRQV )RU WKH H[HUFLVHV DQG VROXWLRQV SOHDVH XVH WKH QHZ H[HUFLVHV DQG VROXWLRQV LQ WKH DSSHQGL[ RI WKLV FRXUVH
1R  1.1 6ROXWLRQ Use menu path File Register or click on the Register icon.

Your instructor will tell you the name of the server on which your OLYHCache is running, together with the associated user name and password.. Input this name in the field List database from server and click on the ! button. Select your OLYHCache by clicking the box on the LHS of the relevant entry, then click on the Register button. A pop-up will now appear. Input the relevant values in the fields Userid name and Password (control, control) and click on the OK button.

Your OLYHCache is now registered for use by DBMGui. Click on the Close button to exit the regsitration function. You will now see a graphic appear in the top RHS window, representing your OLYHCache. 1.2 Method 1: The state of your OLYHCache will be shown in the top RHS window under column State on the line for your OLYHCache entry. Method 2: Check the colour of the traffic light attached to the graphic for your OLYHCache. A value of Warm (colour GREEN) means it is online and ready for use. A value of Cold (colour YELLOW) means it is online but shutdown. A value of Offline (colour RED) means it is offline. A value of Not Connected (no traffic light) means your registration failed check user name and password. 1.3 Use menu path Instance Restart Warm or select the Set Database Warm icon (GREEN traffic light). Start transaction LC10, input the name of the logical OLYHCache and select pushbutton OLYHCache administration . The resulting screen has a pushbutton for each of the above-mentioned functions. The state will show WARM when it has been successfully started. Select your OLYHCache by clicking on its graphic.

1.4

SAP AG

BC555

6-15

 2.1 2.2 In command line mode of DBMGUI, execute the command lc_init. Method 1: Use menu path Instance Information Versions. Method 2: Click on the Information pushbutton on the LHS of the screen, then click on Versions. 2.3 To determine size of data area: Method 1: Use menu path Instance Information Data, then read value from field Total Space (KB). Method 2: Use menu path Instance Configuration Data Devspace, then calculate value from sum of values in Size column for entries with Name of form DATAnnnn. To determine how many devspaces are allocated to the data area, use the abovementioned Method 2 and count the number of non-empty entries with Name = DATAnnnn. 2.4 To determine size of log area: Method 1: Use menu path Instance Information Log, then read value from field Max. Size (KB). Method 2: Use menu path Instance Configuration Log Devspace, then calculate value from sum of values in Size column for entries with Name of form LOGnnn. To determine how many devspaces are allocated to the log area, use the abovementioned Method 2 and count the number of non-empty entries with Name = LOGnnn 2.5 2.6 2.7 MAXDATADEVSPACES: _________ MAXDATAPAGES: ________ Use menu path Instance Information Log, then read value from field Log Mode.

To access the database message files, use menu path Instance Check Files, the double-click on file Database Messages. The information concerning memory allocation by the OLYHCache instance is displayed via a series of messages with label INFO in the Database Message file. The required values can be found associated to fields Kernel shared data size and Available physical memory. The database is in state WARM when you can log on to it. Check for messages.

2.8

Use menu path Instance Check Kernel Trace. Mark the required trace options and click on icon Selected Items ON to activate trace of all selected options. Notice the GREEN traffic light associate with each active trace element.

SAP AG

BC555

6-16

 3.2

Use menu path Instance Configuration Data Devspace and click on the last entry. This entry should have a Name of format DATAnnnn and should not yet be associated with any disk location. Click on the edit icon, then specify size of the new allocation and confirm the default path in which to allocate the new file associated with the new devspace. Finally click on the OK button to allocate the new data component. Select Parameters in the section &RQILJXUDWLRQ, read the value of the given parameter. Modify the parameter. When will the parameter change become active. Method 1: From DBMGui, select menu path Instance Command Line. Method 2: Assuming the relevant program directory is defined to your PATH variable, select Start Run from the Windows NT task bar, then input DBMCLI and click on the OK button. Use either of the previous methods to start up the Command interface. Input HELP and press the ENTER key to display a complete list of all valid commands, together with their syntax. In the command line of DBMGUI enter param_getvalue MAXUSERTASKS and execute

 4.1  5.1

5.2

5.3

SAP AG

BC555

6-17

OLYH&DFKH 0RQLWRULQJ

 OLYH&DFKH &RQFHSWV  OLYH&DFKH $UFKLWHFWXUH DQG 5HTXLUHPHQWV  OLYH&DFKH $GPLQLVWUDWLRQ  OLYH&DFKH 0RQLWRULQJ  OLYH&DFKH %DFNXS DQG 5HVWRUH 7HFKQLTXHV  OLYH&DFKH %DFNXS DQG 5HVWRUH IRU $32
SAP AG 1999

SAP AG

BC555

7-1

OLYH&DFKH 0RQLWRULQJ

$W WKH FRQFOXVLRQ RI WKLV XQLW \RX ZLOO EH DEOH WR


l 8VH 7UDQVDFWLRQ /& WR PRQLWRU YDULRXV DVSHFWV RI l 8VH WKH 'DWD FDFKH PRQLWRU l 0RQLWRU WKH UROOEDFN FDFKH

OLYH&DFKH SHUIRUPDQFH

SAP AG 1999

SAP AG

BC555

7-2

0RQLWRULQJ WKH OLYH&DFKH 0DLQ 0RQLWRU

SAP AG 1999

n n

liveCache can be monitored in the SAP system using the Performance Monitoring functions available in Transaction LC10. The initial screen is the main monitor. This displays a performance overview of the various areas of the liveCache. A Refresh button lets you update the current screen, whereas System messages leads you to knldiag files and and the initialization log Section liveCache attributes lists the main attributes like liveCache SID, server, status and version Section Cache hit rates shows the usage and hit rates of object and converter cache Section liveCache disk accesses informs about disk I/O in the log and data devspaces Section I/O Activity lists the physical and logical I/O requests executed by liveCache. Section liveCache status informs you about data cache usage, availability of monitoring features, trace activity and whether a checkpoint is running Scan and sort activity helps you to detect inefficient accesses to tables

To obtain more detailed information about liveCache performance, choose one of the buttons in section Detailed analysis.

SAP AG

BC555

7-3

0RQLWRULQJ WKH OLYH&DFKH 'HWDLO $QDO\VLV

SAP AG 1999

In the Detailed analysis section of the liveCache performance monitor (Transaction LT10), the buttons you can use for further liveCache performance monitoring include: &RQILJXUDWLRQ; displays the liveCache disk and memory configuration 'DWD FDFKH; displays usage and hit rates in the data cache 'HYVSDFH VWDWLVWLFV; provides information regarding I/O /RJ FDFKHV; displays accesses and hit rates on the rollback caches $FWLYH SDUDPHWHUV; displays current values of liveCache kernel parameters

206 YHUVLRQV DQG $YDLODEOH '% SURFHGXUH; displays information regarding available COM routines 7UDQVDFWLRQV; displays the transactions currently active in the liveCache

SAP AG

BC555

7-4

0RQLWRULQJ OLYH&DFKH 'DWD &DFKH

SAP AG 1999

n n n

The Data cache monitor is one of the options featured in the Detailed analysis menu of Transaction LC10. It enables you to monitor the effectiveness of the data cache. Data cache monitor displays the state of the data cache. A hit rate of close to 100% in the data cache in a running system is a prerequisite for an effectively working liveCache. If the portion of the data cache used by OMS data reaches 100%, the entire cache is being used. If, additionally, the hit rate is below 100%, an extension of the data cache may be required.

SAP AG

BC555

7-5

0RQLWRULQJ OLYH&DFKH 5ROOEDFN &DFKHV

SAP AG 1999

The Log cache monitor is another of the options featured in the Detailed analysis menu of Transaction LC10. When you enter, push the button SQL Log to obtain information about the sql log cache regions, including the rollback cache. The upper area of the Log cache monitor screen describes the configuration of the rollback cache and the log queue. Accesses to the SQL rollback cache and the SQL log queue are displayed in the lower section. SQL activity in the liveCache is minimal, only anchor tables /sapapo/ordkey and /sapapo/ordmap are stored in the SQL section of liveCache. In later liveCache releases, object logging in the liveCache might become available. You will then be able to monitor activity in the corresponding log regions as well.

n n n n

SAP AG

BC555

7-6

6XPPDU\ OLYH&DFKH 0RQLWRULQJ

<RX DUH QRZ DEOH WR

l 8VH 7UDQVDFWLRQ /& WR PRQLWRU YDULRXV DVSHFWV RI OLYH&DFKH SHUIRUPDQFH l 'HWHUPLQH ZKHWKHU WKH GDWD FDFKH LV VXIILFLHQWO\ ELJ

SAP AG 1999

SAP AG

BC555

7-7

([HUFLVHV )RU WKH H[HUFLVHV DQG VROXWLRQV SOHDVH XVH WKH QHZ H[HUFLVHV DQG VROXWLRQV LQ WKH DSSHQGL[ RI WKLV FRXUVH
1R  3OHDVH HQVXUH \RX XVH RQO\ <285 OLYH&DFKH IRU WKH IROORZLQJ H[HUFLVHV Is /& is already fully functional for your OLYHCache? Use the DBMCLI command available in SM49 to store the DBM user info for OS user devadm. Use the DBMCLI command available in SM49 to store the operating system user and password info of user lNNadm for OS user devadm. Only then user devadm is able to execute dbmcli commands coded in the ABAPs of transaction LC10. 8VH /& WR SHUIRUP WKH IROORZLQJ H[HUFLVHV 8VH /& WR SHUIRUP WKH IROORZLQJ H[HUFLVHV Start, stop and initialise your OLYHCache. Is /& is fully functional for your OLYHCache? 3UHSDUH /& LQ V\VWHP '(9 IRU XVDJH ZLWK \RXU OLYH&DFKH ([HUFLVH

1.1 1.2 1.3

1.4  2.1  3.1 3.2 3.3 3.4

What is the version and build level of the OLYHCache kernel. What is the size (in KB) of the data area? How many devspaces does it consist of? What is the size (in KB) of the log area? How many devspaces does it consist of? What are the values of the OLYHCache kernel parameter that define

a) the maximum number of DATA Devspaces and b) the maximum size of the database. Remember these values for a later exercise. 3.5 3.6 What logmode is being used by the OLYHCache?

Examine the database message file. Find the messages pertaining to the startup of your liveCache. What message indicated that the system is in state WARM? What are the values of: - kernel shared memory size (KB) - available physical memory?

 4.1 4.2

([WHQG OLYHFDFKH GLVN VL]H E\   'R QRW SHUIRUP WKLV H[HUFLVH LI \RX KDYH DOUHDG\ H[WHQGHG \RXU OLYH&DFKH LQ FKDSWHU  ZLWK '%0*8, Check the current size of the data area and ensure there is enough space on that disk to increase Add another devspace to the data area in order to increase the total size of the data area by approximately 10%.
BC555 7-8

SAP AG

4.3  5.1  6.1 6.2  7.1 7.2 7.3

Check whether the parameter values for MAXDATAPAGES and MAXDATADEVSPACES noted above changed. When do the modifications at the parameters become actively? OLYH&DFKH SURILOH SDUDPHWHUV Check and adapt the value of the OLYHCache parameter MAXUSERTASKS? Which DB Procedure has been called the most? Which DB Procedure has the highest average run-time? 'HVFULEH KRZ WR UHFRJQLVH FDOOV WR &20 URXWLQHV IURP 6$3 DSSOLFDWLRQV How are COM routines initiated from ABAP? How can you recognise calls to COM routines in an SQL Trace? What is the name of the SQL routine with, in average, the longest elapsed time in the given SQL trace?

&KHFN WKH IROORZLQJ &20 LQIR LQ $32 V\VWHP 202

SAP AG

BC555

7-9

6ROXWLRQV )RU WKH H[HUFLVHV DQG VROXWLRQV SOHDVH XVH WKH QHZ H[HUFLVHV DQG VROXWLRQV LQ WKH DSSHQGL[ RI WKLV FRXUVH
1R  1.1 1.2 6ROXWLRQ Execute /NLC10 and check whether central functionality is available. Execute /NSM49 in the command window. Locate and double click the DBMCLI command. In section Additional Parameters, enter: -d <LNN> -n <liveCache servername> -us control,control Execute /NSM49 in the command window. Locate and double click the DBMCLI command. In section Additional Parameters, enter: -d <LNN> -n <liveCache servername> user_put control SYSTEMNAME=<lNN>adm SYSTEMPASSWORD=<lNN>adm Execute /NLC10 and check whether central functionality is now available. In LC10. enter your OLYHCache ID Use pushbutton OLYHCache administration. The resulting screen has a pushbutton for each of the above-mentioned functions.  3.1 3.2 3.3 3.4 3.5 3.6 Use pushbutton OLYHCache administration. /LYHCache version is displayed in the upper section Use pushbutton OLYHCache configuration. Data devspace configuration is displayed with the tab 'DWD $UHD Log devspace configuration is displayed with the tab /RJ $UHD MAXDATADEVSPACES: _________ MAXDATAPAGES: ________ Use menu path OLYHCache performance, then "Configuration" Read value from field Log Mode. To access the database message files, use LC10 button liveCache administration then Database Messages. The database is in state WARM when you can log on to it. Check for messages.. The information concerning memory allocation by the liveCache instance is displayed via a series messages with label INFO in the Database Message file. The required values can be found associated to fields Kernel shared data size and Available physical memory.

1.3

1.4  2.1

SAP AG

BC555

7-10

 4.2 Use LC10 button liveCache Configuration and push button "Change Configuration". This entry should have a Name of format DATAnnnn and should not yet be associated with any disk location. Then specify size of the new allocation and confirm the default path in which to allocate the new file associated with the new devspace. Finally click on the OK button to allocate the new data component.  5.1  6.1 Select pushbutton OLYHCache configuration , then select pushbutton Parameter and read the value of the given parameter. Modify the parameter. When will the parameter change become active. Select pushbutton OLYHCache monitor . Click on the column header Calls and select the pushbutton Sort in descending order . The first entry in the resulting list is the DB Procedure with the highest number of calls. Select pushbutton OLYHCache monitor . Click on the column header Runtime (average in ms) and select the pushbutton Sort in descending order . The first entry in the resulting list is DB Procedure with the highest average run-time.  7.1 7.2 Via ABAPs dynamic SQL interface EXEC SQL . Via entries with statements like DBPROC SAPR3, SAPAPO_. Start transaction ST05 by inputting ST05 into the command line and pressing the ENTER key. Switch on the trace for your own user by pushing the Trace on for user button. Perform some activity in the system, for instance by executing several monitors of LC10. Then select the Trace List pushbutton and on the resulting screen, use Goto 6WDHPHQW 6XPPDU\ 6RUW E\ 7LPHH[HF 

6.2

7.3

SAP AG

BC555

7-11

OLYH&DFKH %DFNXS DQG 5HVWRUH 7HFKQLTXHV

 OLYH&DFKH &RQFHSWV  OLYH&DFKH $UFKLWHFWXUH DQG 5HTXLUHPHQWV  OLYH&DFKH $GPLQLVWUDWLRQ  OLYH&DFKH 0RQLWRULQJ  OLYH&DFKH %DFNXS DQG 5HVWRUH 7HFKQLTXHV  OLYH&DFKH %DFNXS DQG 5HVWRUH IRU $32
SAP AG 1999

SAP AG

BC555

8-1

OLYH&DFKH %DFNXS DQG 5HVWRUH 7HFKQLTXHV

$W WKH FRQFOXVLRQ RI WKLV XQLW \RX ZLOO EH DEOH WR


l 'HVFULEH KRZ WR SHUIRUP OLYH&DFKH EDFNXSV l 'HILQH EDFNXS PHGLD l 3HUIRUP OLYH&DFKH EDFNXS l 3HUIRUP OLYH&DFKH UHVWRUH

SAP AG 1999

SAP AG

BC555

8-2

&KHFNSRLQWV
[ %ORFN FKDQJHG LQ GDWD FDFKH EHIRUH FKHFNSRLQW  'DWD &DFKH 'DWD &DFKH

'DWD &DFKH DIWHU FKHFNSRLQW 

&KHFNSRLQW 

SAP AG 1999

During a checkpoint, liveCache takes pages that have changed in the data and converter caches and writes them to the data and system devspaces. This can be regarded as a backup of data and converter cache to disk te recover liveCache after a crash. The writing of changed pages occurs in three phases: Phase one: changed pages are written to disk from the converter and data caches Phase two: the version number assigned to changed page is incremented Phase three: cache pages changed in phases one and two are written to disk

During a checkpoint, pages that are marked as changed in the caches are written to disk. When a checkpoint has been signaled, no new change transactions are admitted, and active transactions can finish. Read only actions are not affected by a checkpoint. The end of a checkpoint is reached when all active transactions have committed and the corrsponding data and converter cache information has been written to disk. When long running transactions are active during a checkpoint, wait situations occur and persist until the last open transaction has issued a commit.

After a checkpoint, liveCache is in a state of logical consistency. At the end of a checkpoint, information contained in the caches, the log and in the data and system devspaces are synchronized. The liveCache contains only the data of committed transactions.

SAP AG

BC555

'DWD &DFKH 'DWD &DFKH


&KHFNSRLQW 

'DWD &DFKH 'DWD &DFKH


8-3

OLYH&DFKH %DFNXS

6$9('$7$ &RPSOHWH '$7$ %$&.83

'$7$

'$7$

   '$7$ Q

5LQJ EXIIHU %DFNXSGHY 0$;%$&.83'(96 %DFNXSGHY 

SAP AG 1999

From a technical viewpoint liveCache backup is very similiar to a standard database data backup. Information contained in the liveCache Archive Log is currently not backed up as logging of the activities of the OMS is not available SAVE DATA performs a complete backup of all pages used on liveCache. In addition liveCache configuration is saved in the backup to allow for a fast restore of the original liveCache configuration. Converter pages are not part of the backup. Make sure that the liveCache was shut down regularly when performing a backup in COLD mode. If you follow SAP recommendations regarding the disk configuration and liveCache backup strategy, loss of data is very unlikely. SAVEDATA allows you to save to several backup media at the same time. This improves the runtime of backups. In a best case scenario, backup runtime will be only a third when you perform a parallel data backup to 3 instead of only 1 backup device. The maximal number of parallel backup media is determined by kernel parameter MAXBACKUPDEVS (1 - 32). Changes to this parameters become effective after a liveCache restart. Internally a memory region is provided in the form of a ring buffer, which takes the Write I/O of the server tasks and the Read I/O of the asDev threads, which are temporarily created during backup.

n n n

SAP AG

BC555

8-4

'DWDEDVH 0DQDJHU 0HGLD 0DQDJHU

SAP AG 1999

n n

Media Manager is used to define the properties of your backup media. General characteristics of a backup medium are: Name of the medium Type: - File - Tape - Pipe Path of the device driver, file or named pipe

Extended characteristics are Size of the medium in 8k pages Overwrite capability Automatic Tapeloader uses OS command as specified in OS Cmd to load a new tape

n n

A media group has to be defined, if you want to perform parallel backup. You have to define the properties of each separate member of the media group. Database Manger manual describes the complete procedure.

SAP AG

BC555

8-5

6FKHGXOLQJ OLYH&DFKH %DFNXSV %DFNJURXQG

3UHUHTXLVLWH 'HILQH VXLWDEOH EDFNXS PHGLXP /RJLFDO FRPPDQG 60  GEPFOL

([DPSOH GEPFOL Q S G /&$ X87/ FRQWUROFRQWURO X FRQWUROFRQWURO EDFNXSBVWDUW IRUGDWD UHFRYHU\ GDWD &DOO WKH DERYH FRPPDQG IURP $%$3 6$3$3220B&+(&.32,17B:5,7( ,I $UFKLYLQJ RI WKH OLYH&DFKH ORJJLQJ LV HQDEOHG GHOHWH DUFKLYHG ORJ ZLWK WKH KHOS RI UHSRUW 6$3$3220B$5&+,9(B/2*$5($B'(/ DIWHU WKH VXFFHVVIXO EDFNXS RI OLYH&DFKH 6FKHGXOH 6$3$3220B&+(&.32,17B:5,7( ZLWK WKH KHOS RI 6$3 EDWFK VFKHGXOLQJ V\VWHP 60
SAP AG 1999

liveCache backups can be scheduled with the help of the SAP batch scheduling system. You must define a suitable backup medium before you can make use of this possibility. Use database manager for this. The dbmcli is used to execute the required command on operating system level. Dbmcli is available as a logical command (transaction SM49). The following command is used dbmcli -d <SID> -n <servername> -u control,control -uUTL -c backup_start <Backup Medium Name> RECOVERY DATA This command can be added to a user exit available in report /SAPAPO/OM_CHECKPOINT_WRITE, which you should schedule to run hourly. In this way it is ensured that the backup is performed after the completion of a checkpoint. We recommend that you schedule the report at least daily, better yet, schedule it hourly. Consider to perform different actions in the user exit depending on the time of day.

n n n n

SAP AG

BC555

8-6

5HFRYHU\ &DVHV

SAP AG 1999

Restore the liveCache from a backup if you completely loose a liveCache devspace, because one or more disk devices have suffered physical damage.The latest available liveCache backup usually is the basis for such a recovery. You can also restore a mirrored devspace in the Recovery menu of DBMGUI. In order to restore the liveCache after a disk crash or data corruption on one of the devspaces, you must first provide new disk spaces and determine and eliminate possible causes for future errors. Use the Backup History provided by DBMGUI to restore the latest available backup. Restore is carried out in operating mode COLD with the help of the Restore functionality of DBMGUI. Restart Warm from LC10 finishes liveCache restore.

n n

Recommendation:To prevent loss of backup history information we recommend that you periodically backup the RUNDIRECTORY of your liveCache.

SAP AG

BC555

8-7

'LDJQRVWLFV )LOHV

5XQWLPH (QYLURQPHQW NQOGLDJHUU 6$3 '% .HUQHO *OREDO 6KDUHG 0HPRU\ '%0*8, ,QIRUPDWLRQ %DFNXS +LVWRU\
NQOWUDFH NQOGXPS 6KDUHG 0HPRU\ $E]XJ GEP 6,'!

NQOGLDJ

581',5(&725< 581',5(&725<

581',5(&725<

581',5(&725< XVUVSRROVTOFRQILJ 581',5(&725<

5HVXOWV RI ODVW FKHFN [SFKHFNSURW RI NHUQHO SDUDPHWHUV


SAP AG 1999

n n

The following files, located under RUNDIRECTORY, contain information to help you recognize the causes of liveCache problems. The diagnosis file knldiag logs messages between the liveCache runtime environment and the database. This file is recreated during each start of the liveCache kernel.The existing file is backed up using the name <filename>.old. After a crash and two subsequently failed restarts, you will lose all information, unless you back up the knldiag, which may contain relevant information about the database crash. Knldiag.err only logs error messages and is written to in append mode. Take care to regulary backup and delete this file. The trace file knltrace logs messages between layers of the liveCache kernel, provided the trace option is switched on. Trace size should not be less than 1000 pages in the SAP environment. The trace is cyclically overwritten. You can switch the trace on or off using Database Manager. DBMGUI converts the trace into a readable format for analysis. Files dbm.knl. dbm.log, dbm.mmm, and dbm.mdf contain information about the backup history and usage of media and labels. Database manager uses this information to assist you with performing restore.

n n

SAP AG

BC555

8-8

7HFKQLFDO 5HFRYHU\ 6WUDWHJ\


&KHFNSRLQW 6$9( /& 

&+(&.32,17 &+(&.32,17

,QVWDOO QHZ GLVN 5(67$57 &ROG 5(6725( 6$9( /&  &KHFNSRLQW 6$9( /& 

&+(&.32,17 &+(&.32,17

,QIR PLVVLQJ LQ OLYH&DFKH DIWHU UHVWRUH GDWD

5(67$57 :DUP IURP /&

&+(&.32,17 ,QIR PLVVLQJ LQ OLYH&DFKH DIWHU &UDVK DQG VXEVHTXHQW 5(67$57 :$50
# " & ! %    $ "  

SAP AG 1999

If no disk information was lost during the liveCache crash, simply use LC10 to restart liveCache. Usually you do not want to lose information from the latest checkpoint contained in the liveCache, so you should not perform a liveCache initalization, as this will delete all data stored in the liveCache. If a logical error is committed in the APO system, it might be required to reset the system to a point in time before the error occurred. A liveCache backup is then required in combination with a suitable APO database backup to reset the system. To be prepared for such a recovery case we recommend that you train at least 2 people who can completely recover liveCache and the entire SAP system connected to liveCache . Server landscape comparable to that of your production system is required for the testing of your recovery procedures.

SAP AG

BC555

8-9

6XPPDU\ OLYH&DFKH %DFNXS

<RX DUH QRZ DEOH WR


l l l

'HVFULEH WKH VWHSV UHTXLUHG WR SHUIRUP OLYH&DFKH EDFNXSV 'HVFULEH WKH VWHSV UHTXLUHG WR UHVWRUH OLYH&DFKH

8VH '%0*8, WR GHILQH EDFNXS PHGLD

SAP AG 1999

SAP AG

BC555

8-10

([HUFLVHV )RU WKH H[HUFLVHV DQG VROXWLRQV SOHDVH XVH WKH QHZ H[HUFLVHV DQG VROXWLRQV LQ WKH DSSHQGL[ RI WKLV FRXUVH
1R  1.1 1.1  2.1  3.1 3.2 3.  4.1 4.2 4.3 8VH '%0*8, WR SHUIRUP WKH IROORZLQJ H[HUFLVH Force a checkpoint of your liveCache. Note: Only after a checkpoint can you execute backups of your OLYHCache. How would you trigger a checkpoint in the APO system. 8VH '%0*8, WR SHUIRUP WKH IROORZLQJ H[HUFLVH 8VH '%0*8, WR SHUIRUP WKH IROORZLQJ H[HUFLVH Perform a full backup of your OLYHCache. How would you perform a full backup of your OLYHCache in an APO system? Which additional action do you have to execute after a successful backup of OLYHCache? 8VH '%0*8, WR SHUIRUP WKH IROORZLQJ H[HUFLVH Perform a full restore of your OLYHCache? Define a backup medium for your OLYHCache. ([HUFLVH

How would you perform a full restore of your OLYHCache in an APO system? What do you have to do after the OLYHCache recovery?

SAP AG

BC555

8-11

6ROXWLRQV )RU WKH H[HUFLVHV DQG VROXWLRQV SOHDVH XVH WKH QHZ H[HUFLVHV DQG VROXWLRQV LQ WKH DSSHQGL[ RI WKLV FRXUVH
1R  1.1 6ROXWLRQ In DBMGUI menu instance, use item Command line. Execute the following 3 commands: 1) sql_connect superdba,admin 2) sql_execute call force_and_wait_for_checkpoint 3) sql_release 1.1  2.1 With SM36, schedule a job with step executing report /SAPAPO/OM_CHECKPOINT_WRITE Use %DFNXS 0HGLD in the &RQILJXUDWLRQ section. Use the 0HGLXP button in the lower section and define the properties of your backup media. Name: FORDATA Location: /sapdb/wrk/<SID>/fordata Device Type: File Use Complete in %DFNXS in the %DFNXS section. Use the 0HGLXP that you defined in the previous exercise. Then push the Next Step button. Check the Start details and push the Start button if the recommendations are correct. Edit the user exit in report /SAPAPO/OM_CHECKPOINT_WRITE and add command dbmcli -d <SID> -n <servername> -u control,control -uUTL -c backup_start <Backup Medium Name> RECOVERY DATA to it. After checking the success of the backup action delete archive log area in APO db with the help of report /SAPAPO/OM_ARCHIVE_LOGAREA_DEL Bring your OLYHCache to state COLD. Use 'DWDEDVH in the section 5HFRYHU\. Choose 5HVWRUH ODVW EDFNXS  Push the Next step button and check the details given. If they are correct, push the Next Step and then the Start button. Check the message displayed by DBMGUI. A Restart Warm completes the Recovery. Execute report /sapapo/om_lc_recovery with the help of Tools $32 Administration OLYH&DFKH&20 URWLQHV 5HFRYHU\ 5HFRYHU\ Recover the archive log Restart your CIF queues after you have received an express mail about success of archive log recovery Re-schedule /SAPAPO/OM_CHECKPOINT_WRITE

 3.1

3.2

3.  4.1

4.2 4.3

SAP AG

BC555

8-12

OLYH&DFKH %DFNXS DQG 5HVWRUH IRU $32

 OLYH&DFKH &RQFHSWV  OLYH&DFKH $UFKLWHFWXUH DQG 5HTXLUHPHQWV  OLYH&DFKH $GPLQLVWUDWLRQ  OLYH&DFKH 0RQLWRULQJ  OLYH&DFKH %DFNXS DQG 5HVWRUH 7HFKQLTXHV  OLYH&DFKH %DFNXS DQG 5HVWRUH IRU $32
SAP AG 1999

SAP AG

BC555

9-1

OLYH&DFKH %DFNXS DQG 5HVWRUH IRU $32

$W WKH FRQFOXVLRQ RI WKLV XQLW \RX ZLOO EH DEOH WR


l 'HVFULEH KRZ WR XVH OLYH&DFKH EDFNXSV LQ RUGHU WR UHVWRUH l ([SODLQ DQG DFWLYDWH $32 OLYH&DFKH ORJJLQJ

DQ $32 6\VWHP DQG WKH FRQQHFWHG 2/73 V\VWHPV

l ([SODLQ $32 OLYH&DFKH UHFRYHU\ IURP $32 '% ORJJLQJ

DUHDV

SAP AG 1999

SAP AG

BC555

9-2

OLYH&DFKH %DFNXSV DQG /RJJLQJ IRU $32


$32 )URQWHQG
$SS 6HUYHU

)RUFH &KHFNSRLQW

OLYH&DFKH 6HUYHU

$SSOLFDWLRQ

OLYH&DFKH OLYH&DFKH

$UFKLYH ROG ORJ DUHD

/RJ DUHD $

/RJ DUHD %

1HZ DFWLYH ORJ DUHD


OLYH&DFKH GHYVSDFHV %DFNXS

$UFKLYH /RJ DUHD

$32 'DWDEDVH

SAP AG 1999

As a loss of liveCache in principle does not result in loss of data but only in time required to refill liveCache, recovery prerequisites are disabled in the default. You can enable several options accoriding to your demand in order to maximize APO availability. Performance is affected to a certain extent. Usage of Recovery functionality requires an optimized liveCache disk layout. liveCache recovery differs between the the following logging levels liveCache can periodically write changed cache information to the devspaces. This is achieved by periodical writing of checkpoints. liveCache data can be recovered to the point in time when the last checkpoint has been written. For a liveCache recovery of all data send and received by CIF/BAPI interfaces, logging of changes to liveCache data, which have been successfully received or transmitted through the BAPI and/or CIF interface, can be activated. For a full liveCache recovery, logging of changes to liveCache objects into the APO database can be activated.

If you are using liveCache in Demand Planning, no log for changes to liveCache objects connected to Demand Planning is written. You can create backup infocubes in the APO DB to periodically backup liveCache info in the backup infocubes. Point in time recovery can be achieved by using a Point in time recovery of the APO database and a full liveCache recovery with the help of a suitable liveCache backup and the liveCache log. Perform liveCache backups to be prepared for the occurrence of disk crashes.

SAP AG

BC555

9-3

(QDEOH OLYH&DFKH /RJJLQJ IRU $32

SAP AG 1999

n n

To activate liveCache logging in APO release 3.0A: Call transaction /SAPAPO/OM06 and activate the desired logging method. In addition Schedule a periodic (up to hourly) job that executes the report /SAPAPO/OM_CHECKPOINT_WRITE (trigger checkpoint). If this job is not scheduled, the log might have an overflow. The liveCache can be recovered to the last state before the crash occurred. If you want te be able to restore liveCache after a disk crash, you must also perform periodical backups and possibly activate archive logging. If you have activated the archive logging you should delete liveCache archive logging area at least daily, preferably after a successful liveCache backup with the report /SAPAPO/OM_ARCHIVE_LOGAREA_DEL. Use the user exit provided in report /SAPAPO/OM_CHECKPOINT_WRITE.

SAP AG

BC555

9-4

OLYH&DFKH 5HFRYHU\ ZLWK /RJJLQJ


$32 )URQWHQG
$SS 6HUYHU

OLYH&DFKH 6HUYHU

$SSOLFDWLRQ

 
OLYH&DFKH OLYH&DFKH


/RJ DUHD $ /RJ DUHD %

$FWLYH ORJ DUHD


OLYH&DFKH GHYVSDFHV

$UFKLYH LQDFWLYH ORJ DUHD

$UFKLYH /RJ DUHD

$32 'DWDEDVH

SAP AG 1999

n n n n

The liveCache log information is written to special tables (/sapapo/lc_log<t><v>) in the APO database. Separate logging tables exist for order headers (type h), order data (d), pegging data (f) and keys of changed master data (s). Each of the tables exists in three versions a, b an z. After a checkpoint, the logging mechanism switches between version a and b. The inactive verion of the log is then deleted. It is therefore essential that checkpoints are trigggered periodically to avoid overflow of the active log region. If archive logging is enabled, logging information in the currently inactive logging area is archived to tables of type z, before it is deleted.

SAP AG

BC555

9-5

OLYH&DFKH 5HFRYHU\ XS WR ODVW &KHFNSRLQW


$32 )URQWHQG
$SS 6HUYHU

OLYH&DFKH 6HUYHU

$SSOLFDWLRQ

OLYH&DFKH OLYH&DFKH

/RJ DUHD $

/RJ DUHD %

 6\QFKURQL]H OLYH&DFKH DQG $32 '% ZLWK 6$3$3220 /RJJLQJ QRW DFWLYDWHG

 /RDG ODVW FKHFNSRLQW DIWHU UHVWDUW


OLYH&DFKH  5HVWRUH )LOH 6\VWHP %DFNXS

$32 'DWDEDVH
SAP AG 1999

Recovery after a liveCache crash Stop the APO system (or at least, prevent user log-ins). CIF queues in the attached SAP systems are automatically stopped after a liveCache crash After a disk crash, restore the liveCache from the latest backup Restart the APO system and liveCache with LC10 Remove inconsistencies between APO database and liveCache with the help of transaction /SAPAPO/OM17 Check for inconsistencies of transactional data between the APO system and the attached SAP systems with the help of report /SAPAPO/CIF_DELTAREPORT Restart the CIF queues in the attached SAP systems

Prerequisites to enable recovery after liveCache crash : Trigger liveCache checkpoints Schedule periodic job LC_CHECKPOINT (for example hourly) Job step: execute report /SAPAPO/OM_CHECKPOINT_WRITE See full description in SAP Notes 151274 and 162530

Additional prerequisite to prevent loss of devspace information caused by a disk crash Define a backup medium with the help of DBMGUI Periodically perform liveCache backups with the following dbmcli command in a user exit of report /sapapo/om_checkpoint_write: dbmcli -d <SID> -n <servername> -u control,control -uUTL -c backup_start <Backup Medium Name> RECOVERY DATA.

SAP AG

BC555

9-6

OLYH&DFKH 5HFRYHU\ ZLWK /RJJLQJ


$32 )URQWHQG
$SS 6HUYHU

OLYH&DFKH 6HUYHU

$SSOLFDWLRQ

OLYH&DFKH OLYH&DFKH

/RJ DUHD $

/RJ DUHD %

 5HVWRUH FKDQJHV DIWHU ODVW FKHFNSRLQW IURP ODVW DFWLYH ORJ DUHD /RJJLQJ DFWLYDWHG
OLYH&DFKH )LOH 6\VWHP

 /RDG ODVW FKHFNSRLQW DIWHU UHVWDUW

$32 'DWDEDVH
SAP AG 1999

For a liveCache recovery, use report /SAPAPO/OM_LC_RECOVERY Job for report /SAPAPO/OM_CHECKPOINT_WRITE is deleted liveCache is restarted and liveCache logging info is used to recover the latest committed state of liveCache with the help of the active log area. You are also asked whether you want to use the archived log area. After an express mail has informed you about successful recovery of liveCache, activate CIF queues in attached SAP systems

n n

Re-schedule report /SAPAPO/OM_CHECKPOINT_WRITE Prerequisites Trigger liveCache checkpoints Activate synchronous or BAPI/CIF based liveCache logging in transaction /SAPAPO/OM06 To prevent loss of liveCache data after a disk crash, perform backups and activate archiving of the liveCache logging data to fully recover liveCache after a disk crash

n n

After a disk crash, restore liveCache from the latest backup Check for inconsistencies with transaction /SAPAPO/OM17

SAP AG

BC555

9-7

5HFRPPHQGDWLRQ IRU OLYH&DFKH %DFNXS 6WUDWHJ\


/&%$&.83 DUFKLYHG /&%$&.83 RYHUZULWH
    

$32 '%  /RJ %DFNXS


 



 *HQ  *HQ

 *HQ  *HQ

    $0 $32 '% %DFNXS  &KHFNSRLQW  %DFNXS /& DUFKLYH  'HOHWH /& /RJ $UFKLYH +RXUO\ &KHFNSRLQW 2SWLRQDO %DFNXS /& RYHUZULWH



SAP AG 1999

The outlined strategy will enable you to recover the APO system together with the liveCache in a minimized time span. The following prerequisites must be fullfilled: Each hour a checkpoint is triggered on the liveCache liveCache logging and archiving has been enabled Archiving of the liveCache log has been enabled

n n

Perform daily database data and log backups to ensure data security of the APO database. Archive these backups for at least 4 weeks. Perform a daily backup of liveCache and archive this backup to be able to perform point in time restores in connection with the APO DB backups. Keep at least four generations of the full backup sets of an entire week. In addition and time permitting, you can perform hourly liveCache backups to accelerate liveCache recovery with the help of the liveCache log. These hourly backups can be overwritten. Outlook: In later liveCache releases, object logging in the liveCache might become available. You will then be able to backup liveCache object log and perform liveCache recovery using liveCache log information.

n n

SAP AG

BC555

9-8

6XPPDU\ OLYH&DFKH %DFNXS LQ DQ $32 6\VWHP

<RX DUH QRZ DEOH WR

l 6FKHGXOH OLYH&DFKH EDFNXSV

l ([SODLQ WKH DYDLODEOH OLYH&DFKH ORJJLQJ OHYHOV LQ l (QDEOH OLYH&DFKH ORJJLQJ LQ WKH $32 '%

DQ $32 V\VWHP

l 'HVFULEH WKH VWHSV UHTXLUHG WR UHVWRUH WKH $32

V\VWHP DIWHU D OLYH&DFKH FUDVK

SAP AG 1999

SAP AG

BC555

9-9

&RQFOXVLRQ

SAP AG 1999

SAP AG

BC555

10-1

&RQFOXVLRQ

1RZ \RX DUH DEOH WR

l 'HILQH $32 V\VWHP UHTXLUHPHQWV

l ,GHQWLI\ WKH VSHFLILF OLYH&DFKH FRQILJXUDWLRQ LQ WKH 6$3 HQYLURQPHQW l 3HUIRUP OLYH&DFKH PRQLWRULQJ DQG PDLQWHQDQFH

l /LVW DQG SHUIRUP ZRUN ZLWK '%0*8, DQG 6$3 DGPLQLVWUDWLRQ WRROV

l 8QGHUVWDQG EDFNXS DQG UHFRYHU\ FRQFHSWV RI OLYH&DFKH LQ WKH $32 V\VWHP

SAP AG 1999

SAP AG

BC555

10-2

6\VWHPODQGVFDSH

1HZ ([HUFLVHV DQG 6ROXWLRQV

You will work in a group of two up to four people. To each group an individual Windows server will be assigned. On this server a R3 system, an APO 3.0A system, a liveCache and all optimizers are running. Therefore every group will have its own SAP system landscape to perform the following exercises and will not interfer with any actions of one of the other groups. Your instructor will hand out all necessary data needed to logon to all your systems and your Windows server.

([HUFLVHV
&KDSWHU 
1. Log on to your APO system to retrieve the following information 1.1. Version and SID of the liveCache. (TA lc10 or TA sm49) 1.2. Version of COM routines (/sapapo/om04) 1.3. Version of Optimizers (TA /sapapo/opt09) 2. Check liveCache and COM functionality (TA /sapapo/om03) 3. Check consistency of liveCache configuration (TA /sapapo/om13)

&KDSWHU 
1. Check number of defined work processes (TA sm50) 2. Check defined liveCache tasks (TA lc10) 3. Find the file knldiag on OS level 4. Check number of datadevspaces and logdevspaces of your liveCache from within your APO system (TA lc10) 5. Check data cache size, maximum allowed heap memory and all other relevant liveCache kernel parameters (TA lc10) 6. Find out whether garbage collectors were already in use since your last liveCache restart (TA lc10) 7. Check number of currently active consistent views also note their runtime (TA lc10)

SAP AG

BC555

11-1

([HUFLVHV
&KDSWHU 
1. Register your liveCache in your local dbmgui 2. Check the liveCache devspace configuration using dbmgui 3. Add another datadevspaces to your liveCache using dbmgui 4. Check the definitions of the two logical liveCache connections (TA lc10) 5. Which connection is used for ATP (available to promise)? 6. Store the DBM user information (TA sm49) 7. Store OS user information (TA sm49) 8. Start, stop and initialize your liveCache (TA lc10) 9. Review the file knldiag from within your APO system (TA lc10) 10. Stop and start the X_server on OS level

&KDSWHU 
1. Review all important liveCache performance statistics (TA lc10) 2. Check distribution of liveCache data between OMS data, OMS history and SQL data (TA lc10) 3. Check Data Cache usage (TA lc10) 4. Check DevSpace usage from within your APO system (TA lc10) 5. Check DevSpace usage with dbmgui 6. Check for active liveCache tasks (TA lc10) 7. Check schedule of the APO job /sapapo/om_reorg_daily and adjust it if necessary (TA sm37 and TA sm36) 8. Check the following COM routine statistics (TA lc10) 8.1. Number of calls 8.2. Average runtime 8.3. Accesses to heap 8.4. Accesses to data cache 8.5. Maximum heap usage 9. Check currently used heap memory and maximum allocated heap memory since last liveCache restart (TA se38)

SAP AG

BC555

11-2

&KDSWHU  DQG 
1. Check internal data consistency (TA /sapapo/om17)

([HUFLVHV

2. Check status of synchronous logging and turn it on if necessary (TA /sapapo/om06) 3. Check history of liveCache online backups from within your APO system (TA /sapapo/om11) and using dbmgui 4. Define a backup medium using dbmgui 5. Execute a liveCache online backup using dbmgui 6. Schedule a daily liveCache online backup at midnight (TA se38 and sm36) 7. Write a liveCache checkpoint (TA /sapapo/om18) 8. Schedule an automatic liveCache checkpoint every two hours (TA sm36) 9. Crash your liveCache and restore it afterwards (TA lc10)

SAP AG

BC555

11-3

6ROXWLRQV
&KDSWHU 
1. Log on to your APO system to retrieve the following information 1.1. Version and SID of the liveCache. (TA lc10 or TA sm49) Lc10 Enter logical connection LCA liveCache administration 1.2. Version of COM routines (/sapapo/om04) /sapapo/om04 column changelist Use SAP note 326494 to get corresponding COM routine Version 1.3. Version of Optimizers (TA /sapapo/opt09) /sapapo/opt09 find support package number that corresponds to the optimizer executables 2. Check liveCache and COM functionality (TA /sapapo/om03) /sapapo/om03 (executes report /sapapo/om_lccheck) do not change any predefined entries just press F8 liveCache and COM routines work properly, if last line of resulting protocol says: %%%% NO ERRORS OCCURED %%%%%%%%% COM-routines and liveCache are working well. If report stops because of problems with logical tests implement note 483479 or choose not to carry out logical tests on initial page of the report. 3. Check consistency of liveCache configuration (TA /sapapo/om13) /sapapo/om13 checks all lights should be green

SAP AG

BC555

11-4

6ROXWLRQV
&KDSWHU 
1. Check number of defined work processes (TA sm50) Sm50 Find a list of all work processes (dialog, batch, ) 2. Check defined liveCache tasks (TA lc10) Lc10 Enter logical connection LCA liveCache console choose process overview and press F8 find a list of all defined liveCache tasks 3. Find the file knldiag on OS level Logon to your server move to folder /sapdb/data/wrk/<LC SID> here youll find the desired file 4. Check number of datadevspaces and logdevspaces of your liveCache from within your APO system (TA lc10) Lc10 Enter logical connection LCA liveCache performance configuration on the lower part of the screen find a list of all defined devspaces 5. Check data cache size, maximum allowed heap memory and all other relevant liveCache kernel parameters (TA lc10) Lc10 Enter logical connection LCA liveCache performance active parameters find a list of all active parameters and their corresponding values To change parameter values use dbmgui or dbmcli commands. To activate new parameter values you have to restart your liveCache. 6. Find out whether garbage collectors were already in use since your last liveCache restart (TA lc10) If garbage collectors were already in use, youll find a corresponding entry in the file krnldiag.

Lc10 Enter logical connection LCA liveCache administration system messages search for the word gar
SAP AG BC555 11-5

6ROXWLRQV
Attention: the size of this file is predefined therefore old entries get overwritten at one point. 7. Check number of currently active consistent views also note their runtime (TA lc10) Lc10 Enter logical connection LCA liveCache performance OMS versions find a table that lists all currently running consistent view as well as their runtimes.

&KDSWHU 
1. Register your liveCache in your local dbmgui Start dbmgui file register enter the liveCache host press on ! mark the desired liveCache register enter liveCache name, user control and password control OK close You ll see a new icon for the just registered liveCache in the upper part of the screen. 2. Check the liveCache devspace configuration using dbmgui Start dbmgui doubleklick on the icon for the desired liveCache in the upper part of the screen on the menu on the left hand side of the screen choose configuration data devspace or log devspace 3. Add another datadevspaces to your liveCache using dbmgui Start dbmgui doubleklick on the icon for the desired liveCache in the upper part of the screen on the menu on the left hand side of the screen choose configuration data devspace mark the icon for the first not existing data devspace press edit enter size, location and type of the new data devspace press OK Attention: Once a new data devspace is added it cannot be remove anymore. Also all data devspaces should have the same size.

SAP AG

BC555

11-6

6ROXWLRQV
4. Check the definitions of the two logical liveCache connections (TA lc10) Lc10 enter the name of the logical connection press edit If the connection already exists, the existing data is displayed and can be changed. If the connection does not exists so far, you can define it here. Two connections named LCA and LDA must be defined. For further details refer to the liveCache installation guide. 5. Which connection is used for ATP (available to promise)? ATP uses connection LDA. All other applications use connection LCA. 6. Store the DBM user information (TA sm49) Sm49 doubleklick on dbmcli in the field additional parameters enter: -d <LC SID> -n <LC Host> -u control,control us control,control Recommendation: execute this command two times in a row. 7. Store OS user information (TA sm49) Sm49 doubleklick on dbmcli in the field additional parameters enter: -d <LC SID> -n <LC Host> -u control,control user_put control SYSTEMNAME=<lc-sid adm> SYSTEMPASSWORD=<lc-sid adm password> Recommendation: execute this command two times in a row. 8. Start, stop and initialize your liveCache (TA lc10) Lc10 Enter logical connection LCA liveCache administration press start liveCache , stop liveCache or initialize liveCache Attention: Initialisation of the liveCache deletes all liveCache data. 9. Review the file knldiag from within your APO system (TA lc10) Lc10 Enter logical connection LCA liveCache administration system messages
SAP AG BC555 11-7

6ROXWLRQV
10. Stop and start the X_server on OS level Log on to your liveCache server as user <lc-sid>adm and execute the command: x_server stop or x_server start respectively.

&KDSWHU 
1. Review all important liveCache performance statistics (TA lc10) Lc10 Enter logical connection LCA liveCache performance review all information provided on this screen and on all screens that appear when you press on any button on this page. 2. Check distribution of liveCache data between OMS data, OMS history and SQL data (TA lc10) Lc10 Enter logical connection LCA liveCache performance data cache The table in the middle of the screen shows the distribution of the liveCache data. 3. Check Data Cache usage (TA lc10) Lc10 Enter logical connection LCA liveCache performance data cache The table in the middle of the screen shows the data cache usage. 4. Check DevSpace usage from within your APO system (TA lc10) Lc10 Enter logical connection LCA liveCache performance devspacestatistics The value total data space represents only half the disc space defined as data dev space. Also the value used data space indicates the percentage of the disc space defined by total data space used by the last checkpoint. 5. Check DevSpace usage with dbmgui Start dbmgui doubleklick on the icon for the desired liveCache in the upper part of the screen This time the appearing diagram shows the total amount of disc space included in the data devspaces. And also the given value indicted as used space corresponds to the whole amount of used disc space in all the data devspaces.

SAP AG

BC555

11-8

6. Check for active liveCache tasks (TA lc10) Lc10 Enter logical connection LCA liveCache console mark active tasks and press shift+F1 The appearing table lists all currently active tasks. The application pid is similar to the one shown in TA sm50. 7. Check schedule of the APO job /sapapo/om_reorg_daily and adjust it if necessary (TA sm37 and TA sm36) Sm37 Set wildcards in the fields job name and user name , adust the given time period, enter in the field abap program name the report name /sapapo/om_reorg_daily and press F8 The lists shows all jobs that execute this report. It should run once per night. You can also use TA /sapapo/om13 to check this. In the category checks there is a light, that indicates whether the job is scheduled properly or not. 8. Check the following COM routine statistics (TA lc10) 8.1. Number of calls 8.2. Average runtime 8.3. Number of accesses to heap 8.4. Number of accesses to data cache 8.5. Maximum heap usage Lc10 Enter logical connection LCA liveCache monitor The table shown includes this data in the columns db procedure (name of come routine), calls (Number of calls), runtime (average) (average runtime), oms dereferncings (number of accesses to heap), lc dereferencings (number of accesses to data cache) and oms cache size (maximum heap usage). 9. Check currently used heap memory and maximum allocated heap memory since last liveCache restart (TA se38) Se38 run report /sapapo/om_lc_mem_monitor In the heather of the table shown the value total heap marks the currently used amount of heap memory and the value R indicates the maximum amount of allocated heap since the last liveCache restart. Also you can use the button reset to delete all com routine statistics in this table and the table mentioned in the exercise before and begin a new run of data collection.

SAP AG

BC555

11-9

6ROXWLRQV
&KDSWHU  DQG 
1. Check internal data consistency (TA /sapapo/om17) /sapapo/om17 F5 enter planversion 000 and liveCache LCA F8 the lights in the first row of the table indicate inconsistencies The results of the reports are only reliable, if no other application is running at the same time. Therefore make sure, that no other user is logged on. If inconsistencies are present, you can only correct them by deleting data. (also in /sapapo/om17) To check external data consistency you can use TA /sapapo/ccr. 2. Check status of synchronous logging and turn it on if necessary (TA /sapapo/om06) /sapapo/om06 Mark the radio button for synchronous logging and also set the flag for log data archiving. Save your entries. 3. Check history of liveCache online backups from within your APO system (TA /sapapo/om11) and using dbmgui /sapapo/om11 Enter the desired start date and press F8 The table lists all checkpoints and liveCache online backups. Note: Only checkpoints and backups execute by a job are listed. Action taken by starting the report /sapapo/om_checkpoint_write or in TA /sapapo/om18 are not listed.

SAP AG

BC555

11-10

4. Define a backup medium using dbmgui Start dbmgui doubleklick on the icon for the desired liveCache in the upper part of the screen doubleklick on configuration and then backup media press the button medium enter name (e.g. LCBACKUP) and location (e.g. d:\temp\backup.sav) of the new medium choose device type file and backup type complete klick on extended and set the flag for overwrite save your entries The backup to this medium will be stored locally on your hard disc. Make sure you save the file later on some external device like a tape. Also make sure there is enough room for your backup in the given file system. You can also connect an external backup tool like omnibackup or adsm server over backint for sapdb and backint for oracle to save your backup. 5. Execute a liveCache online backup using dbmgui Start dbmgui doubleklick on the icon for the desired liveCache in the upper part of the screen press on backup complete mark the backup medium of your choice next step mark the recovery radio button start backup Check the return code of your backup in the backup history. 6. Schedule a daily liveCache online backup at midnight (TA se38 and sm36) Define a variant for report /sapapo/om_checkpoint_write:

/sapapo/om18 YES mark liveCache backup and delete archive log area enter the name of your backup medium enter the name of the variant save the variant Schedule the liveCache online backup job

Sm36 enter job name , job class and target server start condition date and time enter schedule start and time period value daily save save step abap program enter name /sapapo/om_checkpoint_write and the variant you defined before save save Now your job is released and will run daily.

SAP AG

BC555

11-11

7. Write a liveCache checkpoint (TA /sapapo/om18) /sapapo/om18 do not define a variant do write a checkpoint Check checkpoint log afterwards. (log is shown automatically) This checkpoint will not be listed in TA /sapapo/om11. 8. Schedule an automatic liveCache checkpoint every two hours (TA sm36) Sm36 enter job name , job class and target server start condition date and time enter schedule start and time period value hourly save save step abap program enter name /sapapo/om_checkpoint_write but do not enter a variant save save Now you scheduled a checkpoint every hour. 9. Crash your liveCache and restore it afterwards (TA lc10) Write a liveCache backup. Crash and recover your liveCache in two different ways. Crash: Stop the liveCache in TA lc10, delete one of the datadevspace files and restart the liveCache. It won t be able to start but will stop in modus cold. Recovery:

Start dbmgui doubleklick on the icon for the desired liveCache in the upper part of the screen recovery database choose last backup start recovery restart your liveCache in TA lc10 Crash: In TA sm49 execute the command dbmcli -d <LC SID> -n <LC HOST> -u control,control db_stop Recovery:

Lc10 restart liveCache include archive log areas in recovery check in sm50 when recovery job has finished (This works only if synchronous logging a archiving of log areas is turned on.)

SAP AG

BC555

11-12

&KHFN \RXU WKHRUHWLFDO OLYH&DFKH NQRZOHGJH 4XHVWLRQV


2. How can you tell if a particular OLYH&DFKH is active and ready to use? 1. Via which tool(s) can you administer and monitor a OLYH&DFKH?

5. Does a physical OLYH&DFKH have to run on the same server as the APO DBMS?

4. Can a physical OLYH&DFKH be identical to the DBMS used by APO, when the DBMS is SAP DB?

3. Can a physical OLYH&DFKH be identical to the DBMS used by APO?

6. In which cache is information stored about the physical location of logical data pages on disk? 7. Where are the contents of the Converter cache stored during a checkpoint? 8. Where are the contents of the Data cache stored during a checkpoint? 9. What block-size is used to store information in all devspaces? 10. What data cache hit rate do we want to have ?

SAP AG

BC555

11-13

$QVZHUV
1. Dbmcli commands, TA lc10, dbmgui 2. Select any pushbutton except OLYH&DFKH monitor. The traffic light attached to field OLYH&DFKH status should be GREEN.

5. No. In fact, for mid-range to large APO systems, SAP recommends that the OLYH&DFKH runs on its own server. 6. Converter cache 7. System devspace 8. Data devspace 9. 8KB 10. At least 99%.

4. No. It must run in its own object oriented DBMS. OLYH&DFKH installation is different to a standard DBMS installation.

3. No. It must run in its own object oriented DBMS. This must be OLYH&DFKH.

SAP AG

BC555

11-14

S-ar putea să vă placă și