Professional Documents
Culture Documents
SAP Web As 6.20 DB2 UDB v7 Administration Guide
SAP Web As 6.20 DB2 UDB v7 Administration Guide
®
SAP on IBM DB2
Universal
Universal Database for
UNIX and Windows
Document Version 1.00 - August 15, 2003
SAP AG
Neurottstraße 16
69190 Walldorf
Germany
T +49/18 05/34 34 24
F +49/18 05/34 34 20
www.sap.com
© Copyright 2003 SAP AG. All rights reserved. JAVA® is a registered trademark of Sun Microsystems, Inc.
No part of this publication may be reproduced or transmitted in any J2EE™ is a registered trademark of Sun Microsystems, Inc.
form or for any purpose without the express permission of SAP AG.
The information contained herein may be changed without prior JAVASCRIPT® is a registered trademark of Sun Microsystems, Inc.,
notice. used under license for technology invented and implemented by
Netscape.
Some software products marketed by SAP AG and its distributors
contain proprietary software components of other software vendors. MarketSet and Enterprise Buyer are jointly owned trademarks of SAP
AG and Commerce One.
Microsoft®, WINDOWS®, NT®, EXCEL®, Word®, PowerPoint® and
SQL Server® are registered trademarks of Microsoft Corporation. SAP, SAP Logo, R/2, R/3, mySAP, mySAP.com, xApps, mySAP
Business Suite, and other SAP products and services mentioned herein
® ® ® ®
IBM , DB2 , DB2 Universal Database, OS/2 , Parallel Sysplex , as well as their respective logos are trademarks or registered
MVS/ESA, AIX®, S/390®, AS/400®, OS/390®, OS/400®, iSeries, trademarks of SAP AG in Germany and in several other countries all
®
pSeries, xSeries, zSeries, z/OS, AFP, Intelligent Miner, WebSphere , over the world. All other product and service names mentioned are the
TM
Netfinity®, Tivoli®, Informix and Informix® Dynamic Server are trademarks of their respective companies.
trademarks of IBM Corp. in USA and/or other countries.
HTML, DHTML, XML, XHTML are trademarks or registered Documentation in the SAP Service Marketplace
®
trademarks of W3C , World Wide Web Consortium, Massachusetts You can find this documentation at the following Internet address:
Institute of Technology. service.sap.com/instguides
Typographic Conventions Icons
Contents
4 August 2003
SAP Database Administration Guide: IBM DB2 Universal Databas
3.4 Installation and Setup of the DB2 Control Center Extensions .........55
3.4.1 Installation of the DB2 Control Center ........................................................................55
3.4.2 Installing the DB2 Control Center Extensions.............................................................55
3.4.3 Setting Up the DB2 Control Center .............................................................................56
3.4.4 Using the DB2 Control Center Extensions ..................................................................63
4 Configuration .................................................................................... 64
4.1 Changing the Admin Tools Configuration..........................................64
4.1.1 Parameters Affecting Log File Management Storage .................................................64
4.1.2 Configuring the Admin Tools Using Environment Files ..............................................67
4.2 Configuring the System for Archiving Log Files ...............................71
4.2.1 Archiving Directly to TSM............................................................................................73
4.2.2 Archiving Directly to Disk ............................................................................................74
4.2.3 Archiving to an Alternative Storage Management Product .........................................75
4.2.4 Indirect Archiving to Tape ...........................................................................................75
4.2.5 Indirect Archiving to TSM ............................................................................................81
4.2.6 Indirect Archiving Using a Customer Script ................................................................81
4.3 Configuring TSM (Tivoli Storage Management).................................83
4.3.1 Configuring TSM Files dsm.opt and dsm.sys .............................................................84
4.3.2 Configuring TSM Environment Variables ....................................................................85
4.3.3 Configuration Considerations......................................................................................87
4.4 DB2 Configuration Parameters ...........................................................88
4.5 Disk Space Considerations for Running the Admin Tools ...............89
5 Regular Administration.................................................................... 91
5.1 DB2 Log File Management...................................................................91
5.1.1 Archiving Log Files from Disk to Backend ..................................................................91
5.1.2 Deleting Log Files .......................................................................................................94
5.2 Storage Management ...........................................................................96
5.2.1 Checking the Space Available in a File System..........................................................97
5.2.2 Checking the Space Available in a Tablespace..........................................................97
5.2.3 Checking the Size of Tables and Indexes...................................................................99
5.3 Performance Monitoring ......................................................................99
5.3.1 Monitoring Database Performance ...........................................................................100
5.3.2 Monitoring Dynamic SQL Statements .......................................................................101
5.3.3 Updating Statistics for Database Tables and Checking for Reorganization .............102
5.3.4 Job Monitoring...........................................................................................................103
5.4 Database Backup................................................................................103
5.4.1 Backup Considerations .............................................................................................103
5.4.2 Performing the Backup..............................................................................................104
5.4.3 Integrity of Backups...................................................................................................105
5.4.4 Frequency of Backups and Time Required...............................................................106
5.4.5 Advanced Backup Techniques..................................................................................106
6 Advanced Tasks ............................................................................. 107
6.1 The db6util Tool..................................................................................107
6.2 Setting and Updating Passwords......................................................108
6.3 Using the Journal in the DB2 Control Center Extensions...............108
6.4 Advanced Log File Management Tasks............................................109
6.4.1 Deleting Special Log Files.........................................................................................110
6.4.2 Deleting Tapes from the Admin DB...........................................................................112
6.5 Reorganization of Tables and Tablespaces .....................................112
6.6 Redirected Restore.............................................................................114
August 2003 5
SAP Database Administration Guide: IBM DB2 Universal Databas
6 August 2003
SAP Database Administration Guide: IBM DB2 Universal Databas
August 2003 7
1 Introduction
1 Introduction
8 August 2003
1 Introduction
Chapters
...
1. Introduction
Provides general information about the guide, its targeted audience, interfaces, naming
conventions and new features.
2. Basic Concepts
Describes administration and Admin Tools and the related concepts, including DB2
UDB-specific information on installing and configuring servers and clients for the SAP
system.
3. Installation and Setup
Explains how to install Admin Tool patches and deal with upgrades. It also covers
manual (re)installation of the tools if required.
4. Configuration
Describes the available options and steps required to configure the Admin Tools.
5. Regular Administration
Lists and describes tasks that system administrators need to perform on a regular basis
such as storage administration, backup and log file management.
6. Advanced Tasks
Covers one-time or rarely needed tasks not related to configuration. Some tasks may
be prerequisites for other day-to-day tasks, which must be performed before log files
can be stored to tape.
Also includes monitoring and performance considerations.
7. Emergency Tasks
Tasks that administrators may need to perform after a database failure.
Appendices
A. Tool Command Line Parameters
Contains detailed command line syntax for each command.
B. Troubleshooting
Describes what to do when tools do not work as expected.
C. Implementation Details
Contains internal tool information, especially for support personnel.
D. Example of the File init<DBSID>.db6
E. Example of Customer Script db6sctsm.smp
F. References
G Glossary and Index
August 2003 9
1 Introduction
Tivoli (IBM) no longer supports the product ADSM. Customers still using
ADSM are strongly advised to upgrade to TSM Client Version 4.1 or higher.
Serious problems have occurred when using the Admin Tools with TSM
Version 3.7. This version is also out of service now, so an upgrade is also
strongly advised.
Windows
The term Windows refers to Windows 95, Windows 98, Windows NT, or Windows 2000.
Servers can only be installed on Windows NT or Windows 2000. Clients can be installed on
any Windows platform.
10 August 2003
1 Introduction
Within these sections, we refer to the Admin Tools release and not the SAP
system release, which do not need to be the same.
For example, the 4.6D Admin Tools should be used on all SAP 3.1I to 4.6D
systems where DB2 UDB for UNIX and Windows Version 7 or higher is
installed. The 6.10 Admin Tools or higher should be used with all SAP system
releases above and including 6.10.
The following changes are informational or not patch-specific:
• Installation Program sddb6ins
The command line syntax of sddb6ins has been simplified by extracting information
from the environment. The sddb6ins program now also contains the remaining Admin
Tools, which it installs. sddb6ins therefore no longer requires a separate
DBATOOLS.SAR file, and the shared library path environment variable must no longer
be set before starting it.
The Admin Tools installation program sddb6ins now checks many aspects of the
environment to locate the majority of problems experienced by customers. In the past a
difficulty with the Admin Tools has been the runtime environment. Admin Tools files
and directories may have been unintentionally removed or were given the wrong
ownership or authorizations; environment variables may have been set to non-existent
directories, and so on.
For more information, see Installing the Admin Tools Manually [Page 42].
• Admin Tools in an MCOD Environment
The Admin Tools have been modified to support this SAP feature. They are only
installed with the first SAP system, that is, only once per database. As log files are
shared by all the SAP systems using the same single database, user db2<dbsid> and
all <sapsid>adm users can perform log file management tasks.
It is necessary to differentiate between the SAP system ID <SAPSID> and the SAP
system database name <DBSID>, as these are no longer necessarily the same.
Additionally, user IDs and directory names may be affected. If <SAPSID> and
<DBSID> have the same value, as is often the case for the first SAP system installed
on a database, the old terminology still applies as described in the table below.
However, there is a limitation in SAP 4.6x releases, that the initial SAP system must
have the same ID as the SAP database. Further SAP systems have different IDs. The
database connect user for the first SAP system in a 4.6D system environment is still
sapr3.
If an MCOD system is removed, you must make sure that the db2<dbsid> user
environment still points to another valid MCOD system using the same database.
August 2003 11
1 Introduction
User ID Descriptions
User Old ID New ID
Database db2<sid> db2<dbsid>
instance owner
SAP database <sid>adm <sapsid>adm
administrator
Database connect sapr3 sap<sapsid>
user
The following are examples of how the descriptions of directory names have
changed on UNIX systems compared to earlier versions of this documentation
on. If <SAPSID> and <DBSID> are the same, the real directory name after
substitution remains unchanged:
Old New
/usr/sap/<SID>/sys/exe/run /usr/sap/<SAPSID>/sys/exe/run
/db/<SID>/log_dir /db/<DBSID>/log_dir
If the original SAP system is removed, certain Admin Tools are no longer fully
functional. This restriction only applies to 4.6D SAP systems.
From SAP system Release 6.10 and higher, it is only necessary to verify that
the db2<dbsid> user is set up correctly. Use sddb6ins –checkonly to
verify this. This user may require changes to his environment.
12 August 2003
1 Introduction
For more information on released platforms and availability, see the SAP Service
Marketplace at the Internet address service.sap.com/platforms and choose →
Multiple Components in One Database (MCOD).
• 64-bit Support
The Admin Tools have been modified to work with 64-bit platforms.
Some changes were specifically implemented for the 4.6D and 6.NN Admin Tools and
delivered as patches. For more detailed information, see New Features [Page 13].
For information on the main differences between the 4.6D and 6.NN Admin Tools, see
Differences Between 4.6D and 6.NN Admin Tools [Page 16].
6.NN stands as a placeholder for all Admin Tools releases starting from 6.10
and higher.
New Features of 4.6D Patch 20 and 6.NN Patch 9
• brarchive/brrestore customer script interface
You can now write your own individual backend interface. For more information, see
Archiving Log Files from Disk to Backend [Page 91].
• Option brarchive –GAL/-DMP
You use this option to adjust the Admin DB to a file system. For more information, see
Adjusting the Content of the Admin DB [Page 135].
• Option sddb6ins –r
You use this option to recreate the Admin DB from a SAR file. For more information,
see Recovery of the Admin DB [Page 143].
• Support of two TSM management classes
The User Exit and brarchive can now archive log files to two TSM management
classes. For more information, see Archiving Directly to TSM [Page 73].
• Restore of log files excluding the Admin DB
The User Exit restores log files from log_archive or log_retrieve without any
information on those log files in the Admin DB. You activate this feature by setting
configuration variable DB2DB6_UEXIT_RETRIEVE_WO_DB in file init<DBSID>.db6.
• Admin Tools and DB2 Version 8
The Admin Tools are now supported for DB2 UDB for UNIX and Windows Version 8.
For more detailed information on 4.6D patch 22 and 6.NN patch 11, see SAP
Note 533979.
August 2003 13
1 Introduction
For more detailed information on 4.6D patch 22 and 6.NN patch 11, see SAP
Note 597356.
New Features of 4.6D Patch 23 and 6.NN Patch 12
• Indirect archiving without accessing the Admin DB
If you are using indirect archiving, the User Exit is now able to archive without
accessing the Admin DB. The necessary tasks to update the Admin DB content are
moved from the User Exit to brarchive. You activate or deactivate this feature of the
User Exit by setting configuration variable DB2DB6_UEXIT_ARCHIVE_WO_DB to ON or
OFF.
Program sddb6ins automatically sets variable DB2DB6_UEXIT_ARCHIVE_WO_DB to
ON if during the installation of the Admin Tools the new version of transaction DB12 is
recognized by the Admin Tools.
• Archiving directly to disk
If you are using direct archiving, the User Exit is now able to archive log files directly
to disk. For more information, see Configuring the System for Archiving Log Files [Page
71].
For more detailed information on 4.6D patch 23 and 6.NN patch 12, see SAP
Note 597416.
New Features of 4.6D Patch 25 and 6.NN Patch 14
• Indirect archiving without accessing the Admin DB is now the default for all
releases.
Before mirroring, the sddb6mir tool also adds missing log files. This updates the
information in the old version of transaction DB12. Archiving without the Admin DB
causes less problems. For this reason, this is now the default for all SAP system
releases. To turn archiving without the Admin DB off, set
DB2DB6_UEXIT_ARCHIVE_WO_DB to OFF in the init file.
14 August 2003
1 Introduction
August 2003 15
1 Introduction
16 August 2003
1 Introduction
Version 7.1
• Closing the Active Log File after Backup
After an online backup is complete, DB2 forces the currently active log file to be closed
and as a result it will be archived. This ensures that an online backup has a complete
set of archived log files available for recovery.
For more information, see the IBM documentation DB2 Administration Guide:
Implementation
• On Demand Log Archive Support
You can now force the currently active log file closed, which is then automatically
archived by DB2 if the User Exit is enabled. This feature gives database administrators
more granular control over their backup and restore strategy.
For more information, see the IBM documentation DB2 Administration Guide:
Implementation.
• Log Limit Increased to 32 GB
The maximum size of (the sum of) all log files has been increased from 4 GB to 32 GB.
This enables applications to perform extremely large amounts of work within a single
transaction.
For more information, see the IBM documentation DB2 Administration Guide:
Implementation.
• Renaming a Tablespace
When creating a tablespace, you specify its name. In previous versions, you were not
allowed to change that name again during the lifetime of the tablespace object. Now,
an administrator can rename a tablespace with the RENAME TABLESPACE statement.
For more information, see the IBM documentation DB2 Administration Guide:
Implementation.
August 2003 17
1 Introduction
Version 7.2
• Block Transactions When Log Directory is Full
DB2 Version 7.2 provides a new registry variable DB2_BLOCK_ON_LOG_DISK_FULL,
which is used to prevent disk full errors from being generated when DB2 cannot create
a new log file in the active log directory. DB2 attempts to create the log file every five
minutes and writes a message to file db2diag.log after each attempt. This file
indicates if your application is hanging.
For more information on the DB2 instance variable DB2_BLOCK_ON_LOG_DISK_FULL
, see the DB2 Release Notes.
• Suspended I/O
Supports continuous system availability, while allowing online split mirror handling of
the database. By momentarily suspending I/O to disk, DB2 will ensure that the split
mirror copy maintains its integrity. A new tool db2inidb has been created that
operates on split mirror copies.
If you want to use the db2inidb tool, we strongly recommend that you read
The db2inidb Tool [Page 122] before you start using it.
• Dual Logging
DB2 now has the capability to mirror the active log files to protect databases from
accidental deletion of an active log and data corruption caused by a hardware failure. A
new registry variable DB2_NEWLOGPATH2 instructs the database to write an identical
copy of the log files to a different path on a physically separate disk.
• Parallel Recovery
DB2 now uses multiple agents to perform both crash recovery and database rollforward
recovery. This may improve performance on SMP machines.
• Incremental and Delta Backups
There are two backup types supported:
Incremental backup:
Only contains pages that have been modified since the last full database or
tablespace backup.
Delta backup:
Only contains data that has changed since the last tablespace backup (full,
incremental, or delta backup).
18 August 2003
1 Introduction
Logging Enhancements
• Dual Logging
Restrictions of this feature, which was introduced in DB2 Version 7.2, have been
removed. This feature is now supported on Windows as well. You can choose the
mirror log directory by setting database configuration parameter mirrorlogpath.
• Infinite Logging
It allows an active unit of work to span the primary logs and archive logs, effectively
allowing a transaction to use an infinite number of log files. Without infinite active log
enabled, the log records for a unit of work must fit in the primary log space. Infinite
active log is enabled by setting logsecond to -1. Infinite active logging can be used to
support environments with large jobs that require more log space than you would
normally allocate to the primary logs.
Be aware that if you activate this feature, rollbacks may take a long time if the
log files containing the rollback information need to be retrieved by the User
Exit. We strongly recommend that you use this feature only if you are using
direct archiving.
If you use indirect archiving, it is possible that the User Exit cannot retrieve
required log files for a rollback, because they have already been archived and
deleted from log_archive by brarchive. In addition, you should set the
new database configuration parameters MAX_LOG and NUM_LOG_SPAN to
avoid that transactions run indefinitely.
• Block Transactions when Log Directory is Full
The block on log disk full function, which was introduced in DB2 Version 7, is now set
using database configuration parameter blk_log_dsk_ful.
• Increased Log Space
The maximum amount of log space, which can be defined, has increased from 32 GB
to 256 GB.
August 2003 19
1 Introduction
Availability Enhancements
• Online Table Reorganization
Online table reorganization allows applications to access the table during the
reorganization. In addition, online table reorganization can be paused and resumed
later by anyone with the appropriate authorization by using the schema and table
name. Online table reorganization is allowed only on tables with type-2 indexes and
without extended indexes.
• Online Index Reorganization
A table and its existing indexes can be read and updated during an index
reorganization using the new REORG INDEXES command.
• Online Configuration Parameters
Over 50 configuration parameters can now be set online. Changes to these online
configuration parameters take immediate effect without the need to stop and start the
instance, or deactivate and activate the database. You no longer have to disconnect
users when you fine tune your system, which gives you more flexibility to decide when
to change the configuration.
• DMS Container Operations
If you use database-managed tablespaces, DB2 Version 8 will allow you to drop a
container from a tablespace, reduce the size of existing containers, and add new
containers to a tablespace in a way that a rebalance does not occur.
Usability Enhancements
DB2 Control Center and 64-bit Instances
The DB2 Control Center can now be used to administer 32-bit and 64-bit instances.
20 August 2003
2 Basic Concepts
2 Basic Concepts
2.1 Introduction
This chapter describes the concepts relating to the Admin Tools, and the terminology used
throughout this documentation. Much of this terminology is described in Glossary and Index
[Page 214].
This documentation includes new and updated information that was not
available in previous versions.
August 2003 21
2 Basic Concepts
SAP System
<SAPSID>
SAP database
<DBSID> SAP processes
M
+ o
Ex nit
ec or
cute
ut
+ Exe r
o
e
Monit
Proto
c
Admin Tools + Qu o l
ery
cute
Ex e
DB2 Control Center
+ SAP Extensions Admin database
Configure ADM<DBSID>
+ Query
The following graphic shows the relationship between the Admin Tools and the DB2 Control
Center Extensions plus the SAP system and database.
22 August 2003
2 Basic Concepts
August 2003 23
2 Basic Concepts
• Database recovery
The DB2 Database Manager may be forced to restart without applications being able to
close all open transactions. The log files containing the information about changes
made by these transactions are required to perform database recovery when the
database manager is started again. This involves rolling back (undoing) all open
transactions for all applications.
• Database restore
A database can be recreated by restoring a previous backup. A backup represents the
state of a database at the time the backup was performed, but does not contain
information about transactions completed after this time. Therefore, after a backup
image is used to restore a database, log file data generated after the backup was taken
must be added to the database again, to bring the database completely up-to-date.
This process is known as rollforward recovery. The command to add the log file
information is as follows:
DB2 ROLLFORWARD.
Restoring from an offline backup image
Such a database is immediately usable after the ROLLFORWARD STOP
subcommand. Alternatively, log files can be first applied to bring the database
up to date (to end of logs).
Restoring from an online backup image
In the case of an online backup, the log files generated while the backup
operation was running are also required, as transactions may have modified the
database contents during the time of the backup. Without this additional data
the restored database cannot be activated. The database must be rolled forward
to at least the point in time when the backup operation completed to ensure
that the data is consistent throughout the database.
Rollback and database recovery do not normally require user intervention. The DB2
Database Manager retains all log files as long as they contain information from open
transactions. User intervention is only required if the directory where the database manager
stores log files is damaged or lost. This directory is known both as the LOGPATH and log
directory. In case of loss or damage, you can recover at least those files that have been
successfully archived with the tools described below.
If the log directory is changed and then the subdirectory or any required log
files in that subdirectory are removed, DB2 will look for log files in the default
log directory (SQLOGDIR) when the database is activated. If the log files are
not found, the database will enter a backup pending state.
In connection with rollforward operations, DB2 version 7 supports a log overflow directory.
The rollforward operation first checks for logs in the location specified by the LOGPATH
database configuration parameter. If you have moved any logs from the location specified by
the log path parameter, use the ROLLFORWARD overflow directory parameter to specify the
path to the logs that you moved. This is especially important in connection with recovery
when logging to raw devices.
24 August 2003
2 Basic Concepts
Each time the LOGRETAIN parameter is turned off and on again, the database
manager resets log file numbers and starts from zero again. This can result in
several log files having the same log file number on a given node. The log
files management tools only directly support recovery of the most recent
version of log files. Recovery of older versions must be done manually.
• USEREXIT
The User Exit mechanism is enabled by turning on this parameter. The User Exit is
automatically started by the DB2 engine each time a log file becomes full.
A backup is required after setting the LOGRETAIN parameter (or both), after which the
database can be started again.
August 2003 25
2 Basic Concepts
Once these parameters have been turned on and a backup has been performed, the Admin
Tools can be used to archive log files. The User Exit (db2uext2) is then automatically
started by the database each time a log file is filled. Depending on how it is configured, the
User Exit either archives log files directly to a storage management product, or it copies the
log files to the directory referred to as archive directory (as defined by the
DB2DB6_ARCHIVE_PATH environment variable). Groups of files in the archive directory can
then be archived to tape, TSM or with an individual script using brarchive later.
The database can be recovered later using the DB2 commands RESTORE and
ROLLFORWARD. Dependent on the configuration, the User Exit either retrieves log files directly
from the chosen repository, or from the archive directory and/or retrieve directories. The latter
is the directory (defined by the DB2DB6_RETRIEVE_PATH environment variable) to which log
files are restored using brrestore. To complete a rollforward operation (other than stop),
brrestore and ROLLFORWARD operations may need to be performed repeatedly until all
required log files have been retrieved and rolled into the database.
If the database is not rolled forward to the end of all logs when restarted, the
Database Manager will create new log files starting with the number
immediately following the last log file that was rolled into the database. This
can result in several log files having the same log file number on a given
node. The log file management tools only directly support recovery of the
most recent version of log files. Recovery of older versions must be done
manually.
Running the User Exit, brarchive and brrestore
The User Exit does not need to be started by a user – it is automatically called by DB2 if
configured correctly. Both brarchive and brrestore can be called from within the DB2
Control Center or can be started from the command line. brarchive can also be scheduled
to be (regularly) started using the DBA Planning Calendar (SAP transaction DB13), or
otherwise automated using scripts or batch files.
26 August 2003
2 Basic Concepts
Direct
LOGPATH DB Parameter . TSM, DISK or VENDOR
…/log_dir . S0000000.LOG
(A)
S0000005.LOG S0000001.LOG
S0000006.LOG User Exit S0000002.LOG
S0000007.LOG (D) S0000003.LOG
online active S0000004.LOG
online retained archived retained
Archive
Restore
When the USEREXIT database configuration parameter is set, the database engine
automatically starts the User Exit program to archive each log file as soon as it is full or it is
closed. The location the file is moved to depends on the configuration of the User Exit. By
default, log files are archived indirectly by first copying the file to the archive directory. The
User Exit can be reconfigured to archive directly using TSM, archive to disk or via an
alternative User Exit.
The Admin Tools can only administer the latest version of a log file with a
given number per node, that is, you cannot administer two log files with the
number 25 on node 0.
August 2003 27
2 Basic Concepts
28 August 2003
2 Basic Concepts
• Indirect archiving
When the User Exit copies log files from the log directory to the archive directory, the
files are renamed by appending the file-closure timestamp (14 digits) and the node
number (NODExxxx). In ROLLFORWARD mode, when the User Exit moves files from the
archive or retrieve directory back to the log directory, the original name is restored.
Otherwise, the files will not be recognized by DB2.
For example, during archiving, the copy of the file S0000001.LOG put in the archive
directory might be renamed to S0000001.LOG.20001130140536.NODE0000.
A file restored by brrestore (in the LOG RETRIEVE directory) still has the extended
file name.
The name is first truncated back to its original form in the copy returned to the log
directory by the User Exit when it is called to retrieve files for a ROLLFORWARD
operation.
DB2 log file names are of the format Snnnnnnn.LOG, where nnnnnnn is a seven digit
number ranging from 0000000 to 9999999. When a database is first created, log files
starting from S0000000.LOG are created. DB2 restarts the log file numbering sequence at
S0000000.LOG under the following conditions:
• When the database configuration file is changed to enable archive logging
• When the database configuration file is changed to disable archive logging
• When the log file sequence wraps, that is after log S9999999.LOG is used
The states a log file passes through, which appear in the above graphic, for example, online
active, are described in Log File States [Page 32].
Normally, only the Admin Tools should be used to manage log files. The files
should not be moved or deleted manually as this will lead to data
inconsistencies. The only exception to this is when log files that are no longer
supported by the tools (see Invalid in the section Log File States [Page 32]),
are restored. Those files must have the timestamp and node extension
removed from their names when they are moved back to the log directory.
August 2003 29
2 Basic Concepts
Be aware that the available disk space will eventually be exhausted if the
User Exit is unable to successfully archive log files over a long period of time.
The same will happen if log files archived using brarchive and restored
using brrestore are not deleted using the same tools.
Tapes can be reused, but other backend storage should be cleaned up
regularly using the Admin Tools. Storage management products often supply
their own tools for doing this or can be configured to automatically remove old
files. However, it is essential that you use the Admin Tools to delete files
when using indirect archiving, as the Admin DB is then also updated.
Log Files in Long-Term Storage
• Tape
If you use a tape as a long-term storage, the Admin DB should always reflect the
content of the tapes (in the Admin DB, there is an entry for each log file that is stored
on tape). If you reuse a tape that already contains log files, all entries in the Admin DB
will automatically be removed before the tape is overwritten with new log files.
Therefore the Admin DB does not grow. If you lose a tape or if a tape becomes
unreadable, you should delete the tape from the Admin DB to reflect this lost or
unreadable tape in the Admin DB. For more information, see Deleting Tapes from the
Admin DB [Page 112].
• TSM
If TSM is configured correctly and if you use an archive copy group for storing log files,
the log files will automatically be deleted from TSM. If you use indirect archiving, the
Admin DB does not recognize the automatic deletion and runs out of sync. To
synchronize the Admin DB, you should use brrestore –delete. For more
information, see Deleting Log Files [Page 94].
30 August 2003
2 Basic Concepts
If you use a backup copy group, you need to delete the log files manually. If you use
indirect archiving, use brrestore –delete. For more information, see Deleting Log
Files [Page 94]. If you use direct archiving, you may use db6adutl to delete the log
files.
• Customer script
If you use a customer script, you should use brrestore –delete to delete log files.
For more information, see Deleting Log Files [Page 94].
2.2.5 Protocols
The User Exit (db2uext2), brarchive and brrestore generate protocol information to
record the actions that have been performed. Protocol information is also written into the
Admin DB by the log file management tools. This information can be used by the DB2 Control
Center Extensions. The Admin DB protocols and the protocol files of brarchive and
brrestore are eventually deleted by brarchive. The frequency can be configured by
setting configuration parameter delete_protocols using the DB2 Control Center
Extensions.
August 2003 31
2 Basic Concepts
This section is mainly written for system administrators and support personnel
only for use if problems involving the Admin DB occur.
Within an SAP environment, in order for the tools to know what operations have been
performed on a log file, the log file is defined to pass though the following states during its life
cycle. This state information is stored in the Admin DB, so it is only relevant to systems using
the (default) indirect archiving method. This information is consequently not stored on
systems performing direct archiving.
• Online active
The log file is currently being used to log transactions. The location of the log file is
defined in the LOGPATH database configuration parameter. This can be either a file
system path or a raw device.
• Online retained
The log file is no longer being written to by the database, but may contain information
about transactions that the database engine has not yet written from the buffer pool to
disk. The log file is located in the log directory, and will also be in the archive directory
after the User Exit has run.
• Offline retained
The log file is no longer being used and does not contain transactions with unwritten
data pages. The log file is in the archive directory.
The original log file will also remain in LOGPATH until the database is stopped
or the DB2 Database Manager reuses the file. However, the tools have no
influence on this and so assume that the file is no longer there.
32 August 2003
2 Basic Concepts
• Archived retained
The log file has been archived using brarchive. The location of the archived log file is
a storage management product, for example, TSM (Tivoli Storage Manager) or tape. If
not explicitly deleted, the original log file is also still in the archive directory and no
restore is possible (or necessary) as long as this original log file has not been deleted
using brrestore.
• Restored retained
The log file has been restored using brrestore. The location of the restored log file is
the retrieve directory. If not explicitly deleted by using the -delete option in a
subsequent operation, the archived log file is also still available on the backend.
• INVALID
The Admin Tools can only administer the latest version of a log file with a given number
per node. If the database generates a second log file with a number already used, the
User Exit marks previous versions as INVALID. This can occur after a database
restore if the ROLLFORWARD operation does not use all log files, or by turning the
LOGRETAIN database configuration parameter off and on again. Older log files that
have been archived can still be manually retrieved from the backend using system or
storage product tools, but the Admin Tools only support the retrieval of the newest
version.
• Gone
This state is only used internally to indicate that a log file could not be found in the
location where it was expected, for example, if a customer uses MOVE, RENAME or
DELETE. This state can also occur when storage products, such as TSM, automatically
delete files after a certain period of time. A delete operation will delete such entries.
August 2003 33
2 Basic Concepts
Do not attempt to copy Admin DB information from the source system to the
new target system.
Although DB2 does not force a backup in this situation, as LOGRETAIN is normally already
active, it is essential that you take a new backup before you use the Admin Tools on the new
SAP system.
Sometimes a system copy is used to overwrite another system or a previous system copy
where the Admin Tools were already installed. In this case, the old Admin DB should be
dropped before the Admin Tools are reinstalled. Additionally, the backup history file must be
pruned to remove all previous backup information before a new backup is taken and before
the Admin Tools are used.
34 August 2003
2 Basic Concepts
Do not change user passwords only using operating system methods. Tools
that read password file dscdb6.conf will no longer be able to connect to the
database until tool dscdb6up has been used.
For information on how to set and update passwords for SAP system users, see Setting and
Updating Passwords [Page 108].
August 2003 35
3 Installation and Setup
3.1 Introduction
This chapter is intended for administrators who want to check their environment, or need to
(re)install or upgrade the Admin Tools manually.
The installation of the Admin Tools depends on the SAP installation tool. You can install the
SAP system using:
• R3SETUP
The Admin Tools are automatically installed as part of the SAP system installation.
R3SETUP creates the directories, user, groups and user environment that are required
to successfully install the Admin Tools using the sddb6ins program.
• SAPinst
The Admin Tools are not automatically installed during the SAP system installation with
SAPinst. However, you can install the Admin Tools after installing the SAP system.
SAPinst creates the users and groups that are required to successfully install the
Admin Tools using the sddb6ins program. Version 6.10 of sddb6ins and higher
creates the directories and adds variables to the user environment that are required to
run the Admin Tools.
The 6.NN Admin Tools must be used on SAP systems with release 6.10 or
higher. They do not perform correctly on SAP systems with release 4.6D or
lower, and the 4.6D Admin Tools do not perform correctly on SAP systems
with release 6.10 or higher.
Installation Overview
The following list provides an overview of the steps that you have to perform to install the
Admin Tools and enable the SAP system database for recovery:
...
1. Check the SAP system environment [Page 38] to make sure that the SAP system was
installed correctly.
2. Check the prerequisites for the installation of the Admin Tools [Page 43].
3. Install or upgrade to the latest Admin Tools. For more information, see one of the
following sections:
Upgrading the Admin Tools [Page 45] if you want to upgrade the Admin Tools to
the latest version.
Installing the Latest Admin Tools [Page 46]if you want to install the latest
version of the Admin Tools or apply the latest patch.
4. Check the Admin Tools environment [Page 47] after installation.
5. Install the DB2 Control Center on the SAP database server or one or more
workstations. For more information, see Installation of the DB2 Control Center [Page
55].
You may have already performed this step as part of the database installation.
Otherwise, this can be delayed until step 7 if rollforward recovery enabling (step 6) will
be performed on the command line.
36 August 2003
3 Installation and Setup
See also:
• For information on installing IBM DB2 Universal Database for UNIX and Windows with
the SAP system, see the following documentation:
For SAP Web AS 6.10 and higher:
SAP Web Application Server Installation on UNIX: IBM DB2 Universal Database
for UNIX and Windows
SAP Web Application Server Installation on Windows 2000: IBM DB2 Universal
Database for UNIX and Windows
You can find this documentation in the SAP Service Marketplace at the Internet
address service.sap.com/instguides → SAP Web Application Server.
For SAP Basis Release 4.6D:
SAP Basis Installation on UNIX: IBM DB2 Universal Database for UNIX and
Windows
SAP Basis Installation on Windows: IBM DB2 Universal Database for UNIX and
Windows
To find this documentation, see the SAP Service Marketplace at the Internet
address service.sap.com/instguides → SAP Basis.
For SAP R/3 Release 4.6x and lower:
To find the corresponding documentation, see the SAP Service Marketplace at
the Internet address service.sap.com/instguides → SAP R/3.
• For additional information on installing the Admin Tools, see the following SAP Notes:
SAP Note 410252
DB6: Installing the latest 4.6D DB2 Admin Tools
SAP Note 455506
DB6: Installing the latest 6.NN DB2 Admin Tools
To find the SAP Notes, see the SAP Service Marketplace at the Internet address
service.sap.com/notes.
August 2003 37
3 Installation and Setup
User Description
db2<dbsid> Database administrator
This operating system user is the DB2 instance
owner and the SAP database administrator.
<sapsid>adm SAP system administrator
This operating system user is authorized to start and
stop the SAP system and the DB2 Database
Manager (instance). <sapsid>adm has the DB2
authorizations DBADM and SYSCTRL. DB2-specific
monitoring functions invoked by SAP application
server functions require SYSCTRL authorization. This
user belongs to the operating system group
db<dbsid>ctl.
sapr3 Database user
These operating system users own all SAP database
First installed SAP system with
objects (tables, indexes and views). All database
Release 4.6D or lower
connection and instance access operations for an
SAP application server are performed using these
users.
38 August 2003
3 Installation and Setup
Groups Description
db<dbsid>adm Database system administration group
Each member of this group has SYSADM authorization
for the DB2 Database Manager instance. This is the
highest level of authorization within the database
manager and controls all database objects.
db<dbsid>ctl Database system control group
Each member of this group has SYSCTRL
authorization for the DB2 Database Manager
instance. SYSCTRL has authorizations allowing
operations affecting system resources, but not
allowing direct access to data.
Windows only: Domain-level SAP system administration group
This group is used for grouping the SAP system
SAP_<SAPSID>_GlobalAdmin
administrators. The sole function of a global group is
to gather users together at domain level so that they
can be placed in the appropriate local groups. The
members of this group are the domain users
<sapsid>adm and sapse<sapsid>.
The group SAP_<SAPSID>_GlobalAdmin is only
used when the SAP System belongs to a Windows
domain. The group SAP_<SAPSID>_GlobalAdmin
is not required for a local installation.
Windows only: Local group on an application server
SAP_<SAPSID>_LocalAdmin Only local groups are created and maintained on an
application server. A local group can only be given
authorizations to the system where it is located. If the
system is part of the domain, the local group can
contain users and global groups from the domain.
August 2003 39
3 Installation and Setup
In the following table, the Set In column shows the location where the
variables are set and where they need to be changed.
General Environment Variables
40 August 2003
3 Installation and Setup
August 2003 41
3 Installation and Setup
The 4.6D Admin Tools must be used on all SAP systems with release 3.1I −
4.6D where DB2 UDB for UNIX and Windows Version 7 or higher is installed.
The Admin Tools are installed on the database server using program sddb6ins. During
normal installation of an SAP system with R3SETUP, sddb6ins is called automatically.
The administrator only needs to execute sddb6ins manually in the following cases:
• If an SAP system was installed with SAPinst
• If you want to use the 4.6D Admin Tools and your SAP system is between Release 3.1I
and 4.6C
• After completion of an SAP system upgrade and if you have not yet installed the latest
Admin Tools
• When applying a downward compatible kernel and if you have not yet installed the
latest Admin Tools
• When manually installing the Admin Tools or applying an Admin Tools patch
• When checking the installation of the Admin Tools
42 August 2003
3 Installation and Setup
General Prerequisites
• Sufficient space
Make sure that you have sufficient space (approx. 4 MB) in the directory containing the
Admin Tools executables. sddb6ins installs the executables in the following directory:
For 6.NN Admin Tools:
UNIX: $INSTHOME/admintools/bin
Windows: %INSTHOME%\admintools\bin
For 4.6D Admin Tools
UNIX: /usr/sap/<SAPSID>/SYS/exe/run
Windows: <drive>:\usr\sap\<SAPSID>\SYS\exe\run
If you are using indirect archiving (that is parameter -NODADMDB is not used during
installation), the Admin DB requires additional space. The directory to which the
database manager configuration parameter DFTDBPATH is pointing must be large
enough to hold the Admin DB and its log files (approx. 4 MB).
• Availability of the database instance
The SAP database instance DB2<DBSID> must be running when installation program
sddb6ins is executed.
• Correct user environment
Program sddb6ins must be executed in the correct user environment.
Windows:
To start sddb6ins.exe, log on to the database server as user <sapsid>adm.
August 2003 43
3 Installation and Setup
1. Create two new groups called db<dbsid>ctl and db<dbsid>adm if they do not
already exist.
2. Change the primary group of user db<dbsid> to db<dbsid>adm and keep group
sysadm as the secondary group.
3. Add group db<dbsid>ctl as the secondary group to user <sapsid>adm.
4. Update the database manager configuration.
To do so, log on to the database server as user db2<dbsid> and enter the following
commands:
db2 update dbm cfg using SYSADM_GROUP db<dbsid>adm
db2 update dbm cfg using SYSCTRL_GROUP db<dbsid>ctl
5. Perform an instance update to correct the file authorizations of executables, for
example, db2start:
a. Log on to the database server as user db2<dbsid> and stop the DB2 instance.
Enter the following command:
db2stop force
b. As user root, switch to the instance directory and update the DB2 instance.
Enter the following commands:
cd <DB2 installation directory>/instance
./db2iupdt db2<dbsid>
c. Log on again as user db2<dbsid> and restart the DB2 instance. Enter the
following command:
db2start
6. Download the dscdb6up program from the SAP Service Marketplace at the Internet
address service.sap.com/patches.
7. To extract dscdb6up using CAR, enter the following command:
CAR -xvf dscdb6up.CAR
8. Copy the dscdb6up program to directory /usr/sap/<SAPSID>/SYS/exe/run.
9. Use chmod and chown to set the authorizations as follows:
File Permission Owner Group
<SAPMNT>/SYS/exe/run/dscdb6up 4750 root db<dbsid>ctl
<SAPMNT>/SYS/global 750 <sapsid>adm db<dbsid>adm
<SAPMNT>/SYS/global/dscd6.conf 640 <sapsid>adm db<dbsid>adm
<SAPMNT> acts as a place holder for /usr/sap/<SAPSID>.
44 August 2003
3 Installation and Setup
The values listed in the table above differ from other Admin Tools.
Abbreviation of sddb6ins Options
The following options of the sddb6ins program are not listed in detail in the sections
Upgrading the Admin Tools [Page 45], Installing the Latest Admin Tools [Page 46] and
Checking the Admin Tool Environment [Page 47]. Instead, {common option} acts as a
placeholder for the following three options:
• [-s <SAPSID>]
• [-db2dbnamepwd <pwd>] [-db2dbnamedomain <domain>]
• [-sidadmpwd <pwd>] [-sidadmdomain <domain>]
• [-NOADMDB]
• [-DEB [<level>]]
For a detailed description of these options, see Appendix A: Tool Command Line Parameters
[Page 147].
August 2003 45
3 Installation and Setup
If you are using a SAP system with Release 4.6D or lower and you want to
use the 6.NN Admin Tools, Admin Tools upgrades are not supported.
Procedure
To upgrade the Admin Tools, enter the following command:
sddb6ins -u <start release> [<target release>] {common options}
<start release> is a placeholder for the release of the previously installed Admin Tools.
For example, to upgrade the Admin Tools from 4.6D to 6.10 using the 6.10
sddb6ins executable:
UNIX: sddb6ins –u 46D
Windows: sddb6ins –u 46D –db2dbnamepwd <password of user
db2<dbsid>>
If the -NOADMDB option is used, the Admin DB will not be installed or will be dropped if it
already exists. In this case log file archiving is only performed directly by the User Exit
program db2uext2 (for more information, see Archiving Directly to TSM [Page 73]).
Otherwise, the Admin DB will be installed (if not already present) and brarchive and
brrestore are then also available.
See also:
Actions Performed by the sddb6ins Program [Page 48]
Procedure
To manually install the latest Admin Tools or to apply an Admin Tools patch, enter the
following command:
sddb6ins -i [<target release>] {common options}
For example, to install the current version of the Admin Tools, enter the following
command:
UNIX: sddb6ins –i
46 August 2003
3 Installation and Setup
The -a option of sddb6ins, which was used to install the latest Admin Tools
after the installation of a downward-compatible kernel (DCK), no longer exists.
Use the -i option instead.
See also:
Actions Performed by the sddb6ins Program [Page 48]
Procedure
To check the environment of the Admin Tools, enter the following command:
sddb6ins –checkonly [<target release>] {common options}
For example, to check the Admin Tools, enter the following command:
UNIX: sddb6ins –checkonly
Windows: sddb6ins –checkonly –db2dbnamepwd <password of
user db2<dbsid>>
August 2003 47
3 Installation and Setup
With the sddb6ins version 6.10 or higher, this verification is also performed automatically at
the end of an installation (–i) or upgrade (-u) operation. The output contains useful
information about the environment in which the Admin Tools operate. The verification tool
writes the following message types:
Message Description
Type
[I] Provides information on the current configuration.
[E] Severe configuration errors have occurred during the
installation.
[W] Warnings if possible inconsistencies have been detected
48 August 2003
3 Installation and Setup
August 2003 49
3 Installation and Setup
50 August 2003
3 Installation and Setup
August 2003 51
3 Installation and Setup
Unlike with an offline backup, if you want to perform online backups, the database
must be in rollforward recovery mode, that is LOGRETAIN must be set to ON.
There are ways of forcing the database out of BACKUP PENDING mode after
setting these parameters without performing a backup first. Do not do this, as the
Admin Tools will not operate correctly until a backup has been performed.
System copies created by restoring a database backup will also not force a new
backup if the LOGRETAIN parameter was already ON for the original database. A
new backup must be performed before the User Exit is called.
See also:
Enabling Rollforward Recovery for a Single-Partitioned Database [Page 53]
Enabling Rollforward Recovery for a Multi-Partitioned Database [Page 54]
52 August 2003
3 Installation and Setup
Make sure that you have installed and set up the DB2 Control Center before
performing these steps. For more information, see Installation of the DB2
Control Center [Page 55] and Setting Up the DB2 Control Center [Page 56].
1. Start the DB2 Control Center.
2. From the context menu of the <DBSID> database icon, choose Configure.
3. Choose Logs of the notebook.
4. Choose Retain log files for roll-forward recovery from the list.
5. In the value area, select the Yes radio button.
6. To confirm, choose OK to confirm.
7. Restart the database instance.
...
August 2003 53
3 Installation and Setup
Make sure that you have installed and set up the DB2 Control Center before
performing these steps. For more information, see Installation of the DB2
Control Center [Page 55] and Setting Up the DB2 Control Center [Page 56].
1. Start the DB2 Control Center.
2. From the context menu of the <DBSID> database icon, choose Open → Database
Partitions….
3. In the table Database Partitions, Select all nodes.
4. From the menu that appears, select Configure….
5. Choose Logs of the notebook.
6. Select Retain log files for roll-forward recovery from the list.
7. In the value area, choose the Yes radio button.
8. To confirm, choose OK.
9. Restart the database instance.
...
54 August 2003
3 Installation and Setup
The DB2 Control Center of DB2 Version 7 or lower does not support 64-bit
instances in general. In order to work with 64-bit systems, the DRDA protocol
must be used. This is available with all single- and multi-partitioned systems.
On all other systems, install DB2 Connect in addition.
If you use the direct archiving mode to archive the log files, the DB2 Control
Center Extensions are not required,.
On Windows:
...
1. Log on to the machine where you want to install the Admin Tools as a user with local
administration authorizations.
2. Insert the SAP kernel CD.
3. On the CD, change to the directory NT\I386\DBTOOLS.
4. Extract file DB6CCEXT.SAR to a temporary directory by using tool SAPCAR.
5. Change to the temporary directory.
6. Invoke setup.exe and follow the instructions.
August 2003 55
3 Installation and Setup
For the DB2 Control Center Extensions to perform correctly, the DB2 variable
DB2INSTANCE must have the same value in the system environment and the
environment of the user who starts the DB2 Control Center.
On UNIX:
...
1. Log on to the machine where you want to install the DB2 Control Center Extension as
user root.
2. Insert the SAP kernel CD.
3. Mount the CD.
4. On the CD, change to the directory UNIX/<Unix platform>/DBTOOLS.
5. Extract file DB6CCEXT.SAR to a temporary directory by using SAPCAR.
6. Change to the temporary directory.
7. Invoke the shell script install and follow the instructions
56 August 2003
3 Installation and Setup
1. In the navigation frame of the DB2 Control Center, choose Systems from the context
menu.
2. Choose Add from the menu.
The Add System dialog box appears.
August 2003 57
3 Installation and Setup
1. In the navigation frame of the DB2 Control Center, expand the node with the name of
the system where the DB2 server is located.
2. From the context menu of the Instances subnode, choose Add.
The Add Instance dialog box appears.
58 August 2003
3 Installation and Setup
1. In the navigation frame of the DB2 Control Center, expand the <system name> node,
then the instances node, and the <instance name> node.
2. From the context menu of the Databases node, choose Add.
The Add Database dialog box appears.
If you want to access a DB2 Version 7 64-bit instance using DB2 Control
Center Version 8, you must configure the DRDA communication protocol to
enable communication. Be aware, however, that in this case only limited
functionality is available.
With DB2 Version 7, the DB2 Control Center does not provide all functions on 64-bit DB2
instances. To use the DB2 Control Center for DB2 Version 7 for the administration of 64-bit
DB2 instances, you must use the communication protocol DRDA.
August 2003 59
3 Installation and Setup
If this option does not appear, you have not installed DRDA support on the
client.
8. Select Connect directly to the server.
9. To continue, choose Next.
The Add Database Wizard - 3. TCP/IP screen appears.
10. In the Host Name field, enter the host name where the SAP database is running.
11. In the Port Number field, enter the port number of the database instance.
You can find the port number in the following file on the database host. The
location depends on the host operating system:
• Windows:
<WindowsSystemDirectory>\system32\drivers\etc\services
• UNIX:
/etc/services
Look for the entry sapdb2<DBSID>.
12. To continue, choose Next.
The Add Database Wizard - 4. Database screen appears.
13. Enter the name of the SAP database and choose Next twice.
The Add Database Wizard - 6. Node Option screen appears.
14. In the System Name field, enter the name of the database host.
15. In the Instance Name field, enter the DB2 instance name.
60 August 2003
3 Installation and Setup
If this option does not appear, you have not installed DRDA support on the
client.
8. Select Connect directly to the server.
9. To continue, choose Next.
The Add Database Wizard – 3. TCP/IP screen appears.
10. In the Host name field, enter the host name where the SAP database is running.
11. In the Port number field, enter the port number of the database instance.
You can find the port number on the database host in the following file:
• UNIX:
/etc/services
• Windows:
<Windows_system_directory>\system32\drivers\etc\servic
es
Look for the entry sapdb2<DBSID>.
12. To continue, choose Next.
The Add Database Wizard – 4. Database screen appears.
13. Enter the name of the SAP database and choose Next.
The Add Database Wizard – 5. Data Source screen appears.
August 2003 61
3 Installation and Setup
14. Deselect Register this database for ODBC and choose Next.
The Add Database Wizard – 6. Node Option screen appears.
15. Choose the corresponding operating system.
16. In the Remote instance name field, enter the DB2 instance name and choose Next.
The Add Database Wizard – 7. System Options screen appears.
17. To continue, choose Next.
The Add Database Wizard – 8. Security Options screen appears.
18. Select User authentication value in server’s DBM configuration.
19. To continue, choose Next.
The Add Database Wizard – 8 DCS Options screen appears.
20. Select Configure DCS options.
21. Select Disconnect if client generates an interrupt (INTERRUPT_ENABLED).
22. Choose Finish.
The Test Connection dialog box appears.
23. Select CLI and enter the user ID and password.
24. Choose Test Connection.
25. To check for a successful test connection, choose the Results tab. In case of a
success, the following message is displayed:
CLI connection tested successfully
26. To add the Admin DB ADM<DBSID>, repeat steps 1 to 22.
You can find the port number on the database host in the following file:
UNIX: /etc/services
Windows: %SystemRoot%\system32\drivers\etc\services
Look for the entry sapdb2<DBSID>.
db2 catalog db <DBSID> at node <nodeName> authentication dcs
db2 catalog dcs db <DBSID> parms ',,INTERRUPT_ENABLED,,,,,'
db2 catalog db ADM<DBSID> at node <nodeName> authentication dcs
db2 catalog dcs db ADM<DBSID> parms ',,INTERRUPT_ENABLED,,,,,'
62 August 2003
3 Installation and Setup
August 2003 63
4 Configuration
4 Configuration
1. In the navigation frame of the DB2 Control Center, choose the database <DBSID>
using the context menu.
If you are using the DB2 Control Center Extensions with a patch level lower
than 3, you choose the database instance db2<dbsid> (containing the
<DBSID> database) using context menu.
2. Choose SAP Option Management.
The Options dialog box appears. The following is an example from an AIX system.
64 August 2003
4 Configuration
When you select a parameter, its description is displayed in the field at the bottom of
the dialog box.
3. To change the value of a selected parameter, double-click on the Value field.
4. Enter the new values.
The following parameters can be set in the Options dialog box:
Parameter Description
backup_dev_type Default storage management product, if not given on the
command line. Initially set to tape, but can be set to adsm
for TSM.
Do not set this value to tsm.
cpio_flags Flags used to modify the cpio command when archiving
files to tape. These may need modifying if a non-standard
block size is used. For more information, see Indirect
Archiving to Tape [Page 75] section Modifying the Tape
Block Size.
cpio_in_flags Flags used to modify the cpio command when restoring
files from tape. These may need modifying if a non-standard
block size is used. For more information, see Indirect
Archiving to Tape [Page 75] section Modifying the Tape
Block Size.
August 2003 65
4 Configuration
66 August 2003
4 Configuration
Be aware that for SAP system releases lower and including 4.6D, <SAPSID>
equals <DBSID> and the global directory is used as the location for the
environment files. Thus, all the variables are contained in the same file that is
located in the global directory.
• The init<SAPSID>.db6 file is located in the following directory:
UNIX: /usr/sap/<SAPSID>/SYS/global
Windows: <drive>:\usr\sap\<SAPSID>\SYS\global
Activation of Variables
All recognized variables are listed in the file and are inactive as long as they appear after the
comment sign (#). You activate a variable by removing the comment sign (#) and by adapting
the value of the variable according to your requirements.
We strongly recommend that you use only these files for configuring the
Admin Tools-specific environment variables.
August 2003 67
4 Configuration
Variable Value
INSTHOME UNIX:
(4.6D Admin Tools only) Points to the db2<dbsid> home directory.
Windows:
Points to <CD-drive>:\db2\db<dbsid>.
DB2DB6_ARCHIVE_PATH Points to the archive directory.
UNIX: /db2/<DBSID>/log_archive (default value)
Windows:
Default value for a single-partitioned database:
<drive>:\db2<DBSID>\log_archive
Default value for a multi-partitioned database:
\\<instance_owning_machine>\log_archive<DBSID>
DB2DB6_RETRIEVE_PATH Points to the retrieve directory.
UNIX: /db2/<DBSID>/log_retrieve (default value)
Windows:
Default value for a single-partitioned database:
<drive>:\db2\<DBSID>\log_retrieve
Default value for a multi-partitioned system:
\\<instance_owning_machine>\log_retrieve<DBSID>
DB2DB6_TEMP_DIR UNIX: /tmp (default value)
Windows: Value of %TEMP% (default value)
DB2DB6_STANDBY_DIR This variable is not set by default.
If this variable is used, the User Exit creates an additional copy
of the log file in the standby directory during the archiving
operation. If you want to set up a hot-standby system, you can
use this variable For more information, see The db2inidb Tool
[Page 122].
DB2DB6_STANDBY_DIR_NOERR By default, this variable is not set or set to OFF.
If the variable is set to ON, operations that fail in the standby
directory do not cause the executable, which accesses the
standby directory, to abort with an error.
DB2DB6_STANDBY_DIR_ADMDBSAR By default, this variable is not set or set to OFF.
If the variable is set to ON, brarchive creates an additional
copy of the Admin DB backup SAR file in standby directory
DB2DB6_STANDBY_DIR.
68 August 2003
4 Configuration
August 2003 69
4 Configuration
70 August 2003
4 Configuration
See also:
Appendix D: Example of File init<DBSID>.db6 [Page 204].
Direct Archiving
The User Exit archives log files either directly to disk (DB2DB6_ARCHIVE_PATH), to TSM or
to another vendor storage management product, that is log files are immediately copied from
the system to a safe backend and do no longer reside on the local system. The User Exit
program can be configured to support one of these options.
Archiving log files directly to a storage vendor product means that the User Exit program uses
the indicated storage management product to manage DB2 log files. In case of TSM the User
Exit utilizes the TSM APIs to archive and retrieve log files. All other storage products (for
example, Legato Networker from Legato System, Inc.) deliver their own implementation of the
User Exit program.
August 2003 71
4 Configuration
You can avoid an overflow of the log directory by increasing the space of the
log directory using the space you saved by not needing an archive directory.
In addition, setting DB2 registry variable
DB2_BLOCK_ON_LOG_DISK_FULL=ON (DB2 Version 7.2) or the
corresponding database configuration variable parameter
BLK_LOG_DSK_FULL=YES (DB2 Version 8) also reduces the risk of database
failure. You also may consider to use infinite logging.
Indirect Archiving
This is the default configuration. The User Exit automatically copies log files to the directory
specified in the DB2DB6_ARCHIVE_PATH variable. Then brarchive is used to archive the
copied files. In this case, you can archive log files to TSM, tape or using a customer script.
Indirect archiving offers the following advantages:
• Log files are stored on the local system until deleted by brarchive.
In case your storage management system is unavailable, you are still able to restore
and rollforward the database as long as all log files and backups are still available on
the local system.
• Simple tape support is provided by the Admin Tools.
• Option brrestore –delete allows deletion of log files that were created before a
specific timestamp. With direct archiving this function is not available.
• The time of the archiving operation can freely be chosen. Thus, network traffic can be
avoided during the day by archiving during the night.
72 August 2003
4 Configuration
However, when using indirect archiving, you have to take into consideration that there are a
few disadvantages. For example, log files located in the archive directory are unsafe until
stored to a safe backend by brarchive. The complexity of the solution, including additional
storage directories and an extra Admin DB, slightly increases the risk of failure. Especially the
existence of the Admin DB can cause problems in split-mirror scenarios and when performing
a homogeneous system copy.
See also:
For detailed information on direct and indirect archiving, see the following sections:
• Archiving Directly to TSM [Page 73]
• Archiving Directly to Disk [Page 74]
• Archiving to an Alternative Storage Management Product [Page 75]
• Indirect Archiving to Tape [Page 75]
• Indirect Archiving to TSM [Page 81]
• Indirect Archiving Using a Customer Script [Page 81]
To switch the User Exit program to direct archiving of log files, either:
• Call the installation program sddb6ins with the parameters:
-i [<target release>] -NOADMDB
The Admin DB is automatically removed.
• Drop the ADM<DBSID> database manually.
In both cases the necessary environment variable(s) must be set to indicate to the User Exit
program that direct archiving to the data storage is required, for example,
DB2DB6_UEXIT_DIRECT.
August 2003 73
4 Configuration
For the database BIN on node NODE0000, archiving log file S0000599.LOG
would result in the following values:
• File space name: /BIN
• File space type: DB2
• Object name file space: /BIN
• Object high-level name: /NODE0000
• Object low-level name: /S0000599.LOG
For storing the log files, the archive copy group is used by default. If no archive copy group is
defined, a backup copy group is used. We recommend that you define an archive copy group.
DB2DB6_UEXIT_DIRECT = TSM:MC1+MC2
74 August 2003
4 Configuration
The log files in the archive directory need to be manually archived to disk using tools of your
choice.
Make sure that the vendor User Exit program is renamed and does not
overwrite the User Exit program delivered by SAP.
Set the DB2DB6_UEXIT_DIRECT and DB2DB6_VENDOR_UEXIT variables in the environment
file init<DBSID>.db6 using the following syntax:
DB2DB6_UEXIT_DIRECT = VENDOR
DB2 DB6_VENDOR_UEXIT = <vendor user exit program name>
If the vendor User Exit program is not in the path of the DB2 instance owner db2<dbsid>,
specify the program with the fully qualified path.
For setup and error handling relating to the vendor User Exit program, refer to the vendor’s
documentation.
August 2003 75
4 Configuration
Initially, a default device class is defined. This device class initially contains one defined
device:
Windows: /dev/mt0
AIX: /dev/rmt0
Solaris: /dev/rmt/0
Linux: /dev/st0
HP-UX: /dev/rmt/0m
1. In the navigation frame of the DB2 Control Center, expand the <system name> node
until the database names are visible.
2. From the context menu of the SAP database <DBSID> icon, choose SAP Tape
Management.
3. If required, log on as user db2<dbsid>.
The Tape Management dialog box appears.
4. Choose Tapes.
5. To display a list of all known device classes, expand the <System name> node in the
tree.
76 August 2003
4 Configuration
All devices and tapes of that class will also be removed by the delete action.
For the first two actions, the Add/Change Device Class dialog box appears.
7. Enter or change the fields as required. The fields are described in detail in the table
following this procedure.
8. Choose Add or Change depending whether you want to add a new device class or
change existing data.
The fields in the Add/Change Device Class dialog box describe a tape device class. Most
fields have a corresponding configuration parameter as described in the table under
Parameters Affecting Log File Management Storage [Page 64].
Field Description
Name Name of the device class. Required but can be freely chosen.
Capacity Overrides the tape_size configuration parameter.
Type Describes the device type you can choose from the menu.
Description Optional field that describes the device class.
Rewind Overrides the rewind configuration parameter.
August 2003 77
4 Configuration
1. In the navigation frame of the DB2 Control Center, choose SAP Tape Management
from the context menu of the SAP database <DBSID>.
2. If required, log on as user db2<dbsid>.
3. Expand the <system name> node, and the <device class> node to which the device
definition will be added.
4. Expand the Devices node.
A list of known device classes is displayed.
5. You can choose from the following actions:
To add a new tape, choose Add Device… from the context menu of the <device
class> node.
To change an existing Device definition, choose Edit from the context menu of
the <device> node.
To retrieve the label of a tape currently located in a tape drive, choose Retrieve
Tape Label from the context menu of the <device> node.
To remove a device definition, choose Delete from the context menu of the
<device> node.
For the first two actions the Add/Change Device dialog box appears.
78 August 2003
4 Configuration
Due to a limitation in the Admin DB design, such changes apply to all tape
classes and tape devices.
Initializing Tapes
Tapes must be initialized before files can be archived to them. This involves writing a header
file to each tape, containing information such as volume name, SAP system ID and tape
usage count. Only a single archive operation involving one or more log files is permitted on
an initialized tape. Tapes must normally then be re-initialized before new log files can be
archived to them. As described in Changing the Admin Tools Configuration [Page 64], tapes
can be re-used if the log files go out of date as defined by the expir_period configuration
parameter.
1. In the navigation frame of the DB2 Control Center, choose SAP Tape Management
from the context menu of the SAP database <DBSID>.
2. If required, log on as user db2<dbsid>.
3. Expand the <system name> node, and the <device class> node to which the tape to be
initialized belongs.
The Tape Management dialog box appears.
4. From the context menu of the Tapes node, choose Initialize Tape….
The Initialize Tape dialog box appears
5. Enter the name of the new tape.
August 2003 79
4 Configuration
If the tape has never been initialized before or was used to archive files less
than expir_period weeks ago, the initialization is not permitted unless the
Force initialization box is selected. You can change the value of the
expir_period parameter in the SAP Option Management dialog box.
To initialize a tape the first time, the Force initialization option must be
selected.
7. To initialize the tape, choose Init.
All tape actions and their results can be seen by choosing Journal tab.
The following command initializes a tape with the name D4XA01 without
checking whether the tape has already been used or initialized. Messages are
only written to a protocol file. To initialize the tape, enter the following
command:
brarchive -i force -v D4XA01 –t/dev/rmt/0
The complete syntax is explained in Appendix A: Tool Command Line
Parameters [Page 147].
80 August 2003
4 Configuration
For the database BIN on node NODE0000, archiving the log file
S0000599.LOG would result in the following values:
• File space name: /BIN
• File space type: DB2
• High-level name: /NODE0000
• Low-level name:
/S0000599.LOG.20010606103645.NODE0000
For storing the log files the archive copy group is used by default if no archive copy group is
defined. Then a backup copy group is used.
August 2003 81
4 Configuration
The sequence of the parameters in the script must be the same as in the
...
table.
The following table lists the return codes the script must issue for every action performed so
that brarchive and brrestore can determine a success or failure:
Return Code Description
LFMVND_STATUS_OK=0 Indicates success of the action performed.
LFMVND_RC_ERROR=64 Indicates failure of the action performed.
LFMVND_COMMAND_NOT_SUPPORTED=71 Indicates that the action specified in the
script is not supported.
You must make sure that you specify the correct return codes for every action
performed − as described in the table.
For example, if the script returns LFM_STATUS_OK (although the action has
failed) brarchive and brrestore assume that the action was completed
successfully, which is not the case. Thus, the content of the Admin DB
becomes inconsistent and you risk to lose log files.
Writing Your Own Script
You use the sample script db6sctsm.smp, which is part of the Admin Tools delivery, to write
your own script. The shell script is designed for UNIX. If your system is running on Windows,
you have to write a batch file or an executable. In the sample script the TSM client dsmc is
used to archive, retrieve or delete log files.
82 August 2003
4 Configuration
We strongly recommend that you copy the sample script to avoid overwriting
during the next Admin Tool installation. After having copied the script, you can
enter your archive, retrieve or delete commands.
Activating the Script
You activate the script by setting parameter DB2DB6_LIBDB6SC_SCRIPT=<path to
customer script> in file init<DBSID>.db6.
For more information on how to set parameters in file init<DBSID>db6, see Configuring the
Admin Tools Using Environment Files [Page 67].
August 2003 83
4 Configuration
UNIX
File dsm.opt
Parameter Value
SERVERNAME <TSM server name>
File dsm.sys
Parameter Value
SERVERNAME <TSM server name>
COMMETHOD TCP/IP
TCPPORT 1500
TCPSERVERADDRESS <TSM server IP address or host name
and domain name>
PASSWORDACCESS Generate
PASSWORDDIR /etc/adsm
The entry of SERVERNAME in the dsm.opt file must fit the value
SERVERNAME in the dsm.sys file.
Windows
File dsm.opt
Parameter Value
COMMMETHOD TCP/IP
TCPPORT 1500
NODENAME <TSM client>
TCPSERVERADDRESS <TSM server IP address or host name and
domain name>
PASSWORDACCESS Generate
84 August 2003
4 Configuration
August 2003 85
4 Configuration
86 August 2003
4 Configuration
We recommend that for archiving log files you use a disk storage pool. With
this pool, you can achieve a better system and rollforward performance if
caching on the disk storage pool is switched on.
For backups, however, we recommend that you do not use such a disk
storage pool. If the DB2 backup image does not fit into this disk storage pool,
TSM will fail. An extremely large disk storage pool would be necessary to
avoid this problem.
August 2003 87
4 Configuration
88 August 2003
4 Configuration
Log Files
• Direct archiving
Make sure that the log directory provides sufficient space to avoid problems if your
storage management system might be temporarily unavailable.
• Indirect archiving
The free space in the directory where DB2DB6_ARCHIVE_PATH is pointing to, needs to
be dimensioned, depending on the log file size and the period of time between two
brarchive calls and the amount of log files that accumulate between two brarchive
calls.
The free space in the directory where DB2DB6_TEMP_DIR is pointing to needs to be
dimensioned, so that two exports of the Admin DB fit into it. Otherwise, brarchive
fails to store the Admin DB.
Protocols
• User Exit protocols
The User Exit writes its protocol files db2uext2.NODExxxx.log and
dbuext2.NODExxxx.err to the directory where the database manager configuration
parameter DIAGPATH points to.
• brarchive/brrestore protocols
These log files are initially generated in the directory where DB2DB6_TEMP_DIR points
to. They are moved to the protocols directory at the end of the brarchive/brrestore
run.
The directories differ for the Admin Tools version as follows:
For 6.NN Admin Tools:
<INSTHOME>/admintools/protocols
For 4.6D Admin Tools:
brarchive: <INSTHOME>/saparch
brrestore: <INSTHOME>/saprest
These directories need to be dimensioned to hold the small protocol files.
August 2003 89
4 Configuration
Trace Files
Trace files are only generated if the user has explicitly enabled trace file generation in the
init<DBSID>.db6 file. The trace files are only required to determine defects or by the SAP
support to fix problems.
The trace file directory can be configured in the init<DBSID>.db6 file for each executable
separately. The default directories are:
• For 6.NN Admin Tools:
<INSTHOME>/admintools/TraceFiles
• For 4.6D Admin Tools:
<DB2DB6_TEMP_DIR>/TraceFiles
90 August 2003
5 Regular Administration
5 Regular Administration
1. In the navigation frame of the DB2 Control Center, choose your system and log on as a
user with administrator authorizations.
2. On the subnode Database, from the context menu of the database <DBSID>, choose
SAP Log File Management.
3. If required, log on as user <sapsid>adm or db2<dbsid>.
The Log File Management dialog box appears.
4. Choose Archive.
5. In the Archive Log Files of Node field, choose the node from which log files should be
archived.
6. In the Log Files to be Archived field, choose the log file up to which you want to
archive. All older log files up to the one you have selected will be selected for archiving.
August 2003 91
5 Regular Administration
If you do not want the log files to be deleted from the archive directory after
archiving, select Keep Log Files in File System. Select TSM, Tape or Script:
TSM:
In the TSM Management Class field, select a TSM management class.
The possible entries for the management class are maintained using the SAP
Option Management dialog box. The corresponding keyword is adsm_mc.
Under Value, a list of management classes is specified, separated by commas.
For more information, see Changing the Admin Tools Configuration [Page 64].
Tape:
i. Select Name of First Tape.
The list of devices next to this box is then recalculated to only contain the
matching devices for that tape.
ii. Select a device. Alternatively, you can start by choosing a device name
and afterwards choose an appropriate tape.
If you want to save to two tapes simultaneously, follow the same procedure
for the Name of the Second Tape and its device. If these fields do not contain
any entries, log files are saved to a single tape.
Once you have selected an entry in one of the four boxes, the entries in the
remaining boxes are limited to those entries that match the selection.
iii. To display the full list of possible entries, start the selection process
again by choosing Reset Selection.
If the tape is not initialized or the device you want to use is not displayed
(not defined), go to the SAP Tape Management by choosing Tape. For
more information, see Indirect Archiving to Tape [Page 75].
After archiving log files to a tape, the same tape cannot be used to archive
additional log files in a later operation until the number of weeks specified in
the expir_period configuration parameter has elapsed or the tape is
initialized again. For more information, see Parameters Affecting Log File
Management Storage [Page 64].
7. To start the archive process, choose Archive.
A dialog box appears indicating that the archiving process was just started. After the
archiving has finished, another dialog box appears indicating if it was successful.
You can see all archiving actions and their results in the Journal page.
92 August 2003
5 Regular Administration
Tapes must be initialized before brarchive can use them. For more
information, see Indirect Archiving to Tape [Page 75].
Archiving Log Files to Single Tape
August 2003 93
5 Regular Administration
• If you want to archive all log files, you enter the following command:
brarchive –s –d script –out
• If you want to retrieve up to ten log files, you enter the following
command:
brrestore –a –d script –n 10 –out
• If you want to delete log files for a specified backup timestamp, you enter
the following command:
brrestore –delete 20020107120000 –d script –out
For more information, see Appendix E: Example of Customer Script db6sctsm.smp [Page
208].
94 August 2003
5 Regular Administration
Normally there is no need to delete files from this directory. Do not delete files
that are still needed by the database.
Log files will be deleted from the log directory if you:
• Drop a database.
This action deletes all log files in the current log path directory. You may need to back
up these log files beforehand, for future recovery purposes.
• Recover the database to a point in time.
When recovering the database to a point in time, log files chronologically past the point
in time are re-used and therefore lost. For example, if a rollforward operation only
needs log data up to the middle of log file 35 and you restart the database, the
remainder of log file 35 and the whole of log files 36 and onwards will be re-used.
If you need to restore again past the point in time used earlier, you cannot do so since
the log files were re-used. Retrieve the original set of log files manually to a different
location and copy them back for the restore action. You can identify the original log files
easily by their timestamp if they have the following format:
Snnnnnnn.LOG.<timestamp>.NODExxxx.
To actively delete log files, use the PRUNE LOG FILE command. This DB2 command
deletes all log files in the log directory created prior to a nominated log file. It will only do so
from the active log path. If any log files have been moved to another path, they will not be
considered by this command.
August 2003 95
5 Regular Administration
The information provided for the DBA Cockpit is valid for SAP Web AS 6.10 or
higher. For SAP system Release 4.6x, you must make sure that you have
installed the DBA Cockpit as described in SAP Note 300828.
96 August 2003
5 Regular Administration
August 2003 97
5 Regular Administration
98 August 2003
5 Regular Administration
Be aware that running a REORGCHK on the listed tables may take a long time
and affect the database performance.
To adjust the tables, choose REORGCHK. Otherwise, choose Continue.
For more information, see the SAP Online Documentation in the SAP Library.
The information provided for the DBA Cockpit is valid for SAP Web AS 6.10
or higher. For SAP system releases lower and including 4.6x, you must make
sure that you have installed the DBA Cockpit as described in SAP Note
300828.
August 2003 99
5 Regular Administration
We recommend that you keep the monitor switches turned on. SAP provides
a graphical performance monitor for DB2 to analyze the database activity
basis of the DB2 monitor switches.
Checking Buffer Pool Quality
Buffer pools are database objects used to cache database data pages in memory. If an
object’s data page is placed in a buffer pool, physical I/O access to disks is avoided. Buffer
pools can be assigned to cache only data of a particular tablespace. This is assigned within
the tablespace definition. Every DB2 database must have a buffer pool. For each new
database created, DB2 defines the IBMDEFAULTBP buffer pool. This is the default buffer pool
for the database.
The information provided in this paragraph is only valid for SAP system
Release 4.6C and higher.
You can access information on the buffer pool quality by calling transaction ST04 and
choosing Performance →Database → Buffer Pools in the navigation frame of the DBA
Cockpit.
Buffer pool related information is displayed. The values of Overall Buffer Quality, Data Hit
Ratio and Index Hit Ratio should be more the 95 percent. Otherwise, contact SAP remote
services Early Watch to improve the values.
For more information, see the SAP Online Documentation in the SAP Library.
The information provided in this paragraph is only valid for SAP system
Release 4.6C and higher.
You can access information on lock escalation, deadlocks and lock timeouts by calling
transaction ST04 and choosing Performance → Database → Buffer Pools in the navigation
frame of the DBA Cockpit.
The value of Lock Escalations, Deadlocks Detected and Lock Timeouts should be almost
zero. Otherwise, contact SAP remote services Early Watch to improve the values.
For more information, see the SAP Online Documentation in the SAP Library.
The information provided in this paragraph is only valid for SAP system
Release 4.6C and higher.
You can access information on sort overflows by calling transaction ST04 and choosing
Performance → Database → Sorts in the navigation frame of the DBA Cockpit.
The value of Sort Overflows divided by Total Sorts should result in less than 0,01. Otherwise,
contact SAP remote services Early Watch to improve the values.
For more information, see the SAP Online Documentation in the SAP Library.
Procedure
You can access information on the dynamic SQL cache by calling transaction ST04 and
choosing Performance → SQL Cache in the navigation frame of the DBA Cockpit. You can
retrieve the latest cached SQL statement by choosing Refresh.
If you retrieve data for the first time, a Selection Criteria dialog box appears where you can
limit the result set displayed. Depending on your system, the snapshot can give you a wide
range of information, which might lead to a very large result set.
If a snapshot already exists, that is, if you had already chosen Refresh at least once, you can
display the last snapshot taken by choosing Set Selection Criteria.
For more information, see the SAP Online Documentation in the SAP Library.
Explain Function
If a statement is displayed, choose Explain to list the access plan for the statement execution.
The Explain function provides a detailed analysis of expensive SQL statements, for example,
on how DB2 accesses the data to resolve the SQL statements.
To display the access plan of a statement from the SAP performance monitor:
...
To reorganize tables we recommend that you use the jobs provided in the
DBA Planning Calendar. These jobs automatically update the table and index
statistics afterwards.
The information provided in this section is valid for SAP Web AS 6.10 and
higher. For SAP system Release 4.6x, you must make sure that you have
installed the DBA Cockpit as described in SAP Note 300828.
You can schedule background jobs to display information on protocol records on all jobs that
were executed by the SAP performance monitor by calling transaction DB6COCKPIT and
choosing Jobs → DBA Log in the navigation frame of the DBA Cockpit. If you want to display
details on a single protocol record, double-click it.
For more information, see the SAP Online Documentation in the SAP Library.
You cannot back up a database that is not in a usable state except for a
database in the backup pending or the rollforward pending state.
The following is necessary to perform a backup:
• You must have SYSADM, SYSCTRL, or SYSMAINT authorization to use the BACKUP
DATABASE command.
• You must start the database manager (db2start) before taking a database backup. If
you want to use the DB2 Control Center, you do not need to explicitly start the DB2
Database Manager.
• In a partitioned database system, keep a copy of the db2nodes.cfg file with any
backup copies you take. This copy is as a protection against possible damage to this
file.
The database may be local or remote. The backup remains on the database server unless a
storage management product, such as Tivoli Storage Manager (TSM), is used.
You can back up a database to a specified disk, a tape, or a location managed by TSM or
another vendor storage management product.
After an online backup, DB2 forces the currently active log file to be closed and as a result it
will be archived. This ensures that an online backup has a complete set of archived log files
available for recovery.
For the complete syntax of this command check the DB2 documentation.
DB2 Control Center
Make sure that you have installed and set up the DB2 Control Center before
performing these steps. Fore more information, see Installation of the DB2
Control Center [Page 55] and Setting Up the DB2 Control Center [Page 56].
1. Start the DB2 Control Center
2. From the context menu of <DBSID> choose Backup → Database… .
3. In the dialog box that appears, enter the required values, including the correct backup
target.
4. Choose Backup now.
A job will be generated that can be monitored using the DB2 Control Center Journal.
For the complete syntax check the DB2 documentation and replace n wit the
catalog node number (the default value is 0).
3. To back up all other nodes in parallel, enter the following command:
db2_all "<<-n< db2 backup db <DBSID> ... "
Make sure that you have installed and set up the DB2 Control Center before
performing these steps. Fore more information, see Installation of the DB2
...
Control Center [Page 55] and Setting Up the DB2 Control Center [Page 56].
1. Start the DB2 Control Center
2. From the context menu of <DBSID> choose Open → Database Partitions….
3. From the context menu of the node number where the system catalog resides (default:
0), choose Backup….
4. In the dialog box that appears, enter the required values, including the correct backup
target.
5. Choose Backup now.
6. Repeat steps 4 to 7 for all other nodes.
A job will be generated that can be monitored using the DB2 Control Center Journal.
db2ckbkp SAMPLE.0.krodger.NODE0000.CTN0000.19990817150714.*
If the backup resides on TSM, refer to the information on db2adutl and db6adutl provided
in Managing Backups and Logs Archived on TSM [Page 121].
For more information on the db2ckbkp utility, see db2ckbkp - DB2 Check Backup Utility
[Page 158].
You can only use an online backup for recovery if the database log files that
are created during the online backup are available.
6 Advanced Tasks
Both commands can be executed with additional parameters to take snapshots periodically.
Enter:
db6util –sd [sleep time] [number of snapshots]
db6util –sl [sleep time] [number of snapshots]
For more information on the syntax of db6util, see db6util - Tool to Assist Database
Administration [Page 164].
1. In the Log File Management, Tape Management or Log File Maintenance dialog box,
choose Journal.
2. Choose the radio button with the category of actions you want to browse.
A list of actions is displayed with start and end time, return code (RC), category and
return message.
3. If you want to see an action that took place more than seven days ago, you can use the
Back button to go back in steps of seven days.
To update the list of actions with the most current data, choose Refresh.
However, there are two special cases that require advanced log file management skills:
• Log files can have special states that can be maintained in special dialog boxes. These
particular log files need to be deleted manually from the Admin DB. For details on how
to delete these log files, see Deleting Special Log Files [Page 110].
• Tapes can become unreadable or can be lost. In this case, you must manually delete
the entry for the tape from the Admin DB. For more information, see Deleting Tapes
from the Admin DB [Page 112].
Procedure
You can delete (or maintain) these special log files using either the DB2 Control Center
Extensions or the DB2 command line.
5. Choose the node where you want to delete or maintain log files.
6. Choose one of the three radio buttons:
archived
Displays log files previously archived and not deleted from the archive directory.
restored
Displays log files previously restored.
from database
Displays log files known to the Admin DB and which are marked as INVALID.
7. Select a range of log files you want to delete.
8. Choose Delete.
Procedure
Using the DB2 Control Center Extensions
...
To delete tape PRD01 from the Admin DB, enter the following command:
brrestore –dt –v PRD01 -out
The DBA Planning Calendar (transaction DB13) provides the following jobs for the
reorganization of tables and tablespaces:
• REORG and RUNSTATS of Flagged Tables
You can use this job to reorganize tables, particularly those for which reorganization is
recommended.
Whether or not it would be beneficial to reorganize a table is calculated by the Update
Statistics Job described in Updating Statistics for Database Tables and Checking for
Reorganization [Page 102].
This job displays a maximum of 100 tables recommended for reorganization as well as
additional data, such as delta table size and the duration of the last reorganization. You
choose which of the proposed tables to reorganize.
The selected tables are reorganized according to the order of the primary index using
the DB6CLP tool. The table statistics are subsequently updated.
• REORG of Tables in Tablespace(s)
Sometimes, you may want to reorganize all the tables of a particular tablespace to
remove fragmented data, thus increasing the free space. The DBA Planning Calendar
(transaction DB13) provides a utility allowing you to do this.
The job uses the external program dmdb6rts to reorganize all tables of a tablespace
and to subsequently update the table statistics.
• Automatic REORG
This job can be used to do automatic reorganizations of tables according to REORGCHK
recommendations. This job is additionally controlled by user-defined limitations such as,
for example, table size or runtime.
• REORG and RUNSTATS for Single Table
Yon can use this job to reorganize one single table
In all jobs you can specify the temporary tablespace where the DB2 Database Manager can
temporarily store the table that is being reconstructed. If no temporary tablespace is entered,
the DB2 Database Manager stores a working copy of the table in the tablespace in which the
table being reorganized resides. This temporary table will be at least as large as the original
table, so you must make sure that the tablespace used for reorganization has at least
sufficient free space to hold the original table.
2 Create Restore
brdb6brt
Script
Customized
Source DB DB Copy Restore User
Script 5 Create
Redirected
Restore 8
brdb6brt Check 7
to change
container Create 6
layout
Customized
Restore
Script
The graphic above illustrates the tasks relevant to a redirected restore process. First of all,
back up the database and retrieve data on the container layout (1) using tool brdb6brt. The
tool creates a backup of the database (3) and a CLP script for restoring this backup (2). This
script corresponds to the container layout of the database at the time of the backup. The
script can then be adapted to the needs of the database to be restored (4). This can involve
changes to the number, size or location of the containers for a restore to the same database
(6 + 8). Another possibility is to perform a homogeneous system copy (9) that normally
requires major changes to the script to match the new machine setup (5). Additionally,
brdb6brt can serve to check the script (7). It reports any failure the restore process might
encounter. In this way, failures can be avoided before they occur.
1. To create the backup and the restore script, enter the following command:
brdb6brt –s SDB –bpt Y:\BACKUPS1 Y:\BACKUPS2 Y:\BACKUPS3
Since the database is rather large, the backup is divided into three pieces.
2. Edit the script SDB.scr and change the container’s location, size and number.
3. To change the container layout, restore the database using the following command:
db2 –tvf SDB.scr
1. To create the backup and the restore script, enter the following command:
brdb6brt –s SDB –bpt Y:\BACKUPS1 Y:\BACKUPS2 Y:\BACKUPS3
Since the database is rather large, the backup is divided into three pieces.
2. Make the backup images and the script available on the target machine. This can be
accomplished by copying them to the machine via ftp.
3. Log on to the target machine and edit the script SDB.scr. Change the container’s
locations. You also need to adapt the location of the backup image to the directory
where the containers are available on the target machine.
4. Restore the database by entering:
db2 –tvf SDB.scr
If you have a multi-partitioned database, you need to run brdb6brt for all
partitions of your database. To do so, use the –nn <node number>
parameter. The scripts created include the partition number, which prevents
existing scripts from other database partitions from being overwritten.
For example, you can use this parameter to change the destination database
name from SAMPLE to SAM and the container location from /db2/sample to
/db2/sam:
brdb6brt –s SAMPLE –bm RETRIEVE –replace
SAMPLE=SAM,/db2/sample=/db2/sam
It allows you to chain commands by separating them with semicolons. Furthermore, it is not
necessary to call it in the special DB2 command shell on Windows. The tool is defined as an
external command in the SAP system and can be used on all platforms.
There are other additional functions, which are presented in the following table.
Option Meaning
-a Explicitly attaches to the database instance before the command
execution. The instance is the one to which the database given with
the –db switch belongs. If –db switch is omitted, <DBSID> is assumed
as the database name.
If S is specified, the attachment is made using user sap<sapsid>.
If A is specified, user <sapsid>adm will be used.
The password is retrieved using the password services of SAP
systems for DB2. Thus the correct environment must exist for a
successful run (DB2DB6EKEY must be set).
This switch can only be used if the caller is one of the users
db2<dbsid> or<sapsid>adm; or sapse<sapsid> on Windows.
-c Explicitly connects to the database given with the –db switch.
If –db switch is omitted, <DBSID> is assumed as the database name.
For specification of S or A the same comments as for the –a switch
apply.
This switch can only be used if the caller is one of the users
db2<dbsid> or <sapsid>adm; or sapse<sapsid> on Windows.
-l Sets the environment DB2INSTANCE to this value before execution of
the CLP command.
-db If this switch is specified without one of the –a and –c switches, an
explicit connection to the database is only made if it is cataloged
remotely.
-p Sets the partition of the database to which the command applies. This
is applicable in multi-partitioned environments. The environment
variable DB2NODE is set to the given value before the command
execution.
-V Prints out version and patch information of the tool.
Monitoring Deadlocks
Deadlocks are situations where two or more applications block each other, each waiting for
the other(s) to release a lock, for example, application 1 and application 2 update or insert
different rows without COMMIT. Then application 1 tries to access the rows that are locked by
application 2, and application 2 tries to access rows that are locked by application 1.
You can access the Deadlocks screen by calling transaction ST04 and choosing
Performance → Deadlocks in the navigation frame of the DBA Cockpit. You can display all
deadlocks that occurred in the past by choosing Show History.
For more information, see the SAP Online Documentation in the SAP Library.
To query, extract and delete backups and log files, you should use the following tools:
DB Backups Log Files saved Log Files saved
with brarchive using the User
Exit in Direct
Mode
TSM Backup Mode db2adutl brarchive db6adutl
To run the program db6adutl, use the instance owning user db2<dbsid>. db6adutl is
part of the Admin Tools and is installed in the following directory:
• For 6.NN Admin Tools
UNIX: $INSTHOME/admintools/bin
Windows: %INSTHOME%\admintools/bin
• For 4.6D Admin Tools
UNIX: /usr/sap/<SAPSID>/SYS/exe/run
Windows: <drive>:\usr\sap\<SAPSID>\SYS\exe\run
The syntax of this command is provided in Appendix A: Tool Command Line Parameters
[Page 147].
Additionally, db2adutl allows you to check backups, logs, and load copy images saved
using TSM. This utility is installed in the following directory:
UNIX: $INSTHOME/sqllib/misc
Windows: <DB2 install path>\sqllib\misc
The syntax of this command is shown in Appendix A: Tool Command Line Parameters [Page
147].
For more information on TSM, see the TSM documentation at:
http://www.tivoli.com/support/storage_mgt/adsm/pubs/
For more information on where log files are archived to on the TSM server, see Indirect
Archiving to TSM [Page 81] and Archiving Directly to TSM [Page 73].
• as standby
You use this option to:
Create normal DB2 backups with nearly no system outage. For more
information, see db2inidb Option: as standby for Backups [Page 127].
Build up a hot-standby system that is synchronized over log files. For more
information, see db2inidb Option: as standby for Hot-Standby Database [Page
129].
The procedures provided in the following sections are only intended for
experienced DB2 database administrators. Be aware that when using these
options, problems with the log file management tools might occur.
For more detailed information on the db2inidb tool, see the IBM DB2
documentation Data Recovery and High Availability Guide and Reference.
With DB2, archiving and restoring the database files and database containers
is only allowed in conjunction with the write suspend feature and the
db2inidb tool for the regular DB2 backup and restore function. If you do not
use these tools, you may cause irrevocable data loss or unexpected system
behavior.
Procedure
Performing a Backup
Ll...
1. To switch the database mode to write suspend, log on to the database server as
user db2<dbsid> and enter the following command:
db2 set write suspend for database
The database only allows read access now.
2. Create the split image. The split image must include:
All database containers (sapdata*)
The database directory:
UNIX: /db2/<DBSID>/db<dbsid>
Windows: <drive>:\db2\<DBSID>\db<dbsid>
Make sure that the image does not include log directory, archive directory
and retrieve directory. This is important because, if the split image is mounted
for a database restore, the current log files, which are contained in these
directories, will be overwritten with the old log files contained in the split
image.
3. To switch the database mode back to normal operation, enter the following command:
db2 set write resume for database
The database now allows full access again.
4. Archive the split image.
Performing a Restore
1. Log on to the database server as user db2<dbsid>.
2. To restore the split image using the storage management system tools, enter the
following command:
db2inidb <DBSID> as mirror
The database is now in rollforward pending mode.
3. Make sure that the log files required for rollforward recovery are available:
For direct archiving:
The User Exit retrieves log files as required during rollforward recovery directly
from the storage management product.
For indirect archiving:
You have to recreate the Admin DB and restore required log files. To do so,
proceed as follows:
i. Delete the Admin DB using the following command:
db2 drop db ADM<DBSID>
ii. Restore the latest Admin DB backup SAR file using brrestore –ex or
use the SAR file located in directory
<DB2DB6_TEMP_DIR>\adminDB_<DBSID> using program sddb6ins.
You can avoid the recreation of the Admin DB in this scenario if the Admin DB
uses a file system that is not located in the default database path
/db2/<DBSID>. Then the Admin DB is not contained in the split image and
contains up-to-date information after the split image has been mounted.
By default, the Admin DB is created in the path specified by the database
manager configuration parameter DFTDBPATH. You can use the redirected
restore tool to move an existing Admin DB. Alternatively, if the Admin DB has
not existed so far, you can set the database manager configuration parameter
DFTDBPATH to a different directory, for example, to /db2/ADM<DBSID>
before calling sddb6ins –i. You should reset parameter DFTDBPATH after
sddb6ins –i was called.
4. Perform a rollforward recovery to the end of logs.
a. Start the rollforward recovery using the following command:
db2 rollforward database <DBSID> to end of logs
b. Check if the rollforward recovery is complete using the following command:
db2 rollforward database <DBSID> query status
If the rollforward recovery is not complete, you have to correct the problem, for
example, by providing missing log files and repeating step a.
c. Complete the rollforward recovery using the following command:
db2 rollforward database <DBSID> to end of logs and complete
If the operation was successful, the database should now be in the most current
state and can be accessed again.
As an example, the following command would delete all log files before 1
January 2003:
brrestore –delete 20030101000000 –force
Since indirect archiving is very complex and thus very error prone in
conjunction with db2inidb tool option as mirror, we strongly recommend
that you use direct archiving.
Procedure
On the source system:
...
1. To switch the database mode to write suspend, log on to the database server as
user db2<dbsid> and enter the following command:
db2 set write suspend for database
The database only allows read access now.
2. Create the split image. The split image must include:
All database containers (sapdata*)
The database directory:
UNIX: /db2/<DBSID>/db<dbsid>
Windows: <drive>:\db2\<DBSID>\db<dbsid>
Log directory log_dir
The log files are required to roll back open transactions when db2inidb option
as snapshot is called on the target system.
Make sure that the split image does not include the archive and retrieve
directory.
3. To switch the database mode back to normal operation, enter the following command:
db2 set write resume for database
The database now allows full access again.
On the target system:
1. Prepare a standard SAP system environment for SAP databases using homogeneous
system copy methods.
2. Mount the split image using the storage system tools.
3. To initialize the database, enter the following command:
db2inidb <DBSID> as snapshot
Alternatively, if you want to change the container layout on the target system to
distinguish it from the one on the source system, you can use the following command:
db2inidb <DBSID> as snapshot using relocate <relocate db script>
You can easily create the <relocate db script> using the brdb6brt option
–bm RETRIEVE_RELOCATE on the source system. All open transaction are rolled back
and the target database can be accessed now.
Before accessing the target database, however, you should perform the following tasks
to clean up the target system.
If the source system was configured for indirect archiving, you must delete the Admin
DB on the target system. The reason is that the Admin DB, which uses circular logging
(that is, LOGRETAIN is switched OFF), is included in the split image, but the db2inidb
<DBSID> as snapshot command only supports databases where LOGRETAIN is
switched ON.:
a. To delete the Admin DB, enter the following command:
db2 drop db ADM<DBSID>
b. Prune the backup history file as the information included in that file is valid for
the source system. To do so, enter the following command:
db2 prune history force
..
Be aware that all databases using circular logging are subject to some
restrictions, for example, online backups and rollforward recovery are not
supported. If you require these features on the target system, you must
reinstall and reconfigure the log file management tools on the target system.
Procedure
Performing a Backup
On the source system:
...
1. To switch the database mode to write suspend, log on to the database server as
user db2<dbsid> and enter the following command:
db2 set write suspend for database
The database only allows read access now.
2. Create the split image. The split image must include:
All database containers (sapdata*)
The DB2 instance directory:
UNIX: /db2/<DBSID>/db<dbsid>
Windows: <drive>:\db2\<DBSID>\db<dbsid>
3. To switch the database mode back to normal operation, enter the following command:
db2 set write resume for database
The database now allows full access again.
4. Archive the split image.
On the target system:
1. To create a database instance using DB2 instance creation tool db2icrt, enter the
following command:
db2icrt <instance_owner>
2. Log on as instance owner.
3. To start the database instance, enter the following command:
db2start
4. Recreate the database from the split image:
a. Mount the split image.
b. Initialize the standby database using the following command:
db2inidb <DBSID> as standby
5. To create a database online backup using the DB2 backup command, enter the
following command:
db2 backup db <DBSID> online to /tmp
Performing a Restore
The backup images created with the backup command on the standby system can be used
as normal backups for the source system. Thus, the restore procedure is equivalent.
The backup performed on the standby system is not listed in the backup
history of the source system.
As an example, the following command would delete all log files before 1
January 2003:
brrestore –delete 20030101000000 -force
hot-
source
standby
database
database
The following graphics show the differences for direct or indirect archiving.
hot-
source
standby
database
database
log_dir log_dir
Storage
db2uext2 Management db2uext2
ARCHIVE System RETRIEVE
hot-
source
standby
database
database
db2uext2
RETRIEVE
without DB
db2uext2
ARCHIVE copy log file on
regular basis
log_archive standby_dir log_archive
brarchive
backend
Procedure
The following procedures describe the end of log scenario. The other
scenario, that is recovering from logical failures, works according to the end
of log scenario, but you must use rollforward to <point of time>
instead of rollforward to end of logs to ensure the time delay for the
hot-standby system.
Preparing the Source Database
• If you are using indirect archiving:
Configure environment variable DB2DB6_STANDBY_DIR in file init<DBSID>.db6.
The User Exit then writes a copy of the log file into the standby directory in addition to
the one the User Exit writes into the archive directory.
• If you are using direct archiving:
The central point for the log files is the storage management system. No further action
is required.
1. To switch the database mode to write suspend, log on to the database server as
user db2<dbsid> and enter the following command:
db2 set write suspend for database
The database only allows read access now.
2. Create the split image. The split image must include:
All database containers (sapdata*)
The database instance directory:
UNIX: /db2/<DBSID>/db<dbsid>
Windows: <drive>:\db2\<DBSID>\db<dbsid>
Make sure that the image does not include the log directory, the archive
directory and the retrieve directory.
3. To switch the database mode back to normal operation, enter the following command:
db2 set write resume for database
The database now allows full access again.
4. Archive the split image.
...
If you are using indirect archiving, you perform the following tasks on the hot-standby
system:
...
1. Recreate the content of the Admin DB on the hot-standby system using the latest
Admin DB backup SAR file. You can find the latest Admin DB backup SAR file in one of
the following locations:
In the standby directory (DB2DB6_STANDBY_DIR).
The SAR file is only available in the standby directory if you have set
configuration parameter DB2DB6_STANDBY_DIR_ADMDBSAR to ON in the
init<DBSID>.db6 file.
In directory <DB2DB6_TEMP_DIR>/adminDB_<DBSID> that is located on the
source system.
If the Admin DB backup SAR file is not in one of these locations or cannot be
accessed, you have to perform an emergency restore using
brrestore –ex.
To recreate the content of the Admin DB, enter the following command:
sddb6ins –r <SAR file>
2. Perform a rollforward recovery to end of log files.
a. To start the rollforward recovery, enter the following command:
db2 rollforward db <DBSID> to end of logs
b. To check if the rollforward recovery is complete, enter the following command:
db2 rollforward db <DBSID> query status
If the rollforward recovery is not complete, you have to correct the error, for
example, by providing missing log files and repeat step a.
c. To complete the rollforward recovery, enter the following command:
db2 rollforward database <DBSID> and complete
If the operation was successful, the hot-standby database should now be in the
most current state and can be accessed again.
1. Set DB2 instance registry variable DB2_NEWLOGPATH2 using db2set. Enter the
following command:
db2set DB2_NEWLOGPATH2=ON
DB2 creates the name of the second log directory from the first log directory by adding
2.
2. To activate this change, restart the instance.
To activate dual logging on DB2 UDB for UNIX and Windows Version 8, proceed as follows:
1. Set DB configuration parameter MIRROR_LOGPATH. Enter:
db2 update db cfg for <DBSID> using MIRROR_LOGPATH <second log directory>
DB2 calls the User Exit just once for each log file regardless if dual logging is
activated or not. This means that the log files are not archived twice. If you
use indirect archiving, the Admin DB keeps track of only one log file.
brarchive stores only one log file.
Before you enter the –GAL option of brarchive you should use the preview
mode with the –DMP option to make sure that your changes to the Admin DB
are correct.
Procedure
To adjust the content of the Admin DB, you use the following brarchive options:
• -GAL add
Log files that are not known to the Admin DB but located in the archive directory are
added to the Admin DB.
• -GAL remove
Log files that are assumed to be in the archive directory but do not exist there are
removed from the Admin DB.
• -GAL revert
With this option, you can revert the state of log files from ARCHRET (archive retained) to
OFFLRET (offline retained) if the log files are still in the archive directory. The next time
brarchive is run to archive log files, these log files will be treated like log files that
have not yet been archived; they will then be archived again.
7 Emergency Tasks
One type of problem that requires point-in-time rollforward recovery is the corruption of data
that is caused by errant logic or incorrect input in an application. You can use rollforward
recovery to recover the database to a point-in-time that is close to when the application
began working with the database.
A log uses a timestamp associated with the completion of a unit of work. The timestamp in
the log uses the Coordinated Universal Time (CUT). CUT helps to avoid having the same
timestamp associated with different logs, for example, because of a change in time
associated with daylight savings time. The timestamp used on the backup is based on the
local time that the backup started. As a result, when you call the ROLLFORWARD command,
you must specify the time in CUT.
1. In the navigation frame of the DB2 Control Center, from the context menu of the SAP
database, choose SAP Log File Management.
2. If required, enter user <sapsid>adm or db2<dbsid>.
The Logfile Management dialog box appears.
3. Choose Restore.
4. Choose the node where you want to restore log files.
5. To determine which log files are to be restored, choose a backup date.
All available log files for the selected backup are displayed together with the number of
locations on which they are stored.
6. In the Restore logiles taken at group box select a log file range to be restored.
Due to a program limitation, the oldest log file must be at the start of the
range.
The -a arguments (shown in the following tables) must be log file numbers
and not log file names. For more information on the syntax of brrestore,
see brrestore - Log File Retrieval Tool [Page 153].
We recommend that you first recover the Admin DB if necessary, and then
use the standard restore command brrestore -a as described in the tables
above.
Prerequisites
• The SAP database has been restored from a backup and left in
ROLLFORWARD_PENDING state.
• You have started the database ROLLFORWARD and determined that DB2 requests log
files that cannot be retrieved directly from the active log or by the User Exit from the
archive or retrieve directory.
Procedure
You can perform the following procedures using either the DB2 Control Center or
brrestore.
1. Locate the most recent backup of the Admin DB ADM<DBSID> on TSM or tape and
recreate the database as described in Recovery of the Admin DB [Page 143].
2. Use the DB2 Control Center Extensions to restore the log files from TSM or tape as
described in “Restoring Log Files” in this section.
brrestore
If you do not currently have access to the Admin Tools, you can restore the log files
completely independently of the DB2 Control Center and the Admin DB. This procedure
allows you to retrieve log files and Admin DB backups directly from tape or TSM.
...
1. After restoring the SAP database and starting the rollforward recovery, determine which
log files are not yet available but will be required for the recovery process. That is,
which log files were created after the backup was taken but are currently not in the
log_dir, log_archive or log_retrieve directories.
2. To find out where these files are located, enter the following command:
brrestore -q <file pattern>
{ -d tsm | -d tape -t <tape address> | -d script }
3. To restore the log files from the archive, enter the following command:
brrestore –ex <file pattern> [<from time>[<to time>]]
{ -d tsm | -d tape –t <non rewind addr> | -d script }
<non_rewind_addr> is the non-rewind address of the tape for restoring from tape.
4. Put the files where DB2 or the User Exit expects to find them (log_dir,
log_retrieve) and continue the rollforward recovery.
To restore all files from a tape on Windows, enter the following command:
brrestore -d tape –ex "*" -t /dev/nmt0.1
To retrieve all log files in the number range 100 to 199 that were archived to
TSM between November 1997 and the current day, enter:
brrestore -d tsm -ex "S00001*" 199711
For more information on the syntax of brrestore and non-rewind addresses, see brrestore -
Log File Retrieval Tool [Page 153].
It is not essential but useful to prune the DB2 backup history file (PRUNE…).
c. Make sure that the SAP database parameters LOGRETAIN and USEREXIT are
both set to ON.
d. Perform a full backup of the SAP database.
• You recover the Admin DB from a safety copy.
To make sure that the Admin DB ADM<DBSID> can be recovered, an export of
essential information from that database is archived to the same target as the log files
just archived.
brarchive does this export and archiving automatically after successfully archiving
one or more log files. This database safety copy is not a database backup but a
compressed archive file (adminDB<timestamp>.SAR) made up of individual table
exports. This database backup image does not contain job information such as the one
shown on journal pages in the DB2 Control Center. This data is lost when
ADM<DBSID> is recreated using this image.
<non rewind addr> is the non-rewind address of the tape for restoring
from tape. For more information on non-rewind addresses, see brrestore –
Log File Retrieval Tool [Page 153].
You can use the pattern adminDB.20000626*.SAR to retrieve all safety files
of the Admin DB archived on August 26, 2000. This pattern reduces the
number of log files that are to be retrieved. To retrieve the above mentioned
safety file(s) to the current working directory, enter the following command:
• For TSM:
brrestore –d tsm –out –ex “adminDB.20000626*.SAR“
• For tape:
brrestore –d tape –out –ex “adminDB.20000626*.SAR“
sddb6ins –r adminDB.20000626123504.SAR
This command performs the following actions:
• It creates the Admin DB.
• It extracts SAR file.
• It imports IXF files from SAR file.
• It adds backups, which were made after the SAR file has been created, to
the Admin DB.
• It adds log files from log_archive that are not known to the Admin DB
to the Admin DB. The reason is that these log files are moved to
log_archive after the SAR file has been created.
Parameter Action
-h Displays the application command line syntax.
-help
-V Displays the application information and library version
-Version information if -d is specified.
Modifier Description
-d <device> Device to archive files to retrieve files from tape,
tsm or any other backend using a customer
-device <device>
script. -d tsm can be followed by a single TSM
management class or by two TSM management
classes separated by ‘+‘.
-DEB [<level>] Switches on trace. <level> is a value between
1 (low detail) and 9 (high detail). However, the
trace is normally turned on in the
init<DBSID>.db6 file.
-one No automatic tape eject after successful archive
operation
-out Displays the protocol on the command line
(stdout).
Backup/Retrieve Mode
To create a backup or a restore script, use the following syntax:
Command Parameter:
Parameter Description
-bm BACKUP Creates a backup of the specified database only.
-bm RETRIEVE Creates the restore script for the specified database only.
-bm BOTH Creates a backup of and the restore script for the specified
database.
-bm RETRIEVE Creates the relocate script for the specified database.
RELOCATE
-s <SourceDB> Name of the database for which the backup and/or restore
script should be created
-pp <ProtocolPath> Directory where the protocol file for the brdb6brt run will
be written to. The default value is the working directory. The
protocol file is named <SourceDB>.brp or
<SourceDB>_NODE<NodeNumber>.brp in a multi-
partitioned environment.
-i <ScriptPath> Directory where the restore script will be written to. The
default value is the working directory. The restore script is
named <SourceDB>.scr or
<SourceDB>_NODE<NodeNumber>scr in a multi-
partitioned environment.
-nb Number of buffers reserved for the execution of the backup.
<NumberOfBuffers> The default value is 2.
-bs <BufferSize> Size of the buffer for the backup operation, in 4 KB
allocation units. The default value is 1024.
-es The restore script is created for experts, that is, only
comments that are really needed are included.
-ol Backup operation is done online.
-ts <Timestamp> Only used in retrieve mode. If specified, the timestamp in
the restore script is set to this value which must be in the
form YYYYMMDDhhmmss. The default value is the current
date and time.
- replace With this option you replace strings in the generated scripts
<ReplaceDefinition> for redirected restore and relocate. Parameter
ReplaceDefinition must have the format <orig.
string 1>=<repl. string 1>,<orig. string
1>=<repl. string 2>,…. This option only makes sense
for –bm RETRIEVE, -bm BOTH and –bm RETRIEVE
RELOCATE.
-parallelism Allows you to specify the parallelism degree for backup and
<degree> redirected restore operations.
-nn <NodeNr> In a multi-partitioned environment the backup operation is
done against this node. The restore script is specific for this
node and is named
<SourceDB>_NODE<NodeNumber>.scr.
-bpt <Device> To back up the database to tape, specify a valid tape
device. You can split the backup into multiple pieces by
specifying multiple devices separated by blanks.
-bpt <Directory> To back up the database to a directory, specify a valid
directory. Make sure it has sufficient space to hold the
backup volume. It is possible to split the backup into
multiple pieces by specifying multiple directories separated
by blanks.
-bpt TSM With this option you back up the database into TSM. Specify
[<NumberOfSessions>] NumberOfSessions for the TSM connection.
-bpt XBSA With this option you back up the database into an XBSA-
[<NumberOfSessions>] compliant storage management system. Specify
NumberOfSessions for the XBSA connection. This feature
can only be used on DB2 V8.
-bpt VENDOR With this option you use a third party shared library to
<LibName> perform the backup operation. Specify the library as
[<NumberOfSessions>] LibName and optionally the NumberOfSessions.
Check Mode
Use this syntax to check whether a given restore script would succeed on this machine. The
user who performs the check mode should be the instance owner of the database instance.
The terminal output of the check run is written to a protocol file in the current directory. The
name of the protocol file is <SourceDB>.chk or <SourceDB>_NODE<NodeNumber>.chk
depending on the specified script name.
Command Parameters
Parameter Description
-bm CHECK Checks whether a given restore script would succeed on
this machine
-ip <ScriptName> Name of the restore script to be checked on this machine.
By default, the restore script is named <SourceDB>.scr
or <SourceDB>_NODE<NodeNumber>.scr in a multi-
partitioned environment.
-nn <NodeNr> In a multi-partitioned environment the check operation is
done against this node.
-user <Username> To perform the database dependent checking of the check
mode as another user, you can specify the user name
here.
-using <Password> Password for the specified user
Parameter Action
-h Displays the application command line syntax.
-help
-V Displays application information and library version
information if -d is specified.
Modifier Description
-d <device> Device to archive files to retrieve files from tape, TSM or
-device <device> any other backend using a customer script. -d adsm can
be followed by an TSM management class
-DEB [<level>] Switches on trace. level is a value between 1 (low
detail) and 9 (high detail). However, the trace is normally
turned on in the init<DBSID>.db6 file.
-one No automatic tape eject after successful archive
operation
-out Displays the protocol on the command line (stdout).
If you have more than one tape device to address, replace the “0” with “1”, “2”
and so on as appropriate. For example, the non-rewind address of the second
tape on Solaris is /dev/rmt/1n.
Parameter Description
QUERY Queries the TSM server for DB2 objects.
EXTRACT Copies DB2 objects from the TSM server to the current
directory on the local machine.
DELETE Either deactivates backup objects or deletes log archives
on the TSM server.
VERIFY Performs consistency check on the backup copy that is
on the server.
This parameter causes the entire backup image to be
transferred over the network.
Command Parameters
Parameter Description
-a Displays all available information.
-c Displays the results of check bits and check sums.
-d Displays information from the headers of DMS tablespace data
pages.
-h Displays media header information, including the name or path of
the image expected by the restore utility.
-H Displays only the media header information.
This option does not validate the image.
Validation will be performed on the entire image if this option is not
specified.
-l Displays log file header data.
-o Displays detailed information from the object headers.
<file name> The name of the backup can be checked at a time.
Parameters
You must issue the db2trc command several times to turn tracing on, produce a dump file,
format the dump file, and turn tracing off. The following table represents the order in which
you use the parameters:
Parameter Description
on Use this parameter to start the DB2 trace facility. See the next
table for information about the options for this parameter.
dump If you are tracing to memory, use this parameter to dump the
trace information out to a file once you reproduce the error. The
following command puts the information in the current directory
in a file called db2trc.dmp:
db2trc dump db2trc.dmp
You must specify a file name with this parameter. The file is
saved in the current directory unless you explicitly specify a
path.
off After you dump the trace to a file, turn the trace off by entering
the following command:
db2trc off
flw | fmt After you dump the trace to a binary file, confirm that the trace
was successful by formatting it into an ASCII file. Use either the
flw option (to sort by process or thread), or the fmt option (to
list every event chronologically). For either option, you must
specify the name of the dump file and should specify the name
of an output file that will be generated.
For example:
db2trc flw db2trc.dmp db2trc.flw
db2trc fmt db2trc.dmp db2trc.fmt
These options are provided for you to verify the trace. In most
cases, only the dump file itself should be sent to the DB2
Customer Service.
l [ buffer_size] This option specifies the size and behavior of the trace
| -i buffer.-l specifies that the last trace records are retained, that
[buffer_size] is, the first records are overwritten when the buffer is full.
–i specifies that the initial trace records are retained, that is,
no more records are written to the buffer once it is full.
The buffer size can be specified in either bytes of megabytes
(MB). To specify the buffer size in megabytes, add the
character m to the buffer size. For example, to start db2trc
with a 4 MB buffer, enter the following command:
db2trc on -l 4m
Unlike the other programs described here, the User Exit parameters allow no
spaces before their arguments.
The -SP and -LS parameters are only used if a raw device is used for
logging.
DB2 Parameters Passed to the User Exit Program
Parameter Description
-OS<os> Platform on which the instance is running, for example, AIX,
Windows, Solaris, HP-UX and Windows 98
-RL<db2rel> DB2 release level
-RQ<request> Request type, for example, archive or retrieve
-DB<dbname> Database name
-NN<nodenum> Local node number
-LP<logpath> Fully qualified path to the log files. The path must contain the
trailing path separator.
-LN<log name> File name of the log file
-AP<TSMpasswd> TSM password. It is passed to the User Exit if it is provided
in the database configuration.
-SP<startpage> Log extent starts at this number in steps of 4 KB pages of
the device.
-LS<logsize> Size of the log extent in 4 KB pages
Parameter Description
QUERY Queries the TSM server for log files.
EXTRACT Copies log files from the TSM server to the current
directory on the local machine.
DELETE Either deactivates log files or deletes log files on the
TSM server.
ARCHIVE Performs action for log files in TSM archive copy group.
BACKUP Performs action for log files in TSM backup copy group.
BOTH Performs action for log files in TSM archive and backup
copy group.
BETWEEN <sn1> AND Specifies that the logs between log sequence number 1
<sn2> and log sequence number 2 are to be used.
DB <dbname> Considers only those objects associated with the
specified database name.
NODE <n> Considers only those objects created by the specified
node number.
WITHOUT PROMPTING The user is not prompted for verification before objects
are deleted.
Parameter Description
-h Prints help text.
-V Prints version information.
-n <dbname> Database name. The default value is the value of environment
variable DB2DBDFT.
-auth User authentication. If this option is not specified, db6util tries
to retrieve the <sapsid>adm password from the DB2 password
service.
-o Log file. The default value is stdout.
-w Result file. The default value is stdout.
-r RUNSTATS on single tables and all indexes
-rf RUNSTATS on tables provided in file first
-rv RUNSTATS on tables with VOLATILE attribute. Tables flagged in
DBSTATC with ACTIVE = N are not affected. The VOLATILE
attribute is removed after RUNSTATS.
-f Gets tablespace free space information.
-dg Gets database parameter.
-dm Modifies database parameter.
-mg Gets database manager parameter.
-mm Modifies database manager parameter.
-sd Displays overview over deadlocked processes in application
snapshot.
-sl Displays overview over deadlocked processes and processes in
lock wait status in application snapshot.
Command Parameters
Parameter Description
<dbName> Specifies the SAP database name <DBSID>.
-NODExxxx Partition number, for example, NODE0002
-ONLINE | OFFLINE Specifies online or offline backup mode.
-ADSM OPEN <num> Number of I/O sessions to be used with TSM
SESSIONS
-TO <targetArea> Lists directory or tape device names.
-LOAD <vendorLibrary> Name of shared library containing the vendor backup
OPEN <num> SESSIONS I/O functions and the number of I/O sessions to be
used
-BUFFERS <num> Number of buffers to be used
-BUFFERSIZE <size> Size, in pages, of the buffer used when building the
backup image. The default value is 1024.
-PARALLELISM <p> Number of buffer manipulators to be spawned during
the backup process. The default value is 1.
Command Parameters
Parameter Description
-n <dbsid> Specifies the SAP database name <DBSID>.
-tALL Performs the operation on all database tables.
-tDBSTAT Performs the operation on all selected DBSTATC tables.
-tCALL Calculates REORGCHK information on all database tables
with current statistics.
-t<tabschema>.<tabname> Table name, for example, SAPR3.MONI
-z <maxRuntime> Maximum amount of time (in minutes) for the execution of
the program. The default value is 1200 minutes.
-m <statisticalOption> To use a statistical option, specify one of the following
letters:
• b
Both tables and index statistics are gathered. This is
the default value.
• t
Table statistics only
• I
Indexes only
• d
Table with extended (distribution) statistics
• x
Extended statistics for indexes only
• e
Both table (with distribution statistics) and basic
indexes
• y
Extended statistics for indexes and basic table statistics
• a
Extended statistics for indexes and table statistics with
distribution
-l <longFieldTimeFrame> Maximum amount of time (in minutes) spent on the
calculation of the size of long fields. The default value is
1200 minutes.
Command Parameters
Parameter Description
-n <dbName> Specifies the SAP database name <DBSID>.
-t <tablespace> Specifies the name of the tablespace that contains the
tables to be reorganized.
-m Specifies the name of the tablespace where the DB2
<tempTablespace> Database Manager can temporarily store the table
being reconstructed.
The page size must match the page size of the
tablespace specified with the –t switch.
On UNIX, sddb6ins must always be called with root authorization but with
the user environment for user db2<dbsid> as described in Installation and
Setup [Page 36].
Command Parameters
Parameter Description
Command Parameters
Parameter Description
-m Mirrors the Admin DB ADM<DBSID> to the SAP database
<DBSID>.
-DEB Activates the tracing facility. The detail level can be specified using
[<level>] <level>. <level> can be between 1 and 9. The default value is
3. The value 9 means “very detailed”.
Appendix B: Troubleshooting
DB2 Traces
The DB2 software provides several trace facilities to track down a variety of problem
categories that might occur when running or developing DB2 applications.
The decision to run a trace must be carefully met. The following facts should be taken into
consideration:
• In most cases, system performance will decrease.
• It is a time-consuming task.
• The amount of trace data can be enormously large. For this reason, it is essential to
find the smallest possible scenario that reproduces the problem. It might be necessary
to drill down, or even stop other activities while recreating the problem situation with the
trace turned on.
• Interpreting trace data properly requires detailed low-level knowledge of DB2. For this
reason, traces are usually only run at the request of DB2 support.
• Problem situations that have been observed might disappear during attempts to
reproduce them with the trace turned on.
All DB2 traces are documented in the Troubleshooting Guide of the DB2 Online
Documentation delivered with the software.
1. To store trace data in a preallocated buffer of size <memory> in shared memory, turn
the trace on by entering the following command:
db2trc on –l <memory> -s
2. Reproduce the problem.
3. Dump the trace data to a file named, for example db2trc.dmp, by entering the
following command:
db2trc dmp db2trc.dmp
4. Turn off the trace by entering the following command:
db2trc off
5. Format the trace into two files, db2trc.fmt and db2trc.flw by entering the
following command:
db2trc fmt db2trc.dmp db2trc.fmt
db2trc flw db2trc.dmp db2trc.flw
While formatting, the output is written to the screen. If the output mentions that the trace has
wrapped, the amount of memory reserved for trace data was insufficient and the trace might
not be useful. The trace needs to be repeated with a larger amount of memory. Typical
values to start with are 20000000 or 40000000 (20 or 40 million bytes).
Procedure
...
1. To turn the DB2 CLI trace on or off, log on as DB2 instance owner.
2. To activate the trace, parameter TRACE in the CLI configuration needs to be set to 1.
To do so for all databases in a DB2 instance, enter the following command:
db2 update cli cfg for section common using trace 1
3. To de-activate the trace, enter the following command:
db2 update cli cfg for section common using trace 0
4. To configure the trace, several parameters can be set. Enter the following command:
db2 update cli cfg for section common using <parameter> <value>
5. To verify the current settings, enter the following command:
db2 get cli cfg
Parameter Description
TRACEFILENAME <file> Path of the file containing all trace data
TRACEPATHNAME <path> Directory to store trace files, one per
process
TRACEFLUSH 0|1 If this parameter is set to 1 it forces a write
to disk for each entry.
The trace output is intended for experienced support personnel and the
application developers. There are often several items that appear to be errors,
but are acceptable under certain conditions.
Environment Variables
Tracing of sddb6ins can only be activated using the command line option
-DEB. You can neither use the environment nor the ini file.
Default Trace File Names
Keep in mind that HW stands for UNIX if the DB2 Control Center runs on UNIX,
or I386 if it runs on Windows.
Return Description
Code
0 Successful
1 DB2 shared library not found. For detailed analysis, activate the tracing facility.
On UNIX: Verify if environment variable INSTHOME is set correctly.
4 Temporary error encountered (system memory). Retry. If the problem persists,
contact your system administrator and SAP support.
5 TSM shared lib could not be loaded.
Check if the specified shared library is in the path of the DB2 instance owner:
UNIX: libApiDS (for 64bit libApiDS64)
Windows: ADSM32.dll
If files are being archived directly to TSM by the User Exit, check environment
variable DB2DB6_VENDOR_UEXIT.
6 Function module in the shared library could not be loaded. Check previous
error messages.
8 The User Exit returns this value to the DB2 Database Manager for most
failures. The DB2 Database Manager automatically retries archive operations
again after five minutes. If processing of the same log file fails repeatedly,
check the error file db2uext2.err.NODExxxx for more detailed information.
12 Hardware error
16 Error with the User Exit program or system function used by the program, for
example, signal handling). Retry. If the problem persists, contact SAP support.
20 Error with one or more of the parameters passed to the User Exit program.
Check whether you are using a version of db2uext2 that is compatible with the
database product release.
23 Admin DB access error. Contact SAP support.
24 The User Exit program was not found. This return code is recorded in the
db2diag.log. Check if program db2uext2 is available in the following
directories:
UNIX: $INSTHOME/sqllib/adm/
Windows: <DRIVE>:\sqllib\bin\
28 I/O fail
30 File I/O error. Accompanying message should contain the system error number
defined in file errno.h.
35 • Archive operations:
If the source is the log file to be archived by the DB2 User Exit, this is just a
warning. The log file has probably been moved out of the online log
directory. Make sure that the log file is still available. If not, you may have
problems if a database recovery becomes necessary.
• Retrieve operations (ROLLFORWARD):
If the DB2 User Exit was called to retrieve log files, the log file could not be
found in either the archive or the retrieve directory. Attempt to retrieve it
using brrestore. If the file does not exist (and never has existed) you are
finished and can perform ROLLFORWARD STOP. This is a safety feature to
ensure that the ROLLFORWARD is not accidentally stopped when log files
still exist that could be recovered using brarchive. This is deliberately
different to the default (simplified) User Exits provided as source code
together with DB2.
36 Opening file failed. Log file does not exist. Check error file
db2uext2.err.NODExxxx for more detailed information.
Retrieve operations (ROLLFORWARD):
This is not necessarily an error. Ensure that the file has never existed and then
perform ROLLFORWARD STOP.
37 Opening file failed. Check the messages and access authorizations. Check
error file db2uext2.err.NODExxxx for more detailed information.
38 Reading from file failed. Wait to see if db2uext2 succeeds at a future attempt.
If not, check at the file system level. Check error file
db2uext2.err.NODExxxx for more detailed information.
39 Writing to file failed: The log file could not be copied to the archive directory.
There could be a free space problem. Check error file
db2uext2.err.NODExxxx for more detailed information.
40 Closing of log file failed.
41 Creating directory failed. Check the file system access authorizations. Check
error file db2uext2.err.NODExxxx for more detailed information. It may be
necessary to modify the environment variables DB2DB6_ARCHIVE_PATH and
DB2DB6_RETRIEVE_PATH.
43 Unable to read environment variable. Check error file
db2uext2.err.NODExxxx for more detailed information.
44 Error when accessing file. Check the file system access authorizations. Check
error file db2uext2.err.NODExxxx for more detailed information (for
example, errno).
45 RC_AUDIT_IO_ERROR: Problem writing to db2uext2.err.NODExxxx or
db2uext2.log.NODExxxx
46 File I/O seek error. Check error file db2uext2.err.NODExxxx for more
detailed information (for example, errno).
48 SQL error occurred. Check error file db2uext2.err.NODExxxx for more
detailed information. Check the SQL code in DB2 Message Reference.
49 SQL warning occurred. Check error file db2uext2.err.NODExxxx for more
detailed information. Check the SQL code in DB2 Message Reference.
90 Windows only: Environment variable DSCDB6HOME not set. Check your
environment.
91 Environment variable DB2DB6EKEY not set. Check your environment.
92 Password could not be retrieved from password file dscdb6.conf.
On UNIX
Check the file authorizations of /sapmnt/<SAPSID>/global
(permission 700, owner <sapsid>adm, group db<dbsid>adm) and
/sapmnt/<SAPSID>/global/dscdb6.conf
(permission 600, owner <sapsid>adm, group sapsys).
On Windows
Check if share \\DSCDB6HOME\sapmnt is available and if the DB2 service has
been started by user db2<dbsid>.
93 Environment variable DB2DBDFT not set. Check your environment.
101 Database management (DBM) parameter DFTDBPATH is not set or could not be
retrieved. Try to retrieve this parameter on the command line. Check the
database environment.
102 Database management (DBM) parameter DIAGPATH is not set or could not be
retrieved. Try to retrieve this parameter on the command line. Check the
database environment.
104 Log file ID cannot be obtained. Any log file to be archived by the DB2 User Exit
is assigned a unique ID. It is generated in the Admin DB. If this error occurs,
check the ADM<DBSID> database of your managed instance and contact SAP
support.
110 Recording information failed: An action step cannot be protocolled in the Admin
DB. Processing continues. Check error file db2uext2.err.NODExxxx for
more detailed information.
111 Protocol database connect error. Check from the DB2 command line (CLP)
whether a connection to ADM<DBSID> can be established. If not, contact SAP
support.
112 ADM<DBSID> object creation failed. No log file entry can be made in the Admin
DB. Processing cannot continue. Check error file db2uext2.err.NODExxxx
for more detailed information.
115 Last backup timestamp could not be retrieved from the database recovery
history file and could not be inserted in the Admin DB. Check error file
db2uext2.err.NODExxxx for more detailed information.
116 The vendor user exit program could not be started. Check error file
db2uext2.err.NODExxxx for more detailed information.
117 Vendor user exit program error. For detailed information, refer to the vendor
user exit documentation.
brarchive/brrestore Troubleshooting
Checking the protocol output and corresponding corrective actions can solve most problems
involving brarchive and brrestore.
However, when called directly on the command line the protocol is by default
only written to file and no output appears on the command line. To override
this, option -out must be included in the program call.
If an application does not perform correctly, make sure that you are using the most recent
patch available in the SAP Service Marketplace at the Internet address
service.sap.com/patches. The version and patch level of each program can be seen
near the top of each protocol.
As mentioned above, in addition to the standard environment tracing switches, brarchive
and brrestore also allow activation of tracing on the command line using parameter
-DEB <level>, for example, 1…9.
ID Message Comment
LFA000 Action ended Main action completed successfully but warnings
with warnings. were issued. See other messages for more
information.
LFA001 <OLD> syntax Although the program still supports this old command
supported but line option it may not in future releases. It is better to
archaic. Use use the new syntax. Use option –help to see the
new syntax. syntax.
LFA002 <OLD> syntax A command line option was ignored because it is no
archaic and longer valid syntax. Use the new syntax. Use option –
ignored. Use help to see the syntax.
new syntax.
LFA005 <OLD> option Although the program still supports this old command
supported but line option it may not in future releases. It is better to
archaic. Use use the new syntax. Use option –help to see the
<NEW OPTION>. syntax.
LFA006 -s with two Although the program still supports this old command
devices and line option it may not in future releases. It is better to
volumes use the new syntax. Use option –help to see the
supported but syntax.
archaic. Use -
ss.
LFA007 -sd with two Although the program still supports this old command
devices and line option it may not in future releases. It is better to
volumes use the new syntax. Use option –help to see the
supported but syntax.
archaic. Use -
ssd.
LFA009 Option Although the program still supports this old command
<OPTION><ARG> line option it may not in future releases. It is better to
supported but use the new syntax. Use option –help to see the
archaic – syntax.
Interpreted
literally
LFA010 -d/-device not Use -d tape to explicitly specify the device type.
specified but
tape implied.
LFA011 -d/-device not Use -d adsm to explicitly specify the device type.
specified but
ADSM implied.
LFA015 Unexpected Use quotes for pattern, for example, '*.SAR'.
pattern
argument
LFA015 No file pattern Warning if no file pattern is given. ‘*’ will be used.
given
LFA021 No action Specify an action option. See the syntax diagram that
specified on is displayed.
command line.
Assuming '-
help'.
LFA023 Using Ensure that environment variable
<DIRECTORY> for DB2DB6_TEMP_DIR is set for user db2<dbsid>.
temporary
files.
LFA024 Device not Use -d tape or -d adsm to explicitly specify the
specified or device type. The default value is tape.
implied. Using
tape.
LFA025 Device not Use -d tape or -d adsm to explicitly specify the
specified or device type. The default value was changed to TSM
implied. Using in the Admin DB using the DB2 Control Center
adsm (default Extensions.
in the config
table of the
Admin
database).
LFA031 File <FILE> A file intended for deletion was not found. No action
could not be is necessary as the file would have been deleted
found for anyway. However, try to determine why the file was
deletion. missing.
LFA032 Tape is This is a valid log file archiving tape but appears to be
initialized but owned by a different SAP system. Use -i force to
volume unknown force tape re-initialization for the current system.
to system.
LFA034 Unable to Check installation and program authorizations. May
change real cause other errors. Use option –checkonly of
user. May program sddb6ins to verify the installation. For
result in more information on authorizations, see Installing the
errors. Admin Tools Manually [Page 42].
LFA036 Program Look for the protocol file in the temporary directory
finished before set in environment variable DB2DB6_TEMP_DIR.
INSTHOME or
db2<dbsid> home
dir determined.
Protocol file
will remain in
temp dir.
LFA037 Signal handling Internal problem caused by an error. Application may
looping. Clean not be able to terminate properly.
up may not be
successful.
LFA038 ... Operation Action was successful but warnings occurred. Check
completed with the protocol file for warning statements.
warnings.
LFA039 Unable to Check if db2start has been executed. Otherwise,
connect to check the database error files. For the SQL return
admin db. ls db code, check the DB2 Message Reference.
started? (rc =
<VALUE>)
LFA040 Query operation Query may not be appropriate.
ended with
warning.
LFA041 Could not For the SQL return code, check the DB2 Message
delete backup Reference.
timestamp
entries (rc =
<VALUE>).
LFA042 No backup Warning: No backups appear to have been
timestamp performed to this target.
entries found.
LFA043 Unable to Non-critical error. Entries not found or internal error
remove old when accessing or deleting them.
protocol
entries from
admin db.
LFA044 Are the program Normally suggested in connection with another error
ownership and or warning. Check the executable authorizations.
permissions set
correctly?
LFA046 XDB DB access SAP Basis Release 4.6D only:
function error Log files may not be displayed in transaction DB13. If
(rc=<VALUE>). this causes concern, contact SAP support.
LFA047 Return without Check DB environment or permission to connect to
trying to the Admin DB.
connect to DB
LFA048 config Value of the configuration parameter in table
parameter too DB6CONFIG too long
long
LFA051 Unable to eject Tape must be ejected manually.
tape.
LFA053 Directory <DIR> Only a problem if other messages reflect this.
cannot be
written to.
LFA070 Tape has SID Tape belongs to another system. If you are certain
<SAPSID> and this tape is not needed, the tape header must be
not <SAPSID> as overwritten using operating system commands, for
expected! example, tar, cpio, or dd.
LFA071 Tape # has been This tape must be replaced as soon as possible. It is
reused # times no longer reliable.
(>#) and should
be replaced.
LFA073 Bad environment The environment variable value may be invalid.
value ? Check this variable in the user environment.
<VARIABLE> =
<VALUE
ID Message Comment
LFA101 Parameter <OPTION> Use option –help to see the syntax.
unknown.
LFA102 Action not allowed Use option –help to see the syntax.
for <PROGRAM>.
LFA103 Action only allowed Use option –help to see the syntax.
for <PROGRAM>.
LFA104 <OPTION> argument Use a shorter argument value. Be careful that
"<VALUE>" too long. you have not used wild card characters
interpreted by the shell.
LFA105 <OPTION> argument Required argument is missing. Use option –
missing. help to see the syntax.
LFA106 <OPTION> argument Check and replace the bad string argument
"<VALUE>" not OK. value. If the problem is not clear, refer to the
option documentation.
LFA107 <OPTION> argument Check and replace bad numeric argument
"<VALUE>" not OK. value. If the problem is not clear, refer to the
option documentation.
LFA108 Too many actions on Only one action option is permitted. Use
the command line. option
–help to see the syntax.
LFA109 <OPTION> results in Check for repeating or conflicting options, for
repeated or example, . –d ADSM or –d TAPE.
conflicting Use option –help to see the syntax.
parameters.
LFA110 The option <OPTION> The action requires that the additional option
is required for this be used. Add the required option to the call.
action.
LFA112 <VAL> “<VAL>”: Same Do not repeat arguments on the command
device given twice. line.
LFA113 The option <OPTION> Provide the correct number of arguments.
requires two
arguments for this
action.
LFA114 The option Use the new syntax. The old syntax may no
<OPTION><ARG> is 31I- longer be supported in a later release. Use
specific. Please option –help to see the syntax.
refer to new syntax.
LFA115 The option Use option -help to see the syntax.
<OPTION><ARG> is not
supported by
<PROGRAM>
LFA120 Problem determining Check the db2<dbsid> user environment.
value of <ENVIRONMENT
VARIABLE>.
LFA121 Value of environment Check the db2<dbsid> user environment.
variable <ENV.
VARIABLE> too long.
LFA130 Application error. Application error. Refer to other messages. If
the cause is not clear, contact SAP support.
LFA131 Admin-tool database Internal database call failed. Refer to other
error (rc = VALUE). messages. Refer to the DB2 Message
Reference for an explanation of the SQL
code.
LFA132 Log-file delete Unable to delete the file. Refer to other
failed. messages.
LFA133 Error initializing Unable to initialize the tape. Refer to other
tape. error messages.
LFA134 Error while preparing Error creating the file list for processing. Refer
list of files to to other error messages.
process.
LFA136 Backend function Backend library function failed. Refer to other
error (rc = <VALUE>). messages.
LFA137 Error while getting Most likely an error occurred opening the
tape label. session with the backend library. Refer to
other messages.
LFA138 New tape label not Tape initialization failed. Retry the operation.
set correctly.
LFA141 <CONFIGURATION Check the default, tape device and tape
PARAMETER> parameter device class values using the DB2 Control
error. Check value in Center Extensions. For more information, see
control center. (ADG Configuration [Page 64].
rc = <VALUE>)
LFA142 Unable to open Library initialization failed. Refer to other
backend session. messages.
LFA143 Emergency restore Emergency restore operation failed. Refer to
failed. other error messages.
LFA144 Transfer operation Archive or restore operation failed. Refer to
failed. other error messages.
LFA145 Query operation Query operation failed. Refer to other error
failed. messages.
LFA146 Unable to create file Error creating the file list for processing. Refer
list. to other error messages.
LFA147 Unable to determine Check the user environment (db2<dbsid>,
value for <sapsid>adm) of the program caller.
<ENVIRONMENT
VARIABLE>.
LFA148 Delete on backend Delete operation for an archived log file failed.
failed. Refer to other error messages.
LFA149 Unable to load Unable to find or load brarchive or
backend library. brrestore library. Check the Admin Tools
installation. Use option –check_only of the
installation tool and check the installation
documentation specifically for file
authorizations.
For more information, see :
• SAP Web Application Server Installation
on UNIX: IBM DB2 Universal Database
for UNIX and Windows
• SAP Web Application Server Installation
on Windows: IBM DB2 Universal
Database for UNIX and Windows
LFA150 Unable to initialize Library initialization failed. Refer to other
session info. messages.
LFA151 Action failed. Operation failed. Refer to other error
messages.
LFA152 <VALUE> is not a Check the command line parameters and
valid device. arguments.
LFA153 Cannot access Unable to access an essential tool file. Check
sap<sapsid>/db2<dbsid the Admin Tools installation. Use the
> data file. –check_only option of the installation tool
and check installation documentation
specifically for file authorizations.
For more information, see:
• SAP Web Application Server Installation
on UNIX: IBM DB2 Universal Database
for UNIX and Windows
• SAP Web Application Server Installation
on Windows: IBM DB2 Universal
Database for UNIX and Windows.
LFA154 Error preparing for Refer to other messages.
operation.
LFA155 No files were Error prohibited file processing. Retry
successfully operation.
processed to
completion.
LFA156 Not all files were Error prohibited some file processing. Retry
successfully operation.
processed to
completion.
LFA157 Unable to create file Internal error. Refer to other messages.
sub list.
LFA158 Error brarchive or brrestore may already be
getting/releasing running. If not, delete the file and restart the
lock: <FILE>. program.
LFA159 No log_archive entry Target directory unknown but should have
in Admin DB. Has User been made available by the User Exit. Check
Exit been run? the User Exit protocols. This error can also be
caused by incorrectly performed upgrade.
LFA160 '-i set' not ok if The action -i set can only be used to
tape already labeled. initialize tapes that are out-of-date. Use -i
Use -i force. force to force re-initialization of a current
tape.
LFA161 Tape <DEVICE> must be The tape is not initialized. Use -i force to
initialized first. force initialization of a new, invalid or current
Use –I set or -i tape.
force.
LFA162 Tape <NUMBER> volume The label found on the referenced tape does
<LABEL> does not not match the value specified with -v on the
match command line command line. Check that the correct tape
value <LABEL>. being used.
LFA163 Default tape rewind Check the default, tape device and tape
and non-rewind device class values using the DB2 Control
addresses identical Center extensions. For more information on
(<DEVICE>) non-rewind address examples, see brrestore -
Log File Retrieval Tool [Page 153].
LFA164 Tape is not known to The tape is not known. Use -i force to
system. Initialize force initialization of a new, invalid or current
with -i force. tape.
LFA165 Tape is initialized The tape label is not a valid format. Use -i
but volume is force to force initialization.
unreadable. Use -i
force.
The tape may be damaged or
may have come from an
incompatible system
(Windows/UNIX).
LFA166 User is <USER> but Only db2<dbsid> or <sapsid>adm users
should be <USER> or should start programs brarchive and
<USER>. brrestore.
LFA189 Unable to find file Refer to other message and check the
or directory <VALUE>. existence of the item. Has the file been
automatically deleted by TSM or moved
manually?
LFA190 Log file <FILE> has Check log file name is valid, for example,
wrong format. S0000000.19920211152635.NODE0000.
LFA191 Directory <dir> Check installation using the check option of
cannot be written to. program sddb6ins. If the problem is not
resolved, contact SAP.
LFA200 Get backup timestamp No backup is known to the Admin DB. Make
entries failed (rc = sure that you performed a database backup
<VALUE>) when you activated database recovery.
LFA201 Check backup Wrong timestamp format or length. See the
timestamp is valid. output of the query for the correct format.
Use: -q backups –out
LFA202 Unable to extend file Cannot allocate memory to extend the file list.
list
LFA203 Add missing backups Check the reason.
failed
LFA240 Unexpected action. Internal error. Check the command line action
option.
LFA241 Unexpected device. Internal error. Check the command line device
option.
LFA242 Unexpected log file Internal error. Contact SAP support.
status.
LFA243 Unexpected return Internal error. Contact SAP support.
code.
LFA244 Unexpected value. Internal error. Contact SAP support.
LFA245 Error creating Admin Internal error. Contact SAP support.
DB backup file.
LFA280 Error deleting <TYPE> Internal error. Contact SAP support.
DB entry (rc =
<VALUE>)
LFA281 Error retrieving Internal error. Contact SAP support.
<TYPE> DB entry (rc =
<VALUE>)
LFA282 Error updating <TYPE> Internal error. Contact SAP support.
DB entry (rc =
<VALUE>)
LFA283 Error creating <TYPE> Internal error. Contact SAP support.
DB entry (rc =
<VALUE>)
LFA284 New entry already in Internal error. Contact SAP support.
DB (rc = <VALUE>)
LFA285 Action <action> Try to interpret the error text. If the meaning is
failed with not clear to you, contact SAP support.
<error_text>
LFA286 SQL Error: <SQL error Try to interpret the error text. If the meaning is
text> not clear to you, contact SAP support.
ID Message Comment
VND000 Environment Check the db2<dbsid> user environment. See
variable also accompanying system error message VND180.
<ENVIRONMENT
VARIABLE> is not
set.
VND001 Not enough disk Delete files or increase the size of the file system.
space in
<DIRECTORY>.
Available:
Compressed file systems may
<VALUE> MB;
calculate the amount of space
needed: <VALUE>
available wrongly.
MB.
VND002 File size The original file size does not match the size of the
mismatch for file restored. If the problem persists, the file may be
<FILE>. <VALUE> damaged. You may be able to restore the file using
on disk and the emergency restore option -ex.
<VALUE> kB on
tape
VND003 Unable to access See previous error messages.
list of files to
be processed.
VND004 Failed to save Store operation failed. If the problem persists, the
<FILE> (rc = media may be damaged. Note return code for SAP
<VALUE>)! Cannot support.
continue…
VND005 Failed to Restore operation failed. If the problem persists, the
retrieve <FILE> media may be damaged. Note the return code for
(rc = <VALUE>)! SAP support.
Cannot continue…
VND006 Failed to delete Delete operation failed. If the problem persists, the
<FILE> (rc = media may be damaged.
<VALUE>)! Cannot
continue…
VND008 Error writing Check the file and directory authorizations.
data to file
<FILE> (rc =
<VALUE>).
VND009 Error reading Check the file and directory authorizations.
data from file
<FILE> (rc =
<VALUE>).
VND010 Error closing System error. If the problem persists, contact SAP
file <VALUE> support.
just sent
to/retrieved.
VND011 Error opening Check the file and directory authorizations.
file <FILE> to
be sent
to/retrieved.
VND012 Query <Value> is Backend does not support the query. Check the
not supported by backend version.
back-end
library.
VND013 Command <Value> Backend does not support the command. Check the
is not supported backend version.
by back-end
library.
VND020 Volume size According to the tape device class tape entry -size
limit reached - in the DB2 Control Center, the tape must now be
no more log full. Check that this entry matches the real tape size.
files will be Complete the (restart) operation with a new tape.
processed.
VND021 If the log file A temporary lock file is still present. Verify that
management tool brarchive is not already running for the same
was terminated, node or using the same device(s).
delete file
<FILE>.
VND022 Volume in device Tape needs initializing.
<DEVICE> has no
label.
VND023 Check the volume Check the tape or tape drive. See other messages.
or device.
VND024 Label on volume Tape needs initializing or may be damaged. In both
in device cases, see other messages.
<DEVICE> has the
wrong format.
VND025 Wrong volume Put the correct tape in the drive or specify the
<LABEL> in correct label on the command line.
device <DEVICE>,
should be:
<LABEL>
VND026 Volume in device If the tape should be written to, remove the write
<DEVICE> is protection.
write protected!
VND027 Volume label Check the tape and device. See other messages.
could not be
written to
<DEVICE>.
VND028 Tape has to be Initialize the tape.
initialized
prior to usage.
VND029 Character The tape device class tape entry -size in the DB2
'K','M','G' or Control Center is incorrect.
'T' should
directly follow
volume size.
VND030 Tape <Device A tape lock file is already present. Either
name> is already brarchive or brrestore is running elsewhere at
in use. If not, the same time (wait for program end) or a previous
delete the lock program call terminated unexpectedly (in this case
file or look for delete the lock file).
error (<file
name or error
message>).
VND031 SAP-SID on tape Tape is used by another SAP system. To overwrite
is <SAPSID>, data on tape, use the brarchive option -i
should be force.
<SAPSID>!
VND032 Wrong tape Check the command line parameters and the
number <#> in version of the backend.
device <Device
name>, should be
<#>
VND042 Error Check the TSM installation and configuration.
registering ADSM Check the accompanying messages for return
file space codes and TSM error messages. Contact Tivoli
'<FILE>' of Type support if necessary.
'<String>’.
VND043 ADSM mgmt class Check the TSM installation and configuration. Look
bind (<STRING>) at the accompanying messages for return codes
failed! (FS- and TSM error messages. Contact Tivoli support if
name: <STRING> - necessary.
HL-name:
<STRING> - LL-
name: <FILE>)
VND044 Error starting Check the TSM installation and configuration. Look
ADSM at the accompanying messages for return codes
transaction. and TSM error messages. Contact Tivoli support if
necessary.
VND045 Error sending Check the TSM installation and configuration. Look
object to ADSM. at the accompanying messages for return codes
and TSM error messages. Contact Tivoli support if
necessary.
VND046 Error sending Check the TSM installation and configuration. Look
data to ADSM. at the accompanying messages for return codes
and TSM error messages. Contact Tivoli support if
necessary.
VND047 Error ending Check the TSM installation and configuration. Look
process for at the accompanying messages for return codes
sending object and TSM error messages. Contact Tivoli support if
to ADSM. necessary.
VND048 Error ending Check the TSM installation and configuration. Look
ADSM at the accompanying messages for return codes
transaction. and TSM error messages. Contact Tivoli support if
necessary.
VND049 Error starting Check the TSM installation and configuration. Look
ADSM <STRING> at the accompanying messages for return codes
query. and TSM error messages. Contact Tivoli support if
necessary.
VND050 Error ending Check the TSM installation and configuration. Look
ADSM <STRING> at the accompanying messages for return codes
query. and TSM error messages. Contact Tivoli support if
necessary.
VND051 ADSM objects No entries match the queries. See other messages.
query found no
match.
VND052 Error starting Check the TSM installation and configuration. Look
data transfer at the accompanying messages for return codes
from ADSM and TSM error messages. Contact Tivoli support if
'STRING' necessary.
repository.
VND053 Error getting Check the TSM installation and configuration. Look
object from ADSM at the accompanying messages for return codes
<STRING> and TSM error messages. Contact Tivoli support if
repository. necessary.
VND054 Error during Check the TSM installation and configuration. Look
data transfer at the accompanying messages for return codes
from ADSM. and TSM error messages. Contact Tivoli support if
necessary.
VND055 Error concluding Check the TSM installation and configuration. Look
object transfer at the accompanying messages for return codes
from ADSM and TSM error messages. Contact Tivoli support if
<STRING> necessary.
repository.
VND056 Error concluding Check the TSM installation and configuration. Look
data transfer at the accompanying messages for return codes
from ADSM and TSM error messages. Contact Tivoli support if
<STRING> necessary.
repository.
VND059 ADSM reason TSM reason for an error
<No>: <String>
VND060 ADSM error <No>: TSM error number and description
<String>
VND061 Unable to load Check that TSM has been correctly installed.
ADSM API DLL.
VND062 Client's API brarchive executables and library do not match.
version is Check the Admin Tools installation.
higher than the
ADSM version
Since DB2 Control Center Extensions are an extension of the DB2 Control Center, a special
start script switches on tracing for the DB2 Control Center. To run the DB2 Control Center
with the DB2 Control Center Extensions trace switched on, start it with script
db2ccdebug.bat. A trace file called db6cc.log is created in your TEMP directory.
Admin DB Structure
Wrong use of this information may make the log file management tools fail or
make it impossible to recover log files required to fully restore a database
backup
The Admin DB (or ADM<DBSID> database) is the core component of SAP DB2
administration. It contains administration management data, configuration parameters, and
administration action protocols.
The most important tables in the Admin DB refer to log files and their locations. This
information is used in recovering archived files. On occasion, support personnel will ask
database administrators to extract information from this database to assist in problem
determination. Other tables record information such as tape volume management and Admin
Tools protocol data.
To understand the log file information in the Admin DB, it is essential that you understand the
file states described in Log File States [Page 32].
The Admin DB should require very little administrative attention. The database administrator
can decide whether to back up the database. However, this is not strictly necessary as
brarchive in archive mode also stores the essential parts of the database from which it can
be rebuilt.
Transaction logging is circular for the Admin DB, that is, LOGRETAIN and USEREXIT are set
to OFF. This has the advantage that the Admin DB should continue to function even when the
main SAP database is blocked by a file system containing log files that are becoming full.
The following graphic shows the Admin DB tables and their relationships.
The following table describes the Admin DB tables shown in the graphic above, together with
their keys. To see the complete structure of each table, use the DB2 DESCRIBE command.
Admin DB Tables
The output can be limited by specifying a value or range for the NAME column (which
contains the log file number). This view contains no node information.
In a multi-partitioned environment, if you require node-specific information, you must
join this view with the DB6IDENTIFIER table, where the OBJID columns have the same
value and NODE=’NODExxxx’ (replace xxxx with the node number).
• Recursive deletion
The relationships between tables DB6IDENTIFIER, DB6CONFIG, DB6LOCATION,
DB6BACKUP, DB6LOGFILE, DB6LFSTATE, DB6TAPE, and DB6TAPETOC are set up
with cascading deletes. In other words, if an object in DB6IDENTIFIER that relates to a
log file is deleted, all related rows will also automatically be deleted from the tables
DB6LOGFILE, DB6LFSTATE, and DB6TAPETOC.
Each tape has two object IDs – one related to the DB6LOCATION table and
one related to the DB6TAPE table. There is no direct relationship joining
these two objects.
• Backup data in table DB6BACKUP
The information in the DB6BACKUP table is extracted from the backup history file by
the User Exit. This information is used to associate log files with a backup. If no backup
is performed after the Admin Tools are installed, the User Exit will not be able to add
this association. If the User Exit has not yet been run before brarchive is called for
the first time, the backup information will be missing and brarchive also generates an
error.
For best User Exit performance, it is also important that the backup history file is not
too long. It may be necessary to prune the file occasionally.
• Configuration table DB6CONFIG
This table contains information to configure the Admin Tools. Normally it can only be
updated using the DB2 Control Center Extensions. You can also use SQL to update
the entries directly.
If an entry is corrupt or lost, this table can be reset to the default values. You can do
this by using SQL to delete all related entries from the DB6IDENTIFIER table.
Be very careful only to delete the OBJIDs found in the configuration table
DB6CONFIG and running sddb6ins -i.
• Mirroring in Admin Tools Release 4.6D
There is an extra executable in Admin Tools releases up to 4.6D called sddb6mir.
This is used to mirror (duplicate) informative Admin DB information to the SAP
database.
The mirror contains most of the tables that the Admin DB contains but these
tables have one column less. They all have no mirror flag column. Although
this should not be necessary, if you want to create the mirrored tables
manually, do not attempt to create these tables using exactly the same
structure as in the Admin DB.
brarchive Admin
brrestore
DB
LfmVndInterface
customer
backend
script
Tape
TSM
backend
The DB2 Control Center looks in directory sqllib/cc for a file called db2plug.zip. If this
file exists, it will be loaded. It comprises the SAP extensions for the DB2 Control Center. In
the context menu of any SAP DB2 instance or database, supplementary menu options will be
offered. If any of these options is chosen, the corresponding SAP extension window appears.
From this window, the user can perform several SAP DB2-specific administrative operations.
Since all these operations are done on the server, stored procedure sddb6jds is called via
JDBC. Sddb6jds calls the Admin Tools and manages the Admin DB ADM<DBSID>.
# DB2DB6_NO_EJECT = ON
# Script name for -d script
#
# default: no default
# DB2DB6_LIBDB6SC_SCRIPT =
# TSM multithread support is required, if TSM LANFREE option should be used
#
# default: OFF
# DB2DB6_TSM_MULTITHREADED = ON
# TSM shared library
#
# default: libApiDS64.a(dsmapish_64.o)
# DB2DB6_TSM_SLIB = libApiDS64.a(dsmapish_64.o)
# Admin DB reorg frequency in days
#
# default: 7
# DB2DB6_ADMDB_REORG_FREQUENCY = 7
# Userexit Trace
# DB2DB6_TRC_DB2UEXT2 = ON
DB2DB6_TRC_DB2UEXT2_LEVEL = 3
DB2DB6_TRC_DB2UEXT2_PATH = /db2/Y1D/admintools/TraceFiles
# Brarchive Trace
# DB2DB6_TRC_BRARCHIVE = ON
DB2DB6_TRC_BRARCHIVE_LEVEL = 3
DB2DB6_TRC_BRARCHIVE_PATH = /db2/Y1D/admintools/TraceFiles
# Brrestore Trace
# DB2DB6_TRC_BRRESTORE = ON
DB2DB6_TRC_BRRESTORE_LEVEL = 3
DB2DB6_TRC_BRRESTORE_PATH = /db2/Y1D/admintools/TraceFiles
# Stored Procedure Trace
# DB2DB6_TRC_SDDB6JDS = ON
DB2DB6_TRC_SDDB6JDS_LEVEL = 3
DB2DB6_TRC_SDDB6JDS_PATH = /db2/Y1D/admintools/TraceFiles
# TSM Util Trace
# DB2DB6_TRC_DB6ADUTL = ON
DB2DB6_TRC_DB6ADUTL_LEVEL = 3
DB2DB6_TRC_DB6ADUTL_PATH = /db2/Y1D/admintools/TraceFiles
########################################################################
# End of Environment File #
########################################################################
#
# default: OFF
# DB2DB6_TSM_MULTITHREADED = ON
# TSM shared library
#
# default: adsm32.dll,adsmv3.dll
# DB2DB6_TSM_SLIB = adsm32.dll,adsmv3.dll
# Admin DB reorg frequency in days
#
# default: 7
# DB2DB6_ADMDB_REORG_FREQUENCY = 7
# Userexit Trace
# DB2DB6_TRC_DB2UEXT2 = ON
DB2DB6_TRC_DB2UEXT2_LEVEL = 3
DB2DB6_TRC_DB2UEXT2_PATH = \\PFERD\db2n2d\admintools\TraceFiles
# Brarchive Trace
# DB2DB6_TRC_BRARCHIVE = ON
DB2DB6_TRC_BRARCHIVE_LEVEL = 3
DB2DB6_TRC_BRARCHIVE_PATH = \\PFERD\db2n2d\admintools\TraceFiles
# Brrestore Trace
# DB2DB6_TRC_BRRESTORE = ON
DB2DB6_TRC_BRRESTORE_LEVEL = 3
DB2DB6_TRC_BRRESTORE_PATH = \\PFERD\db2n2d\admintools\TraceFiles
# Stored Procedure Trace
# DB2DB6_TRC_SDDB6JDS = ON
DB2DB6_TRC_SDDB6JDS_LEVEL = 3
DB2DB6_TRC_SDDB6JDS_PATH = \\PFERD\db2n2d\admintools\TraceFiles
# TSM Util Trace
# DB2DB6_TRC_DB6ADUTL = ON
DB2DB6_TRC_DB6ADUTL_LEVEL = 3
DB2DB6_TRC_DB6ADUTL_PATH = \\PFERD\db2n2d\admintools\TraceFiles
########################################################################
# End of Environment File #
##########################################################
Appendix F: References
Name Description
Administration Guide Administration Guide: Planning provides an overview of
database concepts, information about design issues (such as
logical and physical database design), and information on
high availability.
Administration Guide: Implementation provides information
on implementation issues such as implementing your design,
accessing databases, auditing, backup and recovery.
Administration Guide: Performance provides information on
database environment and application performance
evaluation and tuning.
Administrative API Describes the DB2 application programming interfaces
Reference (APIs) and data structures that you can use to manage your
databases. This book also explains how to call APIs from
your applications.
Application Building Guide Provides environment setup information and step-by-step
instructions about how to compile, link, and run DB2
applications on Windows, OS/2, and UNIX platforms.
Application Development Explains how to develop applications that access DB2
Guide databases using embedded SQL or Java (JDBC and SQLJ).
Discussion topics include writing stored procedures, writing
user-defined functions, creating user-defined types, using
triggers, and developing applications in partitioned
environments or with federated systems.
CLI Guide and Reference Explains how to develop applications that access DB2
databases using the DB2 Call Level Interface, a callable SQL
interface that is compatible with the Microsoft ODBC
specification.
Command Reference Explains how to use the command line processor and
describes the DB2 commands that you can use to manage
your database.
Data Movement Utilities Explains how to use DB2 utilities, such as import, export,
Guide and Reference load, AutoLoader, and DPROP, that facilitate the
movement of data.
Message Reference Lists messages and codes issued by DB2, the Information
Catalog Manager, and the Data Warehouse Center, and
describes the actions you should take.
SQL Getting Started Introduces SQL concepts and provides examples for many
constructs and tasks.
SQL Reference, Volume 1 Describes SQL syntax, semantics, and the rules of the
and Volume 2 language. This book also includes information about release-
to-release incompatibilities, product limits, and catalog views.
System Monitor Guide Describes how to collect different kinds of information about
and Reference databases and the database manager. This book explains
how to use the information to understand database activity,
improve performance, and determine the cause of problems.
Troubleshooting Guide Helps you determine the source of errors, recover from
problems, and use diagnostic tools in consultation with DB2
Customer Service.
What’s New Describes the new features, functions, and enhancements in
DB2 UDB for UNIX and Windows Version 7.
DB2 Enterprise – Provides planning, installation, and configuration information
Extended Edition for UNIX for DB2 Enterprise - Extended Edition on UNIX platforms.
Quick Beginnings This book also contains installation and setup information for
many supported clients.
DB2 Enterprise – Provides planning, installation, and configuration information
Extended Edition for for DB2 Enterprise - Extended Edition for Windows 32-bit
Windows Quick operating systems. This book also contains installation and
Beginnings setup information for many supported clients.
DB2 for UNIX Quick Provides planning, installation, migration, and configuration
Beginnings information for DB2 Universal Database on UNIX platforms.
This book also contains installation and setup information for
many supported clients.
DB2 for Windows Quick Provides planning, installation, migration, and configuration
Beginnings information for DB2 Universal Database on Windows 32-bit
operating systems. This book also contains installation and
setup information for many supported clients.
Name Description
Administration Guide Administration Guide: Planning provides an overview of
database concepts, information about design issues (such as
logical and physical database design), and information on high
availability.
Administration Guide: Implementation provides information on
implementation issues such as implementing your design,
accessing databases, auditing, backup and recovery.
Administration Guide: Performance provides information on
database environment and application performance evaluation
and tuning.
Administrative API Describes the DB2 application programming interfaces (APIs)
Reference and data structures that you can use to manage your
databases. This book also explains how to call APIs from your
applications.
Application Development Provides environment setup information and step-by-step
Guide: Building and instructions about how to compile, link, and run DB2
Running Applications applications on Windows, OS/2, and UNIX platforms.
Application Development Explains how to develop applications that access DB2
Guide, Programming databases using embedded SQL or Java (JDBC and SQLJ).
Client Applications and Discussion topics include writing stored procedure, writing
Programming Server user-defined functions, creating user-defined types, using
Applications triggers, and developing applications in partitioned
environments or with federated systems.
CLI Guide and Explains how to develop applications that access DB2
Reference Volume 1 and databases using the DB2 Call Level Interface, a callable SQL
Volume 2 interface that is compatible with the Microsoft ODBC
specification.
Command Reference Explains how to use the command line processor and
describes the DB2 commands that you can use to manage
your database.
Data Movement Utilities Explains how to use DB2 utilities, such as import, export,
Guide and Reference load, AutoLoader, and DPROP, that facilitate the movement
of data.
Message Reference Lists messages and codes issued by DB2, the Information
Catalog Manager, and the Data Warehouse Center, and
describes the actions you should take.
SQL Getting Started Introduces SQL concepts and provides examples for many
constructs and tasks.
SQL Reference, Volume Describes SQL syntax, semantics, and the rules of the
1 and Volume 2 language. This book also includes information about release-
to-release incompatibilities, product limits, and catalog views.
System Monitor Guide Describes how to collect different kinds of information about
and Reference databases and the database manager. This book explains
how to use the information to understand database activity,
improve performance, and determine the cause of problems.
What’s New Describes the new features, functions, and enhancements in
DB2 UDB for UNIX and Windows Version 8.
Quick Beginnings for Provides planning, installation, migration, and configuration
DB2 Servers information for DB2 Universal Database servers.
Quick Beginnings for Provides planning, installation, migration, and configuration
DB2 Clients information for DB2 Universal Database client.
If you are unable to find an appropriate link for a topic in this documentation,
refer to the table of contents or the DB2 documentation.
Term Description
<DBSID> and <dbsid> Refer to “<SAPSID> and <sapsid>” in this table.
(SAP database name)
<SAPSID> and <sapsid> With the introduction of MCOD systems, it is necessary to
(SAP system ID) differentiate between SAP system IDs and SAP database
names. The changes are as follows:
• The former SAP system ID <SID> or <sid> changes
to <SAPSID> or <sapsid>.
• The former SAP database name <SID> or <sid>
changes to <DBSID> or <dbsid>.
ADSM The IBM storage product ADSM has been renamed to TSM
(Tivoli Storage Manager). For more information, see
Naming Conventions [Page 10].
log file management tools The term log file management tools refers to components
of the Admin Tools that perform log file management
tasks:
• brarchive
• brrestore
• db2uext2 (User Exit)
• db6adutl
• libdb6ds (brarchive/brrestore library)
• libdb6tp (brarchive/brrestore library)
• libdb6sc (brarchive/brrestore library)
• sddb6mir (4.6D Admin Tools only)
mirror Has two meanings depending on the context:
• A copy of the Admin DB tables mirrored in the SAP
database
• A copy of the entire SAP database, often on a
neighboring machine
Multiple Components in Multiple Components in One Database is referred to as
One Database (MCOD) MCOD.
This means that you can install an additional SAP system
into an existing database. The Admin Tools have been
modified to support this SAP system feature. For more
information, see Admin Tools: Enhancements and
Changes [Page 11].
For more information on released platforms and availability,
see the SAP Service Marketplace at the Internet address
www.service.sap.com/platforms and choose
Multiple Components in One Database (MCOD).
password file Refers to file dscdb6.conf containing encrypted
passwords. Contents are set using the dscdb6up utility.
For more information, see Setting and Updating Passwords
[Page 108].
protocol file Refers to a file generated by an application, such as one of
the Admin Tools, which indicates what the tool has done
and contains any results or errors.
restore Refers to the action of restoring the database from a
backup. This may be done after a system failure or in order
to generate a database copy. This will often require a
database rollforward afterwards.