106
Managing MaxDB SPC150 Version 7.6

Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

  • Upload
    others

  • View
    12

  • Download
    2

Embed Size (px)

Citation preview

Page 1: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

Managing MaxDB

SPC150

Version 7.6

Page 2: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 2

What Has to be Monitored?Standby DatabaseCentral Monitoring – Transaction DB59Database Assistant – Transaction DB50Performance Analysis Tools

Snapshot

Alert Monitor – Transaction RZ20

Content

Page 3: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 3

Learning Objectives

As a result of this workshop, you will be able to:Integrate your MaxDB instances into your monitoring landscape in transaction DB59.Use transaction DB50 to monitor your MaxDB instances.Use the MaxDB performance analysis tools to determine performance bottlenecks.Create a standby database and snapshots.Activate the Alert Monitor for your MaxDB instances.Schedule backups and other administrative tasks usingthe DBA Planning Calendar.

DISCLAIMERThis presentation reflects current planning. Contents may bechanged without prior notice, and are in no way binding uponSAP.

Page 4: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 4

What Has to be Monitored?Standby DatabaseCentral Monitoring – Transaction DB59Database Assistant – Transaction DB50Performance Analysis Tools

Snapshot

Alert Monitor – Transaction RZ20

Chapter

Page 5: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 5

Which Instances can be Monitored?

OLTPSystem

KWSystem

APOSystem

ApplicationServer

OLTPDatabase

APODatabase

ApplicationServer

liveCacheliveCache

ApplicationServer

KPRODatabase

CacheServer

ContentServer

Page 6: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 6

Central Monitoring

OLTPSystem

Applicationlayer

MaxDBOLTP

Database

KWSystem

MaxDBKPRO

Database

CacheServer

ContentServer

ApplicationServer

Database

APOSystem

MaxDBAPO

Database liveCacheliveCache

Page 7: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 7

MaxDBKernel

Anatomy of a MaxDB Instance

Application

LogVolumeLog

Volume

MaxDB Instance

DataVolumeData

VolumeDataVolumeData

Volume

One Pool of DB objects

Page 8: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 8

MaxDB Monitoring

Command Analyzer

SQL basis(B* trees)

SQL data & ConverterData Volume(s)

LogVolume(s)

Logqueue

SQL Interpreter & Optimizer

I/O buffer cache

I/O

Taskactivities

Caches

CriticalRegions

ExpensiveSQL

statements

LogFiles

CPU consumptionMemory consumption

Page 9: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 9

SAP liveCache =MaxDB++

SAP liveCache Technology

MaxDB

C++ Application Services

SAP Applications mySAP SCM APO

C++ ObjectsSQL

Page 10: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 10

Transaction Availability

NA – new:DBACOCKPIT

GAGAGAGA7.00

NABasis SP 33GABasis SP 33GA4.6D

GAGAGAGAGA6.40

GA

GA

GA

DB50

Basis SP 18Basis SP 21GABasis SP 216.20

Basis SP 28Basis SP 32GABasis SP 326.10

NABasis SP 44GABasis SP 444.6C

DB13CRZ20LC10DB59 / DB50N

GA: general available; NA: not availableDB50 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 thistransaction should only be used in the corresponding APO/SCM system - but liveCache instancescan 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 SAPDB/MaxDB and liveCache instances is possible as of the mentioned SPs.

Page 11: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 11

Target

The following slides can be used as a reference book –they contain screenshots of the used transactions and additional information.

Page 12: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 12

What Has to be Monitored?Standby DatabaseCentral Monitoring – Transaction DB59Database Assistant – Transaction DB50Performance Analysis Tools

Snapshot

Alert Monitor – Transaction RZ20

Chapter

Page 13: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 13

Standby Database (w/ Log Shipping)

LogData

Master

Log DataLog

Backup

StagingDirectory

Standby

Initial data backup

LogBackup

LogRestore

Page 14: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 14

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 15: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 15

Hot Standby – Standby Within Seconds

Storage System

ArchiveLogData

Application

Data

DataAfterImages

Master Standby

continousRESTARTcontinousRESTART

IP SWITCH

RECONNECT

Cluster

Page 16: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 16

Standby Database: Installing DatabaseSoftware I

MaxDB Software can be installedusing the Installation Manager(SDBSETUP). It is possible to installthe complete software package or toinstall just the client software, whichis needed on SAP ApplicationServers. The Custom installationallows to select single softwarecomponents to be installed.

Page 17: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 17

Standby Database: Installing DatabaseSoftware 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 liketo upgrade an existing softwareinstallation of if you would like toinstall the software into a newdirectory.

Page 18: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 18

Standby Database: Installing DatabaseSoftware III

If you would like to install thesoftware into a new directory, youhave to enter this directory.

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

Page 19: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 19

Standby Database: Installing DatabaseInstance I

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

Page 20: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 20

Standby Database: Installing DatabaseInstance II

After you have selectedthe software version foryour database instance,you have to specify theDatabase ManagerOperator. This is the user used to connect with theDBMGUI to the database instance.Then you have to decide how to initialize thedatabase parameters.

Page 21: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 21

Standby Database: Installing DatabaseInstance III

If you would like to get the parameter values froma backup, you have to specify the backup mediumfor that.

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

Page 22: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 22

Standby Database: Installing DatabaseInstance IV

After you checked theconfiguration of the dataand log volumes, you cancreate further backupmedia.

Next you have to specify if you would like tocreate an empty database instance or if youwould like to restore the data from an existingbackup.

Page 23: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 23

Standby Database: Installing DatabaseInstance V

Before you start theinstallation double-checkthe entered information.

When the databaseinstance has been createdsuccesfully it is not yet startable. You have tocontinue with the restore of the backup in theRecovery Wizard (just press Next in theInstallation Wizard...).

Page 24: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 24

Standby Database: Restoring the InitialBackup

Select/create a backupmedium for the Recovery.Make sure that thebackup of your masterinstance is available atthe specified location.

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

Page 25: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 25

Standby Database: Restoring an IncrementalBackup

Depending on the available backups you can nowcontinue with the restore of an incrementalbackup or with the restore of log backups.

You have to define a new backup medium for theincremental backup.

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

Page 26: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 26

Standby Database: Restoring Log Backups I

You have to define a newbackup medium for thelog backups.Then you have to specifywith which 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 checkincreases the restore time. So specify the actuallyneeded log backup number if you know it.

Page 27: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 27

Standby Database: Restoring Log Backups II

All availablelog backupfiles arerestored oneafter anotherautomatically.When theDatabaseManager triesto restore a logbackup 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 28: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 28

Standby Database: Restoring Log Backups III

When you would like to continue with the restore,you have to start the database instance into ADMINmode.Attention: Do not start the database instance inONLINE 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 lastlog backup file which was already restoredsuccessfully.

Page 29: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 29

Standby Database: Restoring Log Backups IV

When all log backups have beenrestored successfully and you wouldlike to start the standby instance, youhave to choose Back. To start thedatabase select Ignore and pressContinue.

Page 30: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 30

Standby Database: ONLINE

The standby instance is in ONLINE mode now. Please remember to load the system tables(Configuration Upgrade System Tables). Then the database can be used as theproduction instance and it can be administered and monitored using DBMGUI ortransaction DB50.

Page 31: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 31

What Has to be Monitored?Standby DatabaseCentral Monitoring – Transaction DB59Database Assistant – Transaction DB50Performance Analysis Tools

Snapshot

Alert Monitor – Transaction RZ20

Chapter

Page 32: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 32

Central Monitoring – Transaction DB59

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

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

Page 33: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 33

Database Integration

To be able to connect to thedatabase instance you have toenter:

The name of the database instance.The hostname or IP address of theserver on which the databaseinstance runs.The DBM operator and his password.This is the user used to connect tothe Database Manager GUI or CLI.Default: control with passwordcontrol.The Standard Database User, whichfor SAP applications is SAPR3 orSAP<SID> as the default.

Make sure that the checkbox for thecentral authorization is marked, thatthe connect information is stored intables DBCON and DBCONUSR ofthe monitoring system.

Page 34: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 34

Connection Test

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

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

Page 35: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 35

Connection Test

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

Page 36: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 36

X-Server Not Running

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 tothe database instance.

Page 37: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 37

Wrong DBM Operator Password

The connection test also fails if the DBM operator user and/or password has notbeen entered correctly.

Page 38: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 38

Wrong Standard Database User Password

If the DBM Operator and hispassword have been enteredcorrectly, the DBMCLI andDBMRFC connection work.

Then the native SQL test may failbecause the standard databaseuser has not been entered correctly.

In this case you can find moreinformation in the correspondingdev_w# file.

Error -4008 (Unknown user name/password combination) indicates thatthe user data for the standarddatabase user is not correct.

Page 39: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 39

Remote Monitoring

MaxDBMonitoring

DB50

liveCacheMonitoring

LC10

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

Monitoring ofremote instancesis possible. Even

stand-alonedatabases like

small testdatabases can bemonitored in the

SAP system.

Page 40: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 40

What Has to be Monitored?Standby DatabaseCentral Monitoring – Transaction DB59Database Assistant – Transaction DB50Performance Analysis Tools

Snapshot

Alert Monitor – Transaction RZ20

Page 41: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 41

Starting Transaction DB50

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

Page 42: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 42

Transaction DB50 – Properties

This is the Propertiessection of transactionDB50N.

Transaction DB50 canonly connect to thesystem's databaseinstance.

Transaction DB50N isstarted from transactionDB59 as it is able toconnect to differentdatabase instances.

DB50 and DB50N arenearly identical. In thispresentation alwaysDB50N is used, althoughthe slides say DB50.

In the properties section you can find some general informationlike the database name, the database server, the databaseversion and the operational state of the database instance.

Page 43: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

Operational States

There are three possible operationalstates of MaxDB and liveCache:

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

ADMIN:The MaxDB kernel is active (processes are started,caches are initialized). Users cannot connect to thedatabase. Only the DBM operator can connect andperform administrative tasks.

ONLINE:The MaxDB kernel is active and ready to work. Userscan connect to the database.

Page 44: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 44

MaxDB And liveCache 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 directorycontains programs and librariesshared by the MaxDB instances andMaxDB applications.These programs are downwardscompatible.

The IndepData directory containsthe configuration data andrundirectories of MaxDB instances.

The location of these directories isspecified during the first installationof MaxDB software. They exist onlyonce on the server.

The InstallationPath contains theserver software that depends on thedatabase version (e.g. kernel).Several dependent directories canexist alongside each other.

The rundirectory contains the statusfiles of a MaxDB instance.

Page 45: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 45

MaxDB Status And Log files

Most important logfiles:KNLDIAG - contains status anderror messages of the databasekernel

KNLDIAGERR - contains allerror messages since databaseinstallation

UTLPRT - containsadministrative commands sent tothe database kernel (e.g.SHUTDOWN, BACKUP, CHECKDATA) including their returncode(s)

BACKHIST - contains all backupand recovery actions

DBMPRT - contains all(administrative) commands sentto the dbmserver

Page 46: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 46

Database Activity

The Activity Overview gives an overview of thedatabase activity since it was started. E.g. you can see:

the number of SQL statements executed,

the number of lock collisions,

the number of lock escalations

Page 47: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 47

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 Parameters section. All otherparameters should only be changed if requested by the MaxDB support.

Parameters can be changed using the Database Manager GUI. Whenever a parameterhas been changed, the database has to be restarted that the new parameter settingstake effect (see note #814704 for online changeable parameters).

Page 48: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 48

Parameter Change History

It is also possible to get an overview of the parameter changes by date. You can seewhich parameters have been changed on which daythe old as well as the new parameter values.

Page 49: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 49

Volume Configuration

The Volumes sectionshows all configuredlog and data volumesincluding their locationsand sizes.

You can also see, howmany data volumescould be added whilethe database isONLINE.

This is limited by thedatabase parameterMAXDATAVOLUMES.

New volumes can beadded using theDatabase ManagerGUI.

Page 50: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 50

Backup Media

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

Tivoli Storage Manager

Networker

Tools which support the Interface BackInt for OracleThe backup media can also be defined with Database Manager GUI. Backups arecreated using this tool as well or with transaction DB13/DB13C or the DBACOCKPIT.

Page 51: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 51

Task Manager

The Task Manager shows the status of all currently active database tasks. In arunning 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 itsthread (UKT)LogIOWait – task waits for completion of its log request by the 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 bereleased (locks are released after a COMMIT or ROLLBACK)

Page 52: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 52

Memory Areas: Caches

The Caches area shows the configured sizes of the different memory areas and the hitrates of these caches. The Data Cache hit rate should always be >= 98%.

Page 53: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 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 temporarydata.The data is automatically distributed to all volumes equally. You don't have to definetable spaces.Empty data pages are reused by the database automatically. No reorganization isnecessary.

Page 54: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 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 beoverwritten.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 ableto restore the database to the latest state.

The log area can consist ofseveral log volumes -however they are used asone single log area.

The Log Segment Sizedetermines how large thelog backups are created bythe autosave log.

Whenever Log SegmentSize log pages are written,they are copied to the logbackup file and the pages inthe log volume can beoverwritten.

Page 55: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 55

Database Messages

File knldiag has afixed size.

It is initialized whenthe database isstarted.

The last version ofthis file is thencopied to knldiag.old.

Knldiag consists oftwo parts:the first part containsinformation aboutthe database startand is notoverwritten.

In the second part information is logged during the runtime of the database. This part isoverwritten 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 errormessages.

Page 56: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 56

Database Error Messages

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

Page 57: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 57

Database Terminations

If the database is notstopped correctly themost important log filesare saved in theDIAGHISTORY folderduring the next start ofthe database instance.

This ensures that they arenot overwritten and canstill be analyzed todetermine the cause ofthe crash.

These files can be seen inthe Terminations section.

As a default only two setsof log files are held in thediaghistory.

Page 58: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 58

Database Manager Messages

File dbm.prt contains statements sent to the dbmserver.Whenever an administrative command has been executed using DatabaseManager GUI or CLI this is logged in this file, including the error code (if an erroroccurred).E.g. you can see, when a start or stop command has been executed.

Page 59: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 59

Remote SQL Server Messages

File xserver.prt has a fixed size. The first part of this file contains startupinformation of the X-Server, including an environment dump. There you can seethe 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 60: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 60

DBA History: Backup/Restore (DBMServer)

The DBA History contains information about administrative tasks.E.g. you can see information about executed backup and recovery actions orconsistency checks.You can display a detailed log file for each of these actions.

Page 61: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 61

DBA History: Backup/Restore Log File

The log file of a backupcontains the backupcommand and its returncode and detailedinformation like:

the creation date ofthe backup

the number of pagestransferred

the backup label

the location of thebackup file

Page 62: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 62

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 ofone 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 anew backup history.

Page 63: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 63

Kernel Administration Log File

File dbm.utl containsinformation about alladministrative taskssent to the databasekernel.

This log file is written bythe database kernelitself.

It contains informationabout

backups,

consistency checksand

starts/stops of thedatabase instance

including the returncodes of thesecommands.

Page 64: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 64

Database Manager (CLI)

Using the Database Manager CLIdbmserver commands can beexecuted.Some of the most importantcommands are:

db_state – determines thedatabase state

dbm_version – determinesthe version of the dbmserver

db_offline – stops thedatabase instance – shouldnot be executed for thesystems own databaseinstance!

db_online - starts thedatabase instance

Page 65: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 65

DBA Planning Calendar

The DBA Planning Calendar allows to schedule important database tasks likebackups or consistency checks (like transaction DB13/DB13C in earlier SAPreleases). Double-click a line in the calendar view or in the Action Pad to schedule atask.

Page 66: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 66

Scheduling Tasks

For some tasks parameters are necessary – e.g the backup medium for a backup. Theseparameters can be specified in this window. Furthermore you can specify if the taskshould be executed immediately or if it should be executed at a specific date/time and if itshould be executed in a certain interval (daily, weekly, every few hours, …)

Page 67: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 67

DBA Planning Calendar

If you perform a double-click on a finished action you can have a look atthe log files of this task.

Page 68: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 68

What Has to be Monitored?Standby DatabaseCentral Monitoring – Transaction DB59Database Assistant – Transaction DB50Performance Analysis Tools

Snapshot

Alert Monitor – Transaction RZ20

Chapter

Page 69: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 69

Performance Analysis

If you have performance problems you can startthe MaxDB performance analysis tools

Database AnalyzerCommand MonitorResource Monitor

In case you have problems with special transactionsyou can run these afterwards and analyze the collecteddata concerning these transactions.

In case of general performance problems the tools shouldrun for a while and you should check the output of thesetools regularly for any problems.

Page 70: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 70

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 andreports e.g.

Low cache hit ratioHigh I/O loadLow hit ratio 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 71: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 71

Database Analyzer Status

Database Analyzer uses a set of sophisticated rules to classify the current stateof MaxDB by analyzing several MaxDB 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 thelog files are stored.

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

Page 72: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 72

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 highnumber of table rows have to be read internally to find a small number of rowsthat meet the qualification in the WHERE clause.

Page 73: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 73

Starting The Command Monitor

To identify long running statementsor statements with a bad selectivity,the command monitor can be used.It collects specific data about SQLstatements whose resourceconsumption violates configurablethresholds like runtime, pageaccesses or selectivity.

This monitor is mainly used to catchstatements with high individualruntime.

The command monitor also collectsthe exact user input data usedduring statement execution.This is essential to create the correctexecution plan used for statementexecution.

The command monitor keeps only aspecified number of statements - oldstatements are overwritten when thisnumber is reached.

Page 74: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 74

Command Monitor Output

In the command monitor you can seee.g.

the runtime of the statement,the number of rows read and rowsqualified andthe number of disk I/O duringstatement execution.

To view the complete statementperform a double click on thecorresponding entry.

Page 75: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 75

Execution Plan

The execution plan of a SQL statement can be displayed by pressing DisplayExecution Plan for SQL Statement.In this example the optimizer uses a table scan to get the requested results.A lot of rows have to be read to find the few matching rows.That's the explanation for the entries in the database analyzer log file and in thecommand monitor.

Page 76: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 76

Resource Monitor

The resource monitor collects data of all executed statements independent of thesingle execution time.

You can restrict the number of displayed rows specifying lower limits e.g. for theruntime or the number of statement executions.

Page 77: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 77

Starting the Resource Monitor

The resource monitor aggregates the resource consumption over all executions of astatement.

It helps to identify SQL statements with cheap individual execution (e.g. through primarykey access), which are executed very often and therefore cause a high aggregatedruntime and workload.

The optimization of these statements promises the highest overall effect.

Page 78: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 78

Resource Monitor Output

You can see e.g.

the number of executions,

the overall runtime andthe number of page accesses.

To view the statement perform a double click on the corresponding entry.Often these statements cannot be optimized with database methods because theyare already executed in the most efficient way. Then the application developer hasto check if the statement has to be executed so often.

Page 79: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 79

Tables/Views

To determine the bestoptimizer strategy for anSQL statement you haveto analyze all tablesinvolved.

You have to check

the table definition(especially theprimary keydefinition)

the existing indexesand

the optimizerstatistics.

To decrease the runtimeof a statement it might benecessary to update theoptimizer statistics or tocreate a new index.

Page 80: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 80

Tables/Views: Properties

For large tables the sample value should be set to 10% -for smaller tables a sample value of 20000 rows is sufficient (note #808060).

In the Propertiessection you cansee when thetable has beencreated andaltered and whenthe optimizerstatistics havebeen updated thelast time.

It is also possibleto check the tableconsistency andto change thedefault samplevalue for thecreation of theoptimizerstatistics.

Page 81: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 81

Tables/Views: Definition

Primary Key columns have the Type KEY, in column Key Position you can see if thisis the first, second, … key column.

Furthermore you can see the data type and length of a column.

Page 82: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 82

Tables/Views: Indexes

All Indexes defined for atable are listed in the Indexessection. You can see

of which columns theindex consists,

if it has already beenused,

if the index is activated,

if the index is corrupted.

It is also possible to activateand deactivate indexes.

If an index is deactivated it isstill maintained during insert,update or delete operationsbut it cannot be used toaccess the data.

Corrupted indexes can berecreated.

Page 83: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 83

Tables/Views: Restore Index

If an index is corrupted itcannot be used to access thedata.

Mark the corrupted index andchoose Restore Index torecreate it.

Attention: During the indexrebuild the correspondingtable is locked for writetransactions. Depending onthe size of the table therebuild might take a longtime.

Page 84: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 84

Showing the Execution Plan

After the index has been recreated it is used by the optimizer when the statementfound in the command monitor is executed again.

Now the execution of this statement is much faster.

Page 85: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 85

Tables/Views: Optimizer Statistics

To determine the best access strategy for a JOIN the optimizer needs statistical data.If this data is not updated regularly the optimizer might not choose the best strategy.

UPDATE STATISTICS determines information about the size and the value distributionof tables and indexes. These values are not counted but estimated on the basis ofsample rows.

Page 86: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 86

What Has to be Monitored?Standby DatabaseCentral Monitoring – Transaction DB59Database Assistant – Transaction DB50Performance Analysis Tools

Snapshot

Alert Monitor – Transaction RZ20

Chapter

Page 87: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 87

Alert Monitor – RZ20

The alert monitor collects e.g. data concerning the filling level of the log and thedata area, the cache hit ratio and the creation of backups. If you perform a double-click on a node in the tree, you get detailed information about this node - e.g. thebackup history. In this example no data backup exists.

Page 88: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 88

Creating a Complete Backup I

To create a data backup use the Database Manager GUI and choose Backup Database.The Backup Wizard will guide you through the backup process – including the creation of abackup medium, if there is none.

Page 89: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 89

Creating a Complete Backup II

It is also possible to use the DBA Planning Calendar to create the backup. Withthis transaction you can schedule different actions or execute them immediately.

Page 90: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 90

Data Collector

After you have solved the problem, you can either wait until the data collector runs the nexttime or start the data collector manually. To figure out which data collector is responsiblefor this node, place the cursor on this node and press F1 then choose Long Text.

Page 91: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 91

Manual Start of Data Collection for Alert Monitor

To be able to start the datacollector, you have to activatethe maintenance function intransaction RZ20. Choose CCMS monitor sets SAP CCMS Technical Expert MonitorsAll Monitoring Contexts. Then choose Extras Activate maintenance function.

Page 92: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 92

Start Data Collection Method

Then you can selectthe data collector(make sure thecheckbox is marked)and chooseEdit Nodes (MTE)Start methods Startdata collection method.

If you refresh the displayin RZ20 then, the backupnode will be green.

Page 93: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 93

Changing Threshold Values

Sometimes the default threshold values for the nodes do not fit your requirements.In this example a very small test database is monitored.The log volume is nearly empty but the alert is red.Mark the concerning node and choose Properties to adapt the threshold values.

Page 94: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 94

Green Alerts

After changing thethreshold values thenode concerning theFree Log Space isgreen.

Page 95: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 95

What Has to be Monitored?Standby DatabaseCentral Monitoring – Transaction DB59Database Assistant – Transaction DB50Performance Analysis Tools

Snapshot

Alert Monitor – Transaction RZ20

Chapter

Page 96: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 96

Snapshot

Freezing a database imageCreate Snapshot (ADMIN)Revert to Snapshot (ADMIN)Drop Snapshot (ADMIN)

Ideas of use:Very fast point in time resetting (e.g. during upgrades)Restoring training-systems to a defined status

Page 97: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 97

Master – Slave Support w/ Snapshots

Data 01.01.2006

Master

Data

Slave

Complete

Data 07.01.2006

::::

Create Snapshot

Incremental

Complete

Incremental

Restore Snapshot

Data 07.01.2006

::::

Data 14.01.2006 IncrementalIncremental

Restore Snapshot

Data 14.01.2006

:

:::

Page 98: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 98

Snapshots: Database After Setup

Page 99: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 99

Taking a Snapshot

If you would like to create a snapshot, the database has to be in ADMIN mode. DBMGUIallows to create the snapshot with menu Backup g Create Snapshot.

Page 100: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 100

Some Data Has Been Loaded

Then you can use your database instance normally – e.g. you can load some data.

Page 101: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 101

Checking Data in SQL Studio

Page 102: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 102

Admin Mode: Revert to Snapshot

If you would like to revert to the snapshot, choose menu RecoveryRevert to Snapshot. This can be done in ADMIN mode, only.

Page 103: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 103

After Reverting to Initial State

After you restored the snapshot, all data loaded after the creation of the snapshot is gone,data which was deleted, is available again.

Page 104: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 104

Summary

Transactions DB59, DB50 and RZ20 help you to monitor and administer all MaxDBdatabase instances in your system landscape.

Transaction DB59 is the central entry point where the instances can be integrated into themonitoring system. Using this transaction you can easily switch to the Database Assistant foreach of your database instances.Transaction DB50 is the Database Assistant which allows to monitor your MaxDB instance.Performance problems can be analyzed and solved using this transaction.The DBA Planning Calendar enables you to schedule important database tasks like backupsor consistency checks.In transaction RZ20 a special branch for the MaxDB instances can be created, so that criticalsituations are reported using the SAP Alert concept.

Database Manager (GUI) provides all necessary functions to administerexisting database instances and to create new instances – e.g. standbydatabases.

Page 105: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 105

Thank you!

Page 106: Managing MaxDBmaxdb.sap.com/training/administration_7.6/MaxDB-LC-Admin...transaction should only be used in the corresponding APO/SCM system - but liveCache instances can be monitored

© SAP 2007 / MaxDB 7.6 Admin Workshop / SPC 150-2006 /Page 106

Copyright 2007 SAP AGAll 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 changedwithout prior notice.Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors.SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, Duet, Business ByDesign, ByDesign, PartnerEdge and other SAP products and services mentioned herein as well as theirrespective 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 andassociated logos displayed 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. This document is a preliminary version and not subject to your license agreement or any other agreement with SAP. This documentcontains 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. 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, orother 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 ofmerchantability, 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 limitationshall 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 thesematerials and does not endorse your use of third-party Web pages nor provide any warranty whatsoever relating to third-party Web pages

Weitergabe und Vervielfältigung dieser Publikation oder von Teilen daraus sind, zu welchem Zweck und in welcher Form auch immer, ohne die ausdrückliche schriftliche Genehmigung durchSAP AG nicht gestattet. In dieser Publikation enthaltene Informationen können ohne vorherige Ankündigung geändert werden.Einige von der SAP AG und deren Vertriebspartnern vertriebene Softwareprodukte können Softwarekomponenten umfassen, die Eigentum anderer Softwarehersteller sind.SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, Duet, Business ByDesign, ByDesign, PartnerEdge und andere in diesem Dokument erwähnte SAP-Produkte und Servicessowie die dazugehörigen Logos sind Marken oder eingetragene Marken der SAP AG in Deutschland und in mehreren anderen Ländern weltweit. Alle anderen in diesem Dokument erwähntenNamen von Produkten und Services sowie die damit verbundenen Firmenlogos sind Marken der jeweiligen Unternehmen. Die Angaben im Text sind unverbindlich und dienen lediglich zuInformationszwecken. Produkte können länderspezifische Unterschiede aufweisen.

Die in diesem Dokument enthaltenen Informationen sind Eigentum von SAP. Dieses Dokument ist eine Vorabversion und unterliegt nicht Ihrer Lizenzvereinbarung oder einer anderenVereinbarung mit SAP. Dieses Dokument enthält nur vorgesehene Strategien, Entwicklungen und Funktionen des SAP®-Produkts und ist für SAP nicht bindend, einen bestimmtenGeschäftsweg, eine Produktstrategie bzw. -entwicklung einzuschlagen. SAP übernimmt keine Verantwortung für Fehler oder Auslassungen in diesen Materialien. SAP garantiert nicht dieRichtigkeit oder Vollständigkeit der Informationen, Texte, Grafiken, Links oder anderer in diesen Materialien enthaltenen Elemente. Diese Publikation wird ohne jegliche Gewähr, wederausdrücklich noch stillschweigend, bereitgestellt. Dies gilt u. a., aber nicht ausschließlich, hinsichtlich der Gewährleistung der Marktgängigkeit und der Eignung für einen bestimmten Zwecksowie für die Gewährleistung der Nichtverletzung geltenden Rechts.

SAP übernimmt keine Haftung für Schäden jeglicher Art, einschließlich und ohne Einschränkung für direkte, spezielle, indirekte oder Folgeschäden im Zusammenhang mit der Verwendungdieser Unterlagen. Diese Einschränkung gilt nicht bei Vorsatz oder grober Fahrlässigkeit.Die gesetzliche Haftung bei Personenschäden oder die Produkthaftung bleibt unberührt. Die Informationen, auf die Sie möglicherweise über die in diesem Material enthaltenen Hotlinkszugreifen, unterliegen nicht dem Einfluss von SAP, und SAP unterstützt nicht die Nutzung von Internetseiten Dritter durch Sie und gibt keinerlei Gewährleistungen oder Zusagen überInternetseiten Dritter ab.

Alle Rechte vorbehalten.