0% found this document useful (0 votes)
48 views60 pages

MaxDB Administration and Migration Guide

Uploaded by

dharshanselva001
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
48 views60 pages

MaxDB Administration and Migration Guide

Uploaded by

dharshanselva001
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Other Administrative Topics

Contents:
◼ Overview of additional administrative tasks
◼ Creating system copies using MaxDB
◼ Installing database software and the tools used
◼ High availability solutions with MaxDB
◼ Migrating to MaxDB

© SAP 2008

© SAP AG ADM515 6-1


Other Administrative Topics: Learning
Objectives

After completing this unit, you will be able to:


◼ Create system copies using MaxDB
◼ Use the MaxDB software installation tools
◼ List the high availability solutions available

© SAP 2008

© SAP AG ADM515 6-2


Agenda I

1. First Contact 3. Inside MaxDB


1.1. Introduction 3.1. Processes
1.2. Tools and Interfaces 3.2. Locks
1.3. Architecture and Operational States 3.3. Memory Areas
1.4. MaxDB and SAP NetWeaver 3.4. Disk Areas
1.5. Integration with SAP NetWeaver 3.5. Logging
1.6. Server Landscape for this Course 4. Database Backup and
2. Using MaxDB Recovery
2.1. Overview of Database Studio 4.1. Complete Data Backups
2.2. Important Sources of Information in 4.2. Incremental Data Backups
Database Studio 4.3. MaxDB Snapshots
2.3. MaxDB Users in the SAP Environment 4.4. Log Backups
2.4. Disk Areas for Data and Logs 4.5. Automatic Log Backups
2.5. Configuration Changes 4.6. Checking Backups
2.6. DB FULL and LOG FULL Situations 4.7. Backup Strategy
2.7. Parameters 4.8. External Backup Tools
2.8. Tools for Exercises 4.9. Performing Recoveries

© SAP 2008

© SAP AG ADM515 6-3


Agenda II

5. Other Administrative Topics 7. Outlook for MaxDB 7.8


5.1. Checking Databases 7.1. Overview
5.2. Creating Database Instances 7.2. Changes to the Database Kernel
5.3. Reinitializing Database Instances 7.3. New Administrative Functions
5.4. Installing Patches (Release Upgrade) 7.4. Setup and Infrastructure
5.5. Migrating to MaxDB 7.5. Interface and Users
5.6. High Availability
5.7. MCOD
6. Performance Tuning and Troubleshooting
6.1. B* Trees
6.2. Optimization
6.3. SAP NetWeaver Monitoring Tools
6.4. Avoidable Problems
6.5. Diagnosis Files and Trace Options
6.6. Types of Errors and How to Analyze Them

© SAP 2008

© SAP AG ADM515 6-4


Other Administrative Topics: Unit Overview

Other Administrative Topics


Topic 1: Checking Databases
Topic 2: Creating Database Instances
Topic 3: Reinitializing Database Instances
Topic 4: Installing Patches (Release Upgrade)
Topic 5: Migrating to MaxDB
Topic 6: High Availability
Topic 7: MCOD

© SAP 2008

◼ See also SAP Note 940420 ( FAQ: Database structure check (VERIFY)).

© SAP AG ADM515 6-5


Types of Consistency Check

EXTENDED
◼ Checks the key sequences in detail

WITH LONG CHECK (previously WITH SHARE LOCK)


◼ Also checks the LONG (BLOB) columns
◼ Sets share locks

EXCEPT INDEX
◼ Does not check indexes

WITH UPDATE
◼ Can only be executed in the ADMIN operational state
◼ Additional maintenance of converter: deletes page numbers without references

© SAP 2008

◼ Commands:
• CHECK DATA [EXTENDED] [EXCEPT INDEX]
• CHECK TABLE .. [EXTENDED] [WITH LONG CHECK]
• CHECK DATA WITH UPDATE (in the ADMIN operational state only)
◼ The CHECK DATA EXTENDED command allows you to diagnose the data in the volumes in more
detail. This check examines the information on primary key lengths in more detail and how the
primary keys are sorted at all levels of the B* tree. Since this check is relatively complex, it can
increase the runtime.
◼ The WITH LONG CHECK option also checks the BLOBs. During this check, a share lock is set for
the table currently being examined.
◼ To save resources, you can use the EXCEPT INDEX option to exclude the secondary indexes from
the check.
◼ The WITH UPDATE option can only be executed in the ADMIN operational state; it rebuilds the
converter, and in doing so, deletes the non-referenced pages. These non-referenced pages can exist
if you stop the database using the power switch of the database server, which means that the status
of the asynchronous SERVER processes cannot be saved as it would be during a normal shutdown
process, for example, when a DROP TABLE statement is used.

© SAP AG ADM515 6-6


Checking the Consistency of Database
Instances

In the ONLINE operational state:


◼ Only the analysis is performed and no changes are made to the database instance.
In the ADMIN operational state:
◼ During the analysis, the system attempts to repair defective structures. This involves
rebuilding the converter.
Execution
◼ In Database Studio: From the context menu of the database instance ? Check Database
Structure…
◼ In the DBA Cockpit:
◼ Action: Check database structure or
Check database structure (only tables)
◼ The console provides further options.

© SAP 2008

◼ To perform the check using the console:


dbmcli –U c –uUTL -c util_execute check data
◼ The Check database structure action is entered as "CheckData" in the calendar of the DBA Cockpit.
This action is executed by the work process. For each volume, a server task that performs the
analysis is started.
◼ The Check database structure (only tables) action appears as "CheckTables" in the DBA Cockpit
and checks the tables but not the indexes. Here, the planner requests a fixed number of parallel
tasks. If performance problems occur and you are using a small number of volumes, it is useful to
work with "CheckTables" to achieve a higher level of parallelism.

© SAP AG ADM515 6-7


Consistency Check in Database Studio

© SAP 2008

© SAP AG ADM515 6-8


Checking the Consistency of Individual Tables

The CHECK TABLE <OWNER>.<TABLENAME> SQL statement checks all links within
the table tree.
◼ If it returns an error, you have to resolve the hardware problem and import a backup.
Execution
◼ In Database Studio
◼ Using the DBA Cockpit or transaction DB50 (Problem Analysis ? Tables/Views/Synonyms)
◼ Using the Database Manager CLI

© SAP 2008

◼ The CHECK TABLE statement checks all dependencies and links within the table tree.
◼ Each page contains a check number in the header and trailer. These two numbers must be identical.
If the values are different, an error has occurred. The page could not be completely written during
the last read and write operation (I/O).
◼ To perform the check using the Database Manager CLI:
dbmcli –U c –USQL DEFAULT sql_execute ¡°check table <SCHEMA>.<TABLENAME>¡±
◼ To perform the check in Database Studio:
CHECK TABLE <SCHEMA>.<TABLENAME>

© SAP AG ADM515 6-9


Other Administrative Topics:
Unit Overview

Other Administrative Topics


Topic 1: Checking Databases
Topic 2: Creating Database Instances
Topic 3: Reinitializing Database Instances
Topic 4: Installing Patches (Release Upgrade)
Topic 5: Migrating to MaxDB
Topic 6: High Availability
Topic 7: MCOD

© SAP 2008

© SAP AG ADM515 6-10


Creating Database Instances

You have the following options when


creating a database instance:
◼ Create a new instance with no content
◼ Create an instance based on
an existing backup of a source
system (for example,
to create a system copy)

The process can be automated using a


script.

For more information, see SAP Note


129352.

© SAP 2008

◼ Example of a script for creating a system copy based on a backup:


dbmcli -R <INSTROOT> -n <db_host> db_create <dbm_user>,<dbm_password>
<sid>adm,<password>
dbmcli -d SX1 -u <dbm_user>,<dbm_password> -n <db_host> -i scriptfile1
dbmcli -d SX1 -u <dbm_user>,<dbm_password> -n <db_host> -uUTL -c -i scriptfile2
◼ Scriptfile1 (adjust volumes in accordance with source system):
param_startsession
param_init OLTP
param_put LOG_MIRRORED YES
param_checkall EXTENDED
param_commitsession
param_addvolume 1 DATA <path and file name of data volume> F 10000
param_addvolume 1 LOG <path and file name of log volume> F 2500
param_addvolume 1 MLOG <path and file name of mirrored log volume> F 2500
db_admin
◼ Scriptfile2:
util_execute db_activate <sysdba_user>,<sysdba_password> RECOVER <backup_file>
load_systab -u <sysdba_user>,<sysdba_password> -ud <domain_password>
backup_media_put "media name" file with path" FILE DATA 0 8 NO NO ""
backup_start "media name" DATA
db_restart
◼ Default user names in the SAP environment Default passwords
<dbm_user> control <dbm_password> control
<sysdba_user> superdba <sysdba_password> admin
<domin_user> domain <domain_password> domain

© SAP AG ADM515 6-11


Tracing DBM Commands in the Console

© SAP 2008

◼ In the "Preferences" window of Database Studio (Window  Preferences), you can normally
activate a console for outputting commands. You then still have to display this console by choosing
Window  Show View  Other ...
◼ This can be very useful for automating recurring tasks when you are developing DBMCLI scripts.
◼ With this function, it is easy to create import files that you can subsequently load into DBMCLI and
execute using the "–i" option.
◼ Additional functions are available in the upper right-hand corner of the console window.

© SAP AG ADM515 6-12


Creating Database Instances – First Steps

© SAP 2008

◼ You open the Wizard by choosing Create Database... from the context menu of the server.
◼ Select Create a new database in advanced mode, which allows you to define all options with no
restrictions.
◼ The Create a new database option gives you only a few options for changing the users, directory
areas, and so on, that are valid for the SAP area.
◼ Important: In the SAP environment, the installation of SAP NetWeaver with MaxDB is
different from the installation with other databases.
• With MaxDB, the database installation is carried out by SAPINST as part of the SAP
NetWeaver installation and not in advance, as is the case with other databases.
• For this reason, a MaxDB database instance does not need to be created in advance.
• This is because MaxDB has now been integrated in many products and can now be installed
with relatively little maintenance.

© SAP AG ADM515 6-13


Creating Database Instances – Server Login
Information

When working on a
local database server,
leave the login fields
blank.

© SAP 2008

◼ You only need to specify the host name, user name, and password when creating a database instance
on a remote host.
◼ If a remote installation is unavoidable, the user requires special rights:
• Unix: root rights
• Windows: the Log on as a batch job property and administration rights
◼ Select the software version that you want to use to create the database instance.
◼ In the SAP environment, one software instance is always created for each database instance. This
ensures that every SAP system can be upgraded to a new version without other database instances
being affected.
• For this reason, select exactly the same software version that you installed for this database
instance (for test purposes, you can also use a different software instance, taking into account the
relationships explained above).
• It is technically possible to run multiple database instances using one software instance, but this
leads to problems the next time the database is upgraded with the SDBUPD tool. SDBUPD
cannot upgrade the underlying software instance unless there is a 1:1 relationship between the
database instance and software instance. This is because, following an upgrade, stable operation
of the second database instance cannot be ensured.
• The simplest solution is to delete the additional instance using dbmcli ... db_drop or by choosing
Drop Database ... from the context menu of the database instance in Database Studio.

© SAP AG ADM515 6-14


Creating Database Instances – Defining the
Database Manager

Default: control

Default: control

© SAP 2008

◼ In this next step, you can make other advanced settings. The general purpose of these functions is to
reduce the TCO of very small databases.
• These functions are not yet used in the SAP environment since they take longer to run due to the
size of the database and tables and cannot be configured to only run overnight because they run
automatically.
◼ You then define the administration user of the database. In the SAP environment, this is normally
the CONTROL user with password CONTROL.
◼ When installing SAP NetWeaver, you are normally requested to enter a "master" password at the
start of the process, which is then always used when a password is requested. If this password is also
to be used here, enter it on this screen.

© SAP AG ADM515 6-15


Creating Database Instances – Initial
Parameters

© SAP 2008

◼ You have the following options when initializing the parameters:


• Initialize a new parameter set with default values (for example, for a test installation)
• Copy an existing parameter set from another database instance (for example, when creating a
second database instance with a template)
• Restore the parameters from a backup which, in most cases, is to be restored later (for example,
when making a system copy from another host)
◼ Before you perform the last step of the Wizard to create the database instance, you have to create
these changed paths (with the new instance name) in your file system.
◼ You can change the parameter values when creating a database instance.

© SAP AG ADM515 6-16


Creating Database Instances – Copied
Parameters

© SAP 2008

◼ When creating system copies or restoring the parameters from the parameter set in the backup file,
make sure that you adjust the paths specified in the parameters (such as the RunDirectoryPath, paths
for the volumes, and so on).
◼ Before you perform the last step of the Wizard to create the database instance, you have to create
these changed paths (with the new instance name) in your file system.
◼ You can change the parameter values when creating a database instance.

© SAP AG ADM515 6-17


Creating Database Instances – Parameters
from Backup

© SAP 2008

◼ If you want to restore the parameters from a backup which, in most cases, is to be restored later, the
backup file(s) must be available so that you can copy the parameter information.
◼ You can use this template later for the recovery.
◼ Note that if you are using page clustering, you must set the Block Size to a multiple of the cluster
size (for example, a multiple of one or two).

© SAP AG ADM515 6-18


Creating Database Instances – Adjusting
Parameters

© SAP 2008

◼ When creating system copies or restoring the parameters from the parameter set in the backup file,
make sure that you adjust the paths specified in the parameters (such as the RunDirectoryPath,
DiagnoseHistoryPath, paths for the volumes, and so on).
◼ Before you perform the last step of the Wizard to create the database instance, you have to create
these changed paths (with the new instance name) in your file system.
◼ You can change the parameter values when creating a database instance.

© SAP AG ADM515 6-19


Creating Database Instances – Adjusting
Volumes and Paths

© SAP 2008

◼ When creating system copies or restoring the parameters from the parameter set in the backup file,
make sure that you adjust the paths specified in the parameters (such as the RunDirectoryPath, paths
for the volumes, and so on).
◼ Before you perform the last step of the Wizard to create the database instance, you have to create
these changed paths (with the new instance name) in your file system.
◼ Minimum requirements for a mini database instance:
• 50 MB for data
• 20 MB for log

© SAP AG ADM515 6-20


Creating Database Instances – Creating a
Blank Database and Completing the Process

© SAP 2008

◼ In this example, a blank database is created and so you select the first option. The predefined user
for the SAP NetWeaver environment is SUPERDBA with the usual password, ADMIN. This user
then administrates all additional database users (SQL users).
◼ You do not want to recover a backup afterwards.
◼ The Wizard displays a final summary, and you start the installation process by choosing Start.
◼ The Results tab page displays the different installation steps:
• Starting database... (ADMIN operational state)
• Activating database... (ONLINE operational state)
• Loading system tables... (ONLINE operational state)
◼ These system tables are then the only content of the database.
◼ When these system tables are created, log information is also generated and stored in the log
volumes.
◼ Once the process has been completed, the database is in the ONLINE operational state.

© SAP AG ADM515 6-21


Creating Database Instances – For Data from
Backup

Select Create database for recovery if you


want to create a system copy.

© SAP 2008

◼ Select Create database for recovery if you want to create a database instance based on a backup
(that is, create a system copy).
• If you select the first option (Create and start database) instead, the error message –8003 (Log
and data must be compatible) is displayed when you try to start the copied instance after you
have imported the backup from the source system.
• If this error occurs, you have to initialize the faulty database instance again.
◼ The "Results" tab page shows that the database was created and the database kernel started (in the
ADMIN operational state), but the database instance has not been activated. This means that it is
now possible to recover backups.
◼ Creating volumes for large databases can take a long time, depending on the hardware.
◼ After the initialization, you can start the recovery automatically by choosing Recovery.
◼ The database is in the ADMIN operational state.

© SAP AG ADM515 6-22


Creating Database Instances – Recovering
Backups

© SAP 2008

◼ The backups are imported in the ADMIN operational state.


◼ If the database is already in the ONLINE operational state, you have to reinitialize it before starting
the recovery (see next section) so that it is no longer in the ONLINE operational state.
◼ The usual recovery options are offered. In this case, only the option for recovering a medium can be
selected.
◼ Select the template required or create a new one.
◼ The Wizard then reads and displays the label information of the medium on which the template is
based.
◼ You can start the recovery by choosing Start and can check the results on the Results tab page.
◼ The processes described in the "Database Backup and Recovery" unit are carried out.

© SAP AG ADM515 6-23


Other Administrative Topics: Unit Overview

Other Administrative Topics


Topic 1: Checking Databases
Topic 2: Creating Database Instances
Topic 3: Reinitializing Database Instances
Topic 4: Installing Patches (Release Upgrade)
Topic 5: Migrating to MaxDB
Topic 6: High Availability
Topic 7: MCOD

© SAP 2008

◼ See also SAP Note 1014782 (FAQ: MaxDB system copy).

© SAP AG ADM515 6-24


Reinitialization – First Steps

© SAP 2008

◼ If the database instance name already exists, the Wizard prompts you to confirm whether you really
want to reinitialize the instance. All data currently in the database instance will be lost.

© SAP AG ADM515 6-25


Reinitialization – Adjusting Parameters

© SAP 2008

◼ This step gives you the option of completely changing the parameter and volume configuration.
◼ Typically you want to reduce the number and increase the size of volumes here if there are too many
objects to manage.
◼ These configuration changes may also be recommended for performance reasons.
◼ If you create too small a database in the first place, you receive error –2008 (Data area too small)
when installing the database instance later.
◼ The standard directory structure of MaxDB in the SAP environment is explained in SAP Note
327578.
◼ If you select the option of restoring the parameters from a data backup, you can specify both
individual backup media and groups of parallel backup media.
◼ The parameter set exists both on individual backup media and on every medium of a media group.
◼ For this reason, always select an individual medium and not the media group.

© SAP AG ADM515 6-26


Reinitialization – Changing Volumes

© SAP 2008

◼ Only in this phase of the MaxDB lifecycle the size of existing log volumes can be changed. The
volumes remain this size until this step is reached again during an initialization, at which point they
can be changed again.
◼ When the database is later operated online, you can change the size of data volumes indirectly (by
creating a new volume and deleting the old one) in the "Data Volumes" area .
◼ When you are creating system copies, particularly on the same database server, it is very
important that you enter the correct path to prevent a set of volumes being used later by two
databases. The same applies if remote hard disks are mounted on both servers.

© SAP AG ADM515 6-27


Reinitialization – Preparing the Recovery

© SAP 2008

◼ Since a recovery is normally performed now, you would select the second option (Create database
for recovery) here.
◼ The initialization process is normally completed very quickly since the actual work of formatting
log volumes and preparing data volumes is not carried out until later, shortly before the actual
recovery is performed. The Results tab page shows only one entry for the database kernel that is
started.
◼ If you now choose Recovery, the normal recovery process is carried out with the options described
in the previous unit.

© SAP AG ADM515 6-28


Recovery with Individual Media – Complete
Backup

© SAP 2008

◼ The recovery Wizard is started automatically after the initialization.


◼ If you just want to reset the current database instance on the same database server, you can select the
Recover last backup or Recover specified backup from history option.
◼ If you are making a normal system copy from one database server to another, Recover a medium is
the only logical option.
◼ You also have to decide here whether to perform a point-in-time recovery and, if so, specify the
point in time until which this recovery is to run.
◼ You then have to create a template on which the complete backup is to be based.
◼ Once the usual summary has been displayed, you can start the first step of the recovery.

© SAP AG ADM515 6-29


Recovery with Individual Media – Incremental
Backup

Further No further
backups backups

© SAP 2008

◼ After the complete backup has been recovered successfully, you may fall into a potential trap. It is
very tempting to choose Restart here, but only do so if you do not want to recover any further
incremental or log backups.
◼ If further backups exist, you have to carry out the cycle of steps of » creating a medium and then
recovering the backup « until all backup sources have been provided and processed, as shown
above.
◼ You can end this cycle at any time by choosing "Restart" and then start the database with the state
from the backups recovered so far.

© SAP AG ADM515 6-30


Recovery with Individual Media –
Log Backup

© SAP 2008

◼ After you have defined the log medium using the files of the source system, the log recovery can
begin.
◼ Specify the version number of the version file with which you want to (or have to) start.
◼ If you are not sure which file to start with, specify the first version number you find in the directory.
The database kernel will skip the irrelevant files as shown on the next slide.

© SAP AG ADM515 6-31


Recovery with Individual Media – Completion
Options

Option 1 Option 2

© SAP 2008

◼ In this example, the complete backup DATA3 is used as a starting point, which means that the
incremental backup DEV_INC6 and log backups as of DEV_log.011 are also relevant.
◼ To ensure that all log information for all open transactions and their starting points are available for
the recovery process, it is appropriate for the system to offer one or more older log backups.
◼ In this case, all log backups as of "001" are available in the directory, which means you can start
with log backup DEV_log.001.
◼ The recovery process increases the sequential version number and attempts to find the
corresponding log backup until a read error occurs, that is, the file does not exist or contains errors.
In this example, this occurs with file DEV_log.014, which does not exist in the directory (for more
information, see error message -3004).
◼ Database Studio then gives you the option of specifying another directory containing subsequent log
backups (option 1), or starting the database instance (option 3 on the next slide).
◼ You also have the option of ending the recovery process at this point by choosing Cancel (option 2)
and resuming the log recovery at a later point. The database can also be switched to the OFFLINE
operational state here. As soon as the instance is switched to the ONLINE operational state,
however, it is no longer possible to resume the log recovery. This is a manual log shipping solution.

© SAP AG ADM515 6-32


Recovery with Individual Media – Completion
Options

Option 3

© SAP 2008

◼ This slide shows option 3 (starting the database in the ONLINE operational state).
◼ The Results tab page shows the return values resulting from the individual backup files of the
previous step.
• -7075: log backup was skipped
• -8020: log backup was processed successfully and next log file requested
◼ The manual recovery is complete when the operational state is switched to ONLINE.
◼ Remember that you then have to set a starting point for a new backup history by performing a
complete backup.
◼ It has recently become possible to use external file system snapshots to inform the database that the
instance can be recovered, which means HISTLOST does not have to be entered in the backup
history.

© SAP AG ADM515 6-33


Other Administrative Topics: Unit Overview

Other Administrative Topics


Topic 1: Checking Databases
Topic 2: Creating Database Instances
Topic 3: Reinitializing Database Instances
Topic 4: Installing Patches (Release Upgrade)
Topic 5: Migrating to MaxDB
Topic 6: High Availability
Topic 7: MCOD

© SAP 2008

◼ See also SAP Note 1020175 (FAQ: MaxDB installation, upgrade or applying a patch).

© SAP AG ADM515 6-34


Installing Patches

Patches are available on SAP Service Marketplace at


[Link]
 Database Patches (from other vendors)
 MaxDB and SAP DB

Service packs normally introduce new functions, while patches merely eliminate
errors.
Patches are only provided within a version (7.7.04, 7.7.06, and so on).
When you import a patch, it always replaces all the software.
You install the patch using the SDBUPD tool.
You use the SDBINST tool only if the database cannot be started, since SDBUPD only
works if the database is functioning.
◼ Note that SDBUPD carries out additional tasks that SDBINST cannot perform (for example,
loading the system tables).

© SAP 2008

◼ Note that SDBINST contains only a subset of the functions of SDBUPD. If you use SDBINST to
install a patch, you then have to manually carry out the tasks that SDBUPD carries out automatically
(such as loading the system tables). For this reason, use SDBUPD to install patches whenever
possible.

© SAP AG ADM515 6-35


Release Strategy

As of Version 7.5, the release Patch


upgrade of MaxDB is explained in 7.5.0 B51 Service Pack
upgrade guides that contain more Release Upgrade
detailed information on widely-used
enhancements.
7.6.00 B36
7.6.03 B15
7.7.04 B29
7.6.05 B10
The first two numbers define the
release level.
7.7.01 B20
7.7.04 B29
The third number indicates the 7.7.02 B36
service pack with which new
functions are introduced.
7.7.03 B25
7.7.04 B29
The last number indicates the build,
the sole purpose of which is to 7.7.04 B20 7.7.04 B30
eliminate errors.
This slide shows several possible
release upgrade paths. 7.7.06 B06 7.7.06 B15

© SAP 2008

◼ Certain minimum versions of MaxDB are normally defined, based on which you can perform the
release upgrade.
◼ For more information, see the release upgrade guide on SAP Service Marketplace.

© SAP AG ADM515 6-36


Tools Used for Installation

Installation tool sdbinst


◼ Installation packages can be installed in different scopes (client, server, precompiler, base,
and so on).

Update tool sdbupd


◼ Also used to carry out release upgrades (for example, Version 7.6 ? Version 7.7) and install
patches

Installation register
◼ Each installation using sdbinst or sdbupd is stored in the installation register.
◼ Important: Installations (such as patches) must be completed correctly before a new
installation can be started.
◼ Uninstallation routine using sdbuninst
◼ Installation verification using sdbverify
◼ View installation registers using sdbregview

© SAP 2008

◼ To call sdbuninst:
sdbuninst –package ¡°<package name (case-sensitive)>¡±
◼ Directories:
◼ Log files for installation: \sapdb\data\wrk
◼ Installation register: \sapdb\data\config\install

© SAP AG ADM515 6-37


Installation & Uninstallation

Carry out the installation using sdbinst.

The –help option lists useful options.

Installation logs are written to <indepdatapath>/wrk.

You uninstall the MaxDB software using sdbuninst.

Do not delete the MaxDB directories using operating system tools.

© SAP 2008

◼ SDBINST options:
sdbinst –force_extract
◼ SDBUNINST options:
sdbuninst [-h|--help] | [-v|--version] | [-l|--list] | -all | -package <package name> [-package_dir
<package directory>] [-autoresolve]
-h --help show this
-v --version show version
-l --list list installed packages
-package <package name> uninstall a package with such name
-package_dir <package directory> uninstall package <package name>
installed in <package directory>
-all uninstall all registered MaxDB packages
-autoresolve uninstall package <package name> and
all dependent packages
◼ If programs or directories have been deleted, reinstall the same patch in the same place and then
carry out an official uninstallation.

© SAP AG ADM515 6-38


Common Installation Errors

Examples (also see STDERR):


◼ MaxDB components have been overlooked and are still active:

◼ A local SAP system is still connected to a MaxDB instance (local or remote) via dbmrfc:

◼ Attempted downgrade:

© SAP 2008

◼ During an installation or update, you must stop all MaxDB components so that these executable files
can also be replaced.
◼ In Windows, all services relevant to MaxDB (except X Server) have to be stopped:
SAPP DB: <database name>
SAPDBXIE
(SAP DB WWW)
In Unix, X Server also has to be stopped.
◼ Using the –force_extract option for SDBINST and SDBUPD, you can replace programs that are
currently running in most cases, but it can cause these components to crash, for example, if
programs that are still running need to load libraries and cannot find the correct version of these.
◼ The system does not support patch downgrades.

© SAP AG ADM515 6-39


Checking the MaxDB Installation: sdbverify

...

© SAP 2008

◼ SDBVERIFY options:
usage: sdbverify [-h|--help] [-v|--version] [-F|--file <file name>][--set_corrupted_invalid]

-h –help show this


-v –version show version
-F --file <file name> check installed file
--set_corrupted_invalid set inconsistent packages to invalid
◼ Replacing corrupt files:
• Set packages that sdbverify identifies as containing inconsistencies to invalid using the --
set_corrupted_invalid option.
• Use sdbinst to reinstall the same MaxDB patch level, which replaces these packages.

© SAP AG ADM515 6-40


MaxDB Client Installation

This can be performed using the interactive mode of SDBINST.

Choose option 1 (Client).

You are then prompted to enter some additional authorization information


(CONTROL user).

Custom then gives the option


of installing additional
components individually.

© SAP 2008

◼ For more information, see SAP Note 822271 (FAQ: SAP MaxDB client software).

© SAP AG ADM515 6-41


Relationship Between the
Database Instance and Software Instance

Database QAS DEV QAS


instance(s)

Database
/sapdb/QAS/db /sapdb/DEV/db /sapdb/QAS/db
software Missing

Arrangement
Yes Yes
correct?

SDBINST and SDBINST and


Impact of
SDBUPD SDBUPD:
software
function correctly process terminates
updates

© SAP 2008

◼ It is technically possible to have multiple database instances on one database software installation;
these function correctly as long as no changes have to be made to the software.
◼ Changing the software, however, causes problems with the installation and update tools. The tools
themselves cannot tell whether all applications on the database instances are released for this version
after the database update.
◼ For this reason, we recommend that you use an individual software installation of the database for
each application, establishing a 1:1 relationship between the database instance and software
installation.
◼ If a 1:n relationship exists after the database software has been updated, you have the following
options:
• Delete the less important database instance to restore the 1:1 relationship.
• Back up the second instance and rebuild it by creating a system copy with an individual software
installation.
• Separate the second database instance from the software installation (db_drop
WITHOUTFILES), then create an individual database software installation specially for this
instance, and reconnect it to the first database instance (db_create).

© SAP AG ADM515 6-42


Other Administrative Topics: Unit Overview

Other Administrative Topics


Topic 1: Checking Databases
Topic 2: Creating Database Instances
Topic 3: Reinitializing Database Instances
Topic 4: Installing Patches (Release Upgrade)
Topic 5: Migrating to MaxDB
Topic 6: High Availability
Topic 7: MCOD

© SAP 2008

◼ For more up-to-date information about migration, see SAP Note 1007129 (FAQ: DB migration with
MaxDB as target).

© SAP AG ADM515 6-43


Migrating to MaxDB

General information
◼ Migration service is available
◼ Additional consulting is required (by consultants certified for migration)
◼ MaxDB Migration Safeguarding
◼ Service offered by Active
Global Support
◼ Comprises performance analysis,
optimization, and training

Loading data with R3load


◼ Maximize the I/O buffer cache during the import.
◼ Start index generation early using small tables.
◼ Use the "EnableMultipleServerTaskUKT" parameter to distribute server tasks between
more UKTs.
◼ Load the data tables into tables already clustered.
◼ Partition tables based on primary keys to speed up the process for very large tables.
◼ The export process must be changed in the source database.
◼ The subsequent import process can be started with many small imports rather than few
large ones.
© SAP 2008

◼ To load the data into clustered tables in MaxDB, you have to adjust the [Link] file and
extend the CREATE TABLE statement in the file to include the CLUSTER PRIMARY KEY
function.

© SAP AG ADM515 6-44


Options for Migrating to MaxDB

Special feature: little endian/big endian Big endian (such as RISC)


◼ Describes the sequence of the bytes in the main memory or 15..........8 7..........0
files 8-bit 8-bit
◼ Typical providers: CPU registry MSB LSB
◼ Big endian Motorola 680x0
Sun SPARC
Memory layout MSB LSB
◼ Little endian Intel x86
AMD 64 $0 ...... $1 ......
◼ Switchable endian PowerPC
Memory address
Intel Itanium Hexadecimal example
of 65534 FF FE
Impact on MaxDB in main memory
◼ Migration using backup and recovery if endian remains
unchanged Little endian (such as Intel
◼ Possible to change platform very quickly, for example, from 15..........8 7..........0
x86)
Microsoft Windows to Linux or from RISC to Unix 8-bit 8-bit

◼ SAP Note 129352 contains an extract of the matrix; you can CPU registry MSB LSB
find the complete matrix at [Link].
Memory layout LSB MSB
Special feature: liveCache Memory address $0 ...... $1 ......
◼ Due to the objects in liveCache, it is not normally possible
to perform a migration using backup and recovery. For more Hexadecimal example
information, see the guides and best practices. of 65534 FE FF
in main memory:
© SAP 2008

◼ For more information about little endian/big endian, see SAP Note 552464.

© SAP AG ADM515 6-45


Migration of Content Servers

As of MaxDB 7.7.04 B30 (but also 7.6.05 B11), it is possible to migrate content
servers using SAP MaxDB Loader without time-consuming support from the ABAP
tools:
◼ Directly between ASCII and UNICODE
◼ Between little endian and big endian

© SAP 2008

© SAP AG ADM515 6-46


Other Administrative Topics: Unit Overview

Other Administrative Topics


Topic 1: Checking Databases
Topic 2: Creating Database Instances
Topic 3: Reinitializing Database Instances
Topic 4: Installing Patches (Release Upgrade)
Topic 5: Migrating to MaxDB
Topic 6: High Availability

© SAP 2008

◼ See also SAP Note 952783 (FAQ: MaxDB high availability).

© SAP AG ADM515 6-47


High Availability Solutions for MaxDB (1)

Shadow database:
Primary Recovery
◼ The log entries are transferred
from the production
database instance to
an available
shadow instance.
◼ If errors occur, the log Saved
entries that are still DATA Log DATA
available are provided and LOG LOG
File(s)
the shadow instance
is used productively.

◼ Tools available:
◼ DBShadow by Libelle
([Link])

© SAP 2008

◼ Another name for this solution, used widely in the market, is "log shipping".
◼ Different solutions are possible, depending on the specific application requirements.
◼ For more information about the shadow database, see the Help Portal at [Link]
◼ You can implement this solution using database-internal resources by developing your own scripts.
You can also do this using Database Studio but it involves many steps.
◼ In contrast, ready-made solutions are move convenient since the vendor provides maintenance,
service, and upgrades to newer database versions.

© SAP AG ADM515 6-48


High Availability Solutions for MaxDB (2)

Cluster technology for downtime security


◼ Two servers can control the disk areas ABAP Application
of the database instance interchangeably.
Primary Service Backup
◼ If errors occur, a second server name
carries out the database functions.
◼ UNIX: Scripts for the cluster agents
are provided by the operating Cluster
system vendors:
◼ AIX: HACMP
◼ HP-UX: Serviceguard LOG
DATA
Area
◼ SunOS: Sun Cluster
◼ Linux: SteelEye
◼ For implementation tips, see SAP Note 803452.
◼ Microsoft Windows: direct support through MaxDB (see SAP Notes 319835 and 576063)

© SAP 2008

◼ Different solutions are possible, depending on the specific application requirements.

© SAP AG ADM515 6-49


High Availability Solutions for MaxDB (3)

Snapshot technology
MaxDB
◼ Datasets are copied from one disk
area to other disk areas/servers at fixed
intervals
(snapshot).
◼ If an error occurs, a second server
can be started based on the last snapshot
or one of the last snapshots.
◼ This recovers log entries created after the time
DATA LOG
of the last snapshot Snapshot 3 Snapshot 3
◼ Many storage systems on the market
offer this technology.

© SAP 2008

◼ For more information about using storage systems with MaxDB, see SAP Note 912905 (FAQ:
Storage systems used with MaxDB).
◼ When multiple data volumes are used, not all storage systems can write data with exact time
consistency on all disks/files if all data volumes are contained in one snapshot group. Ask the
storage system provider to guarantee this for you.
◼ If it is not possible, the database operations would have to be stopped temporarily so that a snapshot
of the operating system can be created in the storage system. You can do this easily by temporarily
stopping the log writer using the command
dbmcli –U c db_execute suspend logwriter
and then reactivating it using the command
dbmli –U c db_execute resume logwriter
Temporarily stopping data being written to the (data and log) volumes has no further impact, for
example, on the backup history. Deactivating the log writer also indirectly prevents the savepoint
being written to the data volumes, meaning the database is in read-only mode. For more
information, see SAP Note 616814.
◼ Based on these snapshots, you can also switch the MaxDB instance to the ADMIN operational state
after recovering a snapshot on the storage system and then use log backups to roll forward to the
point in time required.
◼ In future versions of MaxDB, external file system snapshots can also be added to the backup history.

© SAP AG ADM515 6-50


High Availability Solutions for MaxDB (4)

MaxDB
Split mirror technology:
◼ Datasets are stored using split mirror disks.

◼ If an error occurs, log entries can be


imported based on the split mirror disks

◼ For more information, see SAP Note 371247.


DATA LOG
◼ Many different types of solutions are available.

DATA LOG

MaxDB

© SAP 2008

◼ This is a user-friendly solution for performing backups and further administrative actions on a split
mirror, which does not restrict productive operation in any way.
◼ Disadvantage: normally requires two or three times more disk space.

© SAP AG ADM515 6-51


High Availability Solutions for MaxDB (5)

Hot standby technology


◼ Combination of clustering and log shipping
◼ Very fast switch process, normally under a minute (OS requires as long as 40-50 seconds for
switching)
◼ MaxDB supports the switch process and administration directly through the library provided
(for example, synchronous creation
of new volumes for both nodes)
◼ Requires more advanced functions Application
for the storage system RECONNECT

◼ Currently available for the following Primary Backup


IP SWITCH
storage systems:
◼ IBM ESS Clusters After
Images Data

◼ EMC
Continous
◼ HP RESTART

(in process)
DATA LOG DATA

Storage System
© SAP 2008

◼ For more information about hot standby solutions, see the Help Portal at [Link] or SAP
Note 952783 (FAQ: MaxDB high availability).
◼ In addition to the library provided by MaxDB development, support is also required from the library
provided by the storage partner. This is used to control the operating system conversion during the
switch process.
◼ The following white paper exists for IBM ESS, operating system AIX:
• White paper: HotStandby for MaxDB/liveCache together with IBM ESS:
[Link]

© SAP AG ADM515 6-52


Other Administrative Topics: Unit Overview

Other Administrative Topics


Topic 1: Checking Databases
Topic 2: Creating Database Instances
Topic 3: Reinitializing Database Instances
Topic 4: Installing Patches (Release Upgrade)
Topic 5: Migrating to MaxDB
Topic 6: High Availability
Topic 7: MCOD

© SAP 2008

© SAP AG ADM515 6-53


MCOD: Multiple Components in One Database

Example:
System name of application 1: SC1 A database instance contains
such as SAP SCM the data for multiple
System name of application 2: LVC applications.
for example, liveCache …
All applications share the
MaxDB Database resources of the database.
SID: SC1
Application example:
Data for ◼ SCM/APO on One DB
Application 1 (available for MaxDB only)
User/Schema:
sapsc1

Data for
Application 2
User/Schema:
saplvc

© SAP 2008

◼ Each installation of an application in the existing database instance generates a new schema
(database user). The data for this application is stored in this schema.
◼ The database instance has the system name of the first application that was installed.
◼ This first application does not need to be MCOD-capable.
◼ All other applications must be MCOD-capable.

© SAP AG ADM515 6-54


Other Administrative Topics: Summary

You are now able to:


◼ Create system copies using MaxDB
◼ Use the MaxDB software installation tools
◼ List the high availability solutions

© SAP 2008

© SAP AG ADM515 6-55


© SAP AG ADM515 6-56
Exercises

Unit: 5
Topic: Other Administrative Tasks

After completing these exercises, you will be able to:


• Create a copy of an existing database instance
• Check the internal structure of the database
• Outline the procedure for installing a database patch

When using a database productively, you may constantly need to copy


database instances and perform tests with the copied instances and data.
These exercises take you through this procedure.

5-1 Check the database structure.


5-1-1 Start a “Check Database Structure” run for the entire database using
Database Studio.
5-1-2 Use DBMCLI or the SQL Editor in Database Studio to execute a CHECK
DATA command for an individual table, such as the FILLTABLE table.

5-2 Create a system copy.


Some preparations for this task have already been made in the file system and the
user administration of the database server:
For each training database, two additional database entries have been created with
the names T<NN> → T<NN>a and T<NN>b. The corresponding administration
users t<NN>aadm and t<NN>badm have also been created. The directories can be
found next to the INSTROOT directories used in previous exercises, for example,
G:\sapdb\T<NN>a\ or G:\sapdb\T<NN>b\.
Check whether the directories for your training database exist.
5-2-1 Follow the detailed description for Creating Database Instances to create a
copy of the existing instance T<NN>. Since this installation is performed
using Database Studio from a remote host, you have to specify the
following information in the first step of the database Wizard:
Database server (ask your instructor)
Administration user (such as t<NN>aadm or t<NN>badm)
Password for administration user (such as t<NN>aadm or t<NN>badm)

© SAP AG ADM515 6-57


5-2-2 Once the instance has been created with the database Wizard and is in the
ADMIN operational state, you can use one of the complete data backups of
the source database to provide the new database with initial data. To do
this, create a suitable medium for the backup files required (complete,
incremental, and log backups), depending on your recovery strategy. At the
end of the recovery, you can switch the database to the ONLINE
operational state.
5-2-3 Finally, create an initial complete data backup of the new database instance
to establish a starting point for the subsequent log backups. Now configure
the automatic log backup function again and reload the system tables again
to be sure.

5-3 Instructor: Demonstrate how to install a patch


5-3-1 Explain preparations such as which components have to be stopped
5-3-2 Explain the postprocessing activities.

© SAP AG ADM515 6-58


Solutions

Unit: 5
Topic: Other Administrative Tasks

5-1 Check the database (VERIFY).


5-1-1 Choose Check Database Structure… from the context menu of your
database instance and then check the knlMsg diagnosis file for error
messages.
5-1-2 Procedure using DBMCLI: Execute, for example, command:
dbmcli -U c –uSQL sap<sid>,sap sql_execute “check table
SAP<SID>.FILLTABLE“.
Procedure using the SQL Editor in Database Studio: Execute SQL
statement:
check table SAP<SID>.FILLTABLE
Now check the knlMsg file again for any errors that occurred during the
execution period.

5-2 Create a system copy.


5-2-1 The procedure is described in detail in Unit 4. The automation option is
also described in the notes.
5-2-2 The procedure is described in detail in Unit 4.
5-2-3 The procedure is described in detail in Unit 4.

5-3 Instructor: Demonstrate how to install a patch

© SAP AG ADM515 6-59


© SAP AG ADM515 6-60

You might also like