Top Banner
SPC150: Managing liveCache
107
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Livecache Monitoring

SPC150: Managing liveCache

Page 2: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 2

Contributing Speakers

Melanie HandreckDevelopment Support, SAP AG

Ashwath KakhandikiDevelopment Support, SAP Labs, LLC

Jörg HoffmeisterDevelopment Manager, SAP AG

Page 3: Livecache Monitoring

What has to be monitored?liveCache OneDBCentral Monitoring – Transaction DB59liveCache Monitoring – Transaction LC10Alert Monitor – Transaction RZ20High Availability

Page 4: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 4

Learning Objectives

As a result of this workshop, you will be able to:

Integrate your liveCache and MaxDB instances into your monitoring landscape in transaction DB59.

Use transaction LC10 to administer and monitor your liveCache instances.

Create a system copy (standby instance) of your liveCache instance.

Use the liveCache performance analysis tools to determine performance bottlenecks.

Activate the Alert Monitor for your liveCache instances.

Schedule backups and other administrative tasks using the DBA Planning Calendar.

DISCLAIMERThis presentation reflects current planning. Contents may be changedwithout prior notice, and are in no way binding upon SAP.

Page 5: Livecache Monitoring

What has to be monitored?liveCache OneDBCentral Monitoring – Transaction DB59liveCache Monitoring – Transaction LC10Alert Monitor – Transaction RZ20High Availability

Page 6: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 6

Which Instances Can be Monitored?

OLTP System

KW System

APO System

ApplicationServer

OLTPDatabase

APODatabase

ApplicationServer

liveCacheliveCache

ApplicationServer

KPRODatabase

CacheServer

ContentServer

Page 7: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 7

Central Monitoring

OLTP System

Applicationlayer

MaxDBOLTP

Database

KW System

MaxDBKPRO

Database

CacheServer

ContentServer

ApplicationServer

Database

APO System

MaxDBAPO

Database liveCacheliveCache

Page 8: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 8

MaxDB/liveCacheKernel

Anatomy of MaxDB & liveCache Instances

Application

LogVolumeLog

Volume

MaxDB/liveCache Instance

DataVolumeData

VolumeDataVolumeData

Volume

One Pool of DB objects

Page 9: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 9

MaxDB & liveCache Monitoring

Command Analyzer

SQL basis(B* trees)

SQL data & ConverterData Volume(s)

LogVolume(s)

Logqueue

SQL Interpreter & Optimizer

I/O buffer cache

I/O

Task activities

Caches

Critical Regions

Expensive SQL

statements

Log Files

CPU consumption Memory consumption

Page 10: Livecache Monitoring

What has to be monitored?liveCache OneDBCentral Monitoring – Transaction DB59liveCache Monitoring – Transaction LC10Alert Monitor – Transaction RZ20High Availability

Page 11: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 11

DatabaseServer

ApplicationServer

GUI

SAP liveCache

GUI GUI GUI

ApplicationServer

Available DB-Systems:- MaxDB- Oracle- IBM DB/2- … (same as WebAS)

Architecture of an SCM System

Page 12: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 12

Kernel

SQL-Interpreter Object ManagmentSystem (OMS)

liveCache Applications(LCApps)

Business logic, codedin C++ (scheduler, ...)

liveCache

ABAP code of SAP solutions (APO / WFM / ...)

Low level ABAP-functions:Object Manager (OM)

Basic DB-features(recovery, transactionhandling, ...)

MaxDB

liveCache = Enhanced MaxDB

Page 13: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 13

liveCache Data Storage

SQL data (B* tree) Object data (page chains)

Data volume pages

...

SQL data is stored on SQL pages and is sorted using the B*tree algorithms. In contrast object data is stored in OMS pages, which are linked to build page chains. Objects are accessed via an OID. In the liveCache, all data is stored in data volume pages regardless of the data type (SQL data or object data).

Page 14: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 14

Class Container

Chain 1 Chain 2 Chain 3 Chain 4first free

next free

Class container

The liveCache data is stored in so called class containers. These containers consist of chains of double linked pages. All pages which contain free space to accommodate further objects are linked additionally in a free chain.The class containers can be partitioned into more than one chain to avoid bottlenecks during massive parallel insert of objects.

Page 15: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 15

Memory Areas in The liveCache

Data cache OMS heap

Parameter: CACHE_SIZE Parameter: OMS_HEAP_LIMIT

SQL pages

History pages

OMS data pages

Local LCA memory

Copied OMS objects

Page 16: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 16

SCM: Two Database Server System

Advanced Planner &Optimizer

SCMApplication

Server

SCM Database Server

liveCacheData

liveCache (Database) Server

Database buffer

SCM Core Data

liveCachelogic

Separate Hardware or

Single box with 2 databases

Multiple DB platforms

Multiple points of consistency

Multiple DB Administration

SCM DB Session liveCache Session

Database buffer

SQL logic

SQL logic

Page 17: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 17

liveCacheData

Database buffer

liveCachelogic

SQL logic

liveCache OneDB

Advanced Planner &Optimizer

SCMApplication

Server

SCM Database optionally

can be integratedinto the

liveCache Server

liveCache Data

liveCache OneDB

Database buffer

SCM Core Data

liveCachelogic

Separate Repositories (Schemas)

Less Hardware

Single DB platform: MaxDB

Single point of consistency

Single point of DB administration

SCM DB Session liveCache Session

SQL logic

Page 18: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 18

Major Advantages of liveCache OneDB

All Software from one vendorOnly the Operation System is not delivered by SAP

Optimized Utilization of hardware resourcesLess processesIncorporated cache usage for SQL and OMS data

Administration of 1 instanceBackup & RecoveryDisk Space Utilization

Lower TCO

Page 19: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 19

Major Advantages of liveCache OneDB II

Single Point of ConsistencyRecoveryPoint In Time RecoveryMaxDB/liveCache Backups are always Consistent on Transaction Level

System copyCopy of only 1 InstanceMaxDB Advantages

Consistency of backupsDisk structure of target system can differ from the source systemTarget system can be smaller than the source system

Page 20: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 20

Demo

Demo

Page 21: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 21

Most parts of this workshop will be shown live in a liveCacheOneDB system (SCM 5.0).The following slides are to be used as a reference book - they contain screenshots of the used transactions and some additional information.You will get sufficient time after the presentation to do the exercises. During these exercises you have the chance to use the shown transactions and to become familiar with them.

Page 22: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 22

Transaction Availability

NA – new: DBACOCKPIT

GAGAGAGA7.00

NABasis SP 33GABasis SP 33GA4.6D

GAGAGAGAGA6.40

GA

GA

GADB50

Basis SP 18Basis SP 21GABasis SP 216.20

Basis SP 28Basis SP 32GABasis SP 326.10

NABasis SP 44GABasis SP 444.6CDB13CRZ20LC10DB59 / DB50N

GA: general available; NA: not available

DB50 and DB50N work exclusively with SAP DB/MaxDB instances (as of version 7.3).DB59 and DB13C are database independent.LC10 works exclusively with liveCache instances. To start/stop/initialize the liveCache this transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored in any SAP system using the mentioned Basis SPs.RZ20 is database independent and available as of SAP release 4.6C. The integration of any SAP DB/MaxDB and liveCache instances is possible as of the mentioned SPs.

Page 23: Livecache Monitoring

What has to be monitored?liveCache OneDBCentral Monitoring – Transaction DB59liveCache Monitoring – Transaction LC10Alert Monitor – Transaction RZ20High Availability

Page 24: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 24

Central Monitoring – Transaction DB59

Initially transaction DB59 contains only an entry for the system's own MaxDB instance and - in case of an APO/SCM system - the two liveCache connection identifiers LCA and LDA. As of SCM 5.0 the connection identifier LEA is used as well.

To be able to monitor other MaxDB instances within this system, you have to integrate the corresponding database instance - i.e. you have to enter the user information to connect to this database instance.

Page 25: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 25

Database Integration

To be able to connect to the database instance you have to enter:

the name of the database instancethe hostname or IP address of the server on which the database instance runsthe DBM operator and his password.This is the user used to connect to the Database Manager GUI or CLI. Default: control with password control.the Standard Database User, which for SAP applications is SAPR3 or SAP<SID> as the default.

Make sure that the checkbox for the central authorization is marked, that the connect information is stored in tables DBCON and DBCONUSR of the monitoring system.

Page 26: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 26

Connection Test

To check, if the entered connect information works, mark the entry of the concerning database instance and choose Connection Test.

You'll get a list of all application servers. Select one and choose Connection Test to check one after another if the connection works from all application servers.

Page 27: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 27

Connection Test

The connection test first checks the DBMCLI connection, then the command and session mode of DBMRFC and afterwards the SQL connection.If everything is OK, a green check mark appears for this application server, otherwise a red cross is shown. Then you have to check the log file.

Page 28: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 28

One possible problem is that the X-Server is not running on the database server. The X-Server is the TCP/IP listener of MaxDB which handles remote connections to the database instance.

X-Server not Running

Page 29: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 29

Wrong DBM Operator Password

The connection test also fails if the DBM Operator user and/or password has not been entered correctly.

Page 30: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 30

Wrong Standard Database User Password

If the DBM Operator and his password have been entered correctly, the DBMCLI and DBMRFC connection work.

Then the native SQL test may fail because the standard database user has not been entered correctly.

In this case you can find more information in the corresponding dev_w# file.

Error -4008 (Unknown user name/ password combination) indicates that the user data for the standard database user is not correct.

Page 31: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 31

Remote Monitoring

MaxDBMonitoring

DB50

liveCacheMonitoring

LC10

Transaction DB59: central entry point to monitor MaxDB & liveCache instances

Monitoring of remote instances is possible. Even

stand-alone databases like

small test databases can be monitored in the

SAP system.

Page 32: Livecache Monitoring

What has to be monitored?liveCache OneDBCentral Monitoring – Transaction DB59liveCache Monitoring – Transaction LC10Alert Monitor – Transaction RZ20High Availability

Page 33: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 33

LC10 <-> DB50

LC10 DB50While transaction DB50 is used to monitor MaxDB instances, transaction LC10 is used to monitor and administer liveCache instances.

Transactions DB50 and LC10 are very similar. A lot of tasks explained in this chapter are also available in transaction DB50 – except some liveCache specific tasks.

Page 34: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 34

Starting Transaction LC10

After you entered the connect information for your database instance you can start the liveCache assistant. Select the newly created entry in the list of databases and choose Assistant.

Page 35: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 35

Transaction LC10 – Properties

This is the Properties section of transaction LC10. In the properties section you can find some general information like the database name, the database server, the database version and the operational state of the database instance.

Page 36: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 36

Operational States

There are three possible operational states of liveCache and MaxDB:

OFFLINE:liveCache kernel processes and caches do not exist. No user can use the database.

ADMIN:The liveCache kernel is active (processes are started, caches are initialized). Users cannot connect to the database. Only the DBM operator can connect and perform administrative tasks.

ONLINE:The liveCache kernel is active and ready to work. Users can connect to the database.

Page 37: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 37

liveCache And MaxDB Directory Structure

Database Software and Configuration Data

bin pgm env etc lib miscincl sap

binpgm

sdb

/opt

programs 7500

/var/opt

config

sdb

<db_name>

wrk

data

Temporarydata

The IndepPrograms directory contains programs and libraries shared by the liveCache/MaxDB instances and applications. These programs are downwards compatible. The IndepData directory contains the configuration data and rundirectories of liveCache/MaxDB instances.The location of these directories is specified during the first installation of liveCache/MaxDB software. They exist only once on the server.The InstallationPath contains the server software that depends on the database version (e.g. kernel). Several dependent directories can exist alongside each other.The rundirectory contains the status files of a liveCache/MaxDB instance.

Page 38: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 38

liveCache Status And Log files

Most important log files:KNLDIAG - contains status and error messages of the database kernelKNLDIAGERR - contains all error messages since database installationUTLPRT - contains administrative commands sent to the database kernel (e.g. SHUTDOWN, BACKUP, VERIFY) including their return code(s)BACKHIST - contains all backup and recovery actions DBMPRT - contains all (administrative) commands sent to the dbmserverLCINIT – contains information about the latest liveCache start/initialization

Page 39: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 39

Database Messages

File knldiag has a fixed size.

It is initialized when the database is started.

The last version of this file is then copied to knldiag.old.

Knldiag consists of two parts: the first part contains information about the database start and is not overwritten.

In the second part information is logged during the runtime of the database. This part is overwritten cyclically. The current write position is marked with '--- current write position --- ' In case of problems with the database you should always check file knldiag for error messages.

Page 40: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 40

Database Error Messages

File knldiag.err contains message '--- Starting…' whenever the database has been started from state OFFLINE to state ADMIN. All other messages are error messages - e.g. information about a crash, including a back trace which can be used by the developers to find the cause of the crash.

Page 41: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 41

Database Terminations

If the database is not stopped correctly the most important log files are saved in the DIAGHISTORY folder during the next start of the database instance.

This ensures that they are not overwritten and can still be analyzed to determine the cause of the crash.

These files can be seen in the Terminations section.

As a default only two sets of log files are held in the diaghistory.

Page 42: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 42

Database Manager Messages

File dbm.prt contains statements sent to the dbmserver. Whenever an administrative command has been executed using Database Manager GUI or CLI this is logged in this file, including the error code (if an error occurred). You can see, for example, when a start or stop command has been executed.

Page 43: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 43

Remote SQL Server Messages

File xserver.prt has a fixed size. The first part of this file contains startup information of the X-Server, including an environment dump. There you can see the relevant environment variable settings of the user who started the X-Server. This part is not overwritten. The second part contains runtime information like e.g. connect errors.

Page 44: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 44

Operation Log File

Each time the liveCache is started, stopped or initialized, a log file (LCINIT.LOG) is written.

The log file of the previous starts, stops or initializations is displayed in Logs -> Operating -> History.

The tab Control File displays the script LCINIT.BAT which is used to start, stop and initialize the liveCache.

Whenever the liveCache is started, stopped or initialized successfully you can find a message liveCache <connection name> successfully started/stopped/initialized at the end of the log file.

Page 45: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 45

DBA History: Backup/Restore (DBMServer)

The DBA History contains information about administrative tasks.You can see, for example, information about executed backup and recovery actions or consistency checks. You can display a detailed log file for each of these actions.

Page 46: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 46

DBA History: Backup/Restore Log File

The log file of a backup contains the backup command and its return code and detailed information like:

the creation date of the backup

the number of pages transferred

the backup label

the location of the backup file

Page 47: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 47

DBA History: Backup/Restore (Kernel)

This is the backup history from the point of view of the database kernel. Each log backup action might create several log backup files - each of the size of one log segment.The HISTLOST entries are created whenever the log volumes are initialized - e.g. during the installation. Then you have to create a complete backup again to start a new backup history.

Page 48: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 48

Kernel Administration Log File

File dbm.utl contains information about all administrative tasks sent to the database kernel.

This log file is written by the database kernel itself.

It contains information about

backups,

consistency checks and

starts/stops of the database instance

including the return codes of these commands.

Page 49: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 49

Activity Overview

A reliable analysis of the liveCache for a productive system is only possible if a sufficient number of LCA routines have already been executed.

If less than about 50 000 LCA routines have been executed, the monitored data may not reflect a representative workload of a production SCM system.

Page 50: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 50

Task Manager

The Task Manager shows the status of all currently active database tasks. In a running system, possible states are:Running – task is in kernel code of MaxDB and uses CPURunnable, Vsleep – task is in kernel code of MaxDB and waiting for a free slot in its thread (UKT)LogIOWait – task waits for completion of its log request by archive log writerIOWait (R) or IOWait (W) – task waits for data I/O completion (read or write)Vbegexcl or Vsuspend – task waits to acquire an internal lock in MaxDBVwait – task waits for an SQL lock held by another application process to be released (locks are released after a COMMIT or ROLLBACK)DComObjectCalled – task is executing code of the LCA procedure.

Page 51: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 51

Cache Overview

In a well-configured system

Data cache usage should be well below 100%Data cache hit rate should be above 99%

If the portion of the data cache used reaches 100%, and the hit rate is below 99%, an extension

of the data cache may be required. To monitor failed accesses to the data cache, choose Refresh. Each failed access results in a physical disk I/O and should be avoided.

Page 52: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 52

Heap Usage

Currently Used is the currently used heap. When additional memory is needed, liveCache uses the already allocated heap until Size is reached. It is important to monitor the maximum heap usage. When Size reaches OMS_HEAP_LIMIT (see note 337445), errors in LCA routines may occur due to insufficient memory. This should be avoided.To handle error conditions due to insufficient heap, an emergency heap will be used. The emergency heap is allocated when the liveCache is started.Detailed values are displayed for all configured sub heaps (parameter OMS_HEAP_COUNT). If this parameter is not set to 1, accumulate the heap values.

Size is the memory that was allocated for heap from the operating system. It reflects the maximum heap size that was needed by the LCA routines since start of liveCache.

Page 53: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 53

Memory Areas: Data Area

The data area can consist of several data volumes. The Total Size shows the sum of the sizes of all data volumes. You can see the filling level of the data area as well as the proportion of temporary data. The data is automatically distributed to all volumes equally. You don't have to define table spaces.Empty data pages are reused by the database automatically. No reorganization is necessary.

Page 54: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 54

Memory Areas: Log Area

For test or demo systems it is possible to activate an overwrite mode for the log volumes -then you don't have to take log backups before the information on the log volume can be overwritten. It is also possible to switch off the writing of log information. Both of these possibilities are not recommended for productive systems as you won't be able to restore the database to the latest state.

The log area can consist of several log volumes -however they are used as one single log area.

The Log Segment Sizedetermines how large the log backups are created by the autosave log.

Whenever Log Segment Size log pages are written, they are copied to the log backup file and the pages in the log volume can be overwritten.

Page 55: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 55

Schemas

liveCache Schemas correspond to the SCM Planning Versions. The size information available in /SAPAPO/OM16 (in KB) is the same as the size information here (in Pages, 1 Page = 8 KB). The name of the schema contains the client. The ID is an internal identifier. Date and time specify the creation timestamp of the Schema.

Page 56: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 56

Class Container

Container size: number of data pages which are occupied by the container.

Free container pages: number of pages which contain free object frames.

Empty container pages: number of pages which contain no occupied object frame.

Key pages: number of pages which are occupied by the index.

Container use: % of usable space on the data pages which is used by occupied object frames.

Schema: name of the schema a class container is assigned to.

Class GUID: external unique identifier of the class.

Class ID: unique internal number for each class container.

Class name: name of the class whose instances are stored in the container.

Object size: size of the stored objects in bytes.

Container Number:used by the application to identify a class container.

Page 57: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 57

OMS Versions

The number of OMS data pages in the Data Cache should be much higher than the number of OMS history pages (a ratio of 4:1 is desirable). If OMS history has nearly the same size as OMS data, use OMS Versions to find out if named consistent views (versions) are open for a long time. Maximum age should be 8 hours. Memory usage: Current heap allocation (Byte)Age: Age in hours since creationTime: Time of creationRolled out: YES if version was swapped from local cache (heap) to global data cache due to memory shortage otherwise NO Rolled out pages: number of pages in data cache used for swapped version data

Page 58: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 58

Example: liveCache Versions And History Growth

Long running OMS versions mayprevent deletion of history pages. Thismay lead to an infavorable cacheusage.

Remember to schedule reports /SAPAPO/OM_REORG_DAILY daily (note 139558) and/SAPAPO/DELETE_OLD_SIMSESS every 30 minutes (note 591841). Furthermore check the liveCache parameters MAX_RETENTION_TIME and MIN_RETENTION_TIME.

Page 59: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 59

OMS Versions: Identify The Owner

Transaction LC10

Transaction SM12

To identify the user who created an OMS version, use transaction SM12 on the SCM server to display locks on table /SAPAPO/OMSIMSDL.

Page 60: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 60

OMS Monitor

The OMS Monitor is mainly used by the support group to get information in case of performance problems. E.g. the runtime of the different LCA routines can be seen here.

Page 61: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 61

Database Procedures

Each time the liveCache is started, or initialized the LCA routines are registered.

This is necessary that the SCM system can work properly.

If the registration of the LCA routines has been successful, a list of all LCA routines is available in the Database Proceduressection.

Page 62: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 62

Starting The Database Analyzer

The database analyzer is a rule-based expert system for performance analysis. It collects statistical and monitoring data as well as system messages. It detects and reports e.g.

Low cache hit rates High I/O load Low hit rates of DML commands (SELECT, UPDATE, DELETE)

For a short time analysis the interval should be set to 60 - 120 seconds. For long time monitoring it should be set to 900 seconds.

Page 63: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 63

Database Analyzer Status

Database Analyzer uses a set of sophisticated rules to classify the current state of MaxDB/liveCache by analyzing several MaxDB/liveCache parameters.These rules and the source of collected data are delivered in file dbanalyzer.cfg.In the status window you can see which configuration file is used and where the log files are stored.

The log files of each day are stored in a separate directory where you can analyze them later on.

Page 64: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 64

Database Analyzer Output

The Database Analyzer rates the information and bottlenecks:

I: General information, such as the number of executed commands

W1 to W3: Bottleneck warnings with low, medium, and high priority

An example for a warning might beW3 Selects and fetches selectivity 0,02% -> rows read 66928, 12 rows qualified

That means that the access strategies to data in SQL tables is bad because a high number of table rows have to be read internally to find a small number of rows that meet the qualification in the WHERE clause.

Page 65: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 65

Parameter Settings

You can check the current parameter settings and the change history of each parameter. The most important parameters are listed in the General Parameterssection. All other parameters should only be changed if requested by the liveCache support. Parameters can be changed using the Database Manager GUI or transaction LC10. Whenever a parameter has been changed, the liveCache has to be restarted using transaction LC10 that the new parameter settings take effect.

Page 66: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 66

Changing Parameters

liveCache parameters can be changed during online operation - but the new values take only effect after a re-start of liveCache!

Beside the parameter name, old and new value and a short description of the parameter are shown.

The parameters in the Extended Parametersand Support Para-meters sections should only be changed when requested by the liveCache support group.

Page 67: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 67

Important Configuration Parameters

CACHE_SIZESize of global cache in pages (8KB)

OMS_HEAP_LIMITMaximum size of OMS cache in KB - should not be set to 0!

MAXCPUMaximum number of CPUs used by liveCache

MAXUSERTASKSMaximum number of connections

MAXDATAVOLUMESMaximum number of volumes used by the current liveCache

For the newest liveCache parameter recommendations, check SAP notes 719652 and 833216.

Page 68: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 68

Volume Configuration I

The Volumes section shows all configured log and data volumes including their locations and sizes.

You can also see, how many data volumes could be added while the database is ONLINE.

This is limited by the database parameter MAXDATAVOLUMES.

New volumes can be added using the Database Manager GUI and in the Administration Section of transaction LC10.

Page 69: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 69

Volume Configuration II

Data volumes can be added on the fly to prevent the liveCache from a standstill due to a database full situation.After pressing the Add Volume button in the upper left corner a new dialog window appears where you have to specify the size, the location and the file type of the new volume.The new volume is immediately available after you have saved and confirmed the input values.Log volumes can be added the same way (tab Log area).

Page 70: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 70

Backup Media

The Backup Media section provides an overview of all defined backup media. It is also possible to define new backup media. liveCache supports parallel backups to several files/tapes/ pipes. Therefore a media group has to be defined which consists of several single backup media. The following external backup tools can be used to create backups:

Tivoli Storage ManagerNetworkerTools which support the interface ‚BackInt for Oracle’

The backup media can also be defined with Database Manager GUI. Backups are created using this tool as well.

Page 71: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 71

Operating

For a liveCache OneDBsystem it is not allowed to start or stop the liveCache from transaction LC10 as the liveCache is always started/stopped when the SCM system is started/stopped.In other SCM systems youcan start and stop theliveCache with transactionLC10. Start liveCachestarts the liveCache into online mode.

After the restart all data committed before the last shutdown (or crash) are available again. Stop liveCache shuts the liveCache down into the offline mode. To prevent the liveCache from accidentally being initialized (which would delete all data), the initialization is only available in the Menu and only users with special permissions are allowed to do this.Only SAP users with role SAP_BC_LVC_SUPERUSER can initialize the liveCache. Users with role SAP_BC_LVC_ADMINISTRATOR can start, stop and configure the liveCache (note 452745).

Page 72: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 72

DBA Planning Calendar

Using the DBA Planning Calendar (DBACOCKPIT) you can schedule important administrative tasks like backups or consistency checks.

Page 73: Livecache Monitoring

What has to be monitored?liveCache OneDBCentral Monitoring – Transaction DB59liveCache Monitoring – Transaction LC10Alert Monitor – Transaction RZ20High Availability

Page 74: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 74

Alert Monitor – Creating The Alert Subtree

When you enter the Alert Monitor for your liveCache instance the first time, the monitoring subtree for this liveCache instance will be created automatically.

Page 75: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 75

Alert Monitor

The Alert Monitor informs you about critical situations of your liveCache instance. Green, yellow and red alerts determine if a situation is critical – e.g.if the data cache is filled to 100% a red alert will be created.

Page 76: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 76

Alert: No Optimizer Statistics

Depending on the Alert you have to take different measures to solve the problem. If the optimizer statistics are obsolete, you can update them using the DBA planning calendar. In transaction LC10 choose Tools -> DBA Planning Calendar.

Page 77: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 77

Solving The Problem

You can schedule different actions or executethem immediately. In this case Mark tablesrequiring statistics update is executedimmediatly – no further parameters are required.

Page 78: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 78

Solving The Problem

Afterwards action Update statistics for marked tables is executed. Now the optimizer statistics are up-to-date.

Page 79: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 79

Solving The Problem

Perform a double-click on theexecuted action to see the job and program log of this task.

Page 80: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 80

Alert: No Optimizer Statistics

After the corresponding data collector has run again, the Optimizer Statistics node will be green. You can complete the alert now by pushing the Open Alerts button.

Page 81: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 81

Alert: No Optimizer Statistics

Mark the alerts to be completed and press the Complete Alerts button in the Open Alerts view. On the next screen press Complete Alerts again.

Page 82: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 82

Alert: No Optimizer Statistics

Now the Optimizer Statistics alert is reset.

Page 83: Livecache Monitoring

What has to be monitored?liveCache OneDBCentral Monitoring – Transaction DB59liveCache Monitoring – Transaction LC10Alert Monitor – Transaction RZ20High Availability

Page 84: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 84

Standby Database (w/ Log Shipping)

LogData

Master

Log DataLog

Backup

StagingDirectory

Standby

Initial data backup

Log Backup

Log Restore

Page 85: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 85

Standby Database: Slave Steps

Standby ModeInitialize once with complete backup from MasterRedo logs as they appear

Start Slave to online mode in case of emergencyIf possible, back up last piece of log from masterRedo all 'open' log backups (there should be none)Redo final log pieceRestart slave to be the new master

Page 86: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 86

Standby Database: Availability

A standby database can be created forMaxDB instancesliveCache OneDB instances

For other liveCache instances a standby database is notsupported as the consistency between the APO/SCM database and the standby database cannot be guaranteed.

Page 87: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 87

Standby Database: Installing Database Software I

MaxDB Software can be installed using the Installation Manager (SDBSETUP). It is possible to install the complete software package or to install just the client software, which is needed on SAP Application Servers. The Custom installation allows to select single software components to be installed.

Page 88: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 88

Standby Database: Installing Database Software II

You can choose if you would like toinstall new software orupdate existing software

It is possible to install a new orupgrade an existing databaseinstance.

You have to choose if you would like to upgrade an existing software installation of if you would like to install the software into a new directory.

Page 89: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 89

Standby Database: Installing Database Software III

If you would like to install the software into a new directory, you have to enter this directory.

Then you'll get an overview of the selected/entered information and you can start the installation.

Page 90: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 90

Standby Database: Installing Database Instance I

To install the database instance for the shadow database, use DBMGUI.To open the Installation Wizard, choose Create...In the Installation Wizard, you can select a configuration template so that you have to editonly a few parameter values.Next you have to specify a database name.

Page 91: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 91

Standby Database: Installing Database Instance II

After you have selected the software version for your database instance, you have to specify the Database Manager Operator. This is the user used to connect with the DBMGUI to the database instance.Then you have to decide how to initialize the database parameters.

Page 92: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 92

Standby Database: Installing Database Instance III

If you would like to get the parameter values from a backup, you have to specify the backup medium for that.

Afterwards you get a list with the parameter values that you can adapt if necessary.

Page 93: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 93

Standby Database: Installing Database Instance IV

After you checked the configuration of the data and log volumes, you can create further backup media.

Next you have to specify if you would like to create an empty database instance or if you would like to restore the data from an existing backup.

Page 94: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 94

Standby Database: Installing Database Instance V

Before you start the installation double-check the entered information.

When the database instance has been created succesfully it is not yet startable. You have to continue with the restore of the backup in the Recovery Wizard (just press Next in the Installation Wizard...).

Page 95: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 95

Standby Database: Restoring the Initial Backup

Select/create a backup medium for the Recovery. Make sure that the backup of your master instance is available at the specified location.

After you restored the complete data backup, choose Back in the Recovery Wizard to be able to restore further backups.

Page 96: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 96

Standby Database: Restoring an Incremental Backup

Depending on the available backups you can now continue with the restore of an incremental backup or with the restore of log backups.

You have to define a new backup medium for the incremental backup.

After you restored the incremental backup, choose Back to be able to restore further log backups.

Page 97: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 97

Standby Database: Restoring Log Backups I

You have to define a newbackup medium for the log backups.Then you have to specifywith wich log backup therestore should begin. It is always possible to enterthe number of the first available log backup file –the database will skip all log backups which arenot needed for the restore. However, this check increases the restore time. So specify the actuallyneeded log backup number if you know it.

Page 98: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 98

Standby Database: Restoring Log Backups II

All availablelog backupfiles arerestored oneafter anotherautomatically. When theDatabase Manager triesto restore a log backup whichis not

available, an error is reported. Then you have to decideif you have restored all needed data,if you would like to continue the restore later orif you can make the needed log backup fileavailable and continue then with the restore.

Attention: Back can be used to changethe media definition or to start thedatabase. Continue tries to restore thebackup file again. Cancel aborts therestore and stops the database instance.

Page 99: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 99

Standby Database: Restoring Log Backups III

When you would like to continue with the restore, you have to start the database instance into ADMIN mode. Attention: Do not start the database instance in ONLINE mode if you would like to continue therestore. When the database instance was ONLINE, you'll have to start with the initialization and restoreof a complete backup again!

To continue the restore you have to specify the last log backup file which was already restoredsuccesfully.

Page 100: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 100

Standby Database: Restoring Log Backups IV

When all log backups have been restored successfully and you would like to start the standby instance, you have to choose Back. To start the database select Ignore and press Continue.

Page 101: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 101

Standby Database: ONLINE

The standby instance is in ONLINE mode now. Please remember to load thesystem tables (Configuration -> Upgrade System Tables). Then the databasecan be used as the productive instance and it can be administered and monitored using DBMGUI or transaction LC10.

Page 102: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 102

Hot Standby – Standby Within Seconds

Storage System

ArchiveLogData

Application

Data

DataAfterImages

Master Standby

continousRESTARTcontinousRESTART

IP SWITCH

RECONNECT

Cluster

Page 103: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 103

Summary

Transactions DB59, LC10 and RZ20 help you to monitor and administer all liveCache database instances in your system landscape.

Transaction DB59 is the central entry point where liveCache and MaxDB instances can be integrated into the monitoring system. Using this transaction you can easily switch to the liveCache/Database Assistant for each of your database instances.Transaction LC10 is the liveCache Assistant which allows to monitor and to administer your liveCache instances.The DBA Planning Calendar enables you to schedule important database tasks like backups or consistency checks. In transaction RZ20 a special branch for the liveCache instances can be created, so that critical situations are reported using the SAP Alert concept.

Database Manager (GUI) provides all necessary functions to administer existing liveCache instances and to create new instances – e.g. standby databases.

Page 104: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 104

Public Web:www.sap.comSAP Developer Network: www.sdn.sap.com Technology MaxDB & liveCacheSAP Customer Services Network: www.sap.com/services/NetWeaver Developer‘s Guide: www.sdn.sap.com/sdn/developersguide.sdn

Related Workshops/Lectures at SAP TechEd 2005SPC100, MaxDB – The Professional Database, 1h lectureSPC151, Managing MaxDB, 2h workshop

Related SAP Education Training Opportunitieshttp://www.sap.com/education/Database Administration MaxDB (ADM515)MaxDB Performance Monitoring and Optimization (UMEWE60)Workshop SAP DB Internals Version 7.5 (WB550)SAP APO LiveCache Monitoring (TEWA60)

Further Information

Page 105: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 105

Q&A

Questions?

Page 106: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 106

Please complete your session evaluation.

Be courteous — deposit your trash, and do not take the handouts for the following session.

Feedback

Thank You !

Page 107: Livecache Monitoring

SAP AG 2005, SAP TechEd ’05 / SPC150: Managing liveCache / 107

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.Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors.Microsoft, Windows, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation. IBM, DB2, DB2 Universal Database, OS/2, Parallel Sysplex, MVS/ESA, AIX, S/390, AS/400, OS/390, OS/400, iSeries, pSeries, xSeries, zSeries, z/OS, AFP, Intelligent Miner, WebSphere, Netfinity, Tivoli, and Informix are trademarks or registered trademarks of IBM Corporation in the United States and/or other countries.Oracle is a registered trademark of Oracle Corporation.UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group.Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registered trademarks of Citrix Systems, Inc.HTML, XML, XHTML and W3C 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. MaxDB is a trademark of MySQL AB, Sweden.SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary.The information in this document is proprietary to SAP. No part of this document may be reproduced, copied, or transmitted in any form or for any purpose without the express prior written permission of SAP AG.This document is a preliminary version and not subject to your license agreement or any other agreement with SAP. This document contains only intended strategies, developments, and functionalities of the SAP® product and is not intended to be binding upon SAP to any particular course of business, product strategy, and/or development. Please note that this document is subject to change and may be changed by SAP at any time without notice.SAP assumes no responsibility for errors or omissions in this document. SAP does not warrant the accuracy or completeness of the information, text, graphics, links, or other items contained within this material. This document is provided without a warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability, fitness for a particular purpose, or non-infringement.SAP shall have no liability for damages of any kind including without limitation direct, special, indirect, or consequential damages that may result from the use of these materials. This limitation shall not apply in cases of intent or gross negligence.The statutory liability for personal injury and defective products is not affected. SAP has no control over the information that you may access through the use of hot links contained in these materials and does not endorse your use of third-party Web pages nor provide any warranty whatsoever relating to third-party Web pages.

Copyright 2005 SAP AG. All Rights Reserved