SAP NetWeaver ’04 Database Administration Guide

SAP on IBM DB2 Universal Database for UNIX and Windows
Document Version 1.02 – July 10, 2006

®

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 2004 SAP AG. All rights reserved. No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice. Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors. Microsoft, Windows, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation. IBM, DB2, DB2 Universal Database, OS/2, Parallel Sysplex, MVS/ESA, AIX, S/390, AS/400, OS/390, OS/400, iSeries, pSeries, xSeries, zSeries, z/OS, AFP, Intelligent Miner, WebSphere, Netfinity, Tivoli, and Informix are trademarks or registered trademarks of IBM Corporation in the United States and/or other countries. Oracle is a registered trademark of Oracle Corporation. UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group. Disclaimer Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registered trademarks of Citrix Systems, Inc. HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C®, World Wide Web Consortium, Massachusetts Institute of Technology. Java is a registered trademark of Sun Microsystems, Inc. JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented by Netscape. MaxDB is a trademark of MySQL AB, Sweden. Documentation in the SAP Service Marketplace You can find this documentation at the following Internet address:
service.sap.com/instguides

SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary. These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty. SAP Library document classification: PUBLIC

Some components of this product are based on Java™. Any code change in these components may cause unpredictable and severe malfunctions and is therefore expressively prohibited, as is any decompilation of these components. Any Java™ Source Code delivered with this product is only to be used by SAP’s Support Services and may not be modified or altered in any way.

Terms for Included Open Source Software
This SAP software contains also the third party open source software products listed below. Please note that for these third party products the following special terms and conditions shall apply.

e.

The Customer may distribute original or modified STLport sources, provided that: • • The conditions indicated in the above permission notice are met; The following copyright notices are retained when present, and conditions provided in accompanying permission notices are met: Copyright 1994 Hewlett-Packard Company Copyright 1996,97 Silicon Graphics Computer Systems, Inc. Copyright 1997 Moscow Center for SPARC Technology. Copyright 1999,2000 Boris Fomitchev Copyright 2001 SAP AG Permission to use, copy, modify, distribute and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. Hewlett-Packard Company makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty.

SAP License Agreement for STLport SAP License Agreement for STLport between SAP Aktiengesellschaft Systems, Applications, Products in Data Processing Neurottstrasse 16 69190 Walldorf Germany ( hereinafter: SAP ) and you ( hereinafter: Customer )

1.

Subject Matter of the Agreement a. SAP grants Customer a non-exclusive, non-transferable, royalty-free license to use the STLport.org C++ library (STLport) and its documentation without fee. b. By downloading, using, or copying STLport or any portion thereof Customer agrees to abide by the intellectual property laws, and to all of the terms and conditions of this Agreement. c. The Customer may distribute binaries compiled with STLport (whether original or modified) without any royalties or restrictions. d. Customer shall maintain the following copyright and permission notices on STLport sources and its documentation unchanged: Copyright 2001 SAP AG Permission to use, copy, modify, distribute and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. Moscow Center for SPARC Permission to use, copy, modify, distribute and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. Silicon Graphics makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty.

Technology makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. Boris Fomitchev makes no representations about the suitability of this software for any purpose. This material is provided "as is", with absolutely no warranty expressed or implied. Any use is at your own risk. Permission to use or copy this software for any purpose is hereby granted without fee, provided the above notices are retained on all copies. Permission to modify the code and to distribute modified code is granted, provided the above notices are retained, and a notice that the code was modified is included with the above copyright notice. Permission to use, copy, modify, distribute and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. SAP makes no representations about the suitability of this software for any purpose. It is provided with a limited warranty and liability as set forth in the License Agreement distributed with this copy. SAP offers this liability and warranty obligations only towards its customers and only referring to its modifications. 2. Support and Maintenance SAP does not provide software maintenance for the STLport. Software maintenance of the STLport therefore shall be not included. All other services shall be charged according to the rates for services quoted in the SAP List of Prices and Conditions and shall be subject to a separate contract.

3.

Exclusion of warranty As the STLport is transferred to the Customer on a loan basis and free of charge, SAP cannot guarantee that the STLport is errorfree, without material defects or suitable for a specific application under third-party rights. Technical data, sales brochures, advertising text and quality descriptions produced by SAP do not indicate any assurance of particular attributes.

4.

Limited Liability a. Irrespective of the legal reasons, SAP shall only be liable for damage, including unauthorized operation, if this (i) can be compensated under the Product Liability Act or (ii) if caused due to gross negligence or intent by SAP or (iii) if based on the failure of a guaranteed attribute. b. If SAP is liable for gross negligence or intent caused by employees who are neither agents or managerial employees of SAP, the total liability for such damage and a maximum limit on the scope of any such damage shall depend on the extent to which its occurrence ought to have anticipated by SAP when concluding the contract, due to the circumstances known to it at that point in time representing a typical transfer of the software. c. In the case of Art. 4.2 above, SAP shall not be liable for indirect damage, consequential damage caused by a defect or lost profit. d. SAP and the Customer agree that the typical foreseeable extent of damage shall under no circumstances exceed EUR 5,000. e. The Customer shall take adequate measures for the protection of data and programs, in particular by making backup copies at the minimum intervals recommended by SAP. SAP shall not be liable for the loss of data and its recovery, notwithstanding the other limitations of the present Art. 4 if this loss could have been avoided by observing this obligation. f. The exclusion or the limitation of claims in accordance with the present Art. 4 includes claims against employees or agents of SAP.

Typographic Conventions
Type Style Example Text Description Words or characters quoted from the screen. These include field names, screen titles, pushbuttons labels, menu names, menu paths, and menu options. Cross-references to other documentation Example text Emphasized words or phrases in body text, graphic titles, and table titles Technical names of system objects. These include report names, program names, transaction codes, table names, and key concepts of a programming language when they are surrounded by body text, for example, SELECT and INCLUDE. Output on the screen. This includes file and directory names and their paths, messages, names of variables and parameters, source text, and names of installation, upgrade and database tools. Exact user entry. These are words or characters that you enter in the system exactly as they appear in the documentation. Variable user entry. Angle brackets indicate that you replace these words and characters with appropriate entries to make entries in the system. Keys on the keyboard, for example, F2 or ENTER.

Icons
Icon Meaning Caution Example Note Recommendation Syntax

EXAMPLE TEXT

Example text

Additional icons are used in SAP Library documentation to help you identify different types of information at a glance. For more information, see Help on Help → General Information Classes and Information Classes for Business Information Warehouse on the first page of any version of SAP Library.

Example text

<Example text>

EXAMPLE TEXT

Contents
SAP Database Administration Guide: IBM DB2 Universal Database for UNIX and Windows...................................................10
1 Introduction .......................................................................................10
1.1 About this Documentation .................................................................. 10
1.1.1 Who Should Use this Documentation .........................................................................10 1.1.2 How this Documentation is Structured........................................................................11

1.2 Naming Conventions ........................................................................... 12 1.3 End of Support of SAP DB2 Admin Tools .......................................... 13 1.4 Admin Tools: Enhancements and Changes....................................... 13
1.4.1 New Features..............................................................................................................16 1.4.2 Differences Between 4.6D and 6.NN Admin Tools.....................................................19

1.5 DB2 UDB for UNIX and Windows Version 7: Enhancements ........... 20 1.6 DB2 UDB for UNIX and Windows Version 8: Enhancements ........... 22 1.7 DB2 UDB for UNIX and Windows Version 8: Enhancements ........... 24 1.8 DB2 UDB for UNIX and Windows Version 8.2.2: Enhancements ..... 25

2 Basic Concepts .................................................................................26
2.1 Introduction .......................................................................................... 26
2.1.1 The SAP DB2 Admin Tools ........................................................................................26 2.1.2 User Interfaces............................................................................................................27

2.2 SAP Log File Management .................................................................. 28
2.2.1 Recovery - The Need for Log Files.............................................................................28 2.2.2 Recovering Log Files ..................................................................................................30 2.2.3 Log File Life Cycle (Archive and Restore) ..................................................................31 2.2.4 Log File Deletion .........................................................................................................34 2.2.5 Protocols .....................................................................................................................36 2.2.6 Raw Device Log Files .................................................................................................36 2.2.7 Log File States ............................................................................................................37 2.2.8 Special Cases - Non-Standard Behavior of Database Systems ................................38

2.3 SAP Security Concept ......................................................................... 39 2.4 Multi-Partitioned Systems ................................................................... 40

3 Installation and Setup.......................................................................41
3.1 Introduction .......................................................................................... 41 3.2 SAP System Environment ................................................................... 43
3.2.1 SAP System Users and Groups .................................................................................43 3.2.2 User Environment .......................................................................................................45 3.2.3 Access Authorizations for Admin Tool-Related Directories ........................................46

3.3 Installing the Admin Tools Manually .................................................. 47
3.3.1 Prerequisites for the Admin Tools Installation ............................................................48 3.3.2 General Information ....................................................................................................50 3.3.3 Upgrading the Admin Tools ........................................................................................50 3.3.4 Installing the Latest Admin Tools................................................................................51 3.3.5 Checking the Admin Tools Environment ....................................................................52 3.3.6 Actions Performed by the sddb6ins Program .............................................................53

6

July 2006

3.3.7 Special Configurations ................................................................................................57 3.3.8 Enabling the Database for Rollforward Recovery.......................................................57 3.3.8.1 Enabling Rollforward Recovery for a Single-Partitioned Database ......................58 3.3.8.2 Enabling Rollforward Recovery for a Multi-Partitioned Database.........................59 3.3.9 Deinstalling the Admin Tools ......................................................................................60

3.4 Installation and Setup of the DB2 Control Center Extensions ......... 60
3.4.1 Installation of the DB2 Control Center ........................................................................61 3.4.2 Installing the DB2 Control Center Extensions ............................................................61 3.4.3 Setting Up the DB2 Control Center.............................................................................62 3.4.4 Using the DB2 Control Center Extensions .................................................................69

4 Configuration.....................................................................................70
4.1 Changing the Admin Tools Configuration ......................................... 70
4.1.1 Parameters Affecting Log File Management Storage.................................................70 4.1.2 Configuring the Admin Tools Using Environment Files ..............................................73

4.2 Configuring the System for Archiving Log Files ............................... 78
4.2.1 Archiving Directly to TSM ...........................................................................................80 4.2.2 Archiving Directly to Disk ............................................................................................81 4.2.3 Archiving to an Alternative Storage Management Product.........................................82 4.2.4 Indirect Archiving to Tape ...........................................................................................82 4.2.5 Indirect Archiving to TSM............................................................................................88 4.2.6 Indirect Archiving Using a Customer Script ................................................................89

4.3 Configuring TSM (Tivoli Storage Management)................................. 90
4.3.1 Configuring TSM Files dsm.opt and dsm.sys .............................................................91 4.3.2 Configuring TSM Environment Variables....................................................................92 4.3.3 Configuration Considerations .....................................................................................94

4.4 DB2 Configuration Parameters ........................................................... 95 4.5 Disk Space Considerations for Running the Admin Tools ............... 96

5 Regular Administration ....................................................................98
5.1 DB2 Log File Management .................................................................. 98
5.1.1 Archiving Log Files from Disk to Backend ..................................................................98 5.1.2 Deleting Log Files .....................................................................................................101

5.2 Storage Management ......................................................................... 103
5.2.1 Checking the Space Available in a File System .......................................................104 5.2.2 Checking the Space Available in a Tablespace .......................................................104 5.2.3 Checking the Size of Tables and Indexes ................................................................106

5.3 Performance Monitoring.................................................................... 107
5.3.1 Monitoring Database Performance ...........................................................................107 5.3.2 Monitoring Dynamic SQL Statements.......................................................................109 5.3.3 Updating Statistics for Database Tables and Checking for Reorganization.............109 5.3.4 Job Monitoring ..........................................................................................................110

5.4 Database Backup ............................................................................... 110
5.4.1 Backup Considerations.............................................................................................111 5.4.2 Performing the Backup .............................................................................................111 5.4.3 Integrity of Backups ..................................................................................................113 5.4.4 Frequency of Backups and Time Required ..............................................................113 5.4.5 Advanced Backup Techniques .................................................................................114

6 Advanced Tasks..............................................................................115
6.1 The db6util Tool.................................................................................. 115 6.2 Setting and Updating Passwords ..................................................... 116 6.3 Using the Journal in the DB2 Control Center Extensions .............. 116

July 2006

7

6.4 Advanced Log File Management Tasks ........................................... 117
6.4.1 Deleting Special Log Files ........................................................................................118 6.4.2 Deleting Tapes from the Admin DB ..........................................................................120

6.5 Reorganization of Tables and Tablespaces ..................................... 120 6.6 Redirected Restore ............................................................................ 122
6.6.1 Usage of Tool brdb6brt .............................................................................................123

6.7 Command Line Tasks Using db6clp................................................. 128 6.8 Monitoring Database Alerts............................................................... 130 6.9 Monitoring Lock Waits and Deadlocks............................................. 130 6.10 Managing Backups and Logs Archived on TSM............................ 131 6.11 The db2inidb Tool ............................................................................ 132
6.11.1 db2inidb Option: as mirror ......................................................................................133 6.11.2 db2inidb Option: as snapshot .................................................................................136 6.11.3 db2inidb Option: as standby for Backups ...............................................................138 6.11.4 db2inidb Option: as standby for Hot-Standby Database ........................................139

6.12 Dual Logging .................................................................................... 145 6.13 Adjusting the Content of the Admin DB ......................................... 145

7 Emergency Tasks............................................................................147
7.1 SAP Database Recovery.................................................................... 147 7.2 Log File Restore of the SAP Database ............................................. 148 7.3 Recovery of the Admin DB ................................................................ 153
7.3.1 General Information ..................................................................................................153 7.3.2 Recovery Process.....................................................................................................154

Appendix A: Tool Command Line Parameters................................157
brarchive - Log File Archive Tool............................................................ 157 brdb6brt - Redirected Restore Tool ........................................................ 160 brrestore - Log File Retrieval Tool .......................................................... 164 db2uext2 - DB2 User Exit......................................................................... 167 db6adutl - SAP TSM Management Tool.................................................. 168 db6util - Tool to Assist Database Administration.................................. 169 dmdb6bkp - Database Backup Tool........................................................ 170 dmdb6srp - Update Statistics Tool ......................................................... 172 dmdb6rts - Table Reorganization Tool ................................................... 173 sddb6ins - Admin Tools Installation Program ....................................... 174 sddb6mir - Admin DB Creation and Mirror Tool Utility ......................... 176

Appendix B: Troubleshooting...........................................................177
DB2 Traces ............................................................................................... 177
DB2 Trace Facility db2trc...................................................................................................177 DB2 CLI Trace ...................................................................................................................178

Admin Tools Traces ................................................................................. 179
Downloading Admin Tool Patches from SAP Service Marketplace ..................................180

Troubleshooting Admin Tools and Programs ....................................... 182
General Troubleshooting Comments.................................................................................182 Initial Troubleshooting Steps..............................................................................................183 Installation (sddb6ins) Troubleshooting .............................................................................183 User Exit Troubleshooting..................................................................................................184

8

July 2006

.................................................................................... 223 DB2 UDB for UNIX and Windows V8 .......................brarchive/brrestore Troubleshooting.....................................227 July 2006 9 ........210 DB2 Control Center Extensions Architecture........................... 211 Appendix D: Example of File init<DBSID>.........Additional Documentation ........221 Appendix F: References .....205 Appendix C: Implementation Details...........smp...................db6 on Windows .............................204 Collecting Diagnostic Information for SAP Support ........................................Additional Documentation ........................................................................................223 DB2 UDB for UNIX and Windows V7 ................................................................ 215 Appendix E: Example of Customer Script db6sctsm........... 225 Glossary and Index ......................... 212 File init<DBSID>........................206 Admin DB Structure ............................212 File init<DBSID>...................................................................... 206 brarchive and brrestore backend Library Architecture........................................................................................................189 DB2 Control Center Extensions Troubleshooting...........db6 .............db6 on UNIX .....................

If you would like to give feedback on this documentation. for example. SAP Notes and customer experience and gives the administrator a single point of reference. The documentation is written based on DB2 UDB Version 7 as the underlying database release. It also includes a new troubleshooting section giving advice about solving problems before contacting SAP. The information in this documentation has been collected from a variety of sources such as previous administration documentations.1. The information is presented in a task-oriented way. use the following email address: feedback. in an emergency.db6@sap.1I and higher as well as IBM DB2 Universal Database for UNIX and Windows Version 7 and higher.com 1. or what information to send to SAP if no solution can be found. including those with experience with other database products. installing. The information provided in this documentation applies to all SAP kernel releases starting from 3. It will also be of use to a range of customer support functions when planning. or assisting in these tasks.1 About this Documentation This documentation supplies information specific to the SAP environment and describes daily administration tasks using both product tools and the SAP-specific administration tools. 10 July 2006 . separating information frequently needed from that which the administrator only requires.1 Who Should Use this Documentation This documentation is intended primarily for database administrators and SAP system administrators who need to install and maintain an SAP system running on DB2 UDB for UNIX and Windows. and maintaining systems.1 Introduction 1. The concepts described in this documentation are also expected to apply to other DB2 for UNIX and Windows database versions. It is structured to be of use to both people new to database administration and experienced SAP administrators alike.

including DB2 UDB-specific information about installing and configuring servers and clients for the SAP system. Advanced Tasks Covers one-time or rarely needed tasks not related to configuration. C. which must be performed before log files can be stored to tape.. Troubleshooting Describes what to do when tools do not work as expected.1. Configuration Describes the available options and steps required to configure the Admin Tools. It also covers manual (re)installation of the tools if required. Some tasks may be prerequisites for other day-to-day tasks. especially for support personnel. its targeted audience.db6 E. Emergency Tasks Tasks that administrators may need to perform after a database failure.1. Basic Concepts Describes administration and Admin Tools and the related concepts.. Introduction Provides general information about the guide. 4. B. interfaces. 6.2 How this Documentation is Structured This documentation is divided into the following sections: Chapters . Example of Customer Script db6sctsm. Installation and Setup Explains how to install Admin Tool patches and deal with upgrades.smp F. Example of the File init<DBSID>. Appendices A. Also includes monitoring and performance considerations. References G Glossary and Index July 2006 11 . Tool Command Line Parameters Contains detailed command line syntax for each command. Implementation Details Contains internal tool information. Regular Administration Lists and describes tasks that system administrators need to perform on a regular basis such as storage administration. 1. 5. backup and log file management. 2. 3. D. naming conventions and new features. 7.

Clients can be installed on any Windows platform. Tivoli Storage Management (TSM) / ADSM The IBM storage product ADSM has been renamed to TSM (Tivoli Storage Manager) in the most recent versions.10 and higher.com. 12 July 2006 . multi-partitioned system / EEE system The term multi-partitioned system replaces the term EEE system. Servers can only be installed on Windows NT or Windows 2000. Customers still using ADSM are strongly advised to upgrade to TSM Client Version 4. see Glossary and Index [Page 227]. Additionally the term SAP system also refers to other applications of mySAP. IBM DB2 Universal Database Enterprise Server Edition for UNIX and Windows IBM DB2 Universal Database Enterprise Server Edition for UNIX and Windows is referred to as DB2 UDB ESE for UNIX and Windows single-partitioned system / EE system The term single-partitioned system replaces the term EE system. as these Admin Tools can be used for any SAP system release starting from 6. Windows The term Windows refers to Windows 95. Tivoli (IBM) no longer supports the product ADSM. or Windows 2000. but in this documentation the product is referred to as TSM.1. Serious problems have occurred when using the Admin Tools with TSM Version 3. This version is also out of service now. so an upgrade is also strongly advised. Product Names In this documentation the following naming conventions apply: SAP Web Application Server / SAP system SAP Web Application Server is referred to as SAP Web AS or SAP system. The names are often used interchangeably.7. IBM DB2 Universal Database for UNIX and Windows IBM DB2 Universal Database for UNIX and Windows is referred to as DB2 UDB for UNIX and Windows or DB2.NN Admin Tools replaces the term 6. Windows NT. Windows 98.10 Admin Tools The term 6. The term ADSM is normally only used in this guide to indicate program parameters or configuration parameter names.10 Admin Tools.1 or higher. 6.2 Naming Conventions Terminology For information about terminology used in this documentation.NN Admin Tools / 6.

Within these sections. for example. DB2 UDB for UNIX and Windows has introduced its own log file management that replaces the SAP log file management tools (referred to as Admin Tools throughout this document). July 2006 13 .sap. Linux on Power. Therefore.com/instuidesNW2004s → Operations → DatabaseSpecific Guides • DB2 documentation IBM DB2 Universal Database . The 6.Data Recovery and High Availability Guide and Reference • SAP Note 913481 1. For more information.6D systems where DB2 UDB for UNIX and Windows Version 7 or higher is installed. see the following documentation: • IBM DB2 Universal Database for UNIX and Windows: New Log File Management that is available on SAP Service Marketplace at service. UNIX. For example.00 or higher New operating system platforms. TheDB2 HADR feature. The DB2 log file management is supported for all SAP releases.10. If you are using DB2 UDB for UNIX and Windows version 8.10 Admin Tools or higher should be used with all SAP system releases above and including 6.1.4 Admin Tools: Enhancements and Changes The following sections summarize recent changes to the Admin Tools.3 End of Support of SAP DB2 Admin Tools With version 8. the SAP log file management tools are no longer supported by: • • • • • Version 9 and higher of IBM DB2 for Linux. and Windows SAP Java only systems SAP systems based on SAP kernel releases 7. Windows AMD64/EM64T or Solaris on AMD64.1I to 4. which do not need to be the same. we refer to the Admin Tools release and not the SAP system release.6D Admin Tools should be used on all SAP 3.2 or higher.2. we recommend that you use DB2’s integrated log file management. Linux AMD64/EM64T. the 4.

For more information. They are only installed with the first SAP system.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. In the past a difficulty with the Admin Tools has been the runtime environment. Further SAP systems have different IDs. environment variables may have been set to non-existent directories. only once per database. If <SAPSID> and <DBSID> have the same value. user IDs and directory names may be affected. see Installing the Admin Tools Manually [Page 47]. As log files are shared by all the SAP systems using the same single database. <sid> <SID>.6x releases. The sddb6ins program now also contains the remaining Admin Tools. <sapsid> <DBSID>. The following terminology conversions must be used: SAP System and Database Name Descriptions ID SAP system ID SAP database name Old ID <SID>. you must make sure that the db2<dbsid> user environment still points to another valid MCOD system using the same database. that is.6D system environment is still sapr3. The Admin Tools installation program sddb6ins now checks many aspects of the environment to locate the majority of problems experienced by customers. sddb6ins therefore no longer requires a separate DBATOOLS.SAR file. the old terminology still applies as described in the table below. Admin Tools files and directories may have been unintentionally removed or were given the wrong ownership or authorizations. Additionally. which it installs. and so on. It is necessary to differentiate between the SAP system ID <SAPSID> and the SAP system database name <DBSID>. as is often the case for the first SAP system installed on a database. The database connect user for the first SAP system in a 4. However. user db2<dbsid> and all <sapsid>adm users can perform log file management tasks. • Admin Tools in an MCOD Environment The Admin Tools have been modified to support this SAP feature. as these are no longer necessarily the same. If an MCOD system is removed. there is a limitation in SAP 4. <dbsid> User ID Descriptions User Database instance owner SAP database administrator Old ID db2<sid> <sid>adm New ID db2<dbsid> <sapsid>adm 14 July 2006 . that the initial SAP system must have the same ID as the SAP database. <sid> New ID <SAPSID>. and the shared library path environment variable must no longer be set before starting it.

see New Features [Page 16]. it is only necessary to verify that the db2<dbsid> user is set up correctly. This restriction only applies to 4.6D system environment. see Differences Between 4. the real directory name after substitution remains unchanged: Old /usr/sap/<SID>/sys/exe/run /db/<SID>/log_dir New /usr/sap/<SAPSID>/sys/exe/run /db/<DBSID>/log_dir If the original SAP system is removed. • 64-bit Support The Admin Tools have been modified to work with 64-bit platforms.6D and 6.6D and 6. Directory Names Descriptions Directory SAP system related directories db2<dbsid> home directory and subdirectories Old Name <SID> <SID> New Name <SAPSID> <DBSID> The following are examples of how the descriptions of directory names have changed on UNIX systems compared to earlier versions of this documentation on. July 2006 15 . From SAP system Release 6. Some changes were specifically implemented for the 4. For more detailed information.NN Admin Tools.NN Admin Tools [Page 19]. certain Admin Tools are no longer fully functional.com/mcod. This user may require changes to his environment.6D and 6. For more information about released platforms and availability. Use sddb6ins –checkonly to verify this. For information about the main differences between the 4.6D SAP systems. If <SAPSID> and <DBSID> are the same.10 and higher. see SAP Service Marketplace at service.Database connect user sapr3 sap<sapsid> sapr3 is still used for the first SAP system in a 4.sap.NN Admin Tools and delivered as patches.

6D Patch 20 and 6.6D Patch 22 and 6. see Archiving Directly to TSM [Page 80].6D patch 22 and 6. see Deleting Log Files [Page 101]. • Restore of log files excluding the Admin DB The User Exit restores log files from log_archive or log_retrieve without any information about those log files in the Admin DB.6D and 6. • Option brarchive –do You use this option to delete obsolete log files using the command line. • Admin Tools and DB2 Version 8 The Admin Tools are now supported for DB2 UDB for UNIX and Windows Version 8.1. For more information. see Adjusting the Content of the Admin DB [Page 145]. 16 July 2006 . For more detailed information about 4. 6.NN stands as a placeholder for all Admin Tools releases starting from 6.NN patch 11. • Support of two TSM management classes The User Exit and brarchive can now archive log files to two TSM management classes.db6.4. • Option sddb6ins –r You use this option to recreate the Admin DB from a SAR file. see SAP Note 533979. For more information. You activate this feature by setting configuration variable DB2DB6_UEXIT_RETRIEVE_WO_DB in file init<DBSID>.NN Patch 11 • Option brarchive –dt You use this option to delete tapes using the command line. New Features of 4. For more information.NN Patch 9 • brarchive/brrestore customer script interface You can now write your own individual backend interface. For more information. • Option brarchive –GAL/-DMP You use this option to adjust the Admin DB to a file system.10 and higher. For more information. see Advanced Log File Management Tasks [Page 117].NN Admin Tools. see Recovery of the Admin DB [Page 153].1 New Features This section provides information about new features that have been specifically implemented for the 4. see Archiving Log Files from Disk to Backend [Page 98]. New Features of 4. For more information.

For more information. To turn archiving without the Admin DB off.NN patch 11.• Support of TSM LANFREE The Admin Tools have been modified to support the TSM LANFREE feature. For more detailed information about 4. see SAP Note 597416. the User Exit is now able to archive without accessing the Admin DB. the sddb6mir tool also adds missing log files. This updates the information in the old version of transaction DB12. set DB2DB6_UEXIT_ARCHIVE_WO_DB to OFF in the init file. 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. For more information.NN patch 12. • To deinstall the Admin Tools. you can use sddb6ins –d.6D patch 23 and 6. Archiving without the Admin DB causes fewer problems. TSM is now supported for Linux IA64 and Windows IA64. see SAP Note 597356. • Archiving directly to disk If you are using direct archiving. see Configuring the System for Archiving Log Files [Page 78]. For more detailed information about 4.6D Patch 25 and 6. You activate this feature by setting configuration variable DB2DB6_TSM_MULTITHREADED in file init<DBSID>. Before mirroring. this is now the default for all SAP system releases.NN Patch 12 • Indirect archiving without accessing the Admin DB If you are using indirect archiving. the User Exit is now able to archive log files directly to disk.6D Patch 27 and 6.6D Patch 23 and 6.NN patch 16. New Features of 4. HP-UX IA64 is not yet supported since the TSM API and client is not yet available.NN Patch 16 • • For 4.6D patch 27 and 6. For this reason. You activate or deactivate this feature of the User Exit by setting configuration variable DB2DB6_UEXIT_ARCHIVE_WO_DB to ON or OFF.6D patch 22 and 6. New Features of 4.NN Patch 14 • Indirect archiving without accessing the Admin DB is now the default for all releases. you must use TSM Version 4 or higher. New Features of 4. see Configuring TSM (Tivoli Storage Management) [Page 90]. July 2006 17 .db6. The necessary tasks to update the Admin DB content are moved from the User Exit to brarchive.

This may occur in a redirected restore scenario because the container layout is then different to the one when the backup was made. You activate this feature by removing the two dashes (−−) at the beginning of the corresponding comment line. For example. For DB2 Version 8. • Backup restore tool brdb6brt patch 5 New comments starting with SET IGNORE ROLLFORWARD The script created by brdb6brt patch 2 or higher contains new comments starting with SET IGNORE ROLLFORWARD. Support of striped containers Striped containers are created if you are using DB2 Version 7 and instance registry variable DB2_STRIPED_CONTAINERS is set to ON. For more detailed information about the current patch of brdb6brt. Option –bm RETRIEVE RELOCATE You use this option to create scripts that can be used for database relocation. With this option. • • Backup restore tool brdb6brt patch 11 AutoStorage support was added. see SAP Note 867914 18 July 2006 . this variable is set to ON by default. Backup restore tool brdb6brt patch 9 Option –nn ALL was added. option INCREMENTAL AUTOMATIC was added. Backup information in brdb6brt brdb6brt automatically contains the information from the latest full backup. Option –replace <replace definition> You use this option to modify the generated scripts for redirected restore and relocation. you can create backups or the redirected restore script for all database partitions with one call.New Features of Other Administrative Tools • Backup restore tool brdb6brt patch 12 If an incremental or delta backup was detected. It retrieves the information from the backup history file. These scripts can be used as a template in db2relocatedb with command relocate DB or in db2inidb with command RELOCATE USING. You might have to use this feature if the log files contain information about container change operations and the operations cannot be applied during the roll-forward recovery. you can replace the database name <DBSID>.

the 6. the Admin DB is not required and so no backup (mirror) of this database is needed. Thus.6D and 6. protocol and trace files have been moved.NN Admin Tools.6D. • New location for Admin Tools executables To reduce the dependencies between the almost release-independent Admin Tools and the release-dependent SAP products. which was used to perform this action. see Installing the Admin Tools Manually [Page 47]. the main differences to the 4. This has proven to be unnecessary. The DB2 Control Center Extensions are supported for DB2 UDB for UNIX and Windows Version 8.2 Differences Between 4.• DB2 Control Center Extensions patch 4: You can now use the DB2 Control Center Extensions for the 4. This means that. For more information. their configuration.10 Admin Tools no longer need to be re-installed after an SAP system upgrade.NN Admin Tools delivery does not contain program sddb6mir any more. the program sdd6mir. July 2006 19 . The DB2 Control Center Extensions have been modified to support the customer script option of brarchive. see Recovery of the Admin DB [Page 153]. 1.NN Admin Tools.4. If log files are stored using brarchive. a backup copy of the Admin DB is stored to the same medium as the log file(s) at the end of each brarchive run. for example.NN Admin Tools Since the implementation of the 6. see SAP Note 703988. the Admin DB ADM<DBSID> was mirrored to the SAP database to reduce the risk of data loss. For more information about how to recover the Admin DB. When SAP system log files are stored directly by the User Exit to TSM. This implies that the 6. unlike Admin Tool versions up to 4. For more detailed information about patch 3 of the DB2 Control Center Extensions. is no longer required.6D and 6. the Admin Tools.6D Admin Tools are: • ADM<DBSID> database mirroring no longer required In the past.

This ensures that an online backup has a complete set of archived log files available for recovery.5 DB2 UDB for UNIX and Windows Version 7: Enhancements The following are the major new features in Version 7.csh/sh Windows: user environment 6. For more information.NN UNIX: <INSTHOME>/admintools/ bin Windows: <INSTHOME>\admintools\ bin UNIX: <INSTHOME>/admintools/ protocols Windows: <INSTHOME>\admintools\ protocols UNIX: <INSTHOME>/admintools/ TraceFiles Windows: <INSTHOME>\admintools\ TraceFiles UNIX: <INSTHOME>/admintools/ bin/dbaenv_<host>.The following table shows the location of the Admin Tools files and variables for 4.NN: 4. which are relevant to the Admin Tools: Version 7.6D Executables and libraries: brarchive/ brrestore. libdb6* Protocol files UNIX: /usr/sap/<SAPSID>SYS/ exe/run Windows: <drive>:\usr\sp\<SAPSID>\SYS\ exe\run UNIX: /db2/<DBSID>/saparch /db2/<DBSID>/saprest Windows: <drive>:\db2\db2<dbsid>\ saparch <drive>:\db2\db2<dbsid>\ saprest Trace files UNIX: /tmp/TraceFiles Windows: <DB2DB6_TEMP_DIR>\ TraceFiles TSM environment variables UNIX: in.dbenv_<host>. db6adutl. see the IBM documentation DB2 Administration Guide: Implementation 20 July 2006 .6D and 6.2. DB2 forces the currently active log file to be closed and as a result it will be archived.csh/ sh Windows: user environment 1.1 and Version 7.1 • Closing the Active Log File after Backup After an online backup is complete.

• 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.2 provides a new registry variable DB2_BLOCK_ON_LOG_DISK_FULL. Version 7. DB2 will ensure that the split mirror copy maintains its integrity. 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. while allowing online split mirror handling of the database.2 • Block Transactions When Log Directory is Full DB2 Version 7. • Suspended I/O Supports continuous system availability. • 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. If you want to use the db2inidb tool. For more information. This file indicates if your application is hanging. By momentarily suspending I/O to disk. • Renaming a Tablespace When creating a tablespace. see the IBM documentation DB2 Administration Guide: Implementation. you were not allowed to change that name again during the lifetime of the tablespace object. A new tool db2inidb has been created that operates on split mirror copies.log after each attempt. Now. see the IBM documentation DB2 Administration Guide: Implementation. Database administrators are thus provided with more granular control over their backup and restore strategy. For more information about the DB2 instance variable DB2_BLOCK_ON_LOG_DISK_FULL. which is then automatically archived by DB2 if the User Exit is enabled. see the IBM documentation DB2 Administration Guide: Implementation. July 2006 21 . see the DB2 Release Notes. For more information. For more information. an administrator can rename a tablespace with the RENAME TABLESPACE statement. we strongly recommend that you read The db2inidb Tool [Page 132] before you start using it. 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. you specify its name. This enables applications to perform extremely large amounts of work within a single transaction.• On Demand Log Archive Support You can now force the currently active log file closed. In previous versions.

effectively allowing a transaction to use an infinite number of log files. you should set the new database configuration parameters MAX_LOG and NUM_LOG_SPAN to avoid that transactions run indefinitely. If you use indirect archiving. This section briefly summarizes new features that affect log file management and database administration in an SAP environment. 22 July 2006 . incremental. We strongly recommend that you use this feature only if you are using direct archiving. Be aware that if you activate this feature. Delta backup: Only contains data that has changed since the last tablespace backup (full.2.What’s New. • 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. This feature is now supported on Windows as well. This may improve performance on SMP machines. the log records for a unit of work must fit in the primary log space. • Infinite Logging It allows an active unit of work to span the primary logs and archive logs. which was introduced in DB2 Version 7. rollbacks may take a long time if the log files containing the rollback information need to be retrieved by the User Exit.• Parallel Recovery DB2 now uses multiple agents to perform both crash recovery and database rollforward recovery.6 DB2 UDB for UNIX and Windows Version 8: Enhancements All new features of DB2 UDB for UNIX and Windows Version 8 are described in the IBM documentation IBM DB2 Universal Database Version 8 . In addition. have been removed. 1. Logging Enhancements • Dual Logging Restrictions of this feature. or delta backup). 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. 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. You can choose the mirror log directory by setting database configuration parameter mirrorlogpath. Without infinite active log enabled. Infinite active log is enabled by setting logsecond to -1.

you can force all users off an instance or a database and put it into a quiesced mode for database maintenance activities. which can be defined. is now set using database configuration parameter blk_log_dsk_ful. • Increased Log Space The maximum amount of log space. you can now specify the time as local time. July 2006 23 . • Database Maintenance Mode: QUIESCE Using the new QUIESCE command. Changes to these online configuration parameters take immediate effect without the need to stop and start the instance. • Online Index Reorganization A table and its existing indexes can be read and updated during an index reorganization using the new REORG INDEXES command. 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. or deactivate and activate the database. • Online Configuration Parameters Over 50 configuration parameters can now be set online. Online table reorganization is allowed only on tables with type-2 indexes and without extended indexes. Availability Enhancements • Online Table Reorganization Online table reorganization allows applications to access the table during the reorganization. In addition. and add new containers to a tablespace in a way that a rebalance does not occur. has increased from 32 GB to 256 GB. DB2 Version 8 will allow you to drop a container from a tablespace. online table reorganization can be paused and resumed later by anyone with the appropriate authorization by using the schema and table name.• Block Transactions when Log Directory is Full The block on log disk full function. This makes it easier to roll forward to a specific point in time and eliminates potential errors due to the translation of local to GMT time. which gives you more flexibility to decide when to change the configuration. reduce the size of existing containers. which was introduced in DB2 Version 7. The quiesce mode of the database is ideal to create an offline backup without the need to stop the SAP application servers. You no longer have to disconnect users when you fine tune your system. Backup and Recovery Enhancements • XBSA Support Backup can now interface with solutions from storage vendors that have implemented the XBSA industry standard interface. • Point in Time Rollforward Recovery to Local Time When using point in time (PIT) rollforward recovery. • DMS Container Operations If you use database-managed tablespaces.

24 July 2006 . With AutoRunstats enabled. AutoRunstats replaces the former internal mechanism of SAP CCMS and is now available for all SAP system releases. You can also use this new command for multi-partitioned databases.sap.com/instuidesNW2004s → Operations → Database-Specific Guides • Automatic RUNSTATS: With automatic statictics collection. DB2 has introduced its own integrated log file management. you let DB2 determine. • New command for simplified database recovery The new command for database recovery combines the functions of the RESTORE DATABASE and ROLLFORWARD DATABASE commands. you can decrease the priority of a specific database tool to a desired value. The advantages are as follows: You only need the backup image to ensure the consistency of an online backup. which statistics are required by your workload and which statistics need to be updated.2. For more information. see SAP Note 860724 Configuration of CCMS Planning Calendar for AutoRunstats.1. the buffer size. see dmdb6bkp – Database Backup Tool [page 170]. • Inclusion of transaction logs in backup images When creating an online backup image.7 DB2 UDB for UNIX and Windows Version 8. you can include the log files that are required to restore and recover a database in the backup image. and the parallelism settings for both backup and restore operations. Using this command. see dmdb6bkp – Database Backup Tool [page 170]. • Self tuning backup and restore operations DB2 automatically chooses the number of buffers. Using this feature. You do not have to decide any more which log files are required. For more information. This feature is supported by tool dmdb6bkp. For more information.2: Enhancements • Integrated log file management With Version 8. DB2 will automatically run the RUNSTATS tool in the background to make sure that the correct statistics are collected and maintained. You do not need to indicate which database backup image must be restored or which log files are required to reach the specified point in time. For more information. see the document IBM DB2 Universal Database for UNIX and Windows: New Log File Management that is available on SAP Service Marketplace at service. you specify the point in time to which you want the database to be recovered. This feature is supported by dmdb6bkp. • Throttling database tools Running DB2 database tools can have a significant impact on the database performance.

DB2 uses one or more storage paths as location where it creates AutoStorage tablespace containers. As space is consumed in a DMS table space that can be automatically resized. You cannot disable automatic storage management afterwards. • Automatic storage management (AutoStorage) Databases that are enabled for automatic storage have a set of one or more storage paths associated with them.1. July 2006 25 .8 DB2 UDB for UNIX and Windows Version 8. You can only enable DB2’s automatic storage management during database creation. The tablespace is considered full when all of the space within the containers has been used. you can add or extend containers using the SQL statement ALTER TABLESPACE that allows more space to be given to the tablespace. DMS tablespaces also have a feature called “auto-resize”. However.2.2: Enhancements • Automatic resizing of DMS tablespaces (AutoResize) DMS tablespaces consist of file containers or raw device containers and their sizes are set when the containers are assigned to the tablespace.

1. 2. the DB2 Control Center Extensions. They can be divided into the following categories: • • • Log file management tools Database backup and restore support tools Performance related tools In addition to the tools themselves. and the terminology used throughout this documentation. a graphical interface. These are extra menu options and windows that are available in the DB2 Control Center after the extensions are installed. has been created that simplifies access to several of the Admin Tools.2 Basic Concepts 2. This documentation includes new and updated information that was not available in previous versions. Much of this terminology is described in Glossary and Index [Page 227]. 26 July 2006 .1 The SAP DB2 Admin Tools The SAP DB2 Admin Tools are a collection of tools specific to the SAP environment.1 Introduction This chapter describes the concepts relating to the Admin Tools. which supplement standard DB2 tools.

July 2006 27 . For introductory information. backup and recovery.1. use the db2cc command on the command line. You can also access tools such as DB2 Visual Explain and DB2 Performance Monitor from the DB2 Control Center. SQL statements and get online help.SAP System <SAPSID> SAP database <DBSID> M o Ex nit ec or ut e Admin Tools SAP processes + Monit o + Exe r cute Proto c + Qu o l ery cute Exe DB2 Control Center + SAP Extensions Configure + Query Admin database ADM<DBSID> The following graphic shows the relationship between the Admin Tools and the DB2 Control Center Extensions plus the SAP system and database. To start the DB2 Control Center. It offers a variety of command options. 2. and can be started in interactive input mode. scheduling jobs. command mode and batch mode. • DB2 Control Center (DB2CC) DB2 tool offering a graphical user interface that simplifies administrative tasks such as configuring the database. choose Help → Getting Started. For more information. and managing media.2 User Interfaces System administrators can perform the DBA tasks using the following interfaces: • DB2 Command Line Processor (CLP) DB2 tool used to execute database utilities. see the DB2 Command Reference. The DB2 Control Center can be extended with the SAP Admin Tools Control Center extensions to support SAP-specific tasks related to log file management. or use Start panels on Windows platforms.

The number of available tasks is limited.2 SAP Log File Management This section explains why log file management is an essential part of system administration.• Operating System Command Line This can be used to perform the majority of tasks described in this documentation. These log files are required for the following purposes: • Explicit and implicit rollback When a database transaction is rolled back all changes are undone. by writing scripts or batch files. • SAP Transactions These provide an additional graphical interface for starting specific tasks. for example. The DB2 Database Manager generates log files to keep track of changes made to the database. The system administrator can also use this interface to automate tasks. but may require user knowledge of complex command syntax. 28 July 2006 . Explicit rollback An application indicates that changes that it started to make to the database are invalid. but they are often neither platform nor database-specific and can therefore be used in a mixed environment. and how the Admin Tools assist in this task. Generally this is the fastest and most flexible method.The Need for Log Files Once a database is up and running. Implicit rollback A program making changes to the database does not commit changes before exiting. 2. It covers the following topics: • • • • • • • • Recovery − The Need for Log Files [Page 28] Recovering Log Files [Page 30] Log File Life Cycle (Archive and Restore) [Page 31] Log File Deletion [Page 34] Protocols [Page 36] Raw Device Log Files [Page 36] Log File States [Page 37] Special Cases – Non-Standard Behavior of Database Systems [Page 38] 2.1 Recovery . In both cases the database needs log file information to return the database to the state it was in before the changes were made. either through incorrect programming or a crash.2. one of the most essential tasks for a database administrator is the management of database backups and log files to ensure that databases can be recovered after a serious failure.

the database will enter a backup pending state. The DB2 Database Manager retains all log files as long as they contain information from open transactions. DB2 version 7 supports a log overflow directory. Alternatively. the log files generated while the backup operation was running are also required. This is especially important in connection with recovery when logging to raw devices. In case of loss or damage. This involves rolling back (undoing) all open transactions for all applications. • Database restore A database can be recreated by restoring a previous backup. In connection with rollforward operations. log file data generated after the backup was taken must be added to the database again. Rollback and database recovery do not normally require user intervention. log files can be first applied to bring the database up to date (to end of logs). Therefore. User intervention is only required if the directory where the database manager stores log files is damaged or lost. DB2 will look for log files in the default log directory (SQLOGDIR) when the database is activated. If the log files are not found. If the log directory is changed and then the subdirectory or any required log files in that subdirectory are removed. Restoring from an offline backup image Such a database is immediately usable after the ROLLFORWARD STOP subcommand. A backup represents the state of a database at the time the backup was performed. This directory is known both as the LOGPATH and log directory. If you have moved any logs from the location specified by the log path parameter. The command to add the log file information is as follows: DB2 ROLLFORWARD. This process is known as rollforward recovery. you can recover at least those files that have been successfully archived with the tools described below.• Database recovery The DB2 Database Manager may be forced to restart without applications being able to close all open transactions. July 2006 29 . 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. Restoring from an online backup image In the case of an online backup. but does not contain information about transactions completed after this time. The rollforward operation first checks for logs in the location specified by the LOGPATH database configuration parameter. to bring the database completely up-to-date. as transactions may have modified the database contents during the time of the backup. use the ROLLFORWARD overflow directory parameter to specify the path to the logs that you moved. after a backup image is used to restore a database. Without this additional data the restored database cannot be activated. 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.

for example.9999999. For more information.0 and so on.4. the Admin Tools are no longer automatically installed. see Installing the Admin Tools Manually [Page 47].3.1. Rollforward recovery is not enabled by default.2. Each time the LOGRETAIN parameter is turned off and on again. • USEREXIT The User Exit mechanism is enabled by turning on this parameter.3. Their main purposes are: • • To archive log files. for example. To perform online backups. 0.2. Recovery of older versions must be done manually. the User Exit either archives log files directly to a storage management product.1. To assist database administrators performing database rollforward operations after a database restore. To restore the database from an online backup.1. This can result in several log files having the same log file number on a given node.2. The User Exit is automatically started by the DB2 engine each time a log file becomes full. all log files in use during the online backup operation must be available to complete the restore operation. the database must be operated in rollforward recovery mode. or it copies the log files to the directory referred to as archive directory (as defined by the DB2DB6_ARCHIVE_PATH environment variable). This behavior can be modified so that the database manager uses log files in an ascending order. Database administrators are strongly recommended to set the following database parameters in the SAP environment to ON: • LOGRETAIN Rollforward recovery is enabled by turning on this parameter. The Admin Tools are automatically installed as part of an SAP system installation with R3SETUP.3. Depending on how it is configured. brarchive and brrestore were developed as the log file management component of the Admin Tools.2 Recovering Log Files The tools db2uext2 (the User Exit). 30 July 2006 . circular logging is turned off and each new log file has a higher number. Groups of files in the archive directory can then be archived to tape. The User Exit (db2uext2) is then automatically started by the database each time a log file is filled.2. By default. Unless otherwise configured. You can manually (re)install. That is. If you install your SAP system with SAPinst. TSM or with an individual script using brarchive later. the database manager also does not start any application (User Exit) to independently archive full log files for later recovery. the DB2 Database Manager reuses a fixed number of log files in a circular fashion. the Admin Tools can be used to archive log files. The log files management tools only directly support recovery of the most recent version of log files. after which the database can be started again. upgrade or patch the Admin Tools using the sddb6ins program. Once these parameters have been turned on and a backup has been performed. 0. A backup is required after setting the LOGRETAIN parameter (or both). the database manager resets log file numbers and starts from zero again.2.….0.

3 Log File Life Cycle (Archive and Restore) The following section covers the standard scenarios known as indirect and direct archiving. the User Exit either retrieves log files directly from the chosen repository. The log file cycle is similar to direct archiving with the log files being copied elsewhere but the target and exact behavior depend on the vendor User Exit. 2. or from the archive directory and/or retrieve directories. The graphic describes the possible life cycle of a log file when using the log file management tools. brarchive can also be scheduled to be (regularly) started using the DBA Planning Calendar (SAP transaction DB13). the Database Manager will create new log files starting with the number immediately following the last log file that was rolled into the database. which is a variation of direct archiving. where the SAP User Exit is configured to call a vendor User Exit. If the database is not rolled forward to the end of all logs when restarted. brrestore and ROLLFORWARD operations may need to be performed repeatedly until all required log files have been retrieved and rolled into the database. July 2006 31 . brarchive and brrestore The User Exit does not need to be started by a user – it is automatically called by DB2 if configured correctly. or otherwise automated using scripts or batch files.The database can be recovered later using the DB2 commands RESTORE and ROLLFORWARD. There is a third scenario. Running the User Exit. To complete a rollforward operation (other than stop). Both brarchive and brrestore can be called from within the DB2 Control Center or can be started from the command line. 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. The latter is the directory (defined by the DB2DB6_RETRIEVE_PATH environment variable) to which log files are restored using brrestore. Dependent on the configuration. Recovery of older versions must be done manually.2.

LOG S0000004. archive to disk or via an alternative User Exit. brrestore retrieves archived log files from the repository if they are no longer in the archive directory.LOG S0000002. The location the file is moved to depends on the configuration of the User Exit. TAPE or SCRIPT S0000002. Indirect Archiving and Restore (Default) Single log files are copied into the archive directory by the User Exit (A).LOG online retained (C) (D) S0000001.LOG (D) S0000006.LOG S0000006.LOG S0000003.LOG archived retained .LOG brrestore User Exit online active restored retained S0000000.LOG S0000007. The Admin Tools can only administer the latest version of a log file with a given number per node.LOG (B) …/log_dir . User Exit offline retained brarchive S0000005.LOG (A) LOGPATH DB Parameter S0000004.LOG S0000007. log files are archived indirectly by first copying the file to the archive directory.LOG DB2DB6_RETRIEVE_PATH …/log_retrieve/<DBSID> Indirect Direct LOGPATH DB Parameter …/log_dir . 32 July 2006 .LOG online active online retained TSM. that is. the User Exit retrieves log files from the archive or the retrieve directory (D). S0000005. the database engine automatically starts the User Exit program to archive each log file as soon as it is full or it is closed. File archiving using the archive directory is referred to as indirect archiving. (A) User Exit (D) TSM. you cannot administer two log files with the number 25 on node 0. DISK or VENDOR S0000000. When requested by a ROLLFORWARD operation in connection with a database restore action. and places them in the retrieve directory (C) where the User Exit can access them.LOG S0000001. The User Exit can be reconfigured to archive directly using TSM.LOG archived retained Archive Restore When the USEREXIT database configuration parameter is set. By default.…/log_archive/<DBSID> S0000003. brarchive is then used to archive groups of offline log files into an archive repository (also known as backend repository) (B).

July 2006 33 . log files copied by the User Exit but not yet archived with brarchive can be lost if the disk containing the archive directory fails. Log files are archived immediately and directly to long-term storage. the node number NODEXXXX is appended to avoid problems in a multi-partitioned environment. the files are renamed by appending the file-closure timestamp (14 digits) and the node number (NODExxxx). when the User Exit moves files from the archive or retrieve directory back to the log directory. including additional storage directories and an extra Admin DB slightly increases the risk of failure. However. Otherwise. The User Exit can be configured to archive directly to TSM. For more information about how to configure the User Exit and the Admin Tools in general. You can use these products not only to archive log files but also to archive backups. the files will not be recognized by DB2. However. In this case. Log File Naming Convention The log file names in the graphic above are simplified for readability depending on the way they are archived: • Direct archiving Files are stored to the backend without their names being modified except if you are using direct archiving to disk. after restoring the database. A later ROLLFORWARD operation. see Changing the Admin Tools Configuration [Page 70]. Direct Archiving and Restore Direct archiving is the recommended method for log file archiving. • The complexity of the solution. The latter provides support for any products which provide a User Exit. Log files are not renamed during direct archiving or restore. whilst ensuring that SAP tables containing log file information are also updated. the original name is restored. • Indirect archiving When the User Exit copies log files from the log directory to the archive directory. Therefore. In ROLLFORWARD mode.Only indirect archiving supports archiving to tape without a vendor storage management product. We recommend that database administrators use direct archiving as it performs well and requires minimal maintenance. archive to disk or to call a vendor User Exit for an alternative storage product. either TSM or another storage management product with its own User Exit is required. before you decide to use this solution you should take the following disadvantages into consideration: • Log files are not immediately archived to long-term storage. as it is the simplest and therefore most reliable method. ROLLFORWARD operations after a database restore normally require no user interaction when using direct archiving. results in the files being automatically restored from the same source.

When a database is first created. the backup timestamp allows the Admin Tools to keep track of the restorable backup or log file combinations. The Admin Tools are then able to tell the database administrator which log files are needed to roll forward a database after a specific backup image has been restored. only the Admin Tools should be used to manage log files.LOG are created. Those files must have the timestamp and node extension removed from their names when they are moved back to the log directory. are restored.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. DB2 restarts the log file numbering sequence at S0000000. online active. Normally. that is after log S9999999. the copy of the file S0000001. no log file copies are made on disk and no deletion is needed.LOG is used The states a log file passes through. The Admin Tools GUI (DB2 Control Center Extensions) also supports this. are described in Log File States [Page 37]. In combination with the log file close timestamp (another log file attribute).4 Log File Deletion Log Files on Disk Log files in the DB2 log directory should not be deleted. during archiving. the Admin Tools also associate it with a database backup timestamp (that is. Admin Tool Log File Management Model – Indirect Archiving Only Whenever a log file is archived. the following happens: • If you chose direct archiving. The database manager automatically deletes or reuses these files after they have been successfully archived by the User Exit. the date and time of the most recent SAP system database backup operation – whichever was performed most recently). DB2 log file names are of the format Snnnnnnn. Depending on the archiving method you choose.NODE0000. For more information. see Log File Restore of the SAP Database [Page 148].20001130140536. A file restored by brrestore (in the LOG RETRIEVE directory) still has the extended file name. where nnnnnnn is a seven digit number ranging from 0000000 to 9999999.LOG put in the archive directory might be renamed to S0000001. for example. 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 37]). 2.LOG.LOG. The files should not be moved or deleted manually as this will lead to data inconsistencies. which appear in the above graphic.For example. log files starting from S0000000.2. 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. 34 July 2006 .

If you use indirect archiving. If you lose a tape or if a tape becomes unreadable. Explicitly deleting log files in a later call to an Admin Tool (options -ds and –dr). If you use direct archiving. all entries in the Admin DB will automatically be removed before the tape is overwritten with new log files. it is essential that you use the Admin Tools to delete files when using indirect archiving. the log files will automatically be deleted from TSM. the Admin DB should always reflect the content of the tapes (in the Admin DB. For more information. Therefore the Admin DB does not grow. log files copied to the archive directory by the User Exit and later successfully archived using brarchive will only be deleted from the archive directory if this is explicitly requested. there is an entry for each log file that is stored on tape). Storage management products often supply their own tools for doing this or can be configured to automatically remove old files. but other backend storage should be cleaned up regularly using the Admin Tools. you may use db6adutl to delete the log files. • TSM If TSM is configured correctly and if you use an archive copy group for storing log files. see Deleting Log Files [Page 101].• If you chose indirect archiving. you should use brrestore –delete. For more information. However. the Admin DB does not recognize the automatic deletion and runs out of sync. If you use a backup copy group. The same applies to log files restored to the retrieve directory by brrestore. In the latter cases deletion is requested by: • • Indicating deletion as part of a brarchive/brrestore operation (options -sd and – ssd). The same will happen if log files archived using brarchive and restored using brrestore are not deleted using the same tools. you need to delete the log files manually. 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. For more information. To synchronize the Admin DB. If you use indirect archiving. see Deleting Log Files [Page 101]. see Deleting Log Files [Page 101]. use brrestore –delete. Tapes can be reused. you should use brrestore –delete to delete log files. July 2006 35 . If you reuse a tape that already contains log files. see Deleting Tapes from the Admin DB [Page 120]. as the Admin DB is then also updated. you should delete the tape from the Admin DB to reflect this lost or unreadable tape in the Admin DB. • Customer script If you use a customer script. Log files no longer required on the backend should also be deleted using these tools. Log Files in Long-Term Storage • Tape If you use a tape as a long-term storage. For more information.

NN Admin Tools: <INSTHOME>/admintools/ protocols brrestore brrestore. brarchive and brrestore generate protocol information to record the actions that have been performed.6D Admin Tools <INSTHOME>/saprest For 6.6 D Admin Tools: <INSTHOME>/saparch For 6. The protocol files have the following form and are written to the following directories: Tool User Exit Protocol File(s) db2uext2. 2.<timestamp>.NODExxxx (Files are appended) brarchive brarchive. For more information. it is generally easier to work with log files in file systems. The frequency can be configured by setting configuration parameter delete_protocols using the DB2 Control Center Extensions. Protocol files should only be deleted by the database system administrator.lfr (One file per run) • • These tools can also write more detailed traces. normally only for use by support and development. The Admin Tools fully support raw logging. Protocol information is also written into the Admin DB by the log file management tools.5 Protocols The User Exit (db2uext2). This information can be used by the DB2 Control Center Extensions. However.lfa (One file per run) • Location Directory defined by the DIAGPATH configuration parameter (db2 get dbm cfg …) • For 4.err.NN Admin Tools: <INSTHOME>/admintools/ protocols For 4. the following is necessary to enable roll-forward during database recovery. as these can be maintained and manipulated using standard operating system tools.NODExxxx db2uext2. This has the effect of bypassing a possible file system management overhead and allows DB2 to manage the log data with optimum efficiency. we recommend that you use raw devices for storing log data. see Appendix B: Troubleshooting [Page 177]. The User Exit extracts raw data into individual files that then behave identically to non-raw log files.<timestamp>. To allow the User Exit to put missing logs in the log overflow directory.2. If logging information cannot be obtained from the log extents available on the raw device.2. 36 July 2006 . The Admin DB protocols and the protocol files of brarchive and brrestore are eventually deleted by brarchive.2.log. DB2 expects the logs to be in the log overflow directory. the ROLLFORWARD utility must specify the overflow log path parameter. If you decide to use raw device logging. The differences between file system-based logging and raw device logging are hidden by the User Exit.6 Raw Device Log Files To achieve maximum performance.

and will also be in the archive directory after the User Exit has run. This state information is stored in the Admin DB. the archived log file is also still available on the backend. TSM (Tivoli Storage Manager) or tape. • Archived retained The log file has been archived using brarchive. for example. Older log files that have been archived can still be manually retrieved from the backend using system or storage product tools. However. in order for the tools to know what operations have been performed on a log file. If not explicitly deleted. The original log file will also remain in LOGPATH until the database is stopped or the DB2 Database Manager reuses the file. The location of the archived log file is a storage management product. This information is consequently not stored on systems performing direct archiving. • Restored retained The log file has been restored using brrestore. If not explicitly deleted by using the -delete option in a subsequent operation. • Offline retained The log file is no longer being used and does not contain transactions with unwritten data pages. • Online active The log file is currently being used to log transactions. July 2006 37 . 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. or by turning the LOGRETAIN database configuration parameter off and on again. This can be either a file system path or a raw device. so it is only relevant to systems using the (default) indirect archiving method. • Online retained The log file is no longer being written to by the database. If the database generates a second log file with a number already used. but the Admin Tools only support the retrieval of the newest version.2. Within an SAP environment.7 Log File States This section is mainly written for system administrators and support personnel only for use if problems involving the Admin DB occur. The log file is located in the log directory.2. The location of the restored log file is the retrieve directory. but may contain information about transactions that the database engine has not yet written from the buffer pool to disk. The location of the log file is defined in the LOGPATH database configuration parameter. • INVALID The Admin Tools can only administer the latest version of a log file with a given number per node. This can occur after a database restore if the ROLLFORWARD operation does not use all log files. the log file is defined to pass though the following states during its life cycle. the tools have no influence on this and so assume that the file is no longer there. the User Exit marks previous versions as INVALID. The log file is in the archive directory.

for example. Although DB2 does not force a backup in this situation. In this case. 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. you can rapidly create a mirror copy of a production system database without the need to shut down the system. Split-Mirror for Backup Purposes DB2 has introduced a new concept known as split-mirror using the db2inidb tool. This requires either TSM or a vendor product that provides its own User Exit. automatically delete files after a certain period of time. we strongly recommend customers to only use direct archiving. see The db2inidb Tool [Page 132]. which continues processing as usual. For more information.• Gone This state is only used internally to indicate that a log file could not be found in the location where it was expected. the Admin Tools must be newly installed on the new system as the system name has changed. if a customer uses MOVE. 2. Additionally. Homogenous System Copy You can create new SAP systems from existing system backups.Non-Standard Behavior of Database Systems Certain systems are set up in a slightly non-standard way.2. it is essential that you take a new backup before you use the Admin Tools on the new SAP system. such as TSM. In this case. A delete operation will delete such entries. Sometimes a system copy is used to overwrite another system or a previous system copy where the Admin Tools were already installed. 38 July 2006 . Do not attempt to copy Admin DB information from the source system to the new target system.8 Special Cases . With this tool. the old Admin DB should be dropped before the Admin Tools are reinstalled. RENAME or DELETE. This state can also occur when storage products. for example: • • As split-mirror As homogeneous system copy In both cases the Admin Tools are either restricted or must be configured differently. For this feature. as LOGRETAIN is normally already active. This copy can then be used to perform an offline backup without affecting the performance of the original system.

In a system environment where the database server operates under an operating system other than Windows.conf be changed (see below). Windows: The DB2DB6EKEY variable is set in the system environment. but this requires that the value be updated on all other related systems. DSCDB6HOME should contain the name of the server where file dscdb6.dbenv_<hostname>. DB2DB6EKEY is requested and set during SAP system installations. environment variable DB2DB6EKEY is used to encrypt or decrypt the requested password. The user IDs and passwords for SAP system users are maintained and stored in the file: • • UNIX: /usr/sap/<SAPSID>/SYS/global/dscdb6. which are read when <sapsid>adm or db2<dbsid> logs on.conf Windows: \\%DSCDB6HOME%\sapmnt\<SAPSID>\SYS\global\dscdb6. the central instance.3 SAP Security Concept General Information In an SAP environment.2. Passwords are stored in encrypted form. This file is protected from unauthorized access using file system access authorizations.sh.conf must be accessible from all application and database servers using NFS (UNIX) or Windows shares. but will need modifying for all but the central database server.conf In an exclusively Windows environment. File dscdb6. The default value is <DBSID><db_server_hostname>. environment variable DSCDB6HOME contains the name of the database server. and on the SAP system database servers (all systems with the same <SAPSID>). and the passwords in the file dscdb6. DB2 runs with authentication set to the value server_encrypt. This means that the user ID and password provided to connect to databases or attach to database instances are verified by DB2 using operating system services from within the database server. UNIX: The DB2DB6EKEY variable is set in the SAP profiles dbenv_<hostname>. The value of DB2DB6EKEY must be identical on all application servers.conf accesses described in this documentation.csh and . The administrator can change this value at any time. For all the dscdb6.conf can be accessed with the path listed above. July 2006 39 .

Log File Retrieval Tool [Page 163]. see Setting and Updating Passwords [Page 116]. For information about how to set and update passwords for SAP system users. In this case. These are stored in encrypted form in a special file and must be updated using the dscdb6up tool.4 Multi-Partitioned Systems The Admin Tools are also enabled to work with multi-partitioned systems. the home directory of the db2<dbsid> user changes from /db2/<DBSID> (single-partitioned system) to /db2/db2<dbsid> (multipartitioned system). Tools that read password file dscdb6. On UNIX. 2. Do not change user passwords only using operating system methods. Also tools such as brarchive and brrestore should be used with the additional parameter –node.conf will no longer be able to connect to the database until tool dscdb6up has been used. certain directories found in the single-partitioned environment are extended to become node-specific in a multi-partitioned environment and other directories are moved. 40 July 2006 .Log File Archive Tool [Page 157] and brrestore . see brarchive . The Admin Tools need access to the user passwords to access the database.Managing Passwords for Database Standard Users DB2 uses operating system users to maintain system security. For more information about the syntax of brarchive and brrestore. in the SAP implementation. A multi-partitioned database can be configured to consist of more than one database node.

and the 4. you can install the Admin Tools after installing the SAP system. The 6.10 of sddb6ins and higher creates the directories and adds variables to the user environment that are required to run the Admin Tools. Version 6.10 or higher. see Installation of the DB2 Control Center [Page 61]. Check the SAP system environment [Page 43] to make sure that the SAP system was installed correctly. 2. The installation of the Admin Tools depends on the SAP installation tool. Installing the Latest Admin Tools [Page 51]if you want to install the latest version of the Admin Tools or apply the latest patch. They do not perform correctly on SAP systems with release 4.. For more information.6D or lower.. Install or upgrade to the latest Admin Tools. 3. R3SETUP creates the directories. July 2006 41 . user. Check the Admin Tools environment [Page 52] after installation. 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: . However. • SAPinst The Admin Tools are not automatically installed during the SAP system installation with SAPinst.6D Admin Tools do not perform correctly on SAP systems with release 6. or need to (re)install or upgrade the Admin Tools manually.3 Installation and Setup 3. Check the prerequisites for the installation of the Admin Tools [Page 48]. SAPinst creates the users and groups that are required to successfully install the Admin Tools using the sddb6ins program. 5. For more information. You can install the SAP system using: • R3SETUP The Admin Tools are automatically installed as part of the SAP system installation. 1. Install the DB2 Control Center on the SAP database server or one or more workstations.1 Introduction This chapter is intended for administrators who want to check their environment. groups and user environment that are required to successfully install the Admin Tools using the sddb6ins program. see one of the following sections: Upgrading the Admin Tools [Page 50] if you want to upgrade the Admin Tools to the latest version.10 or higher.NN Admin Tools must be used on SAP systems with release 6. 4.

see Setting Up the DB2 Control Center [Page 62].sap. see SAP Service Marketplace at service.sap. 42 July 2006 . see Using the DB2 Control Center Extensions [Page 69].40 SR1: SAP Web Application Server ABAP 6.sap.NN DB2 Admin Tools To find the SAP Notes.sap. see SAP Service Marketplace at service.30: 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 To find this documentation. see SAP Service Marketplace at service. 7. 8. Enable the database for roll-forward recovery [Page 57]. 6.sap.com/instguidesNW04 → Installation. • For additional information about installing the Admin Tools. See also: • For information about installing IBM DB2 Universal Database for UNIX and Windows with the SAP system.com/instguides → SAP Components →SAP Basis. see the following SAP Notes: SAP Note 410252 DB6: Installing the latest 4.com/notes. 6. Catalog the databases to be administered. see SAP Service Marketplace at service.com/instguides → SAP Components → SAP R/3.com/instguides → SAP Components →SAP Web Application Server. For SAP Basis Release 4. see SAP Service Marketplace at service. Check that the DB2 Control Center Extensions are working correctly. see the following documentation: For SAP Web AS Release 6.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. For more information. this can be delayed until step 7 if roll-forward recovery enabling (step 6) will be performed on the command line.6D DB2 Admin Tools SAP Note 455506 DB6: Installing the latest 6.6x and lower: To find the corresponding documentation.You may have already performed this step as part of the database installation.40 SR1on UNIX: IBM DB2 Universal Database for UNIX and Windows SAP Web Application Server ABAP 6. For more information. Otherwise.40 SR1on Windows 2000: IBM DB2 Universal Database for UNIX and Windows To find this documentation. For SAP R/3 Release 4.20 and 6. For SAP Web AS 6.10.

3.6D or lower sap<sapsid> SAP systems based on SAP Web AS kernel Release 6. This user belongs to the operating system group db<dbsid>ctl. but there is no need to log on to the SAP system with it.2. indexes and views). SAP System Users User db2<dbsid> Description Database administrator This operating system user is the DB2 instance owner and the SAP database administrator. SAP system administrator This operating system user is authorized to start and stop the SAP system and the DB2 Database Manager (instance). All database connection and instance access operations for an SAP application server are performed using these users. The name of this user must be sapse<sapsid>.3. In general. These users belong to the operating system group SAPSYS and are only created on SAP systems on which the SAP system database has been installed (not on remote application servers). and IMPLICIT_SCHEMA SAP service account user This operating system user is a virtual user. DB2-specific monitoring functions invoked by SAP application server functions require SYSCTRL authorization. on Windows the SAP system is started with this user account.1 SAP System Users and Groups The following tables list the users and groups that are automatically created by the installation tool during the SAP system installation.2 SAP System Environment The following sections explain the SAP system environment that is a prerequisite for the successful installation of the Admin Tools. <sapsid>adm sapr3 First installed SAP system with Release 4. These users have the following database authorizations: CREATETAB.6D SAP systems Windows only: sapse<sapsid> July 2006 43 . Database user These operating system users own all SAP database objects (tables. BINDADD. This user account must have the local user authorizations to Log on as a service and has to be a member of the local administrator group. CONNECT.10 or higher and additional MCOD 4. <sapsid>adm has the DB2 authorizations DBADM and SYSCTRL.

Database system control group Each member of this group has SYSCTRL authorization for the DB2 Database Manager instance. 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. db<dbsid>ctl db<dbsid>mnt 44 July 2006 . The members of this group are the domain users <sapsid>adm and sapse<sapsid>. If the system is part of the domain. Windows only: SAP_<SAPSID>_LocalAdmin Local group on an application server Only local groups are created and maintained on an application server. Database maintenance group A user of this group can perform maintenance operations on all databases associated with an instance. Windows only: SAP_<SAPSID>_GlobalAdmin Domain-level SAP system administration group This group is used for grouping the SAP system administrators. to back up a database or a tablespace. but not allowing direct access to data. SYSCTRL has authorizations allowing operations affecting system resources. A local group can only be given authorizations to the system where it is located. The group SAP_<SAPSID>_GlobalAdmin is only used when the SAP System belongs to a Windows domain. This authority includes privileges to update database configuration files. It does not allow direct access to data. the local group can contain users and global groups from the domain. to restore an existing database and to monitor a database. The group SAP_<SAPSID>_GlobalAdmin is not required for a local installation.SAP System Groups Groups db<dbsid>adm Description 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.

3.dbenv_<hostname> .sapenv_<hostname> .csh and ~/.dbenv_<hostname> . the Set In column shows the location where the variables are set and where they need to be changed.2.dbenv_<hostname> .sapenv_<hostname> .csh and ~/.sh Windows: User environment INSTHOME SAPSYSTEMNAME <SAPSID> July 2006 45 .csh and ~/.dbenv_<hostname> . General Environment Variables Environment Variable DB2INSTANCE Value DB2<DBSID> Set In UNIX: ~/.sh Windows: User environment UNIX: ~/.2 User Environment In the following table.sh Windows: User environment DB2DBDFT <DBSID> Same as relevant location for variable DB2INSTANCE as described in this table DB2DB6EKEY <SAPSID><database server name> (default value) UNIX: Home directory of user db2<dbsid> Windows: Default value for a singlepartitioned system: <drive>:\DB2<DBSID> Default value for a multipartitioned system: \\%DSCDB6HOME%\db2<dbsid> Same as relevant location for variable DB2INSTANCE as described in this table UNIX: ~/.

3 Access Authorizations for Admin Tool-Related Directories Access Authorizations for Directories and Files under UNIX DB2 Directory or File Access Privilege in Octal Form 755 Owner Group Home directory of user db2<dbsid> (/db2/<DBSID> or /db2/db2<dbsid>) /db2/<DBSID>/log_dir /db2/<DBSID>/log_retrieve /db2/<DBSID>/log_archive /db2/<DBSID>/db2dump /usr/sap/<SAPSID>/SYS/exe /usr/sap/<SAPSID>/SYS/ global /usr/sap/<SAPSID>/SYS/exe/ run/dscdb6up /usr/sap/<SAPSID>/SYS/ global/dscdb6.conf db2<dbsid> db<dbsid>adm 750 750 750 750 755 750 db2<dbsid> db2<dbsid> db2<dbsid> db2<dbsid> <sapsid>adm <sapsid>adm db<dbsid>adm db<dbsid>adm db<dbsid>adm db<dbsid>adm sapsys db<dbsid>adm 4750 root <sapsid>adm db<dbsid>ctl db<dbsid>adm 640 All authorizations can be checked using the –checkonly option of the sddb6ins program.dbs_db6_schema Valid for all SAP systems with SAP Web AS 6. Same as relevant location for variable SAPSYSTEMNAME as described in this table Additional Environment Variables for Windows Environment Variable DSCDB6HOME SAPMNT SAPEXE Value Database server name <drive>:\usr\sap\<SAPSID> <drive>:\usr\sap\<SAPSID>\SYS\exe\run 3.6D SAP systems Database schema: sap<sapsid> or sapr3 depending on the SAP system release you have installed. 46 July 2006 .10 or higher and MCOD 4.2.

6D where DB2 UDB for UNIX and Windows Version 7 or higher is installed.1I − 4. System Everyone db2<dbsid>. During normal installation of an SAP system with R3SETUP.1I and 4.6D Admin Tools must be used on all SAP systems with release 3. The Admin Tools are installed on the database server using program sddb6ins. System 3. System SAP_<SAPSID>_LocalAdmin.Access Authorizations for Directories and Files under Windows Directory Access Privileg e Full Control Full Control Full Control Full Control Full Control Full Control Owner For User or Group <drive>:\db2<dbsid> <drive>:\db2 <drive>:\db2\<dbsid>\ log_dir <drive>:\db2\<dbsid>\ log_retrieve <drive>:\db2\<dbsid\ log_archive <drive>:\db2\<dbsid>\ db2dump Administrator Administrator Administrator Administrator Administrator Administrator SAP_<SAPSID>_LocalAdmin. System SAP_<SAPSID>_LocalAdmin.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 July 2006 47 . sddb6ins is called automatically.3 Installing the Admin Tools Manually The 4.6D Admin Tools and your SAP system is between Release 3. 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. System SAP_<SAPSID>_LocalAdmin.

For this.NN Admin Tools: UNIX: $INSTHOME/admintools/bin Windows: %INSTHOME%\admintools\bin For 4. 4 MB).exe. Do not use su . Windows: To start sddb6ins. 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.1 Prerequisites for the Admin Tools Installation Before you can install the Admin Tools. log on to the database server as user <sapsid>adm. UNIX: To run sddb6ins. • Correct user environment Program sddb6ins must be executed in the correct user environment. 4 MB) in the directory containing the Admin Tools executables.3. 48 July 2006 . Some are general. sddb6ins installs the executables in the following directory: For 6. Log on as <sapsid>adm and then change to user root using su.to change to user root because the db2<dbsid> user environment is then lost.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). General Prerequisites • Sufficient space Make sure that you have sufficient space (approx. sddb6ins. the Admin DB requires additional space. The database resource has to run on the actual cluster node. When working with Microsoft Cluster. you require root authorization with the <sapsid>adm user environment. some apply to a certain patch level of the sddb6ins program or depend on your operating system.3. you must make sure that certain prerequisites are met. • Availability of the database instance The SAP database instance DB2<DBSID> must be running when installation program sddb6ins is executed. set the environment variable DB2INSTANCE to db2<dbsid> (instead of db2l<dbsid>) in the local command window.exe must be executed on all cluster nodes.

. Use chmod and chown to set the authorizations as follows: File <SAPMNT>/SYS/exe/run/dscdb6up <SAPMNT>/SYS/global <SAPMNT>/SYS/global/dscd6. db2start: a. Change the primary group of user db<dbsid> to db<dbsid>adm and keep group sysadm as the secondary group.com/patches. switch to the instance directory and update the DB2 instance. To extract dscdb6up using CAR. enter the following command: CAR -xvf dscdb6up. Add group db<dbsid>ctl as the secondary group to user <sapsid>adm. To do so. 1. Update the database manager configuration. Log on to the database server as user db2<dbsid> and stop the DB2 instance.sap. Copy the dscdb6up program to directory /usr/sap/<SAPSID>/SYS/exe/run. Enter the following command: db2start 6. July 2006 49 . 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.conf Permission 4750 750 640 Owner root <sapsid> adm <sapsid> adm Group db<dbsid>ctl db<dbsid>adm db<dbsid>adm <SAPMNT> acts as a place holder for /usr/sap/<SAPSID>./db2iupdt db2<dbsid> c. you have to perform the following additional steps as the group concept changed with Release 4. Create two new groups called db<dbsid>ctl and db<dbsid>adm if they do not already exist. Log on again as user db2<dbsid> and restart the DB2 instance.6x.. 9. Download the dscdb6up program from SAP Service Marketplace at service. 4.6x If you want to install the 4. 3.6A: . Enter the following command: db2stop force b.6D Admin Tools for the first time on SAP systems lower than 4. for example.CAR 8. Perform an instance update to correct the file authorizations of executables. As user root. 7.UNIX only: For SAP Systems lower than 4. Enter the following commands: cd <DB2 installation directory>/instance . 2.

Abbreviation of sddb6ins Options The following options of the sddb6ins program are not listed in detail in the sections Upgrading the Admin Tools [Page 50]. Warning. Installing the Latest Admin Tools [Page 51] and Checking the Admin Tool Environment [Page 52]. Check the output messages.2 General Information Return Codes of sddb6ins The sddb6ins program writes information about the steps it performs to standard output.3. the installation is not complete. The following conditions apply: • If you have performed an upgrade to an SAP system with Release 4. 2 The values listed in the table above differ from other Admin Tools. The return code of the sddb6ins program depends on the success of the installation.3.6D or lower but you are still using a version of the Admin Tools from before 4.3 Upgrading the Admin Tools Use You use the -u option of the sddb6ins program to upgrade the Admin Tools.3.6D. 50 July 2006 . see Appendix B: Troubleshooting [Page 177]. For more information. Instead. see Appendix A: Tool Command Line Parameters [Page 157]. {common option} acts as a placeholder for the following three options: • • • • • [-s <SAPSID>] [-db2dbnamepwd <pwd>] [-db2dbnamedomain <domain>] [-sidadmpwd [-NOADMDB] [-DEB [<level>]] <pwd>] [-sidadmdomain <domain>] For a detailed description of these options.6D Admin Tools is strongly recommended. Errors have occurred during the installation but the installation is complete. an upgrade to the latest 4. 3. The following table describes the possible return codes: Return Code 0 1 Description No error detected Severe errors detected.

See also: Actions Performed by the sddb6ins Program [Page 53] 3. If you are using an SAP system with Release 4.10 using the 6.NN Admin Tools. Procedure To manually install the latest Admin Tools or to apply an Admin Tools patch.10 sddb6ins executable: UNIX: sddb6ins –u 46D Windows: sddb6ins –u 46D –db2dbnamepwd <password of user db2<dbsid>> If the -NOADMDB option is used.NN Admin Tools is required.10 or higher. Otherwise.6D or lower and you want to use the 6. see Archiving Directly to TSM [Page 80]). enter the following command: sddb6ins -i [<target release>] {common options} July 2006 51 .3. the Admin DB will be installed (if not already present) and brarchive and brrestore are then also available. For example. You want to apply an Admin Tools patch for the currently installed Admin Tools. However.• If you upgrade to an SAP system Release 6. you must make sure that you are using a patch that is valid for the same release of the currently installed Admin Tools.10 or higher. the Admin DB will not be installed. an upgrade to the 6. In this case log file archiving is only performed directly by the User Exit program db2uext2 (for more information.4 Installing the Latest Admin Tools Use You use the -i option in the following cases: • • You have to install the latest Admin Tools manually after an SAP system installation of Release 6. to upgrade the Admin Tools from 4. 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. Procedure To upgrade the Admin Tools.6D to 6. Admin Tools upgrades are not supported.

INSTHOME must point to an existing directory. which was used to install the latest Admin Tools after the installation of a downward-compatible kernel (DCK). In this case log file archiving is only performed directly by the User Exit program db2uext2 (for more information. Windows only: The required shares exist. d:\db2\db2<dbsid>. The -a option of sddb6ins. The DB2 instance variable DB2ENVLIST is set correctly. enter the following command: UNIX: sddb6ins –i Windows: sddb6ins –i –db2dbnamepwd <password of user db2<dbsid>> If the -NOADMDB option is used. INSTHOME must point to a Windows share (default directory \\<instance-owning host>\db2<dbsid>). The directory name must not contain any spaces. make sure that environment variable INSTHOME is set correctly: • In a multi-host environment. • In a single-host environment. to install the current version of the Admin Tools.For example. The necessary files and directories exist and have the correct authorizations. the Admin DB will not be installed. Use the -i option instead. 52 July 2006 . the Admin DB will be installed (if not already present) and brarchive and brrestore are then also available. see Archiving Directly to TSM [Page 80]). The verification routine checks if: • • • • • • The environments for user db2<dbsid> and <sapsid>adm are set correctly. See also: Actions Performed by the sddb6ins Program [Page 51] 3. Otherwise.3. On Windows. for example. The database configuration parameters LOGRETAIN and USEREXIT are set to ON for the SAP database <DBSID>.5 Checking the Admin Tools Environment Use You use option –checkonly to verify the Admin Tools installation. no longer exists. UNIX only: Users and groups are set up correctly.

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>> 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 Type [I] [E] [W] Description Provides information about the current configuration. Severe configuration errors have occurred during the installation. Warnings if possible inconsistencies have been detected

3.3.6 Actions Performed by the sddb6ins Program
The following section describes the actions performed by the sddb6ins program during the installation (option -i) or upgrade (option -u) of the Admin Tools:

Actions Performed During Installation (-i)
The sddb6ins program performs the following actions: • 6.NN Admin Tools only: The following table lists the directories that are created by sddb6ins: Directory • • • • UNIX: $INSTHOME/admintools Windows: %INSTHOME%\admintools UNIX: $INSTHOME/admintools/bin Windows: %INSTHOME%\admintools\bin Description Admin Tools directory, also contains the environment file init<DBSID>.db6.

Contains the Admin Tools executables and libraries.

July 2006

53

• • • • •

UNIX: $INSTHOME/admintools/TraceFiles Windows: %INSTHOME%\admintools\TraceFiles UNIX: $INSTHOME/admintools/protocols Windows: %INSTHOME%\admintools\protocols

Contains the trace files created by all Admin Tools.

Contains brarchive and brrestore protocol files. User Exit protocol files are in the DIAGPATH directory.

6.NN Admin Tools on Windows only: In a multi-partitioned system, sddb6ins creates the following shares on the node where hostname matches the contents of the variable DSCDB6HOME: log_archive<DBSID> log_retrieve<DBSID>

Extracts the executables stored in sddb6ins to the following directory: For 6.NN Admin Tools: <INSTHOME>/admintools/bin For 4.6D Admin Tools: /usr/sap/<SAPSID>/SYS/exe/run

Copies the User Exit program db2uext2 to the DB2 directory: UNIX: $INSTHOME/sqllib/adm Windows: <DB2_install_dir>\sqllib\bin

Copies the stored procedure sddb6jds, which is required for the DB2 Control Center Extensions, to the DB2 directory. UNIX: $INSTHOME/sqllib/function Windows: <DB2_install_dir>\sqllib\function

6.NN Admin Tools only: Removes executables installed with previous versions, which are no longer required. The Admin Tools up to 4.6D were stored in the same directory as the standard SAP system executables and were therefore deleted during an SAP system upgrade.

Creates or updates the environment file init<DBSID>.db6 in the following directory: For 6.NN Admin Tools: <INSTHOME>/admintools directory (see table above) For 4.6D Admin Tools: /usr/sap/<SAPSID>/SYS/global For an example of the environment file, see Appendix D: Example of File init<DBSID>.db6 [Page 212].

54

July 2006

By default, sddb6ins creates the Admin DB ADM<DBSID> if it does not already exist and performs the following actions: Customizes a multi-partitioned system. Grants the access authorizations to the Admin DB ADM<DBSID>. If required, it creates the tables in the Admin DB and fills the configuration table with default values if this table is empty. 4.6D Admin Tools only: Creates mirror tables in the <DBSID> database.

If you use the –NOADMDB option, the Admin Tool creation will be suppressed. The Admin DB will not be created then and the above steps will not be performed. If you want to use indirect archiving, do not use the –NOADMDB option. • • 4.6D Admin Tools only: Creates a user defined function (UDF) entry in the <DBSID> database. 6.NN Admin Tools only: Adds Admin Tools-specific environment variables, for example for TSM, to the environment of db2<dbsid> and <sapsid>adm. • • Sets the DB2 instance variable DB2ENVLIST, so that the stored procedure works properly. UNIX only: Sets the access authorizations on the Admin Tools directories and files as follows: 6.NN Admin Tools Directory or File Access Privilege in Octal Form 0755 0755 0755 0755 0644 6755 6755 0755 0755 0755 Owner Group

$INSTHOME/admintools $INSTHOME/admintools/bin $INSTHOME/admintools/protocols $INSTHOME/admintools/TraceFiles $INSTHOME/admintools/init<DBSID>. db6 $INSTHOME/admintools/bin/brarchive $INSTHOME/admintools/bin/brrestore $INSTHOME/admintools/bin/libdb6tp. [o|so|sl] $INSTHOME/admintools/bin/libdb6ds. [o|so|sl] $INSTHOME/admintools/bin/libdb6sc. [o|so|sl]

db2<dbsid> db2<dbsid> db2<dbsid> db2<dbsid> db2<dbsid> db2<dbsid> root db2<dbsid> db2<dbsid> db2<dbsid>

db<dbsid>adm db<dbsid>adm db<dbsid>adm db<dbsid>adm db<dbsid>adm db<dbsid>adm db<dbsid>adm db<dbsid>adm db<dbsid>adm db<dbsid>adm

July 2006

55

$INSTHOME/admintools/bin/libdb6sct sm.smp $INSTHOME/admintools/bin/db6adutl $INSTHOME/sqllib/adm/db2uext2 $INSTHOME/sqllib/function/sddb6jds

0755 6755 0755 0755

db2<dbsid> root db2<dbsid> db2<dbsid>

db<dbsid>adm db<dbsid>adm db<dbsid>adm db<dbsid>adm

4.6D Admin Tools Directory or File Access Privileg e in Octal Form 0755 Owner Group

$INSTHOME/saparch $INSTHOME/saprest /tmp/TraceFiles /usr/sap/<SAPSID>/SYS/global/ init<DBSID>.db6 <SAPEXE>/brarchive <SAPEXE>/brrestore <SAPEXE>/libdb6tp.[o|so|sl] <SAPEXE>/libdb6ds.[o|so|sl] <SAPEXE>/libdb6sc.[o|so|sl] <SAPEXE>/db6sctsm.smp <SAPEXE>/db6adutl $INSTHOME/sqllib/adm/db2uext2 $INSTHOME/sqllib/function/sddb6jds

db2<dbsid>

db<dbsid>adm

0755 0640 6755 6755 0755 0755 0755 0755 6755 0755 0755

db2<dbsid> db2<dbsid> db2<dbsid> root db2<dbsid> db2<dbsid> db2<dbsid> db2<dbsid> root db2<dbsid> db2<dbsid>

db<dbsid>adm db<dbsid>adm db<dbsid>adm db<dbsid>adm db<dbsid>adm db<dbsid>adm db<dbsid>adm db<dbsid>adm db<dbsid>adm db<dbsid>adm db<dbsid>adm

<SAPEXE> is a placeholder for /usr/sap/<SAPSID>/SYS/exe/run. • • Inserts the Admin Tools release into the Admin DB. 6.10 Admin Tools only: Checks the installation of the Admin Tools using, for example, the –checkonly option, which is described in Appendix A: Tool Command Line Parameters [Page 157] and Appendix B: Troubleshooting [Page 177].

56

July 2006

you must call sddb6ins on each host where a database node of the database <DBSID> exists. The archive and retrieve directories must be mounted on all nodes using NFS.7 Special Configurations This section provides information about special configurations that apply in the case of multiple SAP systems on one database (MCOD) or if you are using a multi-partitioned database system: • MCOD For SAP systems with Release 4.6C Admin Tools The executables and libraries are exchanged. For SAP systems with Release 6. You need to use the same path on all nodes for the archive and retrieve directory. SAP and IBM recommend that the database system be operated in roll-forward recovery mode (LOGRETAIN) with the USEREXIT database parameter turned on. • Multi-partitioned database systems If you are using a multi-partitioned database system. In this mode. • 3.3. the active log files. and more than one database node is used. which is the default for an SAP BW installation.3.0B − 4. 3.1I init<DBSID>.6D: The Admin Tools are only enabled for the main SAP system that is the firstly installed SAP system. you have to split the database installation over several nodes (computers). The Admin Tools do not support any additionally installed SAP system . However.Actions Performed During Upgrade (-u) The actions performed during upgrade are similar to the actions performed during installation. some actions depend on the <start release> parameter.1I − 4. 4. You must export the archive and retrieve directories on one node and mount these directories on all other nodes using NFS.sap configuration file content is moved to the Admin DB.6A Admin Tools The log archive location must be changed. in which all database changes are July 2006 57 .1I Admin Tools: The 3.8 Enabling the Database for Rollforward Recovery As outlined in Basic Concepts [Page 23].10 or higher: Call the sddb6ins program for all <sapsid>adm users to enable the Admin Tools environment for all SAP systems that are installed on one database. Any log files in the old location are moved and the Admin Database is updated. The sddb6ins program performs the following additional actions: • • If starting with 3. • Multi-partitioned database systems on UNIX only: If you want to use indirect archiving. 3.

DB2 Command Line on the Database Server ..3. as the Admin Tools will not operate correctly until a backup has been performed. are archived by the User Exit program db2uext2 when they are no longer needed for processing transactions.. enter the following commands: db2 update db cfg for <DBSID> using USEREXIT ON db2 update db cfg for <DBSID> using LOGRETAIN ON 4. To update the database configuration parameters. Log file numbering increases with each new log file (up to 9999999)..1 Enabling Rollforward Recovery for a Single-Partitioned Database Updating Database Parameters You can perform these actions either using the command line or the DB2 Control Center. Windows only: Start the DB2 Command Window.. if you want to perform online backups. 3. The procedures differ depending whether you are using a single-partitioned or multi-partitioned system. Roll-forward recovery is not enabled by default. that is LOGRETAIN must be set to ON. You enable roll-forward recovery and the User Exit mechanism by setting the database configuration parameters LOGRETAIN and USEREXIT to ON. Restart the database instance. Unlike with an offline backup. 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. Log on to the database server as user db2<dbsid>. . There are ways of forcing the database out of BACKUP PENDING mode after setting these parameters without performing a backup first. the database must be in roll-forward recovery mode.recorded. An offline backup of the database must be performed after setting these parameters. See also: Enabling Rollforward Recovery for a Single-Partitioned Database [Page 58] Enabling Rollforward Recovery for a Multi-Partitioned Database [Page 59] 3. 2. Do not do this.8. A new backup must be performed before the User Exit is called. 58 July 2006 . 1.

see Performing the Backup [Page 111]. back up your database. From the menu that appears. For more information. DB2 Control Center Make sure that you have installed and set up the DB2 Control Center before performing these steps. In the table Database Partitions.. . 1. see Installation of the DB2 Control Center [Page 61] and Setting Up the DB2 Control Center [Page 62]. Choose Retain log files for roll-forward recovery from the list.DB2 Control Center Make sure that you have installed and set up the DB2 Control Center before performing these steps. 5. Start the DB2 Control Center.. From the context menu of the <DBSID> database icon. From the context menu of the <DBSID> database icon. 4. 2.. In the value area. To update the database configuration parameters. . select Configure…. 1.8. DB2 Command Line on the Database Server . Backing Up the Database After having updated the database configuration parameters. choose OK to confirm. 4. For more information.2 Enabling Rollforward Recovery for a Multi-Partitioned Database Updating Database Parameters You can perform these actions either using the command line or the DB2 Control Center. 7. Restart the database instance. Start the DB2 Control Center. 1. For more information. enter the following commands: db2_all "db2 update db cfg for <DBSID> using LOGRETAIN ON" db2_all "db2 update db cfg for <DBSID> using USEREXIT ON" 3. July 2006 59 .3. 2. select the Yes radio button. 2. 3. Select all nodes. choose Open → Database Partitions…. 3. 3. Restart the database instance. 6. Log on to the database server as user db2<dbsid>. choose Configure.. Choose Logs of the notebook. To confirm. see Installation of the DB2 Control Center [Page 61] and Setting Up the DB2 Control Center [Page 62]..

For the 4. Choose Logs of the notebook.. . In the value area. see Performing the Backup [Page 111].6D Admin Tools: It drops the mirror tables from the <DBSID> database. Procedure To deinstall the Admin Tools. To be able to use this interface.db6. This can be useful if you: • • • • • • • Want to use other log file management tools Migrate to DB2 Version 8. 3.. 8. Select Retain log files for roll-forward recovery from the list. choose the Yes radio button.4 Installation and Setup of the DB2 Control Center Extensions The Admin Tools have a user interface that is integrated into the DB2 Control Center as a set of extensions. which includes its own log file management Want to start the Admin Tools installation from scratch This option performs the following actions: It removes the Admin Tool executables. such as on a PC. you must install the DB2 Control Center first. 7. It removes environment file init<DBSID>. it is available on all platforms which support Java.3. Restart the database instance. 6.5. choose OK. Backing Up the Database After having updated the database configuration parameters. For more information. To confirm. 9. 60 July 2006 . back up your database.2.9 Deinstalling the Admin Tools Use You can deinstall the Admin Tools with option –d of sddb6ins. It can be run remotely. As it is Java-based. enter the following command: sddb6ins –d 3. It drops the Admin DB.

exe and follow the instructions.1 Installation of the DB2 Control Center The DB2 Control Center is part of the DB2 Client Software called the DB2 Administration Client. In order to work with 64-bit systems. follow the standard DB2 installation process and make sure that you select the option Control Center for installation.. Log on to the machine where you want to install the Admin Tools as a user with local administration authorizations.SAR to a temporary directory by using tool SAPCAR. On all other systems. 1. 6.4.. the DRDA protocol must be used. 3.. Insert the SAP kernel CD. Extract file DB6CCEXT. On a UNIX based operating system. To install it. 2. For the DB2 Control Center Extensions to perform correctly. 4. and also part of the DB2 server installation. you can start the DB2 Control Center by executing command db2cc. If you use the direct archiving mode to archive the log files.3. 5. This is available with all single. July 2006 61 . the DB2 Control Center Extensions are not required. 3. The DB2 Control Center of DB2 Version 7 or lower does not support 64-bit instances in general. there is also a menu entry in the DB2 group in the Start menu. Invoke setup. Change to the temporary directory. install DB2 Connect in addition. On Windows: .4. 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. change to the directory NT\I386\DBTOOLS. On the CD. On Windows.and multi-partitioned systems.2 Installing the DB2 Control Center Extensions The DB2 Control Center Extensions can only be installed after the DB2 Control Center has been installed.

. 7.. Refer to the DB2 documentation for setting up and starting the DB2 Administration instance and the DB2 Messages Reference. Extract file DB6CCEXT. 1.4. choose Systems from the context menu. Invoke the shell script install and follow the instructions 3. 6. If the DB2 Control Center is not running on the same machine as the SAP database. 62 July 2006 . In the navigation frame of the DB2 Control Center. the DB2 Administration instance (db2das) may not be running on the computer being cataloged or communication may not be set up correctly. Log on to the machine where you want to install the DB2 Control Center Extension as user root.. change to the directory UNIX/<Unix platform>/DBTOOLS. 1. Insert the SAP kernel CD.SAR to a temporary directory by using SAPCAR. Cataloging Databases on 32-Bit DB2 Instances If communication error messages appear while performing actions in this section. Mount the CD. it is necessary to catalog the remote computer. 3. On the CD.. the SAP database and its instance. 4. The Add System dialog box appears. Change to the temporary directory. 5. Cataloging a Remote Computer: .3 Setting Up the DB2 Control Center The DB2 Control Center Extensions are available for SAP databases and instances. 2. These tasks have to be performed by an user with administrative authorizations. 2.On UNIX: . Choose Add from the menu.

To retrieve a list of DB2 systems located in the network. 4. July 2006 63 . If available. choose Refresh. 5. To add this and further systems. Fill out or modify the remaining fields. Otherwise. choose Apply. If the system is not listed. enter the name of the server in the System Name field.3. choose the system on which the SAP database server is located. confirm with OK.

4. 5. The Add Instance dialog box appears. In the navigation frame of the DB2 Control Center. expand the node with the name of the system where the DB2 server is located. confirm with OK. From the context menu of the Instances subnode. 64 July 2006 . To add this and further instances. choose Add. Otherwise. select the instance from the list in the Remote Instance field. If available. The service name should have the value sapdb2<DBSID> and is defined in the file /etc/services on the database server. enter the name of the instance in the Remote Instance field and fill out the remaining fields.Cataloging a Database Manager Instance: 1. choose Apply. If the instance is not listed. 2. 3. To retrieve a list of instances on the chosen system. choose Refresh.

you must use the communication protocol DRDA. choose Refresh.. From the context menu of the Databases node.. If the database is not listed. you must configure the DRDA communication protocol to enable communication. Be aware. 4. The DB2 Control Center of DB2 Version 8 provides the same functionality for both instance types as long as your database is DB2 Version 8. choose Add. The Add Database dialog box appears. that in this case only limited functionality is available. enter the name of the database in the Database Name field. then the instances node. If you want to access a DB2 Version 7 64-bit instance using DB2 Control Center Version 8. 7. Confirm the entries with OK. Cataloging Databases to Use Communication Protocol DRDA To be able to use communication protocol DRDA. July 2006 65 . and the <instance name> node. To retrieve the list of databases created on the instance. If available. The other fields are optional. 6. 3. you can only catalog the databases using the command line. To use the DB2 Control Center for DB2 Version 7 for the administration of 64-bit DB2 instances. select the Admin DB ADM<DBSID> in the Database Name field. expand the <system name> node. 1. 2. With DB2 Version 7. you can use the Client Configuration Assistant or the command line processor. the DB2 Control Center does not provide all functions on 64-bit DB2 instances. In the same way. In the navigation frame of the DB2 Control Center. On UNIX. cataloging databases on 64-bit DB2 instances is the same process as on 32-bit DB2 instances. choose the SAP database <DBSID> in the Database Name field. Confirm the entry by choosing Apply. the SAP database <DBSID> and Admin DB ADM<DBSID> must be cataloged in a special procedure. however. Cataloging Databases on 64-Bit DB2 Instances With DB2 Version 8. On Windows.Cataloging the Databases <DBSID> and ADM<DBSID>: . or enter the name by overwriting the previous entry. 5.

Select Connect directly to the server.3. If this option does not appear. 2. 16.4. The Add Database Wizard . Node Option screen appears. To continue. 8. Protocol screen appears. 4. TCP/IP screen appears. choose Next. enter the port number of the database instance. 13. 6. enter the name of the database host. enter the host name where the SAP database is running. You can find the port number in the following file on the database host. In the Port Number field. 66 July 2006 . To be able to connect to the server. Select TCP/IP. 3.. To continue.6. In the System Name field. In the Instance Name field. The Add Database Wizard . choose Next.1. 1. Source screen appears. Start the Client Configuration Environment by choosing Start → Programs → IBM DB2 → Client Configuration Assistant. the user must have domain administrator authorizations. To continue. 9. you have not installed DRDA support on the client.. 15. enter the DB2 instance name. 14.Using the DB2 Version 7 Client Configuration Assistant . 11. The location depends on the host operating system: • Windows: <WindowsSystemDirectory>\system32\drivers\etc\services • UNIX: /etc/services Look for the entry sapdb2<DBSID>. If the computer is a member of a domain. In the Host Name field. 5. Choose Add. Choose Manually configure a connection to a database. Log on as a user with administrative authorizations. Choose the corresponding operating system. The Client Configuration Assistant dialog box appears. select The database physically resides on a host or AS/400 system. Enter the name of the SAP database and choose Next twice. The Add Database Wizard . 10. The Add Database Wizard . choose Next. The Add Database Wizard . 12.2. 7. Database screen appears.

The Add Database Wizard – 5. Source screen appears.17. Database screen appears. select The database physically resides on a host or AS/400 system. To test the connection. In the Host name field. Data Source screen appears. Enter the name of the SAP database and choose Next. 4. 7. 2. the user must have domain administrator authorizations. Log on as a user with administrator authorizations. 5. In the Port number field. 12. The Add Database Wizard – 2. Node Option screen appears. 18. If the computer is a member of a domain. Choose Selected → Add Database Using Wizard… The Add Database Wizard – 1. choose Next. Protocol screen appears. and choose OK. To be able to connect to the server. 14. Select Manually configure a connection to a database. 6. 3. Using the DB2 Version 8 Configuration Client Assistant 1. 11. To repeat the procedure for the Admin DB ADM<DBSID>. choose Next. You can find the port number on the database host in the following file: • UNIX: /etc/services • Windows: <Windows_system_directory>\system32\drivers\etc\services Look for the entry sapdb2<DBSID>. The Add Database Wizard – 6. Select TCP/IP. Select Connect directly to the server. The Confirmation dialog box appears. enter the host name where the SAP database is running. Choose Finish. To continue. 10. 8. If this option does not appear. The Add Database Wizard – 3. The Client Configuration Assistant dialog box appears. enter the port number of the database instance. 9. Deselect Register this database for ODBC and choose Next. The Add Database Wizard – 4. Start the client configuration environment by choosing Start → Programs → IBM DB2 → Set-up Tools → Configuration Assistant. To continue. enter the user ID and password. you have not installed DRDA support on the client. choose Add and repeat steps 13 to 17. To continue. 13. choose Next. TCP/IP screen appears. choose Test Connection. July 2006 67 .

. To continue. db2<dbsid>. the following message is displayed: CLI connection tested successfully 26. 21. 2.15. Select Disconnect if client generates an interrupt (INTERRUPT_ENABLED). 22. choose Next. Enter the following commands in the sequence given (use db2<dbsid> as <nodeName>): db2 catalog tcpip node <nodeName> remote <dbHostName> server <portNumber> 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>.. for example. 23. 1. 24.' db2 catalog db ADM<DBSID> at node <nodeName> authentication dcs db2 catalog dcs db ADM<DBSID> parms '. Choose Finish.. 18. Security Options screen appears. Choose Test Connection. The Add Database Wizard – 8 DCS Options screen appears. 17. To check for a successful test connection.. choose the Results tab. Select Configure DCS options. Using the Command Line . 25.... Log on as a user with SYSADM authorization. Select User authentication value in server’s DBM configuration.' 68 July 2006 . repeat steps 1 to 22. Choose the corresponding operating system.. In case of a success.. System Options screen appears. Select CLI and enter the user ID and password. 16.INTERRUPT_ENABLED. To add the Admin DB ADM<DBSID>.INTERRUPT_ENABLED. choose Next. 20. enter the DB2 instance name and choose Next. To continue.. In the Remote instance name field. The Add Database Wizard – 7. 19. The Test Connection dialog box appears. The Add Database Wizard – 8... db2 catalog db <DBSID> at node <nodeName> authentication dcs db2 catalog dcs db <DBSID> parms '.

see Advanced Log File Maintenance Tasks [Page 117]. The <DBSID> database context menu contains three entries: SAP Options Management. see Parameters Affecting Log File Management Storage [Page 70]. the DB2 Control Center Extensions can now be used.3.4 Using the DB2 Control Center Extensions After cataloging the databases. You can access the DB2 Control Center Extensions using new context menu entries. July 2006 69 .4. which have been added to the standard DB2 Control Center menus at the instance and database levels. For more information about how to use the option SAP Option Management. SAP Log File Management and SAP Tape Management. For more information about how to use the option SAP Log File Management.

Furthermore.. There are two locations where parameters may need to be changed: • In the DB2 Control Center Extensions (only necessary for indirect archiving). 70 July 2006 .4 Configuration 4.1 Parameters Affecting Log File Management Storage If you have decided to use the default behavior of archiving log files indirectly via disk. 1. For more information. To view or to change the parameters.1.. see Configuring the Admin Tools Using Environment Files [Page 73]. The Admin DB keeps track of the location and states of all log files. you choose the database instance db2<dbsid> (containing the <DBSID> database) using context menu. choose the database <DBSID> using the context menu. In the navigation frame of the DB2 Control Center. If you are using the DB2 Control Center Extensions with a patch level lower than 3. the Admin DB will have been created. see Parameters Affecting Log File Management Storage [Page 70].1 Changing the Admin Tools Configuration The following sections describes how you can change the configuration of the Admin Tools. it contains several configuration parameters for the log file management tools.db6 For more information. proceed as follows: . 4. • In the environment file init<DBSID>.

if not given on the command line. Initially set to tape. These may need modifying if a non-standard block size is used. its description is displayed in the field at the bottom of the dialog box. Choose SAP Option Management. For more information. When you select a parameter. cpio_flags Flags used to modify the cpio command when archiving files to tape. cpio_in_flags July 2006 71 . 3. The Options dialog box appears. see Indirect Archiving to Tape [Page 82] section Modifying the Tape Block Size. The following is an example from an AIX system.2. For more information. These may need modifying if a non-standard block size is used. Flags used to modify the cpio command when restoring files from tape. Enter the new values. see Indirect Archiving to Tape [Page 82] section Modifying the Tape Block Size. Do not set this value to tsm. double-click on the Value field. 4. The following parameters can be set in the Options dialog box: Parameter backup_dev_type Description Default storage management product. To change the value of a selected parameter. but can be set to adsm for TSM.

6. To cancel changes. The default value is 30. A dialog box appears asking for confirmation of the changes. This value should not normally be changed. but may be ignored. Number of times a tape can be re-initialized before warning messages appear requesting that the tape be replaced. To confirm the changes. Command used to a spool a tape forwards. The default is value 6. Number of weeks that must pass before a used tape can be re-used without the need to explicitly reinitialize it. M indicates megabytes. risking loss of data. Do not use operating system tools to modify tapes or this information will be lost resulting in tapes being used too often. choose Enter. Standard address of the default tape device. Name of the default TSM management class. Number of days to retain tool protocol entries in the Admin DB. The second $ is replaced by a number indicating the number of files to spool forward by. It is only used to suggest how much data might fit on a tape. The first $ is replaced by the tape device name. 72 July 2006 . This value should not normally be changed.Log File Retrieval Tool [Page 163]. Indicates the default size of tapes. Flags used to modify the dd command when restoring files from tape. These may need modifying if a non-standard block size is used. This value should not be changed. before they are deleted. choose Escape. For more information about non-rewind addresses. Using this address results in the tape being rewound at the end of each tape operation. The default value is 100. Non-rewind address of the default tape device.rewind Command used to rewind a tape. This value is used to set the default value for all user-defined tape devices. These may need modifying if a non-standard block size is used. choose Yes. see brrestore . The $ is replaced by the tape device name. Command used to rewind a tape and then place it offline (some devices eject the tape). The $ is replaced by the tape device name. Flags used to modify the dd command when archiving files to tape. To confirm the changes. rewind_offline tape_pos_cmd tape_size tape_address tape_address_rew expir_period tape_use_count dd_flags dd_in_flags delete_protocols adsm_mc 5. Using this address ensures that the tape is not rewound at the end of each tape operation.

July 2006 73 . db6adutl.db6 file is located in the following directory: For SAP system releases lower and including 4.db6 file is located in the following directory: UNIX: /usr/sap/<SAPSID>/SYS/global Windows: <drive>:\usr\sap\<SAPSID>\SYS\global Format of File Content The following is a brief description of the format of the file content: • • • A # introduces comments. brarchive. Location of the Environment Files • The init<DBSID>.db6 and init<SAPSID>. dmdb6rdi. db2uext2.1. The Admin Tools (for example.4. dmdb6srp. We strongly recommend that you use only these files for configuring the Admin Tools-specific environment variables.6D UNIX: /usr/sap/<SAPSID>/SYS/global Windows: <drive>:\usr\sap\<SAPSID>\SYS\global For SAP Web AS 6.2 Configuring the Admin Tools Using Environment Files The environment files init<DBSID>. You activate a variable by removing the comment sign (#) and by adapting the value of the variable according to your requirements. all the variables are contained in the same file that is located in the global directory. you have to specify a line like <variable name> = <value>. Empty lines are ignored. brrestore. Activation of Variables All recognized variables are listed in the file and are inactive as long as they appear after the comment sign (#). Thus. sddb6mir) can be configured in the init<DBSID>. dmdb6rts.db6 are the primary source for configuring the Admin Tools. The redirected restore tool brdb6brt and the CCMS tools (for example. for example.10 or higher UNIX: <INSTHOME>/admintools Windows: <INSTHOME>\admintools Be aware that for SAP system releases lower and including 4. the rest of the line is ignored. dmdb6snp and db6clp) can be configured in the init<SAPSID>.db6 file. DB2DB6_TEMP_DIR = c:\temp. • The init<SAPSID>.6D.db6 file. <SAPSID> equals <DBSID> and the global directory is used as the location for the environment files. To set a variable.

If the variable is set to ON. this variable is not set or set to OFF. to abort with an error. If this variable is used.6D Admin Tools only) Value UNIX: Points to the db2<dbsid> home directory. you can use this variable For more information. which accesses the standby directory. 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. If you want to set up a hot-standby system. brarchive creates an additional copy of the Admin DB backup SAR file in standby directory DB2DB6_STANDBY_DIR. DB2DB6_STANDBY_DIR_ADMDBSAR By default. Windows: Points to <CD-drive>:\db2\db<dbsid>. and their values. the User Exit creates an additional copy of the log file in the standby directory during the archiving operation. 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. this variable is not set or set to OFF. Variable INSTHOME (4. see The db2inidb Tool [Page 132]. DB2DB6_STANDBY_DIR_NOERR By default.Admin Tools Configuration Variables The following table lists the configuration variables of the Admin Tools. If the variable is set to ON.db6 respectively.db6 or init<SAPSID>. operations that fail in the standby directory do not cause the executable. 74 July 2006 . which are listed in file init<DBSID>.

If this variable is set to ON. DB2DB6_NO_EJECT By default. set the variable as follows: DB2DB6_UEXIT_DIRECT=VENDOR. sddb6mir updates the Admin DB as well. this variable is not set or set to OFF. DB2DB6_TSM_TIMEOUT July 2006 75 . the User Exit does not update the Admin DB during indirect archiving operations. DB2DB6_UEXIT_RETRIEVE_WO_DB By default. DB2DB6_CORE By default. you must configure variable DB2DB6_VENDOR_UEXIT. DB2DB6_UEXIT_ARCHIVE_WO_DB By default. see Configuring the System for Archiving Log Files [Page 78]. For SAP system releases lower and including 4. For TSM: To activate archiving to TSM. We strongly recommend that you do not set this variable to ON unless you are asked to do so by SAP support. If this variable is set to ON. set this parameter to zero. In addition. If you have configured DB2DB6_UEXIT_DIRECT=VENDOR. For archiving directly to disk. set this variable to ON. set variable as follows: DB2DB6_UEXIT_DIRECT=TSM:<mgmt class1>[+<mgmt class 2>] For direct archiving to an alternative storage product. you need to set the variable as follows: DB2DB6_VENDOR_UEXIT=<path to vendor User Exit>. this variable is not set or set to ON. the User Exit tries to retrieve log files from log_archive or log_retrieve even if the Admin DB does not exist or is not up-to-date. • • For more information. To switch off this function. to activate direct archiving to an alternative storage product. For more information.DB2DB6_UEXIT_DIRECT • • For indirect archiving: This variable is not set or set to OFF. this variable is not set or set to OFF which generally avoids ejection of the tape To eject the tape. this variable is not set. this variable is not set or set to OFF. If this variable is set to ON. Disconnects DB2 from TSM after a specified time in seconds of no response .6D where program sddb6mir is used. the Admin Tools executables write a core file in UNIX instead of trying to handle exceptions internally. By default. see Archiving to an Alternative Storage Management Product [Page 82]. brarchive updates the Admin DB only during the next archiving operation. DB2DB6_VENDOR_UEXIT By default. set the variable as follows: DB2DB6_UEXIT_DIRECT=DISK. this variable is not set. which is the default behaviour.

this variable is not set.<timestamp>. By setting this variable. DB2DB6_TRC_<TOOL>_LEVEL Values between 1 and 9 are allowed and specify the level of detail: • • • 1 = less detailed 3 = default 9 = maximum DB2DB6_TRC_<TOOL>_PATH DB2DB6_TRC_<TOOL>_FILE Specifies the path where the trace files of format <TOOL>. If this variable is used. which is set to the fully qualified path of the trace file. Overrides DB2DB6_TRC_<TOOL>_PATH. this variable is not set or set to OFF. You only have to set this variable if the currently shown shared library version changes in newer versions of TSM.DB2DB6_LIBDB6SC_SCRIPT By default. the same trace is used for all runs of <TOOL>. DB2DB6_ADMDB_REORG_FREQUENCY By default. For more information. We strongly recommend that you do not set this variable to ON unless you are asked to do so by SAP Support. this variable is not set. If you want to archive log files using a customer script with brarchive. The default value of seven days applies. For more information.trc are created. this variable is not set or set to OFF. DB2DB6_TSM_SLIB By default. 76 July 2006 . you can specify how often the Admin DB is reorganized : • • –1 = never 7 = default value DB2DB6_TRC_<TOOL> By default. If you set this variable to ON. the tracing for <TOOL> is activated. If you want to use the TSM LANFREE feature. DB2DB6_TSM_MULTITHREADED By default. this variable is not set or set to OFF. the value of the variable must be set to the fully qualified path of the customer script. you must set this variable to ON. see Indirect Archiving Using a Customer Script [Page 89]. see Configuring TSM (Tivoli Storage Management) [Page 90].

Specifies minimum table size in rows to flag tables for RUNSTATS. Variable DB2DB6_DMDB6BKP_RETRIES Default Value 10 Description Backup retries in case of offline backups.Configuration Variables of Other Tools The following table lists the configuration variables of the redirected restore tool brdb6brt and the CCMS tools.db6. Pattern which distinguishes tapes from normal directories Sets backup block size for tapes (used by tool dmdb6bkp) Updates threshold in percent to flag tables for RUNSTATS. 0 means no throttling. and their values. which are contained in file init<SAPSID>. Specifies impact priority for backup. Sets compression flag for backup Includes required transaction log files in an online backup to recover the database to any consistent point in time. DB2DB6_DMDB6BkP_TAPE_PATTERN (Windows only) \\ DB2DB6_DMDB6BKP_BLOCK_SIZE 1024 DB2DB6_DBDM6SRP_UPDATE_THRESHOLD 15 DB2DB6_DMDB6SRP_TABLESIZE_THRESHOLD 1000 DB2DB6_DMDB6BKP_UTIL_IMPACT_PRIORITY 0 DB2DB6_DMDB6BKP_COMPRESS DB2DB6_DMDB6BKP_INCLUDE_LOGS OFF OFF July 2006 77 .

Direct Archiving The User Exit archives log files either directly to disk (DB2DB6_ARCHIVE_PATH). Inc. that is log files are immediately copied from the system to a safe backend and do no longer reside on the local system. Legato Networker from Legato System. 4. Number of days to refresh CCMS archiving log information DB2DB6_DB6SRPRTS_PCT_LONG_LOB 10 DB2DB6_DMDB6RDI_REFRESH_LOG_INFO 14 See also: Appendix D: Example of File init<DBSID>.2 Configuring the System for Archiving Log Files As outlined in Basic Concepts [Page 23].DB2DB6_DB2DB6_BLOCK_SIZE 1024 Specifies backup block size for tapes (used by tool db2db6) Percentage of rows that are read for table size calculation for long and lob columns. All other storage products (for example. to TSM or to another vendor storage management product. log files can be archived directly or indirectly.db6 [Page 212]. In case of TSM the User Exit utilizes the TSM APIs to archive and retrieve log files. 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. 78 July 2006 .) deliver their own implementation of the User Exit program.

With direct archiving this function is not available. You only need extra space if you archive directly to disk. 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. Thus. network traffic can be avoided during the day by archiving during the night. 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. Tape access and management using storage management systems are easy to handle and no tape space is wasted. Furthermore. Backups can also be archived with the storage management product. Then brarchive is used to archive the copied files. Indirect Archiving This is the default configuration. You also may consider to use infinite logging. Option brrestore –delete allows deletion of log files that were created before a specific timestamp. No extra space for an archive directory is needed when archiving to TSM or any other storage management product. The time of the archiving operation can freely be chosen. setting DB2 registry variable DB2_BLOCK_ON_LOG_DISK_FULL=ON (DB2 Version 7. you can archive log files to TSM. an overflow of the log_directory can occur due to network outage or unavailability of the storage management system. when using direct archiving you have to take into considerations that some constraints apply. In case your storage management system is unavailable. Indirect archiving offers the following advantages: • Log files are stored on the local system until deleted by brarchive. The User Exit automatically copies log files to the directory specified in the DB2DB6_ARCHIVE_PATH variable.Direct archiving offers the following advantages: • • • • System configuration is less complex as no Admin DB or DB2 Control Center Extensions are required. If it is not available. • • • Simple tape support is provided by the Admin Tools. During a roll-forward recovery of the database the storage management system must be available. In this case. However. ROLLFORWARD operations after a database restore normally require no user interaction when using direct archiving. tape or using a customer script. problems will arise.2) or the corresponding database configuration variable parameter BLK_LOG_DSK_FULL=YES (DB2 Version 8) also reduces the risk of database failure. You can avoid this situation by setting variable DB2DB6_STANDBY_DIR to keep local copies of log files until they are no longer required on the local system. July 2006 79 . In addition. We recommend that database administrators use direct archiving as it performs well and requires minimal maintenance.

specify either of the following: • DB2DB6_UEXIT_DIRECT = TSM • DB2DB6_UEXIT_DIRECT = TSM:DEFAULT After you have switched on direct archiving by setting variable DB2DB6_UEXIT_DIRECT.db6 (make sure that it is not commented out). see Configuring TSM (Tivoli Storage Management) [Page 90]. you have to take into consideration that there are a few disadvantages. To indicate direct archiving to TSM. The following syntax is used to set variable DB2DB6_UEXIT_DIRECT: DB2DB6_UEXIT_DIRECT = TSM:[<Mgmt Class>] To use the TSM management class MLOG1: DB2DB6_UEXIT_DIRECT = TSM:MLOG1 If you do not want to create and use a specific TSM management class.2. the Admin DB ADM<DBSID> is no longer used and can be dropped. For example. log files located in the archive directory are unsafe until stored to a safe backend by brarchive. 80 July 2006 . set the DB2DB6_UEXIT_DIRECT variable in the environment file init<DBSID>. when using indirect archiving.1 Archiving Directly to TSM In order to use the Tivoli Storage Manager to manage DB2 log files and/or DB2 backups. The complexity of the solution. See also: For detailed information about direct and indirect archiving. the TSM client software must be installed on the DB2 database server and a TSM server must be available. Especially the existence of the Admin DB can cause problems in split-mirror scenarios and when performing a homogeneous system copy. slightly increases the risk of failure. including additional storage directories and an extra Admin DB. For more information about how to set up the TSM client. see the following sections: • • • • • • Archiving Directly to TSM [Page 80] Archiving Directly to Disk [Page 81] Archiving to an Alternative Storage Management Product [Page 82] Indirect Archiving to Tape [Page 82] Indirect Archiving to TSM [Page 88] Indirect Archiving Using a Customer Script [Page 89] 4.However.

LOG Meaning TSM file space name TSM file space type High level file identifier.db6. the User exit can directly archive or retrieve log files to or from disk. Set the DB2DB6_UEXIT_DIRECT and DB2DB6_ARCHIVE_PATH variables in the environment file init<DBSID>. where yyyy is the node number Low level file name. for example.db6 using the following syntax: DB2DB6_UEXIT_DIRECT = DISK DB2DB6_ARCHIVE_PATH = <log file archive path> During the archiving operation the User Exit appends the partition number to the log file to avoid that log files from other DB2 partitions will be overwritten. you have to create two management classes in TSM. During the retrieve operation July 2006 81 .6D Admin Tools). MC1 and MC2.2.LOG For storing the log files.2 Archiving Directly to Disk Since Admin Tools patch 23 (6. you have to configure environment variable DB2DB6_ARCHIVE_PATH. you specify both management classes. Archiving to Two TSM Management Classes For duplicated archiving of log files to TSM. To define the archive directory. where zzzzzzz is the log file number For the database BIN on node NODE0000. To do so. a backup copy group is used. archiving log file S0000599. you have to activate variable DB2DB6_TSM_MULTITHREADED in file init<DBSID>. DB2DB6_UEXIT_DIRECT = TSM:MC1+MC2 Archiving Using TSM Option LANFREE To make sure that the Admin Tools work in a TSM LANFREE environment.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. the archive copy group is used by default. in the User Exit variable DB2DB6_UEXIT_DIRECT. We recommend that you define an archive copy group. If no archive copy group is defined.NN Admin Tools) or patch 12 (4.The following naming conventions on the TSM server apply: TSM Variable /<DBSID> DB2 /NODEyyyy /Szzzzzzz. 4.

refer to the vendor’s documentation. Each tape and tape device is assigned to a tape device class. 82 July 2006 . Make sure that the vendor User Exit program is renamed and does not overwrite the User Exit program delivered by SAP. 4.2. The basic steps in tape management include: • • • Defining device classes. the specific client software must be installed and configured on the DB2 database server. the Admin Tools include a tape management facility.db6 using the following syntax: DB2DB6_UEXIT_DIRECT = VENDOR DB2DB6_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>. Set the DB2DB6_UEXIT_DIRECT and DB2DB6_VENDOR_UEXIT variables in the environment file init<DBSID>.2. Defining devices. Initializing (naming) tapes.the log file is transferred back to the log directory and the partition number is removed automatically. All tapes and tape devices used for log file archiving must be registered here. The Admin Tools User Exit must also be installed. For this purpose. For setup and error handling relating to the vendor User Exit program. Be aware that you cannot use brarchive or brrestore to archive or restore these log files. 4. specify the program with the fully qualified path. The log files in the archive directory need to be manually archived to disk using tools of your choice.3 Archiving to an Alternative Storage Management Product In order to choose an alternative storage manager product to manage DB2 log files or DB2 backups.4 Indirect Archiving to Tape You can only archive log files to tape in indirect archiving mode.

log on as user db2<dbsid>. Choose Tapes. a default device class is defined. 5. 2 and so on to address them. 4. In the navigation frame of the DB2 Control Center. For example.. If you have more than one tape device. the second tape on Solaris is /dev/rmt/1. devices and tapes. The Tape Management dialog box appears. replace the 0 with 1. 3.. expand the <System name> node in the tree. July 2006 83 . From the context menu of the SAP database <DBSID> icon. 1.Initially. read the following sections. expand the <system name> node until the database names are visible. Working with Tape Device Classes . To define device classes. choose SAP Tape Management. If required. 2. To display a list of all known device classes. This device class initially contains one defined device: Windows: AIX: Solaris: Linux: HP-UX: /dev/mt0 /dev/rmt0 /dev/rmt/0 /dev/st0 /dev/rmt/0m We recommend that you update or replace default entries according to your requirements.

To remove a device class definition. choose Add Device Class from the context menu of the <system name> node. For the first two actions. Enter or change the fields as required. You can choose from the following actions: To add a new device class.6. the Add/Change Device Class dialog box appears. choose Edit from the context menu of the <device class> node. 84 July 2006 . Choose Add or Change depending whether you want to add a new device class or change existing data. choose Delete from the context menu of the <device class> node. The fields in the Add/Change Device Class dialog box describe a tape device class. 7. All devices and tapes of that class will also be removed by the delete action. 8. To change an existing device class definition. The fields are described in detail in the table following this procedure. Most fields have a corresponding configuration parameter as described in the table under Parameters Affecting Log File Management Storage [Page 70].

Required but can be freely chosen. July 2006 85 . Overrides the rewind configuration parameter. 2. You can choose from the following actions: To add a new tape. log on as user db2<dbsid>. For the first two actions the Add/Change Device dialog box appears.Field Name Capacity Type Description Rewind Rewind Offline Eject Positioning Description Name of the device class. Overrides the tape_pos_cmd configuration parameter. If required. Set this field to the same value. choose SAP Tape Management from the context menu of the SAP database <DBSID>. Working with Tape Devices .. Overrides the rewind_offline configuration parameter. choose Retrieve Tape Label from the context menu of the <device> node. In the navigation frame of the DB2 Control Center. Describes the device type you can choose from the menu. Identical to Rewind offline. choose Delete from the context menu of the <device> node. choose Edit from the context menu of the <device> node. Optional field that describes the device class. To remove a device definition. A list of known device classes is displayed. 4. Expand the <system name> node. and the <device class> node to which the device definition will be added.. Overrides the tape_size configuration parameter. 5. 3. To retrieve the label of a tape currently located in a tape drive. To change an existing Device definition. 1. Expand the Devices node. choose Add Device… from the context menu of the <device class> node.

the option ‘B‘ must be replaced with ‘C‘ followed by the block size divided by 512. Initializing Tapes Tapes must be initialized before files can be archived to them. If required. 1. In the navigation frame of the DB2 Control Center. Description is optional. Tapes must normally then be re-initialized before new log files can be archived to them. Enter or change the fields as required. Due to a limitation in the Admin DB design. choose SAP Tape Management from the context menu of the SAP database <DBSID>. 3. Only a single archive operation involving one or more log files is permitted on an initialized tape. The Tape Management dialog box appears. 7. For dd. SAP system ID and tape usage count. 2. the bs value must be changed to the block size in bytes. The flags supplied to cpio and dd will need modifying if a non-standard block size is used. such changes apply to all tape classes and tape devices. and the <device class> node to which the tape to be initialized belongs. Modifying the Tape Block Size To improve performance. Choose Add or Change depending on whether you want to add a new tape or change existing data. Expand the <system name> node. tapes can be re-used if the log files go out of date as defined by the expir_period configuration parameter. containing information such as volume name.. This involves writing a header file to each tape. Initializing Tapes Using the DB2 Control Center . log on as user db2<dbsid>. For cpio.6. it is sometimes necessary to modify the block size used to read and write tapes.. 86 July 2006 . As described in Changing the Admin Tools Configuration [Page 70].

The following command initializes a tape with the name D4XA01 without checking whether the tape has already been used or initialized. All tape actions and their results can be seen by choosing Journal tab. July 2006 87 .from the context menu of the tape icon. choose Initialize Tape…. choose Init. Calling brarchive on the command line gives the administrator access to all command line options and may therefore be more flexible than the DB2 Control Center interface. the initialization is not permitted unless the Force initialization box is selected. To initialize a tape the first time. To initialize the tape. the Force initialization option must be selected. choose Re-initialize …. Enter the name of the new tape. choose Delete from the context menu of the tape icon. 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 157]. To initialize an already registered tape again. Choose the device where the tape is located.4. 6. Initializing Tapes with brarchive brarchive is the command that the DB2 Control Center uses to initialize tapes. 7. To remove a tape. You can change the value of the expir_period parameter in the SAP Option Management dialog box. If the tape has never been initialized before or was used to archive files less than expir_period weeks ago. To initialize the tape. Messages are only written to a protocol file. The Initialize Tape dialog box appears 5. From the context menu of the Tapes node.

Archiving Using the TSM Option LANFREE If you want to use this option. archiving the log file S0000599.YYYYMMDDHHMMSS. 88 July 2006 .NODE0000 For storing the log files the archive copy group is used by default if no archive copy group is defined.db6 to enable the Admin Tools to work in a TSM-LANFREE environment.5 Indirect Archiving to TSM For indirect archiving to TSM. where yyyy is the node number Low level file name. We recommend that you define an archive copy group. The following naming conventions apply on the TSM server: TSM Variable /<DBSID> DB2 /NODEyyyy /Szzzzzzz. no special tasks must be performed other than configuring TSM itself. you have to activate variable DB2DB6_TSM_MULTITHREADED in file init<DBSID>.LOG.20010606103645.LOG would result in the following values: • File space name: /BIN • File space type: DB2 • High-level name: /NODE0000 • Low-level name: /S0000599.2. Then a backup copy group is used.NODEyyyy Description TSM file space name TSM file space type High level file identifier.4. where • • • zzzzzzz is the log file number YYYYMMDDHHMMSS is the file that was closed by DB2 yyyy is the node number For the database BIN on node NODE0000.LOG. You can find more general information about TSM configuration in Configuring TSM (Tivoli Storage Management) [Page 90].

NODExxxx The sequence of the parameters in the script must be the same as in the table. which means any other storage product or storage device.2. which is not the case. you enable the Admin Tools to archive log files to any backend. Indicates that the action specified in the script is not supported. By using your own script.4. The following table lists the parameters that the script needs to support: Parameter action Description You can set the parameter to perform the following actions: • • • directory • • • file ARCHIVE RETRIEVE DELETE If you are archiving log files. You must make sure that you specify the correct return codes for every action performed − as described in the table. The log file has the following format: Snnnnnnn. Thus. For example. you have to make sure the script accepts the parameters and return codes provided by brarchive and brrestore. 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 LFMVND_STATUS_OK=0 LFMVND_RC_ERROR=64 LFMVND_COMMAND_NOT_SUPPORTED=71 Description Indicates success of the action performed. What Does the Script Need to Support? If you want to use your own script to archive log files to any other back-end than TSM or tape.. . Indicates failure of the action performed. retrieve or delete log files. July 2006 89 .6 Indirect Archiving Using a Customer Script brarchive und brrestore currently only support archiving to two backends: TSM and tape. directory points to the directory where the log files to be archived are located. The script needs to be able to archive. the content of the Admin DB becomes inconsistent and you risk to lose log files. if the script returns LFM_STATUS_OK (although the action has failed) brarchive and brrestore assume that the action was completed successfully. directory points to the directory where the log files should be retrieved to. according to your requirements. If you are deleting log files. directory points to the directory where the log files were originally archived from. Defines the log file that is to be used.. If you are retrieving log files.LOG<TS>.

5. DSMI_CONFIG. The shell script is designed for UNIX. 2.Writing Your Own Script You use the sample script db6sctsm. For more information about how to set parameters in file init<DBSID>db6.opt and dsm. you can specify Tivoli Storage Manager (TSM product. Configure the TSM environment variables DSM_DIR. We recommend that you use at least TSM Version 4.opt (UNIX and Windows) and dsm. 3. Install the TSM client and API on the DB2 server. 1. you have to perform the following steps: ..sys (UNIX only) as described in Configuring TSM Files dsm. DSMI_DIR. Configure the TSM files dsm. retrieve or delete commands. To generate the password.sys [Page 91]. 4. For more detailed information about steps 2 and 3. DSM_LOG and DSMI_LOG as described in Configuring TSM Environment Variables [Page 92]. restart DB2 with db2start. In the sample script the TSM client dsmc is used to archive.db6. After having copied the script. you have to write a batch file or an executable. DSM_CONFIG. see Configuring the Admin Tools Using Environment Files [Page 73]. If your system is running on Windows. run the TSM client dsmc once. which is part of the Admin Tools delivery. You can also use TSM to manage archived DB2 log files. retrieve or delete log files.1. Activating the Script You activate the script by setting parameter DB2DB6_LIBDB6SC_SCRIPT=<path to customer script> in file init<DBSID>. see SAP Note 82029 ADSM/TSM Installation in DB2 Environment. to write your own script. you can enter your archive..smp. 90 July 2006 .3 Configuring TSM (Tivoli Storage Management) Use When issuing DB2 BACKUP or RESTORE commands. to manage the database or tablespace backup). 4. Procedure Before the DB2 Database Manager db2<dbsid> can use TSM. We strongly recommend that you copy the sample script to avoid overwriting during the next Admin Tool installation. To make the environment variable visible to DB2.

sys On UNIX systems. the TSM files dsm. The files must contain the following parameters: UNIX File dsm.4. On Windows systems.1 Configuring TSM Files dsm. Make sure that this directory has the appropriate authorizations.sys must be configured.opt file must fit the value SERVERNAME in the dsm.opt Parameter SERVERNAME File dsm.sys file. Windows File dsm.sys Parameter SERVERNAME COMMETHOD TCPPORT TCPSERVERADDRESS PASSWORDACCESS PASSWORDDIR Value <TSM server name> TCP/IP 1500 <TSM server IP address or host name and domain name> Generate /etc/adsm Value <TSM server name> The entry of SERVERNAME in the dsm. the TSM file dsm. For parameter PASSWORDDIR: The users root and db2<dbsid> must be able to access directory /etc/adsm.opt Parameter COMMMETHOD TCPPORT NODENAME TCPSERVERADDRESS PASSWORDACCESS Value TCP/IP 1500 <TSM client> <TSM server IP address or host name and domain name> Generate July 2006 91 .opt and dsm.opt and dsm.opt must be configured.3.

2 Configuring TSM Environment Variables TSM environment variables DSM_DIR. The values. you can rerun sddb6ins with the –i option and sddb6ins will add these variables.NN Admin Tools or higher UNIX The sddb6ins program. DSM_CONFIG and DSM_LOG.csh and dbaenv_<hostname>. which call the dbaenv_<hostname>. DSM_CONFIG. DSM_LOG and DSMI_LOG are needed to tell TSM where TSM resides and on which TSM server the database backup and the log files should be stored.dbenv_<hostname>. adds an entry to the profile. Windows If the TSM software is installed on the database server before the sddb6ins program is called. • 6. which are set there.dbenv_<hostname>. 92 July 2006 .4. sddb6ins detects this and sets the TSM API-specific environment variables DSMI_DIR.login scripts in the home directories of db2<dbsid> and <sapsid>adm. which are not valid in most cases and which must be corrected.6D Admin Tools UNIX During the installation of the SAP system with R3SETUP the files .csh and .sh are created in the home directory of db2<dbsid> and <sapsid>adm.3. If you install the TSM software afterwards. work on all standard TSM installations and generally do need not to be corrected.cshrc and . The following list provides additional information about these variables that you have to take into consideration depending on the Admin Tools version you are using: • 4. as well as the TSM client-specific environment variables DSM_DIR. which installs the Admin Tools. Windows The above mentioned variables are not set during installation and must be added manually to the user environment of db2<dbsid> and <sapsid>adm.sh script. The shell script dbaenv_<hostname>. DSMI_CONFIG and DSMI_LOG to appropriate values in the user environment of users db2<dbsid> and <sapsid>adm.csh and dbaenv_<hostname>. These files contain some default values for the TSM variables. . DSMI_DIR. DSMI_CONFIG and DSMI_LOG. DSMI_CONFIG. sh add the TSM API-specific environment variables DSMI_DIR.

csh ~/.csh ~/.sh July 2006 93 .csh $INSTHOME/admintools/bin For 4.sh Log directory for TSM API with the following default: Windows: <drive>:\progra~1\Tivoli \tsm\api UNIX: $INSTHOME/errors Same as for variable DSMI_DIR as described in this table.sh For 4.csh dbaenv_<hostname>.6D Admin Tools: ~/.opt Same as relevant location for variable DSMI_DIR as described in this table UNIX only: DSM_DIR Location of TSM client with the following default: For 6.dbenv_<hostname>.dbenv_<hostname>.dbenv_<hostname>.NN Admin Tools: • • • • DSMI_LOG dbaenv_<hostname>.NN Admin Tools: • • • • $INSTHOME/admintools/bin/dbaen v_<hostname>.csh dbaenv_<hostname>.6D Admin Tools: ~/.dbenv_<hostname>.sh For 4.opt UNIX: $INSTHOME/sqllib/adsm /dsm.opt file with the following default: Windows: <drive>:\progra~1\Tivoli \tsm\baclient\dsm.csh ~/.csh dbaenv_<hostname>.NN Admin Tools: • • • • dbaenv_<hostname>.sh For 4.dbenv_<hostname>.sh Set In Windows: User environment of db2<dbsid> and <sapsid>adm UNIX: For 6.dbenv_<hostname>.csh ~/.Environment Variables for TSM: The following table provides an overview of all environment variables you should check: Variable DSMI_DIR Value Location of TSM API library with the following default: Windows: <drive>:\progra~1\Tivoli\ tsm\api UNIX: For 6.NN Admin Tools: • • • • $INSTHOME/admintools/bin/dbaen v_<hostname>.6D Admin Tools: ~/.dbenv_<hostname>. DSMI_CONFIG Location of dsm.sh UNIX only: For 6.6D Admin Tools: ~/.dbenv_<hostname>.

In this case.opt UNIX only: Same as for variable DSM_DIR as described in this table UNIX only: Same as for variable DSM_DIR as described in this table 4. this is not possible. If you use the same management class. An extremely large disk storage pool would be necessary to avoid this problem. • • We recommend that for archiving log files you use a disk storage pool. The performance during rollforward recovery is limited because log files are widely spread on the tape if stored on the same tape as backups. is that you use a management class for backups different from the one you use for log files. you can achieve a better system and rollforward performance if caching on the disk storage pool is switched on.opt file for TSM client. you can use an older backup and still perform a rollforward recovery. The default is $INSTHOME/errors Location of dsm. the following disadvantages have to be taken into consideration: • If you lose a tape. however. For backups. With log files missing. Sometimes you might be forced to keep offline backups longer than log files. 94 July 2006 . The default is: $INSTHOME/sqllib/adsm/ dsm.UNIX only: DSM_LOG UNIX only: DSM_CONFIG Log directory for TSM client. If the DB2 backup image does not fit into this disk storage pool. If you only lose a backup.3 Configuration Considerations With TSM. you cannot reuse the whole tape because backups still reside on that tape and space reclamation drastically affects the system performance. TSM will fail. The preferable solution. backups and log files might be archived to the same tape.3. With this pool. you can use the same or different management classes for archiving backups and log files. If log files are deleted from tape by TSM. you not only lose a backup but also the log files. we recommend that you do not use such a disk storage pool. however.

NODEyyyy. which influence the Admin Tools directly. DB2 Instance Registry Variables Instance Registry Variable DB2ENVLIST Description Default value: • • Windows: INSTHOME SAPSYSTEMNAME dbs_db6_schema AIX: LIBPATH INSTHOME SAPSYSTEMNAME dbs_db6_schema Linux: LD_LIBRARY_PATH INSTHOME SAPSYSTEMNAME dbs_db6_schema Solaris: LD_LIBRARY_PATH INSTHOME SAPSYSTEMNAME dbs_db6_schema HP-UX: SHLIB_PATH INSTHOME SAPSYSTEMNAME dbs_db6_schema • • • Setting these variables ensures that the User Exit program db2uext2 and the stored procedure sddb6jds get the appropriate environment. refer to the DB2 documentation. <DBSID> Database Configuration Database Configuration Parameter LOGRETAIN USEREXIT LOGPATH LOGFILSIZ Database Manager Configuration Database Manager Configuration Parameter DIAGPATH Description Location where DB2 writes the db2diag.4. Directory where DB2 writes log files to. The sddb6ins installation program sets this value appropriately. Description Must be set to ON that roll-forward recovery is possible. If it is necessary to change them. Must be set to ON that the User Exit db2uext2 is called. Default value in an SAP environment is 64 MB.log and db2uext2. with a brief description. Defines the size of each log file.log.4 DB2 Configuration Parameters DB2 variables are configured by the SAP installation to ensure that DB2 and the Admin Tools work.NODEyyyy. July 2006 95 . This section lists parameters. The User Exit program db2uext2 writes the files db2uext2.err to this directory.

Protocols • User Exit protocols The User Exit writes its protocol files db2uext2. They are moved to the protocols directory at the end of the brarchive/brrestore run. so that two exports of the Admin DB fit into it. Otherwise. 96 July 2006 .log and dbuext2. The free space in the directory where DB2DB6_TEMP_DIR is pointing to needs to be dimensioned. • Indirect archiving The free space in the directory where DB2DB6_ARCHIVE_PATH is pointing to.err to the directory where the database manager configuration parameter DIAGPATH points to. The directories differ for the Admin Tools version as follows: For 6.4. 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.6D Admin Tools: brarchive: <INSTHOME>/saparch brrestore: <INSTHOME>/saprest These directories need to be dimensioned to hold the small protocol files.NODExxxx.5 Disk Space Considerations for Running the Admin Tools The following section provides additional information about the directories that are needed if you want to install the Admin Tools. brarchive fails to store the Admin DB. • brarchive/brrestore protocols These log files are initially generated in the directory where DB2DB6_TEMP_DIR points to.NN Admin Tools: <INSTHOME>/admintools/protocols For 4. The given information refers to disk space considerations for: • • • • Log files Protocols Trace files Admin DB 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.NODExxxx. needs to be dimensioned.

The default directories are: • • For 6. All methods to keep the Admin DB small are described in Regular Administration [Page 98].NN Admin Tools: <INSTHOME>/admintools/TraceFiles For 4. July 2006 97 .6D Admin Tools: <DB2DB6_TEMP_DIR>/TraceFiles Admin DB (Indirect Archiving) The Admin DB is relatively small and its size increases slowly.db6 file for each executable separately. The trace file directory can be configured in the init<DBSID>.db6 file. The trace files are only required to determine defects or by the SAP support to fix problems.Trace Files Trace files are only generated if the user has explicitly enabled trace file generation in the init<DBSID>.

5. choose SAP Log File Management. In the navigation frame of the DB2 Control Center. all archive processes will run automatically. 3. 4. Tape or Script: TSM: In the TSM Management Class field. You can start brarchive on the command line or using the DB2 Control Center Extensions. choose your system and log on as a user with administrator authorizations. Choose Archive. The log files written to the DB2DB6_ARCHIVE_PATH location can by archived using the brarchive tool. The other less regular log file management action is deleting log files from the storage product. Log file management information is stored in the Admin DB ADM<DBSID>.1 DB2 Log File Management The concepts and terminology used in this chapter are described in Basic Concepts [Page 23]. either to tape.5 Regular Administration 5. TSM or any other backend using a customer script. In the Archive Log Files of Node field.. If files are not deleted from the disk during these archive operations. For more detailed information about how to configure the log file management tools. In the Log Files to be Archived field. choose the log file up to which you want to archive. For indirect archiving (the default).. Select TSM. 5. 2. If you are archiving directly. If you do not want the log files to be deleted from the archive directory after archiving. select Keep Log Files in File System. 98 July 2006 . select a TSM management class. All older log files up to the one you have selected will be selected for archiving. from the context menu of the database <DBSID>. or using the DBA Planning Calendar (transaction DB13). 1.1 Archiving Log Files from Disk to Backend The log files are copied to a temporary disk location by the User Exit. You may need to delete old log files from the storage product occasionally. If required. the main daily action is archiving log files to tape or TSM after they have been processed by the User Exit.1. log on as user <sapsid>adm or db2<dbsid>. 6. see Configuration [Page 70]. Archiving with DB2 Control Center . the files remaining on the disk will also need deleting regularly. On the subnode Database. The Log File Management dialog box appears. as specified by the environment variable DB2DB6_ARCHIVE_PATH. choose the node from which log files should be archived.

If these fields do not contain any entries. Tape: i. After archiving log files to a tape. For more information. The list of devices next to this box is then recalculated to only contain the matching devices for that tape. log files are saved to a single tape. To start the archive process. see Indirect Archiving to Tape [Page 82]. a list of management classes is specified. go to the SAP Tape Management by choosing Tape.The possible entries for the management class are maintained using the SAP Option Management dialog box. A dialog box appears indicating that the archiving process was just started. start the selection process again by choosing Reset Selection. you can start by choosing a device name and afterwards choose an appropriate tape. follow the same procedure for the Name of the Second Tape and its device. The corresponding keyword is adsm_mc. iii. the entries in the remaining boxes are limited to those entries that match the selection. 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. Once you have selected an entry in one of the four boxes. You can see all archiving actions and their results in the Journal page. For more information. separated by commas. Select Name of First Tape. The following syntax describes the most common usage of brarchive. choose Archive. Archiving with Command Line Tool brarchive brarchive is the command that the DB2 Control Center uses to archive log files. Alternatively. ii. another dialog box appears indicating if it was successful. see Changing the Admin Tools Configuration [Page 70]. Select a device. see Parameters Affecting Log File Management Storage [Page 70]. If the tape is not initialized or the device you want to use is not displayed (not defined). see Indirect Archiving to Tape [Page 82]. If you want to save to two tapes simultaneously. July 2006 99 . To display the full list of possible entries. Under Value. 7. Tapes must be initialized before brarchive can use them. For more information. After the archiving has finished. Calling brarchive from the command line gives the administrator access to all command line options and may therefore be more flexible than the DB2 Control Center interface.

Archiving Log Files to Single Tape Command syntax Description brarchive -sd -d tape -v D4XA01 –t /dev/rmt/0 -out n 25 Archives 25 log files to the tape D4XA01. For more information about the barchive syntax. MC1 and MC2. for example. you can archive log files to two different management classes. and deletes them from the file system if processing completes successfully.NN Admin Tool patch 9.6D Admin Tool patch 20 or 6. You might not want to delete log files immediately to allow them to be processed using other tools. in TSM before you call brarchive. Messages are written to the standard output file and a protocol file. These must be deleted later using the –ds option.Log File Archive Tool [Page 157]. Messages are written to the standard output and a protocol file. You have to create two management classes. without deleting them from the file system. Archiving Log Files to TSM Without Delete Command syntax Description brarchive -s -d tsm –out Archives all available log files to the default management class in TSM. Messages are written to the standard output file and a protocol file. Archiving Log Files to Two Tapes (Double Store) Command syntax Description brarchive -ssd -d tape -v D4XA01 D4XA02 –t /dev/rmt/0 /dev/rmt/1 -out -n 10 Archives the same ten log files to both the tapes D4XA01 and D4XA02. 100 July 2006 . Archiving Log Files to Two TSM Management Classes Command syntax Description brarchive –ssd –d tsm MC1+MC2 –out As of 4. see brarchive . and deletes them from the file system if processing completes successfully.

and the size of available storage. see Appendix E: Example of Customer Script db6sctsm. 5. before you call brarchive and brrestore using the command line.2 Deleting Log Files Log files may need to be deleted regularly depending on how often backups are taken. • adsm_mc Specify the TSM management class(es) that you want to use by default. For more information. • If you want to archive all log files. see Parameters Affecting Log File Management Storage [Page 70].smp [Page 221].Setting Parameter Default Values in the Admin DB To avoid the necessity to specify all command line options. you enter the following command: brarchive –s –d script –out • If you want to retrieve up to ten log files. Log files are stored in the following locations: • • • • • Log directory Archive directory Tape Storage Products Any other backend using a customer script July 2006 101 . you can set some values in the SAP Option Management using the DB2 Control Center Extensions. Setting the values for the following configuration variables will help you to minimize the required command line options: • backup_dev_type Specify the value that you normally specify using the –d command line option. Archiving Using Customer Script To activate the script support. you must make sure that option –d script is specified in the script as described in the following example. you enter the following command: brrestore –a –d script –n 10 –out • If you want to delete log files for a specified backup timestamp. However. you enter the following command: brrestore –delete 20020107120000 –d script –out For more information. the number of log files generated each day.db6.1. you have to set variable DB2DB6_LIBDB6SC_SCRIPT=<path_to_customer_script> in file init<DBSID>.

As soon as a tape is re-initialized or re-used. the log files are removed again when the files have been successfully stored. log files chronologically past the point in time are re-used and therefore lost.<timestamp>. you cannot do so since the log files were re-used.LOG.*). use the PRUNE LOG FILE command.Deleting Log Files from the Log Directory Normally there is no need to delete files from this directory. If only –s and –ss are used. It will only do so from the active log path. When recovering the database to a point in time. This is done by specifying a file pattern. This DB2 command deletes all log files in the log directory created prior to a nominated log file. Log files will be deleted from the log directory if you: • Drop a database. Deleting Unknown TSM files with brrestore The log file management tool brrestore now allows removal of files from TSM that are not known to the Admin DB. This action deletes all log files in the current log path directory. the files previously stored on the tape are removed from the Admin DB. To actively delete log files. • Recover the database to a point in time. You may need to back up these log files beforehand. either to match log files (*. if a roll-forward 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.LOG and *. they will not be considered by this command. Deleting Log Files from Tape It is neither possible nor necessary to explicitly delete log files from tapes.NODExxxx. for future recovery purposes. You can identify the original log files easily by their timestamp if they have the following format: Snnnnnnn. If you need to restore again past the point in time used earlier. or Admin DB safety files (*.LOG This command will delete all log files in the active log path up to and including S0000099.SAR). Deleting Log Files from the Archive Directory Log files are placed here by the User Exit in indirect mode (default). PRUNE LOGFILE PRIOR to S0000100.LOG. If any log files have been moved to another path. the delete stored action (-ds) must be run separately to delete these files from the disk. For example. If brarchive is then used with the –sd or –ssd archive actions. The syntax is as follows: brrestore –delete <timestamp> [file pattern] 102 July 2006 . Do not delete files that are still needed by the database. Retrieve the original set of log files manually to a different location and copy them back for the restore action.LOG.

1I and 4. adding or resizing. For more information about the syntax of brrestore. Running out of storage may cause the database or system to fail. Checking the size of tables and indexes. which consists of tasks such as: • • • • Checking the free space in file systems. see brrestore – Log File Retrieval Tool [Page 163]. Deleting Log Files Archived with a Customer Script You delete log files.0A) can be deleted using the db6adutl tool or the TSM utility dsmc. For more information. one essential task for system administrators is storage management.Log File Retrieval Tool [Page 163]. For more information about the syntax of brrestore.) these storage elements to deal with changing requirements. which were archived using a customer script. for SAP system Release 3. see brrestore . Checking the space available in tablespaces. July 2006 103 . • Other storage management products Files directly archived using an additional User Exit must be managed with tools made available by that product.Deleting Log Files from Storage Products You can delete log files from either: • TSM Only use the Admin Tools to work with files stored indirectly to TSM. enter the following command: brrestore –delete. refer to Archiving Directly to TSM [Page 80] for a description of where the files are stored. Therefore. by entering the following command: brrestore –d script –delete. see the corresponding product documentation. 5.2 Storage Management Approaching the limit of available storage can degrade overall performance. Managing (for example. To delete old log files created with recent tools. Files stored directly to TSM or archived indirectly with older tools (for example. In this case. The section DELETE must be implemented in the script.

104 July 2006 . For more information. 5.2.. see the SAP Online Documentation in the SAP Library. The information provided for the DBA Cockpit is valid for SAP Web AS 6.1 Checking the Space Available in a File System To check the available free space of the log directory and the archive directory.The tasks described in the following sections can be performed either using the DB2 Control Center or the DBA Cockpit.. In the contents pane a list of all tablespaces is displayed. Scroll to columns Allocated size. proceed as follows: From the SAP Performance Monitor You can access information about space for tablespaces by calling transaction DB02 and choosing Space → Tablespaces in the navigation frame of the DBA Cockpit. 5. you must make sure that you have installed the DBA Cockpit as described in SAP Note 300828.2. 3.6x. see the SAP Online Documentation in the SAP Library. From the DB2 Control Center . Double-click onTablespaces. From the Operating System: Use the command df on UNIX systems and the program Explorer on Windows systems. proceed as follows: From the SAP Performance Monitor You can access the information by calling transaction DB6COCKPIT and choosing Configuration → File Systems in the navigation frame of the DBA Cockpit. 2. Space is measured in pages where one page is 4 KB. For SAP system Release 4. The information displayed on this screen helps you to determine how much free space is available in your file systems.2 Checking the Space Available in a Tablespace To check the amount of space available in a DMS tablespace.10 or higher. Size used and Percentage used to see details related to the amount of space available in a tablespace. 1. Open the database tree. For more information.

When a DMS tablespace reaches the threshold capacity (depending on the usage of the tablespace. • DB2 Version 8 Increase the size of a DMS tablespace by adding a new stripe set. you should add more space to it. Extend one or more existing tablespace container by a specific size. To do so. For more detailed information about the command syntax. see the IBM documentation DB2 Universal Database SQL Reference. data in the tablespace remains accessible. July 2006 105 . enter the following SQL command: alter tablespace <tablespace name> resize (all containers <new container size in pages> ) The database manager will automatically rebalance the tables in the DMS tablespace across all available containers if necessary. that is. From DB2 CLP Using the following SQL commands you can: • Add a new container to a DMS tablespace. To do so. From the SAP Performance Monitor (SAP Web AS 6. To add a new container. To do so. The DB2 database manager will automatically rebalance the tables in the DMS tablespace across all available containers. Container sizes can only be increased.Adding More Space to a Tablespace The capacity for a DMS tablespace is the total size of all containers allocated to this tablespace.2. 90% is a possible threshold). enter the following SQL command: alter tablespace <tablespace name> begin new stripe set (file ‘<container name>’ <number of pages>) This does not cause rebalancing. If you are using the new features of DB2 Version 8. you do not have to manually add space to containers.2. enter the following SQL command: alter tablespace <tablespace name> extend (all containers <number additional pages> ) Resize one or more existing tablespace containers to a new size. The space that you have added will be available immediately. During rebalancing. DMS AutoResize or AutoStorage. enter the following SQL command: alter tablespace <tablespace name> add ( file '<container name>' <number of pages> ) • Increase the size of one or more containers in the DMS tablespace.20 or higher) You can add more space to tablespaces by calling transaction DB02 and choosing Space → Tablespaces in the navigation frame of the DBA Cockpit and choosing Add. data in the tablespace remains accessible. During rebalancing.

20 or higher) You can reduce the space of a tablespace by calling transaction DB02 and choosing Space → Tablespaces in the navigation frame of the DBA Cockpit and choosing Change. because the file system is full. For more information. see the SAP Online Documentation in the SAP Library. backing up the tablespace and restoring it using a new physical layout. choose Continue. Be aware that running a REORGCHK on the listed tables may take a long time and affect the database performance.2. Always resize all containers of the last stripe set. choose REORGCHK.3 Checking the Size of Tables and Indexes You can access information about space for tables and indexes by calling transaction DB02 and choosing Space → Tables and Indexes in the navigation frame of the DBA Cockpit. the following check on the system catalog tables is performed: • • Are there tables that do not yet have an entry in the CCMS control table DB6TREORG? (This table is always filled by CCMS programs after REORGCHK. a dialog box appears listing these tables that require reorganization. database containers do not have to be resized because this is automatically done by DB2. begin a new stripe set with an appropriate number of containers.We recommend that you avoid rebalancing because it has an significant impact on the database performance. When you call this transaction for the first time. because no rebalancing occurs there. If this is not possible any more.) Are there tables that have entries in the CCMS control table DB6TREORG and that are not up-to-date with the system catalog? If any tables are found. that is. Reducing the Size of a Tablespace • DB2 Version 7 You can reduce the size of tablespaces by reorganizing all the tables in the tablespace.2. Otherwise. DMS AutoResize or AutoStorage. To adjust the tables. • DB2 Version 8 From the SAP Performance Monitor (SAP Web AS 6. From DB2 CLP You can reduce the size of a tablespace using the following SQL command: alter tablespace <tablespace name> resize (all containers <new container size in pages>) 5. 106 July 2006 . If you are using the new features of DB2 Version 8. for example. In addition. the added space is not available until rebalancing has finished.2.

contact SAP remote services Early Watch to improve the values. DB2 defines the IBMDEFAULTBP buffer pool. for example. For each new database created. We recommend that you keep the monitor switches turned on. performance monitoring.6x. If an object’s data page is placed in a buffer pool.3 Performance Monitoring Performance monitoring consists of the following tasks: • • • • Monitoring database performance Monitoring SQL statements Updating statistics for database tables and checking for reorganization Monitoring jobs You can access all monitoring and database administration tasks using the DBA Cockpit. you must make sure that you have installed the DBA Cockpit as described in SAP Note 300828.6C and higher. Data Hit Ratio and Index Hit Ratio should be more the 95 percent. Buffer pools can be assigned to cache only data of a particular tablespace. which is divided at the top level into the main task areas of database administration.10 or higher. The DBA Cockpit is a navigation frame that holds a tree structure. The monitor switches can be turned on and off at the instance level (DBM configuration) or at the application level (using the UPDATE MONITOR SWITCHES command). Every DB2 database must have a buffer pool.5. Checking Buffer Pool Quality Buffer pools are database objects used to cache database data pages in memory. July 2006 107 . For SAP system releases lower than and including 4.3. The values of Overall Buffer Quality. Otherwise. This is assigned within the tablespace definition. 5. You can access information about the buffer pool quality by calling transaction ST04 and choosing Performance → Database → Buffer Pools in the navigation frame of the DBA Cockpit. SAP provides a graphical performance monitor for DB2 to analyze the database activity basis of the DB2 monitor switches. physical I/O access to disks is avoided.1 Monitoring Database Performance DB2 monitors are used to collect detailed resource usage information. The information provided in this paragraph is only valid for SAP system Release 4. This is the default buffer pool for the database. Buffer pool related information is displayed. The information provided for the DBA Cockpit is valid for SAP Web AS 6.

01. see the SAP Online Documentation in the SAP Library. For more information. These snapshots are used in the SAP performance monitor to display sort overflows. The value of Lock Escalations. The information provided in this paragraph is only valid for SAP system Release 4.For more information. Checking Sort Overflows The DB2 Snapshot Monitor provides cumulative information about the number of heaps used. Otherwise. contact SAP remote services Early Watch to improve the values. see the SAP Online Documentation in the SAP Library. For more information. Deadlocks Detected and Lock Timeouts should be almost zero. see the SAP Online Documentation in the SAP Library. The information provided in this paragraph is only valid for SAP system Release 4. You can access information about lock escalation. For more information. The values of Catalog Cache Quality and Package Cache Quality should be more the 95 percent. see the SAP Online Documentation in the SAP Library. contact SAP remote services Early Watch to improve the values. Checking Cache Quality You can access information about catalog cache and package cache by calling transaction ST04 and choosing Performance → Database → Cache in the navigation frame of the DBA Cockpit. contact SAP remote services Early Watch to improve the values. Checking Locks and Deadlocks DB2 captures information for locks held by applications against a database and records each deadlock event (by means of deadlock event monitors).6C and higher. The value of Sort Overflows divided by Total Sorts should result in less than 0. 108 July 2006 . Otherwise.6C and higher. Otherwise. You can access information about sort overflows by calling transaction ST04 and choosing Performance → Database → Sorts in the navigation frame of the DBA Cockpit. deadlocks and lock timeouts by calling transaction ST04 and choosing Performance → Database → Buffer Pools in the navigation frame of the DBA Cockpit. overflows and the performance of sorts.

5. 1. see the SAP Online Documentation in the SAP Library. which might lead to a very large result set. you can identify the dynamic SQL statements that are most frequently executed and the queries that consume the most resource. SQL Explain Facility. Choose Explain. 2... You can retrieve the latest cached SQL statement by choosing Refresh. Depending on your system. on how DB2 accesses the data to resolve the SQL statements. Follow the procedure as described above. If a snapshot already exists. Using this information. for example. To display the access plan of a statement from the SAP performance monitor: . to determine if SQL tuning could result in better database performance. By examining the contents of this cache. July 2006 109 . that is. For more information. For more information.3. you can examine the most commonly executed and most expensive SQL operations.2 Monitoring Dynamic SQL Statements Use The DB2 statement cache stores packages and statistics for frequently used SQL statements. 3.3 Updating Statistics for Database Tables and Checking for Reorganization Regular updates of statistics on the physical characteristics of the database tables and indexes provide the necessary information for the DB2 optimizer to determine the access path to the data. The Explain function provides a detailed analysis of expensive SQL statements. a Selection Criteria dialog box appears where you can limit the result set displayed. if you had already chosen Refresh at least once. Select a statement. Procedure You can access information about the dynamic SQL cache by calling transaction ST04 and choosing Performance → SQL Cache in the navigation frame of the DBA Cockpit. The global statistics information is stored in the catalog tables. you can display the last snapshot taken by choosing Set Selection Criteria. choose Explain to list the access plan for the statement execution. see the IBM documentation Administration Guide: Chapter 26. If you retrieve data for the first time. statistics are collected based on the table data that is located on the database partition where the command is executed. Global table statistics for an entire partitioned table are derived by multiplying the values obtained at a database partition by the number of database partitions on the node group over which the table is partitioned.3. Explain Function If a statement is displayed. In a partitioned database system.5. the snapshot can give you a wide range of information.

The results are stored in SAP internal tables.3. 110 July 2006 . For SAP system Release 4. You can perform backups in online or offline mode: • Online mode Access to the database is not blocked. see the SAP Online Documentation in the SAP Library.4 Job Monitoring The information provided in this section is valid for SAP Web AS 6. double-click it. If you want to display details on a single protocol record. You must perform backups on a regular basis in order to be able to restore the database to a consistent state that is as up-to-date as possible. To reorganize tables we recommend that you use the jobs provided in the DBA Planning Calendar. The users can continue to work normally during the backup. These jobs begin by updating the database statistics (using the DB2 RUNSTATS utility) and then check whether tables need to be reorganized (using the six formulas of the REORGCHK utility as described in the IBM documentation IBM DB2 Universal Database Command Reference). You can schedule background jobs to display information about 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.6x. and three are used for indexes. you must make sure that you have installed the DBA Cockpit as described in SAP Note 300828. The database can be restored without log files. • Offline mode The backup process connects to the database in exclusive mode. you can use the jobs Update Statistics + Reorgchk all tables or Update Statistics and Reorgchk (DBSTATC) in the DBA Planning Calendar (transaction DB13). The REORGCHK formulas help to decide if tables and indexes require physical reorganization. These formulas are general recommendations that show the relationship between the allocated space and the space that is being used for the data in tables. 5. Three formulas are used for tables. These jobs automatically update the table and index statistics afterwards.To update database tables’ statistics and to check whether tables need to be reorganized. 5. For more information.10 and higher.4 Database Backup Backups are complete copies of the database.

1 Backup Considerations 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. After an online backup. you can either use the BACKUP DATABASE command. 5. 2. DB2 forces the currently active log file to be closed and as a result it will be archived. You must start the database manager (db2start) before taking a database backup. To perform both online and offline backups of the database. This copy is as a protection against possible damage to this file. such as Tivoli Storage Manager (TSM). In a partitioned database system. You can back up a database to a specified disk. the DB2 Control Center or the DBA Planning Calendar within the SAP system. DB2 Command Line 1. or a location managed by TSM or another vendor storage management product. • The database may be local or remote. Enter the following command: db2 backup db <DBSID>… For the complete syntax of this command check the DB2 documentation. This ensures that an online backup has a complete set of archived log files available for recovery. July 2006 111 . 5. you do not need to explicitly start the DB2 Database Manager. or SYSMAINT authorization to use the BACKUP DATABASE command. The backup remains on the database server unless a storage management product. keep a copy of the db2nodes. the database can be restored completely and brought up-to-date by rolling in the log files generated after the backup was taken. Log on to the database server as user db2<dbsid>.cfg file with any backup copies you take.In either case. If you want to use the DB2 Control Center.2 Performing the Backup Backing Up a Single-Partitioned Database You can perform these actions either using the DB2 command line or the DB2 Control Center.4. The following is necessary to perform a backup: • • You must have SYSADM. is used. a tape.4. SYSCTRL.

including the correct backup target. A job will be generated that can be monitored using the DB2 Control Center Journal. 1. 2.. Repeat steps 4 to 7 for all other nodes. Fore more information.DB2 Control Center Make sure that you have installed and set up the DB2 Control Center before performing these steps. see Installation of the DB2 Control Center [Page 61] and Setting Up the DB2 Control Center [Page 62]. 6. Choose Backup now. 112 July 2006 . . including the correct backup target. Start the DB2 Control Center 2. In the dialog box that appears. Log on to the database server as user db2<dbsid>. enter the required values. 1. 3. From the context menu of <DBSID> choose Backup → Database… . see Installation of the DB2 Control Center [Page 61] and Setting Up the DB2 Control Center [Page 62]. 4.. enter the following command: db2_all "<<-n< db2 backup db <DBSID> . From the context menu of <DBSID> choose Open → Database Partitions…. Choose Backup now. 5. choose Backup…. Fore more information. 3.. A job will be generated that can be monitored using the DB2 Control Center Journal. 4. In the dialog box that appears. Enter the backup command for the catalog node: db2_all “<<+n< db2 backup db <DBSID> …” For the complete syntax check the DB2 documentation and replace n wit the catalog node number (the default value is 0). Start the DB2 Control Center 2. " DB2 Control Center Make sure that you have installed and set up the DB2 Control Center before performing these steps. 3. Backing Up a Multi-Partitioned Database You can perform these actions either using the DB2 command line or the DB2 Control Center. To back up all other nodes in parallel.. DB2 Command Line 1. enter the required values. From the context menu of the node number where the system catalog resides (default: 0).

19990817150714. see db2ckbkp . It can also be used to display the meta data stored in the backup header in order to determine information about a particular backup image.NODE0000.3 Integrity of Backups The db2ckbkp utility allows the user to test the integrity of a backup image on disk or tape and determine whether or not it can be restored.5.krodger. db2ckbkp SAMPLE. To reduce the amount of time that the database is not available.* If the backup resides on TSM.4. which reduces the amount of time required by the ROLLFORWARD utility to recover the database. consider using online backups. It also reduces the chance of a log file not being available (corruption or loss).4 Frequency of Backups and Time Required You should take full database backups regularly.001) must be specified first. regardless of how often log files are archived.DB2 Check Backup Utility [Page 166]. 5. When checking multiple parts of an image. the first backup image object (. A recent full backup means that there are fewer archived log files to apply to the database in case of recovery. One or more parts of an image can be checked. refer to the information about db2adutl and db6adutl provided in Managing Backups and Logs Archived on TSM [Page 131]. You can only use an online backup for recovery if the database log files that are created during the online backup are available.4. July 2006 113 . You can use the utility as follows: If the full backup consists of multiple objects. For more information about the db2ckbkp utility.0.CTN0000. the validation will only succeed if db2ckbkp is used to validate all of the objects at the same time.

• Standby database for backup purposes For information about using tool db2inidb as a standby database for a backup. 114 July 2006 . you can use incremental or delta backups. • Backup by file system copy For information about using tool db2inidb as a mirror for a file system-based backup. see The db2inidb Tool [Page 132].5.4. For more information. see the IBM documentation Data Recovery and High Availability Guide and Reference.5 Advanced Backup Techniques The following list provides information about advanced backup techniques: • Incremental or delta backups To reduce the backup and restore time. see The db2inidb Tool [Page 132].

enter the following command: db6util -r <tabname> To perform RUNSTATS on all tables specified in the file.1 The db6util Tool The db6util tool contains a collection of utility routines that are mainly used during the SAP system upgrade. is displayed. Database Lock Overview db6util helps to analyze database lock wait situations by extracting all involved processes from a snapshot for applications and displaying their dependencies in the form of a syntax diagram. Tablespace Free Space To generate a free space list for all tablespaces. Detailed information about those processes. enter the following command: db6util –sl July 2006 115 . enter the following command: db6util –f DB2 RUNSTATS Options • • To perform RUNSTATS on a single table. The following db6util options are also useful for database administration and troubleshooting and can be entered using the command line. • To display processes that are only involved in a deadlock situation. such as the last SQL statement that was executed or lock types. enter the following command: db6util –sd • To display all processes that are involved in a lock wait situation. you can call db6util –h from the command line.6 Advanced Tasks 6. enter the following command: db6util –rv Tables that are marked with an N in the ACTIVE column in table DBSTATC are not affected by this option. The results or messages generated by all db6util commands may be redirected by the command options [ -o <log file> ] or [ -w <resultfile> ] . To generate a complete list of all db6util options. create a file containing a list of tables and enter the following command: db6util –rf <filename> • To perform RUNSTATS on all tables that were temporarily marked as VOLATILE in the database and to remove the VOLATILE attribute from the tables after RUNSTATS has run.

You can access these logs by choosing Journal. On multi-partitioned systems.conf file. A list of actions is displayed with start and end time. you can recreate it by entering the following command: dscdb6up –create <sap<sapsid>/sapr3 password> <<sapsid>adm password> The operating system passwords are not changed when you use the -create option. To access the journal: . You can display completed tasks. If you want to see an action that took place more than seven days ago. If you inadvertently delete or destroy file dscdb6. 116 July 2006 . choose Journal. 1. and the operating system password. 3.. In the Log File Management. Log on as user <sapsid>adm. Enter the following command: dscdb6up <user> <password> This command updates the contents of the dscdb6.conf. initializing tapes and also display tasks still running. Enter: db6util –sd [sleep time] [number of snapshots] db6util –sl [sleep time] [number of snapshots] For more information about the syntax of db6util. 1..Tool to Assist Database Administration [Page 169]. which must not be modified manually. category and return message. return code (RC). see db6util . Tape Management or Log File Maintenance dialog box. such as archiving or restoring log files. 6. Choose the radio button with the category of actions you want to browse. 2. you can use the Back button to go back in steps of seven days. this must be done on all database nodes. 6. In addition. you can display the logs of the user exit.Both commands can be executed with additional parameters to take snapshots periodically.2 Setting and Updating Passwords You can set and update the password of the users <sapsid>adm and sap<sapsid> or sapr3 (for systems up to and including 4..3 Using the Journal in the DB2 Control Center Extensions Most tasks in the DB2 Control Center Extensions are logged in the Admin DB. 2..6D) using the command line: .

you can archive log files either automatically using the User Exit or let the User Exit copy them to the archive directory. Choose an action from the list.4. choose Refresh. you have to restore them into the retrieve directory as described in Log File Restore of the SAP Database [Page 148]. To update the list of actions with the most current data. July 2006 117 . 6.4 Advanced Log File Management Tasks As outlined in Basic Concepts [Page 23]. From this directory you have to archive them as described in Archiving Log Files from Disk to Tape or TSM [Page 98]. The detailed output of that action is displayed in the Description group box. If you need archived log files for a roll-forward recovery. The Admin DB ADM<DBSID> keeps track of the current location of the log files.

If you retrieve log files. Using the DB2 Control Center Extensions . you must manually delete the entry for the tape from the Admin DB. 3. For details on how to delete these log files. The Logfile Maintenance dialog box appears. see Deleting Special Log Files [Page 118]. see Deleting Tapes from the Admin DB [Page 120]. 2. The Log File Management dialog box appears.4. tape. These particular log files need to be deleted manually from the Admin DB..1 Deleting Special Log Files Use You use the following procedure to delete log files that can have a special status. From the context menu of <DBSID> choose SAP Logfile Management. storage management products and any other backend using a customer script. The log files can be maintained in special dialogs. • 6. In this case. Choose Log File Maintenance… . Procedure You can delete (or maintain) these special log files using either the DB2 Control Center Extensions or the DB2 command line. they have two locations assigned − the retrieve directory (DB2DB6_RETRIEVE_PATH) and the archive location (for example. 1. However. archive directory.As outlined in Deleting Log Files [Page 101]. 118 July 2006 . on tape). enter user <sapsid>adm or db2<dbsid> and the corresponding password. For more information.. In this case log files with the same sequence number are created again. If required. This can happen if you restore a database without rolling it forward to the end of the logs. 4. you can delete log files from the log directory. 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. In the Admin DB the old log files are marked as invalid. they have two locations assigned. Tapes can become unreadable or can be lost. A log file has the status invalid. The status of these log files can be as follows: • • • If you archive log files and choose at the same time to leave them in the archive directory (DB2DB6_ARCHIVE_PATH). In the DB2 Control Center select the SAP database <DBSID>.

Select a range of log files you want to delete. restored Displays log files previously restored. from database Displays log files known to the Admin DB and which are marked as INVALID. enter the following command: brrestore –dr –out • To delete log files that are marked as INVALID. Using the DB2 Command Line • To delete log files from the archive directory that have already been archived but not removed from the archive directory. enter the following command: brarchive –do -out July 2006 119 . 8. Choose one of the three radio buttons: archived Displays log files previously archived and not deleted from the archive directory. Choose Delete. 6. 7.5. Choose the node where you want to delete or maintain log files. enter the following command: brarchive –ds –out • To delete log files from the retrieve directory that have been restored but not removed from the retrieve directory.

In general. because logically sequential data may be on different physical pages that are not sequential. 4. From the context menu choose Delete. consequently. In the navigation tree of the Tape Management dialog box. enter the following command: brrestore –dt –v PRD01 –out 6. you should use the DB2 reorganization utility (REORG) to rearrange the data in the tables and indexes and to remove the free space that is inherent in fragmented data. This means that the DB2 Database Manager has to perform additional read operations to access the data. In the DB2 Control Center choose the SAP database <DBSID>. The Attention dialog box appears.. Using the DB2 Command Line To delete tapes from the Admin DB.. 5. select the tape that you want to delete. 120 July 2006 .6. 1. If required. enter user <sapsid>adm or db2<dbsid>.4. deletes or inserts. Procedure Using the DB2 Control Center Extensions . Confirm the operation by choosing Yes. enter the following command: brrestore –dt –v <tape> -out To delete tape PRD01 from the Admin DB.2 Deleting Tapes from the Admin DB Use You use this procedure to delete tapes that have become unreadable or were lost from the Admin DB to keep the content of the Admin DB up-to-date. causing performance to deteriorate. Therefore. 6. 3. improvements in performance. newly inserted rows cannot be placed in the physical sequence corresponding to the logical sequence defined by an index. The result will be faster accessing of data and.5 Reorganization of Tables and Tablespaces Reorganization of Tables A table can become fragmented as a result of large numbers of updates. The Tape Management dialog box appears. From the context menu of <DBSID> choose SAP Tape Management. 2.

see the SAP Online Documentation in the SAP Library. the temporary tablespace. If no temporary tablespace is entered. which is used during the reorganization. thus increasing the free space. During the reorganization. particularly those for which reorganization is recommended. July 2006 121 . 16 KB or 32 KB). such as delta table size and the duration of the last reorganization. The job uses the external program dmdb6rts to reorganize all tables of a tablespace and to subsequently update the table statistics. table size or runtime. The selected tables are reorganized according to the order of the primary index using the DB6CLP tool.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. For more information. • Automatic REORG This job can be used to do automatic reorganizations of tables according to REORGCHK recommendations. must have the same size pages as the base tablespace. 8 KB. This temporary table will be at least as large as the original table. 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 109]. Keep in mind that you may be reorganizing a table within a temporary tablespace that is using pages larger than 4 KB (for example. you may want to reorganize all the tables of a particular tablespace to remove fragmented data. the DB2 Database Manager stores a working copy of the table in the tablespace in which the table being reorganized resides. The DBA Planning Calendar (transaction DB13) provides a utility allowing you to do this. You choose which of the proposed tables to reorganize. for example. This job is additionally controlled by user-defined limitations such as. This job displays a maximum of 100 tables recommended for reorganization as well as additional data. • 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. so you must make sure that the tablespace used for reorganization has at least sufficient free space to hold the original table. The table statistics are subsequently updated. • REORG of Tables in Tablespace(s) Sometimes.

change the name and structure of the database. This can involve changes to the number. Before you run the script. you can modify it. It reports any failure the restore process might encounter. back up the database and retrieve data on the container layout (1) using tool brdb6brt. 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). First of all. This script corresponds to the container layout of the database at the time of the backup. In this way. size or location of the containers for a restore to the same database (6 + 8). failures can be avoided before they occur. The script can then be adapted to the needs of the database to be restored (4).6 Redirected Restore The redirected restore tool brdb6brt retrieves a database backup and creates a CLP script for the restore of this backup image. The tool creates a backup of the database (3) and a CLP script for restoring this backup (2). Additionally. 2 Create brdb6brt 1 Retrieve Data & Backup DB Restore Script Create 3 Edit 4 Backup Image Redirected Restore 9 for homgeneous system copy Source DB Redirected Restore 8 DB Copy Customized Restore Script User 5 Create brdb6brt to change container layout Check 7 Create 6 Customized Restore Script The graphic above illustrates the tasks relevant to a redirected restore process. 122 July 2006 . for example. brdb6brt can serve to check the script (7).6.

Performing a Redirected Restore After the script has been edited. Change text during script generation if required. The DB2 Command Line Processor (DB2 CLP) provides an option allowing DB2 to read statements from a file. The backup is made online. Perform a homogeneous system copy. Enter the following command: brdb6brt –s SAMPLE –bm BACKUP –bpt ADSM 2 –ol Retrieving an Overview of the Container Layout If you want to have an overview of the layout of the database containers. You can also use this script for a restore operation if you have taken a backup of the database separately. The following sections provide example commands. see brdb6brt . Performing a Simple Backup You want to make a backup of the entire database to TSM with two sessions.Redirected Restore Tool [Page 160]. it has to be executed from the command line. you can create a restore script only. To do so for database SAMPLE as instance owner db2user with password PASS123. enter the following command: brdb6brt –s SAMPLE –bm RETRIEVE –user db2user –using PASS123 The script contains the current time as the backup timestamp. You will have to change the script to the timestamp of the backup image you created separately. Create a script for restoring certain tablespaces only. Retrieve an overview of the container layout. For more information about the syntax of brdb6brt. Change the container layout.6. Perform a redirected restore.1 Usage of Tool brdb6brt You can use the brdb6brt redirected restore tool to: • • • • • • • • • Perform simple backups. The source database is called SAMPLE. Move existing containers do other directories. This is called background mode.6. Check the restore script. Enter the following command: db2 –tvf <script file> July 2006 123 .

Forces the CLP to read the statements from the specified file. the database can have AutoStorage tablespaces as well as DMS tablespaces without AutoStorage. the script should now be executed. The database has one or more storage paths (that are database parameters) and automatically handles the space allocation for the automatic storage table spaces. You must not use it for tablespaces that are managed by DB2’s automatic storage management.. the backup splitted and stored in three separate directories.scr Changing the Storage Path The following procedure only applies if you are using AutoStorage tablespaces and a database that also has automatic storage enabled. To change the container layout.. the brdb6brt tool creates a script file of the name <DBSID>scr. 1. -v -f <file> If a backup and restore script of the database SAMPLE was created.scr and change the container’s location. 124 July 2006 .The parameters have the following meaning: Parameter -t Meaning Forces the CLP to use a semicolon (. Enter the following command: db2 –tvf SAMPLE. size and number. This can comprise changing the number of containers of a tablespace. You want to change the layout of the containers of your current database. If automatic storage is enabled for a database. To create the backup and the restore script.. where <DBSID> is the name of the source database. changing their sizes or their location in the file system.) as terminating character for an SQL statement.scr Changing the Container Layout The following procedure only applies if you are using DMS tablespaces. Edit the script SDB. 3. 2. By default. The DMS tablespaces without AutoStorage are handled as described under Changing the Container Layout. The following procedure is an example of of changing the container layout and storing the backup into three separate directories: . enter the following command: brdb6brt –s <DBSID> –bm BOTH –bpt Y:\BACKUPS1 Y:\BACKUPS2 Y:\BACKUPS3 Since the database is rather large. Forces the CLP to print each statement on the screen. restore the database using the following command: db2 –tvf <DBSID>. The use of this option is mandatory for the execution of the script.

.The following procedure is an example of changing the storage paths for the AutoStorage tablespaces and storing the backup into three separate directories: 1. To change the container layout.scr. Create the backup and the restore script by entering the following command: brdb6brt –s <DBSID> –bm BOTH –bpt Y:\BACKUPS1 Y:\BACKUPS2 Y:\BACKUPS3 Since the database is rather large. You also need to adapt the location of the backup image to the directory where the containers are available on the target machine. 3. This can be accomplished by copying them to the machine via ftp. Change the container’s locations. For this purpose the container locations have to be adapted.scr July 2006 125 .scr Performing a Homogeneous System Copy You want to copy your database to another machine. 1. enter the following command: brdb6brt –s <DBSID> –bm BOTH –bpt Y:\BACKUPS1 Y:\BACKUPS2 Y:\BACKUPS3 Since the database is rather large. restore the database using the following command: db2 –tvf <DBSID>.scr script and change the AutoStorage paths for the AutoStorage tablespaces. Make the backup images and the script available on the target machine. the backup is splitted and stored in three separate directories.. Restore the database by entering: db2 –tvf <DBSID>. 4. To create the backup and the restore script. the backup splitted and stored in three separate directories. To do so for the database SDB.. 2. 3. Edit the SDB. 2. proceed as follows: . Log on to the target machine and edit the script SDB.

The check allows scripts that perform full database or tablespace level restores. If you have a multi-partitioned database. for example. out of space situations.Creating a Script for Restoring Certain Tablespaces Only You want to back up one or more tablespaces rather than of the entire database.chk. The user running the check should be the user that will later run the script with DB2 CLP. missing write authorizations. enter the following command: brdb6brt –bm CHECK -ip SAMPLE.chk. The output is also saved to a file in the current directory. TBSPACE and TESTSP2. use the –nn <node number> parameter. Also. In this example.scr script. duplicated file names. If you use the –nn all option. you need to run brdb6brt for all partitions of your database. the database administrator now should be able to find errors in the script or on the database server system. So before running brdb6brt. The scripts created include the partition number. warnings with [W] and informational messages with [I]. To do so.scr The output from the check run shows possible errors. the check output would be written to file SAMPLE. To run a check on the SAMPLE. in most cases the DB2 instance owner (db2<DBSID>). The tablespaces for backup have the names USERSPACE1. Possible errors start with [E]. 126 July 2006 . which is mainly error and warning messages. The backup is done to TSM (three sessions). which prevents existing scripts from other database partitions from being overwritten. such as: • • • • • List of tablespace containers Information about used space Information about free space Information about missed space Information about required space in the DB2 log directory Especially on UNIX database servers you should be aware that new tablespace containers will be placed in the topmost existing directory and therefore in the underlying file system. the tablespace container layout (distribution of tablespace containers in the file system(s)) should be implemented by creating file systems. scripts for all database partitions are automatically created. The database name is SAMPLE. the script can be checked whether it would succeed on that machine. Enter the following command: brdb6brt –s SAMPLE –bm BOTH –bpt TSM 3 –tbs USERSPACE1 TBSPACE TESTSP2 Checking the Restore Script After the script has been edited. The restore script is created to restore only the specified tablespaces. restoring to a new or existing database is considered. directories and links to get sound check output. Additional information about the used file systems is provided. With the content of the check output. warnings and information about the redirected restore operation that the script will perform. The file name is the script name replaced by the file ending .

To move containers using the db2relocatedb tool.scr and change the autostorage paths for the autostorage table spaces 3.Moving Existing Containers to Other Directories for DMS tablespaces If you are using AutoStorage tablespaces and a database that also has automatic storage enabled. Furthermore.scr 3. proceed as follows: 1. 1. you must not use the following procedure.scr July 2006 127 . for example. you can create relocate scripts to move existing containers to other directories using the db2relocatedb tool. Move containers using the db2relocatedb tool by entering the following command: db2relocatedb –f SAMPLE. With brdb6brt patch 5 or higher. you can use these scripts to initialize mirrored databases with a modified container layout using the db2inidb tool and its parameter RELOCATE USING. To create the relocate script. it can have automatic storage table spaces as well as “normal” DMS table spaces. The database has one or more storage paths (that are database parameters) and automatically handles the space allocation for the automatic storage table spaces.scr Changing the Storage Path The following procedure only applies if you are using AutoStorage tablespaces and a database that also has automatic storage enabled. 2. To initialize the mirrored database. enter the following command: db2relocatedb –f SAMPLE. When automatic storage is enabled for a database. Create the relocate script by entering the following command: brdb6brt –s SAMPLE –bm RETRIEVE_RELOCATE 2. To change the storage paths for the AutoStorage tablespaces. You need to modify it according to your requirements. to create a database snapshot using the db2inidb tool. Edit the script SDB. The “normal” DMS table spaces are handled as described under Changing the Container Layout. enter the following command: brdb6brt –s SAMPLE –bm RETRIEVE_RELOCATE Script SAMPLE is generated. enter the following command: db2inidb SAMPLE as snapshot relocate using SAMPLE.

/db2/sample=/db2/sam 6. a new parameter –replace <ReplaceDefinition> was introduced. You can use this parameter to adjust the script output during its generation instead of adapting the output manually afterwards. For example. you cannot chain commands on the command line.Changing Text During Script Generation brdb6brt creates the scripts that are used to perform a redirected restore and to relocate the database (relocate DB script). 128 July 2006 . CLP accepts certain administrative commands like BACKUP DATABASE and SQL commands like SELECT. The script then needs to be adapted according to your requirements. The reason is that you can only access CLP on Windows by using a special command shell installed with DB2. With brdb6brt patch 5 or higher. However. It is actually a wrapper of the original CLP. On Windows you need a special environment to use CLP.7 Command Line Tasks Using db6clp DB2 UDB for UNIX and Windows provides the command line tool Command Line Processor (CLP) that allows you to administer your databases and instances as well as to access your databases via SQL. 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. Tool db6clp was developed specifically for this reason.

If A is specified. If –db switch is omitted. Prints out version and patch information of the tool. <DBSID> is assumed as the database name. or sapse<sapsid> on Windows. which are presented in the following table. This switch can only be used if the caller is one of the users db2<dbsid> or <sapsid>adm. If –db switch is omitted. Multiple commands can be specified by separating them with semicolons. -p -V <command> July 2006 129 . Thus the correct environment must exist for a successful run (DB2DB6EKEY must be set). -c Explicitly connects to the database given with the –db switch. an explicit connection to the database is only made if it is cataloged remotely. The command to be executed by DB2 CLP. -l -db Sets the environment DB2INSTANCE to this value before execution of the CLP command. the attachment is made using user sap<sapsid>. <DBSID> is assumed as the database name. This is applicable in multi-partitioned environments. user <sapsid>adm will be used. Option -a Meaning Explicitly attaches to the database instance before the command execution. Sets the partition of the database to which the command applies. There are other additional functions. The instance is the one to which the database given with the –db switch belongs. it is not necessary to call it in the special DB2 command shell on Windows. The password is retrieved using the password services of SAP systems for DB2. If this switch is specified without one of the –a and –c switches. The environment variable DB2NODE is set to the given value before the command execution. This switch can only be used if the caller is one of the users db2<dbsid> or<sapsid>adm.It allows you to chain commands by separating them with semicolons. If S is specified. For specification of S or A the same comments as for the –a switch apply. The tool is defined as an external command in the SAP system and can be used on all platforms. Furthermore. or sapse<sapsid> on Windows.

see the SAP Online Documentation in the SAP Library at SAP Web Application Server → Computing Center Management System → Background Processing. You can access information about lock waits by calling transaction ST04 and choosing Performance → Lock Waits in the navigation frame of the DBA Cockpit. choose Refresh. For more information about SQL. If you want to display data for the first time. For more information.The formal syntax of the command is as follows: db6clp -V | [-a S|A [-db <db name>] | -c S|A [–db <db name>] | -i <instance> | -db <db name>] [-p <partition>] <command> See also: • For more information about external commands. see the IBM DB2 documentation SQL Reference. see the SAP Online Documentation in the SAP Library.8 Monitoring Database Alerts For information about how to monitor database alerts. the second application gets the status lock wait. You can choose between the display layouts by using the list box Layout. see the IBM DB2 administration documentation Command Reference. As a result. • • 6.9 Monitoring Lock Waits and Deadlocks Monitoring Lock Waits A lock wait is a situation when one application updates or inserts a row without COMMIT and a second application tries to access this row. 130 July 2006 . For more information about DB2 CLP and administrative commands. 6. see the SAP Online Documentation in the SAP Library.

extract and delete backups and log files. and application 2 tries to access rows that are locked by application 1. The definition of kept versions and days must be performed on the TSM server and cannot be changed by the TSM client. for example. application 1 and application 2 update or insert different rows without COMMIT.Monitoring Deadlocks Deadlocks are situations where two or more applications block each other. DB2 Backup TSM Copy Group TSM backup copy group brarchive Default: TSM archive copy group.10 Managing Backups and Logs Archived on TSM TSM distinguishes between: • • TSM backup copy group A defined number of versions of each file is kept on the TSM server. TSM archive copy group Each file is kept on the TSM server for a defined number of days. 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. each waiting for the other(s) to release a lock. The following table shows which type of TSM copy group is used by DB2 and the Admin Tools. Then application 1 tries to access the rows that are locked by application 2. you should use the following tools: DB Backups Log Files saved with brarchive Log Files saved using the User Exit in Direct Mode db6adutl db6adutl TSM Backup Mode TSM Archive Mode db2adutl -- brarchive brarchive July 2006 131 . 6. If not present on the TSM server then TSM backup copy group User Exit in Direct Mode Default: TSM archive copy group. see the SAP Online Documentation in the SAP Library. If not present on the TSM server then TSM backup copy group To query. For more information.

see db2inidb Option: as mirror [Page 133]. tape.11 The db2inidb Tool DB2 tool db2inidb and the write suspend feature are new features of DB2 UDB for UNIX and Windows Version 7. Tool db2inidb in combination with hardware technologies like EMC Timefinder® or IBM ESS® provides the basis for fast backups or database clone creation.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 157]. 6. 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 157]. logs. For more information about TSM.com/support/storage_mgt/adsm/pubs/ For more information about where log files are archived to on the TSM server. see db2inidb Option: as snapshot [Page 136] 132 July 2006 . in a different directory on the same machine where the original file system is located or replace the current content of the original file system in case of failure. and load copy images saved using TSM. Additionally.To run the program db6adutl.tivoli. db2adutl allows you to check backups.2. The db2inidb tool provides the following options: • as mirror You use this option to create fast backups and fast database restores with nearly no system outage. • as snapshot You use this option to create database clones for quality assurance or test systems. For more information. EMC Timefinder® or IBM ESS® also provide functions to archive a split image to storage devices. see Indirect Archiving to TSM [Page 88] and Archiving Directly to TSM [Page 80]. for example. db6adutl is part of the Admin Tools and is installed in the following directory: • For 6. that is create a split image of a file system. use the instance owning user db2<dbsid>. see the TSM documentation at: www.NN Admin Tools UNIX: $INSTHOME/admintools/bin Windows: %INSTHOME%\admintools/bin • For 4. This split image can be mounted on a different machine. For more information. With these technologies you can split up an entire file system very fast.

Thus. All storage management systems are able to archive files from the file systems. Using this function you are not restricted to the destinations provided by the DB2 backup command. This means you save the time for a normal database restore from a normal DB2 backup image. see the IBM DB2 documentation Data Recovery and High Availability Guide and Reference. For more information. For more information. The procedures provided in the following sections are only intended for experienced DB2 database administrators. 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. The mount time of the split image is very fast compared to a normal database restore. Be aware that when using these options. July 2006 133 . see db2inidb Option: as standby for Hot-Standby Database [Page 139]. you may cause irrevocable data loss or unexpected system behavior. This means you have nearly no system outage during the backup of the split image.• as standby You use this option to: Create normal DB2 backups with nearly no system outage. For more detailed information about the db2inidb tool. You use this function to store all important DB2 files and database containers. see db2inidb Option: as standby for Backups [Page 138]. If you do not use these tools. 6. • Store log files to any storage management system. • Compress backups with the standard system command compress before archiving. Build up a hot-standby system that is synchronized over log files. For example. problems with the log file management tools might occur. To restore the database. the split image can be compressed before you archive it to tape. The creation of the split image is very fast if you are using hardware technologies such as EMC Timefinder® or IBM ESS®. The split image is created while the database is in write suspend mode. With DB2.1 db2inidb Option: as mirror Use You use the db2inidb tool option as mirror to: • Perform fast backups or restores. you mount the split image and roll forward the database.11. tape space and I/O bandwidth are saved.

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. enter the following command: db2 set write resume for database The database now allows full access again. Archive the split image. Performing a Restore 1. Log on to the database server as user db2<dbsid>. 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.. the current log files. which are contained in these directories. if the split image is mounted for a database restore. 4.Procedure Performing a Backup Ll. 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. 2. To switch the database mode to write suspend.. 134 July 2006 . This is important because. Create the split image. To switch the database mode back to normal operation. 3. Delete the Admin DB using the following command: db2 drop db ADM<DBSID> ii. To restore the split image using the storage management system tools. archive directory and retrieve directory. will be overwritten with the old log files contained in the split image. proceed as follows: i. enter the following command: db2inidb <DBSID> as mirror The database is now in rollforward pending mode. To do so. 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. 2. For indirect archiving: You have to recreate the Admin DB and restore required log files. 3. 1.

July 2006 135 . Perform a rollforward recovery to the end of logs as follows: a. By default. you can set the database manager configuration parameter DFTDBPATH to a different directory. the usability of the brrestore –delete option. Then the Admin DB is not contained in the split image and contains up-to-date information after the split image has been mounted. enter the following command: sddb6ins –r <latest_Admin_DB_backup_SAR_file> iv. you have to consider the following: If no normal database backup (that is a regular online or offline backup) was performed on the system. if the Admin DB has not existed so far. c. the Admin DB is created in the path specified by the database manager configuration parameter DFTDBPATH. for example. 4. Complete the rollforward recovery using the following command: db2 rollforward database <DBSID> to end of logs and complete If the operation was successful. You should reset parameter DFTDBPATH after sddb6ins –i was called. you have to correct the problem. by providing missing log files and repeating step a. Alternatively. To do so. You can use the redirected restore tool to move an existing Admin DB. 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>.iii. Log File Management Considerations If you want to use indirect archiving. the database should now be in the most current state and can be accessed again. to /db2/ADM<DBSID> before calling sddb6ins –i. Start the rollforward recovery using the following command: db2 rollforward database <DBSID> to end of logs b. the log files are assigned to the last backup made on the system. Restore log files required for rollforward recovery using brrestore. This affects. for example. Check if the rollforward recovery is complete using the following command: db2 rollforward database <DBSID> query status If the rollforward recovery is not complete. for example.

we strongly recommend that you use direct archiving. To avoid the log file deletion problem. you can specify a timestamp that is not a backup timestamp. brrestore option –force was introduced. The homogeneous system copy requires a full database backup and a redirected restore on the target system.. In the past it was necessary to copy a SAP system using the homogeneous system copy. This procedure can be timeconsuming if your source system is very large (for example.. 6. 2. If you use –force in conjunction with –delete <TS>. As an example. 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. 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 db2inidb Option: as snapshot Use You use the db2inidb option as snapshot to create a database clone for test or quality assurance systems from your production system.The brrestore –delete option requires that you specify a backup timestamp.11. the backup timestamp is not known to the Admin Tools. 1. The db2inidb tool option as snapshot allows you to perform a homogeneous system copy for large databases very fast. Procedure On the source system: . Create the split image. Since no normal backup is performed. 136 July 2006 . To switch the database mode to write suspend. 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. several 100 MB).

Prune the backup history file as the information included in that file is valid for the source system. is included in the split image. If the source system was configured for indirect archiving. To switch the database mode back to normal operation. 3. which uses circular logging (that is. 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. but the db2inidb <DBSID> as snapshot command only supports databases where LOGRETAIN is switched ON. Thus. you do not need to use the log file management tools.Make sure that the split image does not include the archive and retrieve directory. Before accessing the target database. All open transaction are rolled back and the target database can be accessed now.. you must delete the Admin DB on the target system. LOGRETAIN is switched OFF). To delete the Admin DB. The reason is that the Admin DB. Log File Management Considerations If you want to use the target system for quality assurance or test purposes. 2. July 2006 137 . Mount the split image using the storage system tools. online backups and rollforward recovery are not supported. To do so. however. you should perform the following tasks to clean up the target system. enter the following command: db2 set write resume for database The database now allows full access again. Be aware that all databases using circular logging are subject to some restrictions. enter the following command: db2 drop db ADM<DBSID> b. If you require these features on the target system. you should consider to set parameter LOGRETAIN to OFF and to use circular logging instead. you must reinstall and reconfigure the log file management tools on the target system. enter the following command: db2 prune history force . enter the following command: db2inidb <DBSID> as snapshot Alternatively. To initialize the database. if you want to change the container layout on the target system to distinguish it from the one on the source system. On the target system: 1. for example. 3. Prepare a standard SAP system environment for SAP databases using homogeneous system copy methods.: a.

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. 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. 4. Log on as instance owner. The backup image can be used to perform a redirected restore. To create a database instance using DB2 instance creation tool db2icrt.3 db2inidb Option: as standby for Backups Use You use the db2inidb tool option as standby to perform fast backups with nearly no system outage. 1. To start the database instance. The normal DB2 backup images offer the following advantages: • • • The backup image can be used to restore the database on a different hardware platform. enter the following command: db2 set write resume for database The database now allows full access again. where split images are used to back up the database. enter the following command: db2icrt <instance_owner> 2.. Procedure Performing a Backup On the source system: . The backup image can be used to restore the database into a newer DB2 version. On the target system: 1. Archive the split image. In comparison to the db2inidb option as mirror. especially if you are using hardware technologies such as EMC Timefinder® or IBM ESS®.6. Create the split image. for example to build up a quality assurance or test system on a new database version. 3. 2. enter the following command: db2start 138 July 2006 .11.. normal DB2 backup images are created. To switch the database mode back to normal operation. Backups and restores are simply performed with standard DB2 commands. To switch the database mode to write suspend.

To avoid the log file deletion problem. Allow a fast recovery from logical failures. brrestore option –force was introduced. the log files are assigned to the last backup made on the source system. the restore procedure is equivalent. Initialize the standby database using the following command: db2inidb <DBSID> as standby 5. Mount the split image. The brrestore –delete option requires that you specify a backup timestamp. that is you create a hot-standby database. for example.4 db2inidb Option: as standby for Hot-Standby Database Use You use the db2inidb tool option as standby to synchronize two databases using log files. Since no normal backup is performed. As an example. If a logical error is detected on the source system. Hot-standby database systems are used to: • • Avoid long restore operations after a hardware failure. 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. Recreate the database from the split image: a. In this case. the following command would delete all log files before 1 January 2003: brrestore –delete 20030101000000 –force 6. The hot-standby database buffers are allocated and filled with the most recently changed data pages. you have to consider the following: If no normal database backup (that is a regular online or offline backup) was performed o the system. The backup performed on the standby system is not listed in the backup history of the source system. you July 2006 139 . you can specify a timestamp that is not a backup timestamp. To create a database online backup using the DB2 backup command. the backup timestamp is not known to the Admin Tools. Log File Management Considerations If you want to use indirect archiving.4. b. Thus. the usability of the brrestore –delete option. the hot-standby system is kept in a state with a defined time delay compared to the source system. This affects. If you use – force in conjunction with -delete <TS>.11.

can switch to the state of the hot-standby system that may not have applied this logical error. Overview of Standby Databases If Direct Archiving Is Used source system hot-standby system source database hotstandby database log_dir db2uext2 ARCHIVE Storage Management System log_dir db2uext2 RETRIEVE 140 July 2006 . source system hot-standby system source database log file copied on regular basis hotstandby database log_dir log_dir The following graphics show the differences for direct or indirect archiving. The setup can be as follows: The source database works normally. The hot-standby database is in roll-forward pending mode. All log files are created on the source database and are copied to the hot-standby database using the ROLLFORWARD command as shown in the following graphic.

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. The other 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.Overview of Standby Databases If Indirect Archiving Is Used source system hot-standby system source database hotstandby database log_dir Admin DB Admin DB log_dir db2uext2 ARCHIVE log_archive brarchive standby_dir db2uext2 RETRIEVE without DB copy log file on regular basis log_archive backend Procedure The following procedures describe the end of log scenario. July 2006 141 . • If you are using direct archiving: The central point for the log files is the storage management system. Preparing the Source Database • If you are using indirect archiving: Configure environment variable DB2DB6_STANDBY_DIR in file init<DBSID>. works according to the end of log scenario. that is recovering from logical failures. No further action is required.

The User Exit then retrieves the latest log files with the log file number requested by the database engine during roll-forward recovery.. On the hot-standby system: 1. you have to activate this flag. 2. 1. 2. 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. Create the database by mounting the split image from the source system. Drop the Admin DB using the following command: db2 drop db ADM<DBSID> The Admin DB of the hot-standby system is empty until the system failover.Creating an Initial Hot-Standby Database Version On the source system: Create a database snapshot of the source system that is used as the starting point for the hot-standby system: . Preparing the Hot-Standby Database If you want to use indirect archiving: 1... 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. enter the following command: db2 set write resume for database The database now allows full access again. To enable the User Exit to retrieve log files during rollforward recovery. To switch the database mode back to normal operation. Archive the split image. To switch the database mode to write suspend. the archive directory and the retrieve directory. 142 July 2006 . Set environment variable DB2DB6_UEXIT_RETRIEVE_WO_DB in file init<DBSID>. The Admin DB on the hot-standby system does not have any knowledge about log files created on the source database.. Create the split image.db6 to ON. Initialize the hot-standby database using the following: db2inidb <DBSID> as standby The open transactions are not rolled back and the hot-standby database is now in rollforward pending mode. 3. 2. . 4.

To start the rollforward recovery. for example. 1. you perform a rollforward recovery to the end of log files on the hot-standby system. you have to perform the following tasks on a regular basis. you have to configure the same NODENAME (TSM configuration parameter) on the hot-standby system as on the source database. To check if the rollforward recovery is complete. Switching Over to the Hot-Standby Database System If you are using direct archiving. the hot-standby database is now in the most current state and can be accessed again. If you want to use indirect archiving: • In most cases. Keeping the Hot-Standby Database in Synchronization with the Source Database To keep the hot-standby database in synchronization with the source database. enter the following command: db2 rollforward db <DBSID> query status If the rollforward recovery is not complete. where the source database had stored them. you have to transport the log files from the source database system to the hot-standby system. • If you want to use direct archiving: You perform a rollforward recovery on the hot-standby system (without the stop/complete option) using the following command: db2 rollforward db <DBSID> to end of logs The User Exit then retrieves the required log files directly from the storage management system.If you want to use direct archiving: If you are using TSM. you have to correct the error. If this is not the case. July 2006 143 . enter the following command: db2 rollforward database <DBSID> and complete If the operation was successful. To stop the rollforward recovery. Perform a rollforward recovery on the hot-standby system (without the stop/complete option) using the following command: db2 rollforward db <DBSID> to end of logs • Delete log files that have already been applied to the hot-standby database using rollforward recovery and that have already been archived on the source system using brarchive. enter the following command: db2 rollforward db <DBSID> to end of logs 2. the standby directory (DB2DB6_STANDBY_DIR) of the source database is a shared file system pointing to the archive directory of the hot-standby database system (DB2DB6_ARCHIVE_PATH>/<DBSID>). 3. by providing missing log files and repeat step a.

In directory <DB2DB6_TEMP_DIR>/adminDB_<DBSID> that is located on the source system. enter the following command: sddb6ins –r <SAR file> 2. Recreate the content of the Admin DB on the hot-standby system using the latest Admin DB backup SAR file. 1.. To start the rollforward recovery. If the Admin DB backup SAR file is not in one of these locations or cannot be accessed.. You can find the latest Admin DB backup SAR file in one of the following locations: In the standby directory (DB2DB6_STANDBY_DIR). you have to perform an emergency restore using brrestore –ex. enter the following command: db2 rollforward db <DBSID> query status If the rollforward recovery is not complete. To recreate the content of the Admin DB. for example. enter the following command: db2 rollforward db <DBSID> to end of logs b. c. the Admin DB of the hot-standby database does not contain any information about log files and database backups before the system failover. To check if the rollforward recovery is complete. 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. you perform the following tasks on the hot-standby system: . Thus. To complete the rollforward recovery.db6 file. Perform a rollforward recovery to end of log files. you have to correct the error.If you are using indirect archiving. 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>. 144 July 2006 . Log File Management Considerations If you are using indirect archiving. by providing missing log files and repeat step a. The system failover is relatively complex and error-prone. a. we recommend that you use direct archiving.

To activate this change. 6. If you use indirect archiving. 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..13 Adjusting the Content of the Admin DB Use You adjust the content of the Admin DB by using the brarchive option –GAL. 1. the Admin DB keeps track of only one log file.2. Procedure To adjust the content of the Admin DB. Enter: db2 update db cfg for <DBSID> using MIRROR_LOGPATH <second log directory> 2. To activate dual logging on DB2 UDB for UNIX and Windows Version 8. 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. To activate dual logging on DB2 V7: Set. proceed as follows: 1. 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. restart the instance.6. 2. Set DB configuration parameter MIRROR_LOGPATH. DB2 calls the User Exit just once for each log file regardless if dual logging is activated or not.. restart the instance. brarchive stores only one log file. which are normally only in the log directory. July 2006 145 . Set DB2 instance registry variable DB2_NEWLOGPATH2 using db2set.12 Dual Logging Dual logging is a new feature of DB2 Version 7. This means that the log files are not archived twice. It provides the option to keep two copies of the log files. To activate this change.

these log files will be treated like log files that have not yet been archived. 146 July 2006 . they will then be archived again. • -GAL revert With this option.• -GAL remove Log files that are assumed to be in the archive directory but do not exist there are removed from the Admin DB. The next time brarchive is run to archive log files. 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.

When the rollforward recovery method completes successfully. but a tablespace does not. you could either restore a nonrecoverable database. or to a particular point in time. In a partitioned database environment. A database must be restored successfully before it can be rolled forward. The DB2 Database Manager ensures that an incorrect log is not applied during rollforward recovery.1 SAP Database Recovery If you are using a full database backup as a basis. A database rollforward runs offline. that is. the last log that was used by rollforward is truncated. you can choose to have DB2 apply all the units of work for any or all of the tablespaces in the database. The practical effect is that any log in the log directory with a sequence number greater than the last log used for rollforward recovery is re-used. During the restore phase. You can specify that roll-forward recovery is done to the end of logs. roll-forward recovery re-applies the completed units of work recorded in the database logs to the restored database. If the active log file is not sufficient for a recovery. and logging begins with the next sequential log. You can. a copy of the SAP database and SAP database logs is needed for recovery. The database administrator db2<dbsid> or the SAP system administrator <sapsid>adm can restore or rollforward the database. it is not available for use. To restore a database without rolling forward. and not at the tablespace level. however. perform an online rollforward of tablespaces as long as SYSCATSPACE is not included. The restore command can be entered from the command line processor. You have to make a copy of the logs before executing the ROLLFORWARD command if not already done by the User Exit program. up to any point within the time period covered by the logs ROLLFORWARD recovery. tablespace or tablespaces. but the other tablespaces in the database are. When you perform an online rollforward operation on a tablespace. or you could specify the WITHOUT ROLLING FORWARD parameter for the restore utility. a database that uses circular logging. July 2006 147 . the db2uext2 interface will be called with the RETRIEVE request to get the missing log file. the rollforward must be issued from the catalog node of the database.7 Emergency Tasks 7. Restoring Databases from an Offline Backup Without Rolling Forward You can only restore without rolling forward at the database level. or by specifying STOP on the ROLLFORWARD command. The database is not available for use until the rollforward completes either by reaching the end of the logs during a tablespace rollforward. but it cannot detect the location of the required log. DB2 Command Center or DB2 Control Center. As long as all the log files are available covering the time period from the time of the backup through to the current time.

If required. for example.2 offers the new command RECOVER DATABASE that combines the functionality of the RESTORE DATABASE and ROLLFORWARD DATABASE command. The timestamp in the log uses the Coordinated Universal Time (CUT). You can start with any backup as long as you have the logs associated with and following that backup. when you call the ROLLFORWARD command. From there the User Exit is able to retrieve log files to the online log directory.. you must specify the time in CUT. CUT helps to avoid having the same timestamp associated with different logs. 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. Restoring Log Files with the DB2 Control Center: To restore the log files. Using this command. The Logfile Management dialog box appears. 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. choose SAP Log File Management. TSM or any other backend where you archived log files to using customer script) either with the brrestore tool or with the DB2 Control Center Extensions for the SAP system. If you choose to restore from storage into the retrieve directory. you specify a point-in-time to which the database should be recovered. you can restore log files either automatically using the User Exit program or you have to restore them from the retrieve directory. The timestamp used on the backup is based on the local time that the backup started. A log uses a timestamp associated with the completion of a unit of work. because of a change in time associated with daylight savings time. 148 July 2006 . enter user <sapsid>adm or db2<dbsid>. You do not have to indicate which backup image must be restored or which log files are required to reach the specific point-in-time. In the navigation frame of the DB2 Control Center.Restoring Databases and Tablespaces and Rolling Forward You do not have to recover your database with the latest backup copy of the database. As a result. 2. use one of the following procedures. 7. 1. Restoring Databases Using the New RECOVER DATABASE Command DB2 version 8.. You can restore log files from storage (tape. proceed as follows: . from the context menu of the SAP database.2 Log File Restore of the SAP Database As outlined in Basic Concepts [Page 23].

All available log files for the selected backup are displayed together with the number of locations on which they are stored. 5. Due to a program limitation. Choose Restore. Choose the node where you want to restore log files. 4. In the Restore logiles taken at group box select a log file range to be restored. To determine which log files are to be restored.3. choose a backup date. 6. the oldest log file must be at the start of the range. July 2006 149 .

Log File Retrieval Tool [Page 163]. choose Restore.7. If there are still log files left to be restored. The -a arguments (shown in the following tables) must be log file numbers and not log file names. To start restoring from the selected location. For more information about the syntax of brrestore. see brrestore . All restore actions and their results can be seen on the Journal screen. 150 July 2006 . The Select Location dialog box appears. The following tables describes the most common usage of brrestore. the Select Location dialog box reappears again and you have to repeat the process for all different locations where necessary. choose Start. Choose the location to be used for the restore process. 9. a dialog box appears displaying a success message. Restoring Log Files with the Command Line Tool brrestore brrestore can be used to retrieve any log file archived using brarchive. an emergency restore can be attempted. A dialog box appears informing you that the restore process has been started. All log files that can be restored from the chosen location are displayed. you have to choose a tape device in the Select tape drive field. 8. To start the restore procedure. The best location is the default value. Calling brrestore on the command line gives the administrator access to all command line options and may therefore be more flexible than using the DB2 Control Center. After the restore has finished. If you choose a tape location from where all matching devices are retrieved. although we do not recommend this action. If this fails. If so. a check is made whether all selected log files were restored.

Restoring Log Files From TSM Command syntax Description brrestore -a 110-120 -d tsm –out –sid SAPSID This command tries to retrieve the log files with the numbers 110 to 120 from TSM. July 2006 151 . 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. Messages are written to the standard output file and a protocol file. Do not use an emergency restore for normal management purposes. Emergency Restore of Log Files Using brrestore -ex Use this procedure either when both the Admin DB and the SAP database have been destroyed or normal log file retrieval methods fail. Messages are written to the standard output file and a protocol file. Restoring Log Files Archived Using Customer Script Command syntax Description brrestore -a 110-120 -d script –out –sid SAPSID This command tries to retrieve the log files with the numbers 110 to 120. which where archived using your own script. and then use the standard restore command brrestore -a as described in the tables above. as the Admin DB is not updated. Prerequisites • • The SAP database has been restored from a backup and left in ROLLFORWARD_PENDING state. We recommend that you first recover the Admin DB if necessary.Restoring Log Files From a Tape Command syntax Description brrestore -a 110-120 -d tape -v D4XA99 –out –sid SAPSID This command tries to retrieve the log files with the numbers 110 to 120 from tape D4XA99. Messages are written to the standard output and a protocol file.

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. enter the following command: brrestore -d tape –ex "*" -t /dev/nmt0. 2. Put the files where DB2 or the User Exit expects to find them (log_dir.. enter the following command: brrestore -q <file pattern> { -d tsm | -d tape -t <tape address> | -d script } 3. see brrestore . 1. 2. log_archive or log_retrieve directories. 152 July 2006 . To restore all files from a tape on Windows. That is.Log File Retrieval Tool [Page 163].. log_retrieve) and continue the rollforward recovery. To find out where these files are located. To restore the log files from the archive. which log files were created after the backup was taken but are currently not in the log_dir.. brrestore If you do not currently have access to the Admin Tools. determine which log files are not yet available but will be required for the recovery process. After restoring the SAP database and starting the rollforward recovery.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. 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 153]. DB2 Control Center . you can restore the log files completely independently of the DB2 Control Center and the Admin DB.Procedure You can perform the following procedures using either the DB2 Control Center or brrestore. . This procedure allows you to retrieve log files and Admin DB backups directly from tape or TSM. Use the DB2 Control Center Extensions to restore the log files from TSM or tape as described in “Restoring Log Files” in this section. 1. enter: brrestore -d tsm -ex "S00001*" 199711 For more information about the syntax of brrestore and non-rewind addresses..

brarchive does this export and archiving automatically after successfully archiving one or more log files. If the Admin DB still exists. for example. this is the fastest way of recovering or recreating the Admin DB. It is not essential but useful to prune the DB2 backup history file (PRUNE…).SAR) made up of individual table exports. You can deal with these situations as follows: • You create a new Admin DB and take a backup of the SAP database. to recover them. To make sure that the Admin DB ADM<DBSID> can be recovered. This database backup image does not contain job information such as the one shown on journal pages in the DB2 Control Center. Perform a full backup of the SAP database. The Admin DB data itself may need to be recovered for the following reasons: • • The Admin DB is lost or damaged. call sddb6ins –i.7. If you do not need the old log files.. you must create a new empty Admin DB. The SAPSID and DBSID must remain unchanged. you must recover the Admin DB from a safety copy as described below. If the Admi. July 2006 153 . Otherwise.3 Recovery of the Admin DB 7. To recreate an empty Admin DB.1 General Information The Admin DB contains information about objects such as log files and their locations. • You recover the Admin DB from a safety copy. Make sure that the SAP database parameters LOGRETAIN and USEREXIT are both set to ON. a. an export of essential information from that database is archived to the same target as the log files just archived. c. on a test system. Otherwise. This information is required to process these log files. The SAP system is being moved or a duplicate SAP system is being set up on another machine.3. This data is lost when ADM<DBSID> is recreated using this image. This database safety copy is not a database backup but a compressed archive file (adminDB<timestamp>.. for example. d. drop it using the following command: DROP DB ADM<DBSID> b.

To retrieve the above mentioned safety file(s) to the current working directory. all safety files will be retrieved. Admin DB backup images are also stored using a customer script.*.SAR to retrieve all safety files of the Admin DB archived on August 26. To find the most recent file. the number of files is reduced. 2000.SAR as the file pattern. restore the safety file of the Admin DB from the current tape to the current working directory using the following command: brrestore –d tape –ex <file pattern> -t <non rewind addr> -out <non rewind addr> is the non-rewind address of the tape for restoring from tape.20000626*. enter the following command: • For TSM: brrestore –d tsm –out –ex “adminDB.SAR) should be located in subdirectory <DB2DB6_TEMP_DIR>/adminDB_<DBSID>. You can restore the SAR file from TSM using the following command: brrestore –d tsm –ex <file pattern> -out • Customer script: If the database logs were archived using a customer script. For more information about non-rewind addresses. You need to restore the SAR file manually from where the customer script has stored it. 2. 1..7. You can use the pattern adminDB. Customer Script or Tape) A copy of the latest Admin DB safety copy export archive file (adminDB. Retrieving the Admin DB backup image from archive. • TSM: If the database log files were archived to TSM.2 Recovery Process The recovery process consists of the following steps: Re. If you specify a part of the timestamp in the file pattern. This pattern reduces the number of log files that are to be retrieved. Retrieving the Admin DB Backup Image from Archive (TSM.3. If this file is available.SAR“ 154 July 2006 . Admin DB backup images are also stored there.SAR“ • For tape: brrestore –d tape –out –ex “adminDB. • Tape: If database safety copies (and log files) are archived to tape.20000626*. Recreating the Admin DB using sddb6ins or manually. If you specify adminDB.20000626*.<timestamp>. see brrestore – Log File Retrieval Tool [Page 163].. it may be necessary to retrieve several or all SAR files from TSM. you do not need to recover the Admin DB backup image from storage and you can continue with “Recreating the Admin DB” described further below in this section.

enter the following command: On UNIX: a. enter the following command: sddb6ins –I On Windows: Log on to your database server as user <sapsid>adm and enter the following command: sddb6ins –i –db2dbnamepwd <password of user db2<dbsid>> 2. • It extracts SAR file. Create the Admin DB using sddb6ins. to the Admin DB. Recreating the Admin DB Manually 1. Import IXF files using the db2move tool. 2. On Windows: As user <sapsid>adm. • It adds backups.SAR 3. Log on to the database server: On UNIX: As user <sapsid>adm and switch to user root (su root). To recreate the Admin DB step-by-step from the SAR file. enter the following command: sddb6ins –r <file name> sddb6ins –r adminDB. Extract the SAR file using the following command: SAPCAR –xvf adminDB.Recreating the Admin DB The Admin DB can be recreated either using program sddb6ins or manually.<timestamp>. which were made after the SAR file has been created. The reason is that these log files are moved to log_archive after the SAR file has been created. July 2006 155 . • It imports IXF files from SAR file.20000626123504. Log on as user <sapsid>adm and switch to user root using the following command: su root b. • It adds log files from log_archive that are not known to the Admin DB to the Admin DB. Recreating the Admin DB Using Program sddb6ins 1.SAR This command performs the following actions: • It creates the Admin DB. To do so. As user root.

–Rows committed.DB6IDENTIFIER IMPORT: -Rows read: SAPR3. –Rows committed.4. 19 Table: 774 Table: IMPORT: -Rows read: 1774. Enter the following command: db2move ADM<DBSID> IMPORT –io INSERT_UPDATE This command performs the following actions: Backups that were made after the SAR file was created are added to the Admin DB (brarchive –q backups –out). The reason is that these log files are moved to log_archive after the SAR file has been created (brarchive –GAL add –out). –Rows committed.msg. call db2move as user <sapsid>adm from the directory where the archive was unpacked. As a result.DB6LFSTATE All errors and warnings are recorded in the table-specific message files named tab?. 1774 Table: SAPR3. 156 July 2006 . Log files that are not known to the Admin DB are added from log_archive to the Admin DB. To import the original data. 2109 Table: SAPR3. backups that are made after the SAR file has been created are added to the Admin DB using the following command: brarchive –q backups –out Tool db2move also adds log files that are not known to the Admin DB from log_archive to the Admin DB using the following command: brarchive –GAL add –out. The output of the db2move command can be as follows: IMPORT: -Rows read: 2109. 774.DB6CONFIG IMPORT: -Rows read: SAPR3.DB6LOGFILE 19. The reason is that these log files are moved to log_archive after the SAR file has been created. db2move is located in the DB2 directory misc. –Rows committed.

Log File Archive Tool July 2006 157 .Appendix A: Tool Command Line Parameters brarchive .

<subcommand> can be replaced by one of the following: • • • show Displays the tape volume name (default). Removes original copies from disk. <type> can be replaced by one of the following: • • backups Displays the timestamps of all known backups.Command Parameter Actions Parameter -h -help -V -Version -do -dt Displays the application information and library version information if -d is specified. set Re-initializes the old archive tape. Tape only: Same as –ss action but removes original copies from disk. Similar to -i show -ss -ssd -ds -q <type> -query <type> 158 July 2006 . For tape. Stores and deletes log file(s). also specify –v and –t. Deletes stored log file(s). For tape. Stores each log file twice to backend. You use this option if the tape is lost or is physically damaged. Files are not deleted on disk after they are archived. Deletes obsolete files. For tape. Deletes tape with label volume from the Admin DB. For tape. check Displays detailed information about a tape. force Initializes the new tape or re-initializes the old tape containing the active log files.. also specify –v and –t. -i <subcommand> -initialize . Successfully archived files are deleted from disk. Action Displays the application command line syntax. also specify –v. Files are not deleted on disk after they are archived. also specify –v and –t.. -s -sd Stores log file(s).

the trace is normally turned on in the init<DBSID>.. -d tsm can be followed by a single TSM management class or by two TSM management classes separated by ‘+‘. The oldest files are processed first. <level> is a value between 1 (low detail) and 9 (high detail). -vndlib <lib> SAP system ID to which the operation applies Tape only: Tape device(s). -v <volume> [<vol2>] -volume .Command Parameter Modifiers Modifier -d <device> -device <device> Description Device to archive files to retrieve files from tape. -DEB [<level>] -one -out Without this parameter no output is displayed except -h and -V.. -out must be specified. /dev/rmt/0 on Solaris. No automatic tape eject after successful archive operation Displays the protocol on the command line (stdout). tsm or any other backend using a customer script. Switches on trace. File name (including path) of the vendor library to load brarchive and brrestore only automatically display output with -h and -V. Node on which to perform processing or all nodes on which to perform processing. The default value is NODE0000. However.db6 file. -n <number> -number <number> -node NODExxxx -node ALL Maximum number of log files to process. -sid <SAPSID> -t <device> [<dev2>] -tape_device . Tape only: Volume name(s) on tape(s). Two arguments are required for -ss and –ssd.. This parameter is only required with multi-partitioned systems. for example. To display the output for other actions. Two arguments are required for -ss and –ssd. The numerical argument does not refer to a log file number.node ALL cannot be used with all actions. July 2006 159 . ..

use the following syntax: Command Parameter: Parameter -V -h -bm BACKUP -bm RETRIEVE Description Displays the version information (patch level) brdb6brt. 160 July 2006 . Backup/Retrieve Mode To create a backup or a restore script. Creates the restore script for the specified database only.Redirected Restore Tool brdb6brt runs in the following four modes: • • • Backup/retrieve Check Tool information The following sections provide syntax examples of each mode. Displays an overview of the command line options of brdb6brt. Creates a backup of the specified database only.brdb6brt .

The default value is 1024. string 1>=<repl. use option –nn ALL. Backup operation is done online. in 4 KB allocation units. -bm BOTH and –bm RETRIEVE RELOCATE. Size of the buffer for the backup operation. specify a valid tape device. Creates the relocate script for the specified database. You can split the backup into multiple pieces by specifying multiple devices separated by blanks. Number of buffers reserved for the execution of the backup. July 2006 161 . string 2>. string 1>. the timestamp in the restore script is set to this value which must be in the form YYYYMMDDhhmmss.<orig. If specified. Directory where the restore script will be written to. Parameter ReplaceDefinition must have the format <orig. The protocol file is named <SourceDB>.-bm BOTH -bm RETRIEVE RELOCATE -s <SourceDB> -pp <ProtocolPath> Creates a backup of and the restore script for the specified database. only comments that are really needed are included. -i <ScriptPath> -nb <NumberOfBuffers> -bs <BufferSize> -es -ol -ts <Timestamp> -replace <ReplaceDefinition> -parallelism <degree> -nn <NodeNr> -nn ALL -bpt <Device> To back up the database to tape. Allows you to specify the parallelism degree for backup and redirected restore operations. To address all nodes in one run.brp or <SourceDB>_NODE<NodeNumber>. string 1>=<repl. In a multi-partitioned environment the backup operation is done against this node. The restore script is named <SourceDB>. The default value is the working directory. Only used in retrieve mode. that is.scr.brp in a multipartitioned environment. The restore script is created for experts. With this option you replace strings in the generated scripts for redirected restore and relocate.scr or <SourceDB>_NODE<NodeNumber>scr in a multipartitioned environment. The default value is the working directory. This option only makes sense for –bm RETRIEVE. Name of the database for which the backup and/or restore script should be created Directory where the protocol file for the brdb6brt run will be written to. The default value is 2. The restore script is specific for this node and is named <SourceDB>_NODE<NodeNumber>. The default value is the current date and time.….

This feature can only be used on DB2 V8. Specify NumberOfSessions for the TSM connection. To perform the whole operation of brdb6brt as another user. you may choose to back up only one or more tablespaces of the database. Specify the library as LibName and optionally the NumberOfSessions. With this option you back up the database into an XBSAcompliant storage management system. To do so. Password for the specified user -bpt TSM [<NumberOfSessions>] -bpt XBSA [<NumberOfSessions>] -bpt VENDOR <LibName> [<NumberOfSessions>] -tbs <Tablespace> -user <Username> -using <Password> 162 July 2006 . The restore script is created only for the specified tablespaces. a full database backup is performed. It is possible to split the backup into multiple pieces by specifying multiple directories separated by blanks. However. If this option is not specified. With this option you use a third party shared library to perform the backup operation. you can specify the user name here. specify the tablespaces separated by blanks. Specify NumberOfSessions for the XBSA connection.-bpt <Directory> To back up the database to a directory. With this option you back up the database into TSM. specify a valid directory. Make sure it has sufficient space to hold the backup volume.

the restore script is named <SourceDB>. The terminal output of the check run is written to a protocol file in the current directory. you can specify the user name here. The user who performs the check mode should be the instance owner of the database instance.Check Mode Use this syntax to check whether a given restore script would succeed on this machine.chk depending on the specified script name. Command Parameters Parameter -bm CHECK -ip <ScriptName> Description Checks whether a given restore script would succeed on this machine Name of the restore script to be checked on this machine. The name of the protocol file is <SourceDB>.chk or <SourceDB>_NODE<NodeNumber>. In a multi-partitioned environment the check operation is done against this node.scr in a multipartitioned environment. To perform the database dependent checking of the check mode as another user.scr or <SourceDB>_NODE<NodeNumber>. By default. Password for the specified user -nn <NodeNr> -user <Username> -using <Password> July 2006 163 .

for example. Each parameter is a log file number and not a log file name. -a 5 or -a 5-10 to restore log file 5 only or files 5 to 10. Action Displays the application command line syntax. Removes restored copies from disk. Deletes restored log file(s).Log File Retrieval Tool Command Parameter Actions Parameter -h -help -V Displays application information and library version information if -d is specified. Restores log file(s) from archive.brrestore . -dr [<number>|<range>] -a <number> -a <range> 164 July 2006 .

–q "*. -n <number> -number <number> Maximum number of log files to process. -q <type> -query <type> -force Currently only used in conjunction with –delete ts-. The numerical argument does not refer to a log file number. If you want to specify a timestamp that is not a backup timestamp. for example. <pattern> Requests a list of log files matching the given file pattern on the TSM server. -d tsm can be followed by an TSM management class Switches on trace. The oldest files are processed first. However. the trace is normally turned on in the init<DBSID>.-ex <pattern> Performs emergency restore of log files when the Admin DB is not available. level is a value between 1 (low detail) and 9 (high detail). even if they are not known to the Admin DB. Command Parameter Modifiers Modifier -d <device> -device <device> -DEB [<level>] Description Device to archive files to retrieve files from tape. TSM or any other backend using a customer script. No automatic tape eject after successful archive operation Displays the protocol on the command line (stdout).db6 file. <type> can be replaced by one of the following: • • adsmMC Displays known TSM management classes. you need to specify the –force option in addition. Nonrewind address examples are described under “Non-Rewind Tape Device Addresses” later in this section. -one -out Without this parameter no output is displayed except -h and -V.LOG" (TSM only). An additional (optional) file pattern can be specified to force all matching files older than the timestamp to be deleted. July 2006 165 . -delete <timestamp> [<pattern>] Deletes all known log files in an archive (TSM only) older than the given backup timestamp ts. Tape argument -t must refer to a non-rewind device.

replace the “0” with “1”. With the exception of AIX. brrestore can only access one tape a time. “2” and so on as appropriate. it is formed by adding an "n" to the standard (rewind) address: • • • • • Windows: AIX: Solaris: Linux: HP-UX: /dev/nmt0 /dev/rmt0. 166 July 2006 . /dev/rmt/0 on Solaris. brrestore can only access one tape at a time. -sid <SAPSID> -t <device address> -tape_device -v <volume> -volume -vndlib <lib> Volume name on tape.-node NODExxxx -node ALL Node on which to perform processing. brarchive and brrestore only automatically display output with -h and -V. File name (including path) of the vendor library to load SAP system ID to which the operation applies Tape device. -out must be specified Non-Rewind Tape Device Addresses This form of the addresses is only required for emergency restore (-ex). For example. the non-rewind address of the second tape on Solaris is /dev/rmt/1n. This parameter is only required with multipartitioned systems. The default value is NODE0000 or ALL nodes. -node ALL cannot be used with all actions. To display output for other actions.1 /dev/rmt/0n /dev/nst0 /dev/rmt/0mn If you have more than one tape device to address. for example.

Log extent starts at this number in steps of 4 KB pages of the device. Windows. File name of the log file TSM password. The syntax description here is only for qualified SAP support personnel and administrators who have been explicitly instructed to perform an action involving the User Exit by SAP support. Size of the log extent in 4 KB pages Displays the version information of the db2uext2 tool July 2006 167 . the User Exit parameters allow no spaces before their arguments.DB2 User Exit Wrong usage of this function can make database backups unusable.db2uext2 . DB2 Parameters Passed to the User Exit Program Parameter -OS<os> -RL<db2rel> -RQ<request> -DB<dbname> -NN<nodenum> -LP<logpath> -LN<log name> -AP<TSMpasswd> -SP<startpage> -LS<logsize> -V Description Platform on which the instance is running. AIX. The -SP and -LS parameters are only used if a raw device is used for logging. Unlike the other programs described here. The path must contain the trailing path separator. HP-UX and Windows 98 DB2 release level Request type. It is passed to the User Exit if it is provided in the database configuration. for example. The user exit is normally only called by the database engine. Solaris. archive or retrieve Database name Local node number Fully qualified path to the log files. for example.

The user is not prompted for verification before objects are deleted.<timestamp>.SAR) should be deleted using brrestore before changing from indirect archiving to direct User Exit archiving. Performs action for log files in TSM archive copy group. Performs action for log files in TSM archive and backup copy group. Either deactivates log files or deletes log files on the TSM server. Considers only those objects created by the specified node number. Copies log files from the TSM server to the current directory on the local machine. 168 July 2006 . Performs action for log files in TSM backup copy group. Specifies that the logs between log sequence number 1 and log sequence number 2 are to be used.SAP TSM Management Tool Parameter QUERY EXTRACT DELETE ARCHIVE BACKUP BOTH BETWEEN <sn1> AND <sn2> DB <dbname> NODE <n> WITHOUT PROMPTING Description Queries the TSM server for log files. Considers only those objects associated with the specified database name.db6adutl . Archived Admin DB safety files (adminDB.

The default value is stdout. Gets database manager parameter. db6util tries to retrieve the <sapsid>adm password from the DB2 password service. Database name. The default value is the value of environment variable DB2DBDFT.Tool to Assist Database Administration Parameter -h -V -n <dbname> -auth Description Prints help text. The default value is stdout. Displays overview over deadlocked processes and processes in lock wait status in application snapshot. Displays overview over deadlocked processes in application snapshot. Log file. -o -w -r -rf -rv -f -dg -dm -mg -mm -sd -sl July 2006 169 . Gets database parameter. Prints version information. RUNSTATS on single tables and all indexes RUNSTATS on tables provided in file first RUNSTATS on tables with VOLATILE attribute.db6util . If this option is not specified. User authentication. The VOLATILE attribute is removed after RUNSTATS. Gets tablespace free space information. Modifies database parameter. Tables flagged in DBSTATC with ACTIVE = N are not affected. Result file. Modifies database manager parameter.

LOAD <vendorLibrary> OPEN <num> SESSIONS BUFFERS <num> BUFFERSIZE <size> PARALLELISM <p> 170 July 2006 . Partition number. Number of buffer manipulators to be spawned during the backup process.dmdb6bkp . The default value is 1024.Database Backup Tool Command Parameters Parameter <dbName> NODExxxx ONLINE | OFFLINE ADSM OPEN <num> SESSIONS TSM OPEN <num> SESSIONS TO <targetArea> XBSA <vendorLibrary> Description Specifies the SAP database name <DBSID>. of the buffer used when building the backup image. whichcontains the vendor backup I/O functions Name of shared library containing the vendor backup I/O functions and the number of I/O sessions to be used Number of buffers to be used Size. in pages. Name of shared library that is compliant with the XBSA standard. for example. NODE0002 Specifies online or offline backup mode. The default value is 1. Number of I/O sessions to be used with TSM Identical to the –ADSM option Lists directory or tape device names.

Indicates. July 2006 171 . INCREMENTAL DELTA COMPRESS COMPRLIB-name EXCLUDE COMPROPTS UTIL_IMPACT_PRIORITY INCLUDE LOGS You cannot use this option for an offline backup. Throttling allows to control the impact of the backup operation on the database performance Specifies that the backup image should include the range of log files that are required to restore and rollforward the backup image to some consistent point in time. the default DB2 compression library is used.INCREMENTAL Specifies a cumulative backup image. EXCLUDE LOGS Specifies that the backup image does not include any database transaction log files. Indicates the name of the library to be used to perform the compression (fully qualified path). this is option is set. The backup includes all database data that has changed since the most recent successful backup of any type. Specifies. By default. – Specifies a non-cumulative backup image. with the priority specified. that the backup will run in throttled mode. If this parameter is not set. Indicates that the compression library will not be stored in the backup. Describes a block of binary data that will be passed to the initialization routine of the compression library.that a backup should be compressed. The backup includes all database data that has changed since the most recent successful full backup.

specify one of the following letters: • • • • Y Basic table and extended index statistics This is the default value. Calculates REORGCHK information about all database tables with current statistics.dmdb6srp . T Basic table and no index statistics A Distributed table and extended index statistics E Distributed table and basic index statistics D Distributed table and no index statistics I Basic Index and no table statistics X Extended Index and no table statistics • • • • 172 July 2006 . SAPR3.<tabname> -m <statisticalOption> Description Prints out the version information (patch level) of dmdb6srp Prints out an overview of the command line options of dmdb6srp Specifies the SAP database name <DBSID>. Performs the operation on all selected DBSTATC tables. for example.Update Statistics Tool Command Parameters Parameter -V -h -n <dbsid> -t ALL -t DBSTAT -t CALL -t <tabschema>. Table name. Performs the operation on all database tables. B Basic table and basic index statistics.MONI To use a statistical option.

The default value is 3 minutes. you can override the DBSTATC entry for the analysis method for the specific table. Specifies the name of the tablespace where the DB2 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.Table Reorganization Tool Command Parameters Parameter -V -h -n <dbName> -t <tablespace> -m <tempTablespace> Description Prints out the version information (patch level) dmdb6rts Prints out an overview of the command line options for the tool dmdb6rts Specifies the SAP database name <DBSID>. a given –m analysis method would have no effect. Does NOT write protocol data to CCMS protocol tables Ignores column dbstatc-ameth – In case you perform a RUNSTATS for a single table. July 2006 173 . The default value is 300 minutes. Without the –I parameter. Maximum amount of time (in minutes) spent on the calculation of the size of long fields. Specifies the name of the tablespace that contains the tables to be reorganized.-z <maxRuntime> Maximum amount of time (in minutes) for the execution of the program. -P -I -l <longFieldTimeFrame> dmdb6rts .

Admin Tools Installation Program On UNIX. Deinstalls the Admin Tools Recreates the Admin DB using the Admin DB backup SAR file. Command Parameters Parameter -h -V -i [<target release>] Description Prints the usage of sddb6ins. Installs the Admin Tools. Prints the version of sddb6ins. The default value of <target release> is the release of sddb6ins. Checks if the Admin Tools are installed correctly. <start release> indicates the release of the already installed Admin Tools (for example.sddb6ins . Upgrades the Admin Tools. -u <start SAP release> [<target release>] -d -r [<adminDB backup image>] -checkonly [<target release>] 174 July 2006 . 46D). sddb6ins must always be called with root authorization but with the user environment for user db2<dbsid> as described in Installation and Setup [Page 41]. The default value of <target release> is the default release of sddb6ins. The default value of <target release> is the release of sddb6ins.

<level> can be between 1 and 9. The value for -sidadmpwd <pwd> is read from the dscdb6up password file. The value of the SAPSYSTEMNAME environment variable is the default value for <SAPSID>. For the installation of the 6. -DEB [<level>] -NOADMDB July 2006 175 . Activates the tracing facility. The Admin DB is not needed because log files are archived directly to the vendor storage product by the User Exit program. except -db2dbnamepwd <pwd>. The value 9 means "very detailed".NN Admin Tools on Windows. The following default values apply: • • The value of the USERDOMAIN environment variable is the default value for <domain>. -s <SAPSID> Specifies the SAP system ID.[-db2dbnamepwd <pwd>] [-sidadmpwd <pwd>] Windows only: [-db2dbnamedomain <domain>] [-sidadmdomain <domain>] All of these parameters have useful default values. The detail level can be specified using <level>. the -db2dbnamepwd <pwd> is mandatory. The default value is 3.

sddb6mir . 176 July 2006 . The value 9 means “very detailed”. The default value is 3.Admin DB Creation and Mirror Tool Utility Command Parameters Parameter -V -h -m -DEB [<level>] Description Prints out the version information (patch level) of sddb6mir Prints out an overview of the command line options of sddb6mir Mirrors the Admin DB ADM<DBSID> to the SAP database <DBSID>. The detail level can be specified using <level>. <level> can be between 1 and 9. Activates the tracing facility.

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. DB2 will probably come to a standstill. trace data needs to be formatted on the system the trace was taken on. Given the number of activities in an SAP environment. Problem situations that have been observed might disappear during attempts to reproduce them with the trace turned on. trace data first needs to be dumped before the trace is turned off. The decision to run a trace must be carefully met. The following facts should be taken into consideration: • • • In most cases. controlled by the command db2trc. For this reason. system performance will decrease. it is essential to find the smallest possible scenario that reproduces the problem. It is a time-consuming task. DB2 Trace Facility db2trc The DB2 trace. In many cases. Once the problem has been traced. July 2006 177 . run the command with no options. It might be necessary to drill down. • • All DB2 traces are documented in the Troubleshooting Guide of the DB2 Online Documentation delivered with the software. traces events. To get the trace into readable form. It must be run by the DB2 instance owner on the database server. the amount of memory available for tracing is limited by the amount of available shared memory. traces are usually only run at the request of DB2 support. options for the location of trace data are: • In shared memory For this. this reduces the duration of the trace to a few minutes. The amount of trace data can be enormously large. When turned on. • In a file This severely affects performance. For this reason.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. To get an overview of the available options.

several parameters can be set. To configure the trace. the amount of memory reserved for trace data was insufficient and the trace might not be useful. Turn off the trace by entering the following command: db2trc off 5. enter the following command: db2 update cli cfg for section common using trace 1 3. 2.flw by entering the following command: db2trc fmt db2trc.. To turn the DB2 CLI trace on or off. Dump the trace data to a file named.fmt and db2trc. To verify the current settings. the output is written to the screen. There is no option to activate the trace for a process while it is being connected to the database. parameter TRACE in the CLI configuration needs to be set to 1.dmp db2trc. enter the following command: db2 get cli cfg 178 July 2006 ..fmt db2trc flw db2trc. for example db2trc. Procedure .dmp. the SQL interface of DB2. db2trc. To activate the trace. The trace needs to be repeated with a larger amount of memory. 1. To do so for all databases in a DB2 instance. Reproduce the problem. turn the trace on by entering the following command: db2trc on –l <memory> -s 2. To store trace data in a preallocated buffer of size <memory> in shared memory.flw While formatting.Usually.dmp 4. DB2 CLI Trace The DB2 CLI trace traces all activities of the Call Level Interface (CLI). It is run on the machine running the DB2 application program..dmp db2trc. by entering the following command: db2trc dmp db2trc. To de-activate the trace. log on as DB2 instance owner. the sequence of activities using this kind of trace is as follows: . that is. Enter the following command: db2 update cli cfg for section common using <parameter> <value> 5. Format the trace into two files. If the output mentions that the trace has wrapped. 1. It is activated for an application process when the trace is turned on or the process connects to the database. 3. Typical values to start with are 20000000 or 40000000 (20 or 40 million bytes).. enter the following command: db2 update cli cfg for section common using trace 0 4.

one per process If this parameter is set to 1 it forces a write to disk for each entry. Admin Tools Traces You can activate all tracing activities of most SAP DB2 kernel tools using variable settings in environment file init<DBSID>. Environment Variables Environment Variable DB2DB6_TRC_<TOOL> Values ON or OFF Default value: OFF For example: DB2DB6_TRC_DB2UEXT2=ON DB2DB6_TRC_<TOOL>_LEVEL Default value: 2 1 Errors Error tracing 2 Footprint Function internal info 3 DEV: Development trace DB2DB6_TRC_<TOOL>_PATH Any path where db2<dbsid> has write access. <TOOL> is DB2UEXT2. There are often several items that appear to be errors.db6. but are acceptable under certain conditions. or BRDB6BRT. This environment file is located in the $INSTHOME/admintools directory (UNIX) or on the environment settings (Windows. also Registry settings). which is overwritten by each new trace. SDDB6JDS.Examples of Available Parameters Parameter TRACEFILENAME <file> TRACEPATHNAME <path> TRACEFLUSH 0|1 Description Path of the file containing all trace data Directory to store trace files. BRARCHIVE. The trace output is intended for experienced support personnel and the application developers. In the table above. July 2006 179 . For example: DB2DB6_TRC_DB2UEXT2_PATH/db2/PRD/admintools/TraceFiles DB2DB6_TRC_<TOOL>_FILE A fixed name for the file to be used for all traces. This should normally be left unset to use the default behavior of creating one file per trace. Each component of the Admin Tools can be traced separately. BRRESTORE.

sap.6C → Binary Patches → SAP KERNEL 4.trc dmdb6rdi.<timestamp>. Default Trace File Names Admin Tools DB2 administration server DB2 User Exit Log file management Data collector Update statistics Redirected restore Backup tool DB6CLP (command line processor) File Names sddb6jds.6D Admin Tools • For 32 Bit Choose SAP R/3 → SAP R/3 4. Tracing of sddb6ins can only be activated using the command line option -DEB.<timestamp>.<timestamp>.trc db2uext2.trc The default trace file directories are: • • UNIX: $INSTHOME/admintools/TraceFiles Windows: %INSTHOME%\admintools\TraceFiles Downloading Admin Tool Patches from SAP Service Marketplace Ggf.trc brrestore. You can neither use the environment nor the ini file.trc dmdb6bkp.trc brarchive.<timestamp>.trc dmdb6srp. Verweis auf Hinweis. • For 64 Bit Choose SAP R/3 → SAP R/3 4.com/patches. in dem die DL parameter stehen … (BRITTA) Was is hier nochmal mit DL gemeint? You can download the latest available versions of the Admin Tools from SAP Service Marketplace at service.trc db6clp.<timestamp>.6D → <Your OS> → DB2 UDB.You can control brarchive and brrestore tracing using the command line option –DEB.<timestamp>.6D 64-BIT → <Your OS> → DB2 UDB. which overrides the environment.trc brdb6brt.6C → Binary Patches → SAP KERNEL 4.<timestamp>. The trace level can have a value between 0 and 9.<timestamp>. 180 July 2006 .<timestamp>. or an optional trace level and trace directory. For 4.

Contains the installation program sddb6ins(.CAR Description Contains the extraction tool SAPSAR(.CAR DB6CCEXT_HW. there is both a Unicode and a non-Unicode version. For brdb6brt. Therefore. you must use the nonUnicode version. or I386 if it runs on Windows.6x Keep in mind that HW stands for UNIX if the DB2 Control Center runs on UNIX.CAR/SAR dscdb6up.exe). UNIX only and only for SAP system Releases 4. • For 64 Bit Choose SAP Web AS → SAP Web AS <Release> → Binary Patches → SAP KERNEL <Release> 64-BIT → <Your OS> → DB2 UDB.NN Admin Tools • For 32 Bit Choose SAP Web AS → SAP Web AS <Release> → Binary Patches → SAP KERNEL <Release> → <Your OS> → DB2 UDB. July 2006 181 .SAR sddb6ins. Contains the SAP DB2 Control Center Extensions. The following table provides an overview of the files available: File SAPCAR. There is no Unicode version of sddb6ins.For 6.exe).

Make sure that files are no longer active before moving them. an environment variable was changed or unset. that is. It is important to choose only the most recent inactive files as the user exit and brarchive will move older files first. Older versions of the Admin Tools. SAP system Release 3. see Setting and Updating Passwords [Page 116]. a lock file may be left behind. check that the operating system user has not revoked users. see Downloading Admin Tool Patches from SAP Service Marketplace [Page 180] in this appendix. An installation may not have completed successfully. or a user inadvertently changed the environment. Customers occasionally run out of disk space. Ensure that neither brarchive nor brrestore are running and delete the file. Use dscdb6up to resynchronize passwords. or file or directory authorizations were changed. ADSM must be still used in this case. for example. defects that you find have already been found and addressed.log in the db2dump directory has not become too large. Initializing tapes with non-default values. If the database cannot be started. when the User Exit has archived several files. Also. Problems with devices are a frequent issue. Downloading and installing the latest patch from SAP Service Marketplace will often resolve the problem. You can now check the runtime environment for the Admin Tools by calling sddb6ins –checkonly. 182 July 2006 . For more information. Password file problems are also common. it may be necessary to first temporarily move some log files out of the log directory to provide space. are not compatible with TSM. Running brarchive will free up space by removing log files from the archive directory.Troubleshooting Admin Tools and Programs The following section provides information and advice on how to proceed when problems occur. General Troubleshooting Comments Many recent customer problems were caused by problems with the runtime environment. brarchive should then be called and the log files in temporary storage moved back to the log directory. As soon as enough space is available. For detailed information. If brrestore or brarchive can not terminate properly. Often. will cause problems if these values conflict with the parameters in those in the Admin DB.1I. For example. Make sure that the DB2 protocol file db2diag. see Changing the Admin Tools Configuration [Page 70]. with a different block size. Running the tool again will cause an LFA158 error that will contain the path of the lock file. For more information.

Create a message using SAPNet − R/3 Frontend. variable DB2DB6EKEY changed. 4.com/patches for new patches. Look in the protocol file for the error. . 8. Check SAP Service Marketplace at service. if the installation or upgrade has not completed successfully. 2. To ensure efficient troubleshooting. 5. By default. Installation (sddb6ins) Troubleshooting Installation Failure In general. you can retry this operation without causing data loss. Retry installation or upgrade operation. the value is based on the machine name. the protocol file init<DBSID>. Look up the meaning of the error message in this appendix. run the installation tool with the -checkonly option and check the output. Switch on Admin Tool tracing. If there is an SQL return code in the error message. 7. Perform the suggested action. Download and install the latest patch version. and any core file to the SAP server. Common Installation Problem The password file is inconsistent with the operating system. Search SAP Notes for solutions to previous occurrences of this error. The following error can occur during the installation of the Admin Tools: Error Message Reason Action Required Error opening file <file> with mode wb.db6. Run the action again.sap. Make any appropriate adjustments to the runtime environment. 3. The passwords given when installing the SAP system or using the dscdb6up utility must match the operating system passwords for the same users.Initial Troubleshooting Steps Implement the following steps until the problem is resolved. 1. File cannot be replaced because the executable or shared library is currently in use. Upload the protocol and trace files. July 2006 183 . which is often different on multi-node systems (DB2 UDB EEE V7 or DB2 UDB ESE V8 with multiple partitions). 6. If not... go through the above steps and gather as much information as possible about the problem before contacting SAP support. DB2DB6EKEY must have the same value on all systems. look it up in the DB2 Message Reference and perform the recommended action.

NODEXXXX Error file: db2uext2. The DB2 Database Manager automatically retries archive operations again after five minutes. For detailed analysis.err..err. Check previous error messages. check environment variable DB2DB6_VENDOR_UEXIT. 6 8 Function module in the shared library could not be loaded. 1. For the User Exit error message. These files are located in the DIAGPATH database parameter and are written for each database partition.NODEXXXX 2. No new log files appear in the archive directory.User Exit Troubleshooting The following errors might occur: • • • The log directory (database parameter LOGPATH) becomes full. On UNIX: Verify if environment variable INSTHOME is set correctly. Look at the journal page for User Exit entries. contact your system administrator and SAP support.log and db2alert.log or db2uext2. activate the tracing facility. the return codes have the following description: User Exit Error Messages Return Code 0 1 4 5 Description Successful DB2 shared library not found. If processing of the same log file fails repeatedly.dll If files are being archived directly to TSM by the User Exit. The file names are as follows: Protocol file: db2uext2. Look at the db2uext2 protocol and error files. If the problem persists.. TSM shared lib could not be loaded. you can use the following procedure that is valid for the ARCHIVE and RETRIEVE actions of the DB2 User Exit program: .log. 184 July 2006 . Temporary error encountered (system memory). To check the reasons for these errors. The User Exit returns this value to the DB2 Database Manager for most failures. See the following table for details. Entries in diagnostic file db2diag. Retry.NODEXXXX (located in the DIAGPATH database parameter) report a User Exit failure.NODExxxx for more detailed information.err. check the error file db2uext2. Check if the specified shared library is in the path of the DB2 instance owner: UNIX: libApiDS (for 64bit libApiDS64) Windows: ADSM32.

36 Opening file failed.NODExxxx for more detailed information. Check if program db2uext2 is available in the following directories: UNIX: $INSTHOME/sqllib/adm/ Windows: <DRIVE>:\sqllib\bin\ 21 22 23 24 28 30 32 33 34 35 Failure of I/O File I/O error. Check error file db2uext2. Ensure that the file has never existed and then perform ROLLFORWARD STOP. If the problem persists. Operator or user terminated process Operator or user terminated process Copy of log file (archive or retrieve operation) failed • Archive operations: If the source is the log file to be archived by the DB2 User Exit. This is an internal error that you must report to SAP support. Error with one or more of the parameters passed to the User Exit program. This is deliberately different to the default (simplified) User Exits provided as source code together with DB2. This is an internal error that you must report to SAP support. If the file does not exist (and never has existed) you are finished and can perform ROLLFORWARD STOP. Make sure that the log file is still available. Accompanying message should contain the system error number defined in file errno. Admin DB access error. contact SAP support. you may have problems if a database recovery becomes necessary. Attempt to retrieve it using brrestore. for example. the log file could not be found in either the archive or the retrieve directory. 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. The log file has probably been moved out of the online log directory. Retrieve operations (ROLLFORWARD): This is not necessarily an error. this is just a warning. This return code is recorded in the db2diag.log. Contact SAP support. If not.12 16 20 Hardware error Error with the User Exit program or system function used by the program. Check whether you are using a version of db2uext2 that is compatible with the database product release. July 2006 185 . Retry. Log file does not exist.err. Invalid database parameter. • Retrieve operations (ROLLFORWARD): If the DB2 User Exit was called to retrieve log files. signal handling). The User Exit program was not found. Invalid database manager parameter.h.

NODExxxx for more detailed information. The API call “begin query” of the ADSM/TSM API failed. The API call “begin transaction” of the ADSM/TSM API failed.err.NODExxxx for more detailed information (for example.err. Check error file db2uext2. Obtaining requested object data from ADSM/TSM failed. Check error file db2uext2. 39 40 41 Closing of log file failed.err. Check error file db2uext2. Registration of file space on ADSM/TSM server failed. Check error file db2uext2. Initialization of request to send object to ADSM/TSM server failed. Reading from file failed.err. SQL error occurred.err.err.NODExxxx or db2uext2.NODExxxx for more detailed information. Check error file db2uext2. SQL warning occurred. Check error file db2uext2.NODExxxx for more detailed information.NODExxxx for more detailed information. Check the SQL code in DB2 Message Reference. Check the messages and access authorizations. End of data sending to ADSM/TSM failed.NODExxxx File I/O seek error. Error when accessing file.err.log. Binding of ADSM/TSM management class failed. check at the file system level.NODExxxx for more detailed information. errno). Check error file db2uext2.NODExxxx for more detailed information. Wait to see if db2uext2 succeeds at a future attempt. If not.NODExxxx for more detailed information (for example. Check the file system access authorizations. Check error file db2uext2. Getting data stream from ADSM/TSM failed. Check the SQL code in DB2 Message Reference. Creating directory failed. Writing to file failed: The log file could not be copied to the archive directory. Check the file system access authorizations. errno).NODExxxx for more detailed information. Query of object on ADMS/TSM server failed. Check error file db2uext2.err. Start of retrieve operation in ADSM/TSM storage failed. Signifying end of getting object cycle failed 43 44 45 46 48 49 50 51 52 53 54 55 56 57 58 59 60 62 63 64 186 July 2006 .err. The API call “end transaction” of the ADSM/TSM API failed. There could be a free space problem. Unable to read environment variable. RC_AUDIT_IO_ERROR: Problem writing to db2uext2. It may be necessary to modify the environment variables DB2DB6_ARCHIVE_PATH and DB2DB6_RETRIEVE_PATH.err.37 38 Opening file failed. Sending of data stream to ADSM/TSM failed. The API call “end query” of the ADSM/TSM API failed.

Try to retrieve this parameter on the command line.67 68 69 70 80 81 82 83 84 85 86 Object was not found on ADSM/TSM server.err. Log file ID cannot be obtained. Processing continues. Database management (DBM) parameter DIAGPATH is not set or could not be retrieved. Check your environment. DB2 CLI Transcation statement failure. This is an internal error that you must report to SAP. On UNIX Check the file authorizations of /sapmnt/<SAPSID>/global (permission 700. This is an internal error that you must report to SAP. DB2 CLI Free statement. Try to retrieve this parameter on the command line.conf (permission 600. Any log file to be archived by the DB2 User Exit is assigned a unique ID. This is an internal error that you must report to SAP. DB2 CLI Prepare statement failure. group sapsys). Environment variable DB2DB6EKEY not set. On Windows Check if share \\DSCDB6HOME\sapmnt is available and if the DB2 service has been started by user db2<dbsid>. DB2 CLI Bind parameter failure. Password could not be retrieved from password file dscdb6. Deletion of object on ADSM/TSM server failed DB2 CLI statemnet allocation failure. If this error occurs. Check your environment. 93 101 102 104 110 July 2006 187 . Check your environment. Environment variable DB2DBDFT not set. group db<dbsid>adm) and /sapmnt/<SAPSID>/global/dscdb6. DB2 CLI Set statement option failure. Check the database environment. Initialization of ADSM/TSM session failed. owner <sapsid>adm. Check the database environment. Termination of ADSM/TSM session failed. This is an internal error that you must report to SAP. Report to SAP. DB2 CLI Execute statement failure. It is generated in the Admin DB. owner <sapsid>adm. Check error file db2uext2. Recording information failed: An action step cannot be protocolled in the Admin DB.conf. This is an internal error that you must report to SAP. 90 91 92 Windows only: Environment variable DSCDB6HOME not set. This is an internal error that you must report to SAP. check the ADM<DBSID> database of your managed instance and contact SAP support. Internal error. Failure.NODExxxx for more detailed information. Database management (DBM) parameter DFTDBPATH is not set or could not be retrieved.

The vendor user exit program could not be started. If not. refer to the vendor user exit documentation. 188 July 2006 . Report to SAP. No log file entry can be made in the Admin DB. Check from the DB2 command line (CLP) whether a connection to ADM<DBSID> can be established.111 Protocol database connect error. 116 117 For more detailed information about the most current documentation of the db2uext2 tool return codes. Check error file db2uext2. Check error file db2uext2.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. see SAP Note 104019. Vendor user exit program error. For detailed information. ADM<DBSID> object creation failed.err.NODExxxx for more detailed information.err.NODExxxx for more detailed information. Report to SAP. Check error file db2uext2.err. contact SAP support. ADM<SID>: Write configuration parameter failed: Internal error. Processing cannot continue. 112 113 114 ADM<SID>: Could not move log file to other location: Internal error. See also SAP Note 543779.

for example. As mentioned above.sap. If an application does not perform correctly. • • • • brarchive and brrestore information messages have no numbers . VND000 to VND999 are back end library error messages. when called directly on the command line the protocol is by default only written to file and no output appears on the command line.only warnings and errors.brarchive/brrestore Troubleshooting Checking the protocol output and corresponding corrective actions can solve most problems involving brarchive and brrestore. LFA100 to LFA999 are brarchive and brrestore error messages. 1…9. make sure that you are using the most recent patch available on SAP Service Marketplace at service. July 2006 189 . LFA000 to LFA099 are brarchive and brrestore warning messages. their texts. However. brarchive and brrestore also allow activation of tracing on the command line using parameter -DEB <level>. and suggested corrective actions. in addition to the standard environment tracing switches. brarchive and brrestore Messages The following tables list brarchive and brrestore message IDs.com/patches. The version and patch level of each program can be seen near the top of each protocol. option -out must be included in the program call. To override this.

LFA010 Use -d tape to explicitly specify the device type. ‘*’ will be used. Although the program still supports this old command line option it may not in future releases. Use new syntax. It is better to use the new syntax. Use ssd. Use <NEW OPTION>. -sd with two devices and volumes supported but archaic. LFA001 LFA002 LFA005 LFA006 LFA007 Although the program still supports this old command line option it may not in future releases. 190 July 2006 . Use option –help to see the syntax. See other messages for more information. Although the program still supports this old command line option it may not in future releases. Use new syntax. <OLD> option supported but archaic. Use ss. Use option –help to see the syntax. '*. Use option –help to see the syntax. for example.brarchive and brrestore Warning Messages ID LFA000 Message Action ended with warnings. LFA015 Warning if no file pattern is given. Use option – help to see the syntax. It is better to use the new syntax.SAR'. A command line option was ignored because it is no longer valid syntax. LFA009 Although the program still supports this old command line option it may not in future releases. -s with two devices and volumes supported but archaic. Although the program still supports this old command line option it may not in future releases. <OLD> syntax archaic and ignored. It is better to use the new syntax. LFA015 Use quotes for pattern. -d/-device not specified but ADSM implied. <OLD> syntax supported but archaic. Option <OPTION><ARG> supported but archaic – Interpreted literally -d/-device not specified but tape implied. LFA011 Use -d adsm to explicitly specify the device type. It is better to use the new syntax. Use the new syntax. Use option –help to see the syntax. It is better to use the new syntax. Unexpected pattern argument No file pattern given Comment Main action completed successfully but warnings were issued. Use option –help to see the syntax.

LFA031 A file intended for deletion was not found. Using adsm (default in the config table of the Admin database). Protocol file will remain in temp dir. The default value was changed to TSM in the Admin DB using the DB2 Control Center Extensions. The default value is tape. See the syntax diagram that is displayed. Use option –checkonly of program sddb6ins to verify the installation. try to determine why the file was missing. Look for the protocol file in the temporary directory set in environment variable DB2DB6_TEMP_DIR. Unable to change real user. No action is necessary as the file would have been deleted anyway. However. Signal handling looping. Assuming 'help'. May cause other errors. This is a valid log file archiving tape but appears to be owned by a different SAP system. LFA023 Ensure that environment variable DB2DB6_TEMP_DIR is set for user db2<dbsid>. LFA032 LFA034 LFA036 LFA037 Internal problem caused by an error. Program finished before INSTHOME or db2<dbsid> home dir determined. Using <DIRECTORY> for temporary files. Tape is initialized but volume unknown to system. Clean up may not be successful. May result in errors.LFA021 No action specified on command line. Use -i force to force tape re-initialization for the current system. Device not specified or implied. Check installation and program authorizations. For more information about authorizations. see Installing the Admin Tools Manually [Page 47]. Application may not be able to terminate properly. LFA025 Use -d tape or -d adsm to explicitly specify the device type. Device not specified or implied. Specify an action option. July 2006 191 . Using tape. File <FILE> could not be found for deletion. LFA024 Use -d tape or -d adsm to explicitly specify the device type.

Action was successful but warnings occurred. Otherwise. check the database error files. Could not delete backup timestamp entries (rc = <VALUE>). Entries not found or internal error when accessing or deleting them. Unable to connect to admin db. LFA043 LFA044 Normally suggested in connection with another error or warning. check the DB2 Message Reference. LFA046 SAP Basis Release 4.6D only: Log files may not be displayed in transaction DB13. contact SAP support.. Check if db2start has been executed. Return without trying to connect to DB config parameter too long Unable to eject tape. No backup timestamp entries found. Are the program ownership and permissions set correctly? XDB DB access function error (rc=<VALUE>). check the DB2 Message Reference. LFA042 Warning: No backups appear to have been performed to this target. Value of the configuration parameter in table DB6CONFIG too long Tape must be ejected manually. Check the protocol file for warning statements. If this causes concern. ls db started? (rc = <VALUE>) Query operation ended with warning. Check DB environment or permission to connect to the Admin DB. Operation completed with warnings. Unable to remove old protocol entries from admin db. LFA047 LFA048 LFA051 192 July 2006 . For the SQL return code. LFA041 For the SQL return code.LFA038 . Non-critical error. Check the executable authorizations. LFA039 LFA040 Query may not be appropriate..

Check for repeating or conflicting options. refer to the option documentation. LFA071 LFA073 The environment variable value may be invalid. brarchive and brrestore Error Messages ID LFA101 LFA102 LFA103 LFA104 Message Parameter <OPTION> unknown. Use option –help to see the syntax. Check this variable in the user environment. It is no longer reliable. Check and replace the bad string argument value. <OPTION> argument "<VALUE>" too long. The action requires that the additional option be used. Add the required option to the call. Action not allowed for <PROGRAM>. Only one action option is permitted. cpio. Required argument is missing. Use option –help to see the syntax. tar. Use option –help to see the syntax. <OPTION> argument "<VALUE>" not OK. <OPTION> results in repeated or conflicting parameters. <OPTION> argument missing. If the problem is not clear. for example. refer to the option documentation. Use option –help to see the syntax. Check and replace bad numeric argument value.LFA053 Directory <DIR> cannot be written to. Action only allowed for <PROGRAM>. –d ADSM or –d TAPE. . Use option – help to see the syntax. LFA105 LFA106 LFA107 LFA108 LFA109 LFA110 July 2006 193 . Tape has SID <SAPSID> and not <SAPSID> as expected! Tape # has been reused # times (>#) and should be replaced. Bad environment value ? <VARIABLE> = <VALUE Only a problem if other messages reflect this. for example. or dd. Comment Use option –help to see the syntax. If you are certain this tape is not needed. the tape header must be overwritten using operating system commands. This tape must be replaced as soon as possible. <OPTION> argument "<VALUE>" not OK. Use a shorter argument value. Be careful that you have not used wild card characters interpreted by the shell. Too many actions on the command line. LFA070 Tape belongs to another system. The option <OPTION> is required for this action. If the problem is not clear.

(ADG rc = <VALUE>) LFA136 LFA137 LFA138 LFA141 194 July 2006 . Refer to other messages. Provide the correct number of arguments. Application error. LFA115 LFA120 Check the db2<dbsid> user environment. Please refer to new syntax. For more information. Refer to other messages. LFA130 LFA131 Application error. Backend function error (rc = <VALUE>). contact SAP support. Refer to other messages. Retry the operation. Refer to other messages. Check value in control center. see Configuration [Page 70]. Use option -help to see the syntax. Refer to other error messages. Internal database call failed. <CONFIGURATION PARAMETER> parameter error. LFA121 Check the db2<dbsid> user environment. Refer to the DB2 Message Reference for an explanation of the SQL code. Backend library function failed. Most likely an error occurred opening the session with the backend library. Check the default. The old syntax may no longer be supported in a later release.LFA112 LFA113 <VAL> “<VAL>”: Same device given twice. Tape initialization failed. Error while getting tape label. Refer to other error messages. Admin-tool database error (rc = VALUE). If the cause is not clear. Use option –help to see the syntax. The option <OPTION><ARG> is not supported by <PROGRAM> Problem determining value of <ENVIRONMENT VARIABLE>. VARIABLE> too long. Error initializing tape. tape device and tape device class values using the DB2 Control Center Extensions. The option <OPTION><ARG> is 31Ispecific. Do not repeat arguments on the command line. Unable to initialize the tape. Error while preparing list of files to process. Unable to delete the file. LFA114 Use the new syntax. The option <OPTION> requires two arguments for this action. LFA132 LFA133 LFA134 Log-file delete failed. New tape label not set correctly. Error creating the file list for processing. Value of environment variable <ENV. Refer to other messages.

<VALUE> is not a valid device. Refer to other error messages. Operation failed. Check the Admin Tools installation. Emergency restore operation failed. Unable to load backend library. Query operation failed. Unable to create file list. LFA148 LFA149 Delete operation for an archived log file failed. Delete on backend failed. Check the command line parameters and arguments. 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 LFA151 LFA152 Unable to initialize session info. Unable to determine value for <ENVIRONMENT VARIABLE>. Refer to other messages. Refer to other messages.LFA142 LFA143 LFA144 LFA145 LFA146 LFA147 Unable to open backend session. Archive or restore operation failed. Library initialization failed. Query operation failed. July 2006 195 . Refer to other error messages. Refer to other error messages. Error creating the file list for processing. Use option –check_only of the installation tool and check the installation documentation specifically for file authorizations. Unable to find or load brarchive or brrestore library. Emergency restore failed. Refer to other error messages. <sapsid>adm) of the program caller. Library initialization failed. Refer to other error messages. Check the user environment (db2<dbsid>. Transfer operation failed. For more information. Action failed. Refer to other error messages.

Tape <NUMBER> volume <LABEL> does not match command line value <LABEL>. No files were successfully processed to completion. Has User Exit been run? '-i set' not ok if tape already labeled. see brrestore . Use the –check_only option of the installation tool and check installation documentation specifically for file authorizations. If not. Error prohibited file processing. For more information about non-rewind address examples. Check the default. Not all files were successfully processed to completion. Retry operation. Unable to access an essential tool file. Unable to create file sub list. The label found on the referenced tape does not match the value specified with -v on the command line. 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. The tape is not initialized. brarchive or brrestore may already be running. Use -i force to force re-initialization of a current tape. Default tape rewind and non-rewind addresses identical (<DEVICE>) Refer to other messages. Check that the correct tape being used. delete the file and restart the program. This error can also be caused by incorrectly performed upgrade. No log_archive entry in Admin DB. Use -i force.LFA153 Cannot access sap<sapsid>/db2<dbsid > data file. Refer to other messages. • LFA154 LFA155 Error preparing for operation. Check the Admin Tools installation. The action -i set can only be used to initialize tapes that are out-of-date. For more information. Check the User Exit protocols.Log File Retrieval Tool [Page 163]. LFA156 Error prohibited some file processing. invalid or current tape. Target directory unknown but should have been made available by the User Exit. Retry operation. LFA157 LFA158 Internal error. Error getting/releasing lock: <FILE>. Use -i force to force initialization of a new. Tape <DEVICE> must be initialized first. LFA159 LFA160 LFA161 LFA162 LFA163 196 July 2006 . Use –I set or -i force. tape device and tape device class values using the DB2 Control Center extensions.

The tape label is not a valid format. Initialize with -i force. Check system memory resources and retry operation. Program is already running. If not. A lock file is already present. Tape is initialized but volume is unreadable. Either brarchive or brrestore is running elsewhere at the same time (wait for program to end) or a previous program call terminated unexpectedly (in this case delete <LOCK FILE>). Use new name or reinitialize old tape. LFA169 Tape has not been initialized by brarchive.LFA164 Tape is not known to system. Tape not used and can therefore have no files. delete <LOCK FILE>. Unable to allocate memory. The tape is not known. Only db2<dbsid> or <sapsid>adm users should start programs brarchive and brrestore. Must be registered in Control Center. Initialize with –i set/force. Check system resources. Tape device <DEVICE> not known. LFA165 The tape may be damaged or may have come from an incompatible system (Windows/UNIX). LFA166 User is <USER> but should be <USER> or <USER>. LFA170 Attempting to restore from the wrong tape? LFA171 See “Tape Management” in Indirect Archiving to Tape [Page 82]. Name can only be reused if tape with this name is re-initialized. LFA167 LFA168 Volume name <VOLUME> used on other tape. Use -i force to force initialization of a new. Tape not initialized or already used. LFA180 System memory error. July 2006 197 . Use -i force to force initialization. Use -i force. invalid or current tape. Name already exists.

Unable to find file or directory <VALUE>. Delete operation for the log file failed. Refer to other error messages. Unable to determine home directory of <USER>. Get backup timestamp entries failed (rc = <VALUE>) Check backup timestamp is valid. for example. Use option –check_only of the installation tool and check the installation documentation specifically for files and file authorizations. Unable to set signal handler. Check installation using the check option of program sddb6ins. Use: -q backups –out Unable to extend file list Add missing backups failed Unexpected action. Check the file authorizations of <FILENAME>.NODE0000. Unexpected device.LFA181 Unable to load library <LIBRARY NAME>. Check the Admin Tools installation. 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. Directory <dir> cannot be written to. contact SAP. No backup is known to the Admin DB. Wrong timestamp format or length. S0000000. Set variable INSTHOME. Has the file been automatically deleted by TSM or moved manually? Check log file name is valid. the application attempts to determine the home directory of user db2<dbsid>. • LFA182 Delete failed for file <FILENAME>. Cannot allocate memory to extend the file list. If the problem is not resolved. LFA200 LFA201 LFA202 LFA203 LFA240 LFA241 198 July 2006 . For more information. errno = <VALUE>. LFA184 LFA188 LFA189 LFA190 LFA191 Log file <FILE> has wrong format. Check the command line action option. See the output of the query for the correct format. Unable to find or load the brarchive or brrestore library. System error that may result in incorrect program execution. Make sure that you performed a database backup when you activated database recovery. Check the reason. If environment variable INSTHOME is not set. Internal error. Refer to other message and check the existence of the item. Check the command line device option. Contact your system administrator.19920211152635. Internal error.

The original file size does not match the size of the file restored. Contact SAP support. Internal error. Not enough disk space in <DIRECTORY>. Compressed file systems may calculate the amount of space available wrongly. VND001 Delete files or increase the size of the file system. <VALUE> on disk and <VALUE> kB on tape Comment Check the db2<dbsid> user environment. VND002 July 2006 199 . Unexpected value. Internal error. contact SAP support. Contact SAP support. Error deleting <TYPE> DB entry (rc = <VALUE>) Error retrieving <TYPE> DB entry (rc = <VALUE>) Error updating <TYPE> DB entry (rc = <VALUE>) Error creating <TYPE> DB entry (rc = <VALUE>) New entry already in DB (rc = <VALUE>) Action <action> failed with <error_text> SQL Error: <SQL error text> Internal error. Contact SAP support. Contact SAP support. Available: <VALUE> MB. Contact SAP support.LFA242 LFA243 LFA244 LFA245 LFA280 Unexpected log file status. Try to interpret the error text. Contact SAP support. needed: <VALUE> MB. Contact SAP support. LFA282 Internal error. Unexpected return code. contact SAP support. Internal error. If the meaning is not clear to you. If the meaning is not clear to you. File size mismatch for <FILE>. the file may be damaged. If the problem persists. Contact SAP support. LFA283 Internal error. LFA284 LFA285 Internal error. You may be able to restore the file using the emergency restore option -ex. Try to interpret the error text. See also accompanying system error message VND180. LFA286 brarchive and brrestore Library Error Messages ID VND000 Message Environment variable <ENVIRONMENT VARIABLE> is not set. Error creating Admin DB backup file. Contact SAP support. Internal error. LFA281 Internal error.

VND021 200 July 2006 . VND009 Check the file and directory authorizations. VND010 System error. If the problem persists. the tape must now be full. VND020 According to the tape device class tape entry -size in the DB2 Control Center. Query <Value> is not supported by back-end library. Failed to save <FILE> (rc = <VALUE>)! Cannot continue… Failed to retrieve <FILE> (rc = <VALUE>)! Cannot continue… Failed to delete <FILE> (rc = <VALUE>)! Cannot continue… Error writing data to file <FILE> (rc = <VALUE>). VND005 VND006 VND008 Check the file and directory authorizations. See previous error messages. the media may be damaged. Note return code for SAP support. Check that this entry matches the real tape size. VND012 Backend does not support the query. Restore operation failed. Complete the (restart) operation with a new tape. If the log file management tool was terminated. Volume size limit reached no more log files will be processed. Note the return code for SAP support. Error closing file <VALUE> just sent to/retrieved. VND004 Store operation failed. Delete operation failed. VND011 Check the file and directory authorizations. delete file <FILE>. A temporary lock file is still present. If the problem persists. Command <Value> is not supported by back-end library. contact SAP support.VND003 Unable to access list of files to be processed. Error opening file <FILE> to be sent to/retrieved. VND013 Backend does not support the command. Check the backend version. the media may be damaged. Verify that brarchive is not already running for the same node or using the same device(s). Error reading data from file <FILE> (rc = <VALUE>). Check the backend version. If the problem persists. If the problem persists. the media may be damaged.

VND022 Volume in device <DEVICE> has no label. VND023 VND024 Check the tape or tape drive. Tape needs initializing or may be damaged. see other messages. Label on volume in device <DEVICE> has the wrong format. remove the write protection. delete the lock file or look for error (<file name or error message>). Character 'K'. July 2006 201 . VND026 If the tape should be written to. VND030 A tape lock file is already present. VND031 Tape is used by another SAP system. To overwrite data on tape. should be <#> Error registering ADSM file space '<FILE>' of Type '<String>’. VND027 VND028 Initialize the tape. Wrong volume <LABEL> in device <DEVICE>. VND025 Put the correct tape in the drive or specify the correct label on the command line.'G' or 'T' should directly follow volume size. Check the volume or device. Tape needs initializing. Check the command line parameters and the version of the backend. Either brarchive or brrestore is running elsewhere at the same time (wait for program end) or a previous program call terminated unexpectedly (in this case delete the lock file). If not. use the brarchive option -i force. VND029 The tape device class tape entry -size in the DB2 Control Center is incorrect. See other messages. VND032 VND042 Check the TSM installation and configuration. See other messages. Check the accompanying messages for return codes and TSM error messages. Check the tape and device. SAP-SID on tape is <SAPSID>. In both cases. should be <SAPSID>! Wrong tape number <#> in device <Device name>. Tape has to be initialized prior to usage. Tape <Device name> is already in use. Contact Tivoli support if necessary. should be: <LABEL> Volume in device <DEVICE> is write protected! Volume label could not be written to <DEVICE>.'M'.

VND044 Check the TSM installation and configuration. Look at the accompanying messages for return codes and TSM error messages. VND053 202 July 2006 . Check the TSM installation and configuration. Look at the accompanying messages for return codes and TSM error messages.VND043 ADSM mgmt class bind (<STRING>) failed! (FSname: <STRING> HL-name: <STRING> . Contact Tivoli support if necessary. VND047 Error ending process for sending object to ADSM. Contact Tivoli support if necessary. Contact Tivoli support if necessary. Error ending ADSM transaction. Check the TSM installation and configuration. Look at the accompanying messages for return codes and TSM error messages. Contact Tivoli support if necessary. Check the TSM installation and configuration. No entries match the queries. Look at the accompanying messages for return codes and TSM error messages. Error starting ADSM <STRING> query. Look at the accompanying messages for return codes and TSM error messages. See other messages. Error sending object to ADSM. Contact Tivoli support if necessary. Error getting object from ADSM <STRING> repository. Look at the accompanying messages for return codes and TSM error messages. Check the TSM installation and configuration. Check the TSM installation and configuration. Look at the accompanying messages for return codes and TSM error messages. Look at the accompanying messages for return codes and TSM error messages. VND045 VND046 Error sending data to ADSM. Contact Tivoli support if necessary. ADSM objects query found no match. Check the TSM installation and configuration.LLname: <FILE>) Error starting ADSM transaction. Contact Tivoli support if necessary. Look at the accompanying messages for return codes and TSM error messages. Contact Tivoli support if necessary. Error ending ADSM <STRING> query. Contact Tivoli support if necessary. Look at the accompanying messages for return codes and TSM error messages. VND048 VND049 VND050 VND051 VND052 Check the TSM installation and configuration. Check the TSM installation and configuration. Contact Tivoli support if necessary. Error starting data transfer from ADSM 'STRING' repository. Check the TSM installation and configuration.

brarchive executables and library do not match. Contact Tivoli support if necessary. VND064 VND101 VND102 VND111 No matching files in TSM. Look at the accompanying messages for return codes and TSM error messages. Client's API version is higher than the ADSM version Client's ADSM API structures are incompatible/hav e changed File <FILE> not found in ADSM. VND149 VND150 See other error messages. see brrestore . Check the tape and device. Look at the accompanying messages for return codes and TSM error messages. … failed Internal library error. Check the TSM installation and configuration. Copying <FILE> to/from <LOCATION> failed due to previous errors. Error concluding data transfer from ADSM <STRING> repository. Refer to other error messages. Internal error. ADSM reason <No>: <String> ADSM error <No>: <String> Unable to load ADSM API DLL. July 2006 203 . Check the command line device name and DB2 Control Center configuration values. Check the TSM installation and configuration.Log File Retrieval Tool [Page 163]. For more information about non-rewind address examples. Tape <DEVICE> should be a nonrewind address. Check the Admin Tools installation. Error concluding object transfer from ADSM <STRING> repository. Refer to other error messages. TSM reason for an error TSM error number and description Check that TSM has been correctly installed. VND055 VND056 VND059 VND060 VND061 VND062 VND063 brarchive executables and library do not match. Check the Admin Tools installation. Contact Tivoli support if necessary. Check the TSM installation and configuration. Look at the accompanying messages for return codes and TSM error messages.VND054 Error during data transfer from ADSM. Rewind of volume in device <DEVICE> failed. Operation failed. Contact Tivoli support if necessary. Use TSM tools to verify if files exist.

File already exists and will be overwritten. See other error messages. Check whether directory <directory> exists. Compressed file systems may calculate the amount of space available wrongly. one of the software components might not have been installed. check if there is enough free space in the directory.VND170 VND181 VND182 File <FILE> already exists. Delete files or increase the size of the file system. VND186 VND190 Check if <FILE> is a directory. File <FILE> does not exist. Restore of <FILE> failed. If the directory is missing. Install DB2 client application enabler (CAE). Check that you can access the Registry and that there is a key software\IBM\DB2\DB2 Folder Name under HKEY_LOCAL_MACHINE. Check the file. Needed: <VALUE> MB <FILE> is not a directory. 204 July 2006 . DB2 Control Center Extensions Troubleshooting The following tables provide information about error messages from the DB2 Control Center installation program on Windows: Please change directory to <CDROM-drive>:\\NT\\I386\\ADMIN and start again! Cause Solution The installation program was not started in the specified directory. Available: <VALUE> MB. Directory does not exist Cause Solution Directory <directory> does not exist. Space information about device <DEVICE>. DB2HOME not found Cause Solution DB2 client application enabler (CAE) is not installed or an error occurred during Registry access. Switch to the specified directory and restart the installation.

exe. Check whether directory. To ease data collection.\sqllib\bin contains files sddb6wfm. Since DB2 Control Center Extensions are an extension of the DB2 Control Center. At present. db6aopt and db6ar3db. start it with script db2ccdebug. Collecting Diagnostic Information for SAP Support While processing issues reported to SAP support..\sqllib\bin contains files sapact.. When you create a problem message.dll and sddb6wfm. db6atape. Check whether directory. The data collected needs to be provided to SAP. Check whether directory.. To speed up processing of reported issues in DB2 UDB for UNIX and Windows.exe. To run the DB2 Control Center with the DB2 Control Center Extensions trace switched on.. Logon dialog is not displayed Cause Solution The DB2 administration tools were probably not installed correctly. a special start script switches on tracing for the DB2 Control Center.dll.exe. Dialog is not displayed Cause Solution The DB2 administration tools were probably not installed correctly. db6algfl.exe. db6achpw.log is created in your TEMP directory.Error executing car. A trace file called db6cc..dll. you should mention the file name and location. a tool is provided that is described in SAP Note 83819. the data collecting tool can be run when the issue is sent to SAP.exe. SAP support often needs data required for further investigation.bat. db6algfl. the tool currently runs on UNIX systems only. Menu does not appear Cause Solution The DB2 administration tools were probably not installed correctly. Contact SAP support..exe Cause Solution Program car could not be executed.\sqllib\bin contains file sapdef. Many of the data requested by SAP support for DB2 UDB for UNIX and Windows can be grouped together to form typical data sets. July 2006 205 .dll.

and administration action protocols. It contains administration management data. or for customers directed by SAP support to perform specific operations. that is. This information is used in recovering archived files. To understand the log file information in the Admin DB. LOGRETAIN and USEREXIT are set to OFF. On occasion. The following graphic shows the Admin DB tables and their relationships. The Admin DB should require very little administrative attention. The most important tables in the Admin DB refer to log files and their locations. 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.Appendix C: Implementation Details This appendix is only intended as a reference for SAP support personnel to assist with problem determination. 206 July 2006 . Customers may wish to read this information for a better understanding of the tools and to inspect the system. The database administrator can decide whether to back up the database. it is essential that you understand the file states described in Log File States [Page 37]. 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. 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. this is not strictly necessary as brarchive in archive mode also stores the essential parts of the database from which it can be rebuilt. but must not use this knowledge to change the system without an explicit request from SAP support. Transaction logging is circular for the Admin DB. However. configuration parameters.

Admin DB Tables Table Name DB6IDENTIFIER Key OBJID Description Unique identifier.The following table describes the Admin DB tables shown in the graphic above. together with their keys. Contains imported backup information from the database recovery history file. Contains Admin Tools configuration parameters. July 2006 207 . Contains information about log files. the TSM server name. for example. Relates each object to a database node if appropriate. plus tape information. To see the complete structure of each table. These can normally only be set using the DB2 Control Center. DB6LFSTATE OBJID (from DB6IDENTIFIER) + LOCID (from DB6LOCATION) Contains the location and state of each log file. Contains the locations of log files and backups. use the DB2 DESCRIBE command. DB6CONFIG OBJID (from DB6IDENTIFIER) DB6LOCATION LOCID (OBJID in DB6IDENTIFIER) DB6BACKUP OBJID (from DB6IDENTIFIER) DB6LOGFILE OBJID (from DB6IDENTIFIER) The OBJID key is not the log file number.

This number is the number contained in the log file name. Contain temporary data used for internal communication. this is usually due to the DB6ACTION and especially the DB6ACTIONDETAIL tables. DB6DEVCLASS Name Contains tape device classes and related information. for example. For example. 8mm. enter the following SQL statement: SELECT * from sapr3. This view joins several tables and displays the information in a slightly more userfriendly way. to list all location information. /dev/rmt0. Alternatively. Contain the tool protocols used by DB2 Control Center Extensions. enter the following SQL statement: SELECT * from sapr3. DB6TAPETOC OBJID (from DB6TAPE) + LFID (OBJID in DB6LOGFILE) Contains the position of log files on each tape (accelerates recovery). these tables will fill very quickly. DB6DEVICE Name DB6ACTION DB6ACTIONDETAIL DB6CACHE DB6MESSAGE Additional Notes and Troubleshooting Information • Schema The Admin DB tables are created with schema SAPR3 (even with MCOD systems). • Log file information view DB6LOGFILE_PLACE Log file numbers are stored in the integer column NAME in the DB6LOGFILE table. These tables can become very large. For example. for example. Only recent versions of brarchive prune these tables automatically. if a tool is looping or being called repeatedly due to an error situation. S0000456. so all table references in SQL statements must be qualified with this value.DB6TAPE OBJID (from DB6IDENTIFIER) Contains tape volume information.LOG is log file number 456. This can be determined by studying the contents of these tables. A convenient method of studying log file information is using the LOGFILE_PLACE view.db6location. DLT Contains physical tape devices and related information. for example. • Admin DB size If the Admin DB is running out of space.db6logfile_place 208 July 2006 . Make sure that the Admin Tools are up-todate.

the User Exit will not be able to add this association. • Mirroring in Admin Tools Release 4. DB6CONFIG.The output can be limited by specifying a value or range for the NAME column (which contains the log file number). DB6LOGFILE. all related rows will also automatically be deleted from the tables DB6LOGFILE. July 2006 209 .6D called sddb6mir. • Configuration table DB6CONFIG This table contains information to configure the Admin Tools. this table can be reset to the default values. Normally it can only be updated using the DB2 Control Center Extensions. It may be necessary to prune the file occasionally. if you want to create the mirrored tables manually. DB6BACKUP. Although this should not be necessary. where the OBJID columns have the same value and NODE=’NODExxxx’ (replace xxxx with the node number). DB6LFSTATE. There is no direct relationship joining these two objects. For best User Exit performance. 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. do not attempt to create these tables using exactly the same structure as in the Admin DB. In a multi-partitioned environment. If no backup is performed after the Admin Tools are installed. if you require node-specific information. DB6LOCATION. and DB6TAPETOC. • Recursive deletion The relationships between tables DB6IDENTIFIER. Each tape has two object IDs – one related to the DB6LOCATION table and one related to the DB6TAPE table. They all have no mirror flag column. if an object in DB6IDENTIFIER that relates to a log file is deleted. You can also use SQL to update the entries directly.6D There is an extra executable in Admin Tools releases up to 4. you must join this view with the DB6IDENTIFIER table. If the User Exit has not yet been run before brarchive is called for the first time. and DB6TAPETOC are set up with cascading deletes. Be very careful only to delete the OBJIDs found in the configuration table DB6CONFIG and running sddb6ins -i. This information is used to associate log files with a backup. This view contains no node information. If an entry is corrupt or lost. the backup information will be missing and brarchive also generates an error. DB6LFSTATE. In other words. DB6TAPE. You can do this by using SQL to delete all related entries from the DB6IDENTIFIER table. • Backup data in table DB6BACKUP The information in the DB6BACKUP table is extracted from the backup history file by the User Exit. it is also important that the backup history file is not too long.

At the same time it permits storage product manufacturers to provide backend libraries that implement low-level file storage to their products. The separation of logic permits the log file management applications to retain full control over the Admin DB. which can be made available to vendors intending to provide a library interfacing to their archiving product. The interface is described in the SAP system header file vnddb6lfm. for example. brarchive Admin DB brrestore LfmVndInterface tape library TSM library script library vendor library Tape TSM customer script backend backend 210 July 2006 .h. whose interface is not open. Tivoli Data Protection.brarchive and brrestore backend Library Architecture brarchive and brrestore were designed with an open interface to separate log file management logic from the lower-level code responsible for archiving and restoring data.

Sddb6jds calls the Admin Tools and manages the Admin DB ADM<DBSID>. Since all these operations are done on the server. the user can perform several SAP DB2-specific administrative operations. These functions are implemented using the following architecture: The DB2 Control Center looks in directory sqllib/cc for a file called db2plug. July 2006 211 . If any of these options is chosen. In the context menu of any SAP DB2 instance or database. If this file exists. the corresponding SAP extension window appears.DB2 Control Center Extensions Architecture The DB2 Control Center Extensions make use of an open DB2 interface to add functions to the DB2 Control Center via additional menu options. supplementary menu options will be offered. it will be loaded.zip. It comprises the SAP extensions for the DB2 Control Center. From this window. stored procedure sddb6jds is called viJDBC.

the list # # items should be delimited by commas. parameter definition can be continued on the next # # line. # # A parameter value list should be enclosed in parentheses.db6 File init<DBSID>. # # After any symbol. # # # ######################################################################## # db2<dbsid> home directory # # default: no default INSTHOME = /db2/Y6D # Log file archive directory # # default: /db2/<DBSID>/log_archive DB2DB6_ARCHIVE_PATH = /db2/Y6D/log_archive # Log file retrieve directory # # default: /db2/<DBSID>/log_retrieve DB2DB6_RETRIEVE_PATH = /db2/Y6D/log_retrieve # Temporary work directory # # default: /tmp DB2DB6_TEMP_DIR = /tmp # Standby directory # # default: no default # DB2DB6_STANDBY_DIR = # ignore errors on standby dir # # default: OFF # DB2DB6_STANDBY_DIR_NOERR = ON # if ON. tabs and new lines) # # between symbols for parameter definition. brarchive copies Admin DB backup SAR file to STANDBY_DIR # # default: OFF # DB2DB6_STANDBY_DIR_ADMDBSAR = ON # Direct userexit archiving # # default: no default DB2DB6_UEXIT_DIRECT = TSM:DEFAULT # Vendor userexit archiving # # default: no default # DB2DB6_VENDOR_UEXIT = 212 July 2006 . # # There can be any number of white spaces (blanks.Appendix D: Example of File init<DBSID>.db6 on UNIX The following is an example of an environment file under UNIX: ######################################################################## # # # SAP DB2 Universal DB for Unix/Windows Environment File # # # # Enclose parameter values which consist of more than one symbol in # # double quotes.

o) # Admin DB reorg frequency in days # # default: 7 # DB2DB6_ADMDB_REORG_FREQUENCY = 7 # Disconnect from TSM after this time in seconds of no response.a(dsmapish_64.o) # DB2DB6_TSM_SLIB = libApiTSM64. if TSM LANFREE option should be used # # default: OFF # DB2DB6_TSM_MULTITHREADED = ON # TSM shared library # # default: libApiTSM64.# user exit archive without ADMDB # # default: OFF DB2DB6_UEXIT_ARCHIVE_WO_DB = ON # user exit retrieve without ADMDB # # default: OFF # DB2DB6_UEXIT_RETRIEVE_WO_DB = ON # deactivate signal handling for SIGSEGV and SIGBUS # # default: OFF # DB2DB6_CORE = ON # done eject tape (same as -one) # # default: OFF # DB2DB6_NO_EJECT = ON # Script name for -d script # # default: no default DB2DB6_LIBDB6SC_SCRIPT = # TSM multithread support is required. # # default: 0 # DB2DB6_TSM_TIMEOUT = 0 # Userexit Trace # DB2DB6_TRC_DB2UEXT2 = ON DB2DB6_TRC_DB2UEXT2_LEVEL = 3 DB2DB6_TRC_DB2UEXT2_PATH = /db2/Y6D/db2dump # Brarchive Trace # DB2DB6_TRC_BRARCHIVE = ON DB2DB6_TRC_BRARCHIVE_LEVEL = 3 DB2DB6_TRC_BRARCHIVE_PATH = /db2/Y6D/db2dump # Brrestore Trace # DB2DB6_TRC_BRRESTORE = ON DB2DB6_TRC_BRRESTORE_LEVEL = 3 DB2DB6_TRC_BRRESTORE_PATH = /db2/Y6D/db2dump # Stored Procedure Trace # DB2DB6_TRC_SDDB6JDS = ON DB2DB6_TRC_SDDB6JDS_LEVEL = 3 DB2DB6_TRC_SDDB6JDS_PATH = /db2/Y6D/db2dump # TSM Util Trace # DB2DB6_TRC_DB6ADUTL = ON DB2DB6_TRC_DB6ADUTL_LEVEL = 3 DB2DB6_TRC_DB6ADUTL_PATH = /db2/Y6D/db2dump July 2006 213 .a(dsmapish_64. A value of zero turns off this timeout mechanism.

# Backup/Restore tool Trace # DB2DB6_TRC_BRDB6BRT = ON DB2DB6_TRC_BRDB6BRT_LEVEL = 3 DB2DB6_TRC_BRDB6BRT_PATH = /db2/Y6D/db2dump # DB6CLP Trace # DB2DB6_TRC_DB6CLP = ON DB2DB6_TRC_DB6CLP_LEVEL = 3 DB2DB6_TRC_DB6CLP_PATH = /db2/Y6D/db2dump # Data Collector Trace DB2DB6_TRC_DMDB6RDI = ON DB2DB6_TRC_DMDB6RDI_LEVEL = 9 DB2DB6_TRC_DMDB6RDI_PATH = /tmp # Runstats Tool Trace DB2DB6_TRC_DMDB6SRP = ON DB2DB6_TRC_DMDB6SRP_LEVEL = 3 DB2DB6_TRC_DMDB6SRP_PATH = /tmp # Reorg Tablespace Tool Trace # DB2DB6_TRC_DMDB6RTS = ON DB2DB6_TRC_DMDB6RTS_LEVEL = 3 DB2DB6_TRC_DMDB6RTS_PATH = /db2/Y6D/db2dump # Backup DB Tool Trace # DB2DB6_TRC_DMDB6BKP = ON DB2DB6_TRC_DMDB6BKP_LEVEL = 3 DB2DB6_TRC_DMDB6BKP_PATH = /db2/Y6D/db2dump # History Utility # DB2DB6_TRC_SDDB6HIS = ON DB2DB6_TRC_SDDB6HIS_LEVEL = 3 DB2DB6_TRC_SDDB6HIS_PATH = /db2/Y6D/db2dump # Mirror Utility # DB2DB6_TRC_SDDB6MIR = ON DB2DB6_TRC_SDDB6MIR_LEVEL = 3 DB2DB6_TRC_SDDB6MIR_PATH = /db2/Y6D/db2dump # backup retries # # default: 10 # DB2DB6_DMDB6BKP_RETRIES = 10 # backup block size for tapes # # default: 1024 # DB2DB6_DMDB6BKP_BLOCK_SIZE = 1024 # backup util impact priority # # default: 0 # DB2DB6_DMDB6BKP_UTIL_IMPACT_PRIORITY = 0 # enable backup compression # # default: OFF # DB2DB6_DMDB6BKP_COMPRESS = OFF # online backup including logs # # default: OFF # DB2DB6_DMDB6BKP_INCLUDE_LOGS = OFF # Update threshold in percent to flag tables for RUNSTATS # # default: 15 # DB2DB6_DMDB6SRP_UPDATE_THRESHOLD = 15 214 July 2006 .

# Minimum table size in rows to flag tables for RUNSTATS # # default: 1000 # DB2DB6_DMDB6SRP_TABLESIZE_THRESHOLD = 1000 # backup block size for tapes # # default: no default # DB2DB6_DB2DB6_BLOCK_SIZE = 1024 # Percentage of rows read for table size calculation for long and lob columns # # default: 10 # DB2DB6_DB6SRPRTS_PCT_LONG_LOB = 10 # Number of days to refresh CCMS archive log information # # default: 14 # DB2DB6_DMDB6RDI_REFRESH_LOG_INFO = 14 ######################################################################## # End of Environment File # ########################################################################File July 2006 215 .

init<DBSID>.db6 on Windows
The following is an example of an environment file on Windows:
######################################################################## # # # SAP DB2 Universal DB for Unix/Windows Environment File # # # # Enclose parameter values which consist of more than one symbol in # # double quotes. # # After any symbol, parameter definition can be continued on the next # # line. # # A parameter value list should be enclosed in parentheses, the list # # items should be delimited by commas. # # There can be any number of white spaces (blanks, tabs and new lines) # # between symbols for parameter definition. # # # ######################################################################## # db2<dbsid> home directory # # default: no default INSTHOME = c:\db2n4d # Log file archive directory # # default: <drive>:\db2\<DBSID>\log_archive DB2DB6_ARCHIVE_PATH = c:\db2\N4D\log_archive # Log file retrieve directory # # default: <drive>:\db2\<DBSID>\log_retrieve DB2DB6_RETRIEVE_PATH = c:\db2\N4D\log_retrieve # Temporary work directory # # default: C:\WINNT\TEMP\1 DB2DB6_TEMP_DIR = C:\WINNT\TEMP # Standby directory # # default: no default # DB2DB6_STANDBY_DIR = # ignore errors on standby dir # # default: OFF # DB2DB6_STANDBY_DIR_NOERR = ON # if ON, brarchive copies Admin DB backup SAR file to STANDBY_DIR # # default: OFF # DB2DB6_STANDBY_DIR_ADMDBSAR = ON # Direct userexit archiving # # default: no default DB2DB6_UEXIT_DIRECT = TSM:DEFAULT # Vendor userexit archiving # # default: no default # DB2DB6_VENDOR_UEXIT = # user exit archive without ADMDB # # default: OFF DB2DB6_UEXIT_ARCHIVE_WO_DB = ON # user exit retrieve without ADMDB #

216

July 2006

# default: OFF # DB2DB6_UEXIT_RETRIEVE_WO_DB = ON # deactivate signal handling for SIGSEGV and SIGBUS # # default: OFF # DB2DB6_CORE = ON # done eject tape (same as -one) # # default: OFF # 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: adsmv3.dll # DB2DB6_TSM_SLIB = 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 = c:\db2\N4D\db2dump # Brarchive Trace # DB2DB6_TRC_BRARCHIVE = ON DB2DB6_TRC_BRARCHIVE_LEVEL = 3 DB2DB6_TRC_BRARCHIVE_PATH = c:\db2\N4D\db2dump # Brrestore Trace # DB2DB6_TRC_BRRESTORE = ON DB2DB6_TRC_BRRESTORE_LEVEL = 3 DB2DB6_TRC_BRRESTORE_PATH = c:\db2\N4D\db2dump # Stored Procedure Trace # DB2DB6_TRC_SDDB6JDS = ON DB2DB6_TRC_SDDB6JDS_LEVEL = 3 DB2DB6_TRC_SDDB6JDS_PATH = c:\db2\N4D\db2dump # TSM Util Trace # DB2DB6_TRC_DB6ADUTL = ON DB2DB6_TRC_DB6ADUTL_LEVEL = 3 DB2DB6_TRC_DB6ADUTL_PATH = c:\db2\N4D\db2dump # Backup/Restore tool Trace # DB2DB6_TRC_BRDB6BRT = ON DB2DB6_TRC_BRDB6BRT_LEVEL = 3 DB2DB6_TRC_BRDB6BRT_PATH = c:\db2\N4D\db2dump # DB6CLP Trace # DB2DB6_TRC_DB6CLP = ON DB2DB6_TRC_DB6CLP_LEVEL = 3 DB2DB6_TRC_DB6CLP_PATH = c:\db2\N4D\db2dump # Data Collector Trace # DB2DB6_TRC_DMDB6RDI = ON DB2DB6_TRC_DMDB6RDI_LEVEL = 3 DB2DB6_TRC_DMDB6RDI_PATH = c:\db2\N4D\db2dump

July 2006

217

# Runstats Tool Trace # DB2DB6_TRC_DMDB6SRP = ON DB2DB6_TRC_DMDB6SRP_LEVEL = 3 DB2DB6_TRC_DMDB6SRP_PATH = c:\db2\N4D\db2dump # Reorg Tablespace Tool Trace # DB2DB6_TRC_DMDB6RTS = ON DB2DB6_TRC_DMDB6RTS_LEVEL = 3 DB2DB6_TRC_DMDB6RTS_PATH = c:\db2\N4D\db2dump # Backup DB Tool Trace # DB2DB6_TRC_DMDB6BKP = ON DB2DB6_TRC_DMDB6BKP_LEVEL = 3 DB2DB6_TRC_DMDB6BKP_PATH = c:\db2\N4D\db2dump # History Utility # DB2DB6_TRC_SDDB6HIS = ON DB2DB6_TRC_SDDB6HIS_LEVEL = 3 DB2DB6_TRC_SDDB6HIS_PATH = c:\db2\N4D\db2dump # Mirror Utility # DB2DB6_TRC_SDDB6MIR = ON DB2DB6_TRC_SDDB6MIR_LEVEL = 3 DB2DB6_TRC_SDDB6MIR_PATH = c:\db2\N4D\db2dump

# backup retries # # default: 10 # DB2DB6_DMDB6BKP_RETRIES = 10 # tape pattern # # default: \\ # DB2DB6_DMDB6BKP_TAPE_PATTERN = \\ # backup block size for tapes # # default: 1024 # DB2DB6_DMDB6BKP_BLOCK_SIZE = 1024 # backup util impact priority # # default: 0 # DB2DB6_DMDB6BKP_UTIL_IMPACT_PRIORITY = 0 # enable backup compression # # default: OFF # DB2DB6_DMDB6BKP_COMPRESS = OFF # online backup including logs # # default: OFF # DB2DB6_DMDB6BKP_INCLUDE_LOGS = OFF # Update threshold in percent to flag tables for RUNSTATS # # default: 15 # DB2DB6_DMDB6SRP_UPDATE_THRESHOLD = 15 # Minimum table size in rows to flag tables for RUNSTATS # # default: 1000 # DB2DB6_DMDB6SRP_TABLESIZE_THRESHOLD = 1000 # backup block size for tapes # # default: no default # DB2DB6_DB2DB6_BLOCK_SIZE = 1024

218

July 2006

# Percentage of rows read for table size calculation for long and lob columns # # default: 10 # DB2DB6_DB6SRPRTS_PCT_LONG_LOB = 10 # Number of days to refresh CCMS archive log information # # default: 14 # DB2DB6_DMDB6RDI_REFRESH_LOG_INFO = 14 ######################################################################## # End of Environment File # ########################################################################

July 2006

219

220 July 2006 .

tar..smp * # * # * # Sample script to be used with brarchive/brrestore -d script. .db6 if [ ! -f $INIFILE ] then INIFILE=/usr/sap/$SAPSYSTEMNAME/SYS/global/init$DB2DBDFT..db6 fi July 2006 221 . . * # * # This sample script uses TSM (dsmc) to handle the log files. * # Instead of dsmc you can use your own commands. Also you can * # use os commands like cp. retrieve or delete command failes! * # * # Arguments: * # action * # directory * # filename * # * # Returncodes * # LFMVND_STATUS_OK * # LFMVND_RC_ERROR * # LFMVND_COMMAND_NOT_SUPPORTED * # * #********************************************************************* #********************************************************************* # ReturnCodes # LFMVND_STATUS_OK=0 LFMVND_RC_ERROR=64 LFMVND_COMMAND_NOT_SUPPORTED=71 #********************************************************************* # Variables # res=$LFMVND_RC_ERROR outfile=/tmp/dsmc$$. * # * # Attention: It is important to return LFMVND_RC_ERROR if the * # archive.Appendix E: Example of Customer Script db6sctsm. Anwendungen und Produkte in der Datenverarbeitung * # * # (C) Copyright SAP AG * # * # * # db6sctsm.smp #!/bin/sh #********************************************************************* # * # SAP AG Walldorf / Germany * # Systeme.out LANG=C export LANG #********************************************************************* # Arguments # action=$1 directory=$2 file=$3 #********************************************************************* # Messages # echo "action =$action" echo "directory=$directory" echo "file =$file" #********************************************************************* # Configuration section # mgmtclass=DEFAULT INIFILE=$INSTHOME/admintools/init$DB2DBDFT.

..*\[Done\]' $outfile` if [ "$G" = "" ] then res=$LFMVND_RC_ERROR fi .. esac echo "rc =$res" rm -f $outfile exit $res 222 July 2006 .*finished without failure' $outfile` if [ "$G" = "" ] then res=$LFMVND_RC_ERROR fi . #********************************************************************* # *) echo "ERROR: action $action not supported" res=$LFMVND_COMMAND_NOT_SUPPORTED .*\[Sent\]' $outfile` if [ "$G" = "" ] then res=$LFMVND_RC_ERROR fi .#********************************************************************* # Path to put the retrieved logfile # arch_path=`grep DB2DB6_ARCHIVE_PATH $INIFILE | cut -f 2 -d =`/$DB2DBDFT/ case "$action" in #********************************************************************* # This section puts the logfile to the archive # "ARCHIVE") $DSM_DIR/dsmc archive -archmc=$mgmtclass -description='Log file' -compressa=yes $directory/$file | tee $outfile G=`grep 'Archive processing of.. #********************************************************************* # This section delete the logfile in the archive # "DELETE") $DSM_DIR/dsmc delete archive -noprompt $arch_path/$file | tee $outfile G=`grep 'Archive Delete. #********************************************************************* # This section retrieves the logfile from the archive # "RETRIEVE") $DSM_DIR/dsmc retrieve -replace=yes $arch_path/$file $directory/$file | tee $outfile G=`grep 'Retrieving.

creating user-defined types. Name Administration Guide Description Administration Guide: Planning provides an overview of database concepts. and information about high availability. Explains how to develop applications that access DB2 databases using embedded SQL or Java (JDBC and SQLJ). DB2 installation and configuration information These books are for DB2 on a specific platform. and developing applications in partitioned environments or with federated systems. Administrative API Reference Describes the DB2 application programming interfaces (APIs) and data structures that you can use to manage your databases.Appendix F: References DB2 UDB for UNIX and Windows V7 . auditing.com/db2. backup and recovery. using triggers. OS/2. This book also explains how to call APIs from your applications. writing user-defined functions. accessing databases.ibm. information about design issues (such as logical and physical database design). All manuals listed in the following table are available at www. and run DB2 applications on Windows.Additional Documentation The following table divides the DB2 books into two categories: • • DB2 guide and reference information These books contain the common DB2 information for all platforms. Application Building Guide Application Development Guide CLI Guide and Reference July 2006 223 . Administration Guide: Performance provides information about database environment and application performance evaluation and tuning. Discussion topics include writing stored procedures. Explains how to develop applications that access DB2 databases using the DB2 Call Level Interface.software. there are separate Quick Beginnings books for DB2 on platforms based on Windows and UNIX. for example. link. and UNIX platforms. Provides environment setup information and step-by-step instructions about how to compile. Administration Guide: Implementation provides information about implementation issues such as implementing your design. a callable SQL interface that is compatible with the Microsoft ODBC specification.

recover from problems. installation. This book also contains installation and setup information for many supported clients. installation. and enhancements in DB2 UDB for UNIX and Windows Version 7. Introduces SQL concepts and provides examples for many constructs and tasks. load. and the rules of the language.Extended Edition for Windows 32-bit operating systems. and the Data Warehouse Center. Provides planning. Provides planning. and determine the cause of problems. migration. Helps you determine the source of errors. and catalog views. improve performance. installation. product limits. Lists messages and codes issued by DB2. AutoLoader. Explains how to use DB2 utilities. This book also contains installation and setup information for many supported clients. Data Movement Utilities Guide and Reference Message Reference SQL Getting Started SQL Reference. the Information Catalog Manager. and describes the actions you should take.Extended Edition on UNIX platforms. Describes how to collect different kinds of information about databases and the database manager. Volume 1 and Volume 2 System Monitor Guide and Reference Troubleshooting Guide What’s New DB2 Enterprise – Extended Edition for UNIX Quick Beginnings DB2 Enterprise – Extended Edition for Windows Quick Beginnings DB2 for UNIX Quick Beginnings DB2 for Windows Quick Beginnings 224 July 2006 . and DPROP. Describes SQL syntax. Provides planning. migration. Provides planning.Command Reference Explains how to use the command line processor and describes the DB2 commands that you can use to manage your database. installation. that facilitate the movement of data. This book also contains installation and setup information for many supported clients. This book explains how to use the information to understand database activity. Describes the new features. functions. and use diagnostic tools in consultation with DB2 Customer Service. export. and configuration information for DB2 Universal Database on Windows 32-bit operating systems. This book also contains installation and setup information for many supported clients. This book also includes information about releaseto-release incompatibilities. semantics. and configuration information for DB2 Universal Database on UNIX platforms. and configuration information for DB2 Enterprise . and configuration information for DB2 Enterprise . such as import.

the Information Catalog Manager. Name Administration Guide Description Administration Guide: Planning provides an overview of database concepts. accessing databases. Administration Guide: Performance provides information about database environment and application performance evaluation and tuning. and DPROP. writing user-defined functions. backup and recovery. and the Data Warehouse Center. such as import.Additional Documentation All manuals listed in the following table are available at software. Discussion topics include writing stored procedure. Lists messages and codes issued by DB2. AutoLoader. Explains how to develop applications that access DB2 databases using the DB2 Call Level Interface. creating user-defined types.DB2 UDB for UNIX and Windows V8 . Provides environment setup information and step-by-step instructions about how to compile. Explains how to use DB2 utilities. link. information about design issues (such as logical and physical database design). Administrative API Reference Describes the DB2 application programming interfaces (APIs) and data structures that you can use to manage your databases. a callable SQL interface that is compatible with the Microsoft ODBC specification. using triggers. auditing. export.com/db2. Application Development Guide: Building and Running Applications Application Development Guide. Explains how to develop applications that access DB2 databases using embedded SQL or Java (JDBC and SQLJ). OS/2. load. This book also explains how to call APIs from your applications.ibm. and UNIX platforms. that facilitate the movement of data. Explains how to use the command line processor and describes the DB2 commands that you can use to manage your database. and developing applications in partitioned environments or with federated systems. and information about high availability. and describes the actions you should take. Programming Client Applications and Programming Server Applications CLI Guide and Reference Volume 1 and Volume 2 Command Reference Data Movement Utilities Guide and Reference Message Reference July 2006 225 . Administration Guide: Implementation provides information about implementation issues such as implementing your design. and run DB2 applications on Windows.

and the rules of the language.SQL Getting Started SQL Reference. migration. This book explains how to use the information to understand database activity. and enhancements in DB2 UDB for UNIX and Windows Version 8. What’s New Quick Beginnings for DB2 Servers Quick Beginnings for DB2 Clients 226 July 2006 . functions. Provides planning. product limits. and configuration information for DB2 Universal Database servers. and determine the cause of problems. This book also includes information about releaseto-release incompatibilities. and configuration information for DB2 Universal Database client. migration. installation. Provides planning. installation. improve performance. and catalog views. Volume 1 and Volume 2 System Monitor Guide and Reference Introduces SQL concepts and provides examples for many constructs and tasks. Describes how to collect different kinds of information about databases and the database manager. Describes the new features. Describes SQL syntax. semantics.

With the introduction of MCOD systems. If appropriate. sapr3. see Naming Conventions [Page 12]. This is separate from the SAP system database <DBSID> but part of the same database manager instance db2<dbsid>. For more information. If you are unable to find an appropriate link for a topic in this documentation. user IDs (db2<dbsid>. Admin Database Admin DB Refers to the database associated with the log file management tools. <sapsid>adm.Glossary and Index This glossary defines terms used in this documentation or terms often used by support personnel in connection with the Admin Tools. it also includes links to other parts of this documentation. with the assumption that the file is less likely to be lost there in case of system failure. Not to be confused ADSM archiving archival July 2006 227 . refer to the table of contents or the DB2 documentation. The changes are as follows: • • The former SAP system ID <SID> or <sid> changes to <SAPSID> or <sapsid>. Term <DBSID> and <dbsid> (SAP database name) <SAPSID> and <sapsid> (SAP system ID) Description Refer to “<SAPSID> and <sapsid>” in this table. Refers to the movement or copying of a file to other longerterm storage.6D and higher. The IDs and the SAP database names are case-sensitive. The new terms are valid for SAP systems with Release 4. sap<sapsid>) and directory names are affected. The former SAP database name <SID> or <sid> changes to <DBSID> or <dbsid>. The IBM storage product ADSM has been renamed to TSM (Tivoli Storage Manager). which describe the term in more detail. They are explained in more detail in Admin Tools: Enhancements and Changes [Page 13]. See the term User Exit for an example. The Admin DB has the name ADM<DBSID>. it is necessary to differentiate between SAP system IDs and SAP database names. Admin Tools Refers to the SAP DB2 administration tools described in this documentation. Make sure that you observe lower and upper case! Additionally.

such as tape.with backup. usually /db2/<DBSID>/log_archive. Refers to the DB2 software controlling a database instance and its databases.db6 log directory log file log file management tools 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. For more information. Refer to SAP DB2 Control Center Extensions. archive directory Refers to the directory where brarchive stores log files. Offers extra functions when used with the SAP DB2 Control Center Extensions. which will allow it to be recovered (restored) later. Product name and refers to IBM DB2 UDB Enterprise Server Edition. The opposite of retrieving.db6 contains environment variables used by the Admin Tools for tasks such as turning on tracing. Refers to a file generated by DB2 to keep track of changes made to the database. for recovery purposes. It is defined in the ini file as DB2DB6_ARCHIVE_PATH.6D Admin Tools only) backend backup DB2 Control Center DB2 Control Center Extensions DB2 Database Manager ESE ini file init<DBSID>. TSM or a vendor product Refers to the action of storing the database in a form. see Actions Performed by the sddb6ins Program [Page 53] and Appendix D: Example of File init<dbsid>db6 [Page 212]. Refers to the directory where DB2 stores log files. DB2 product offering a graphical interface used to administer databases. For more information. often on a 228 July 2006 . Refers to the target used to archive files to. This is a DB parameter (db cfg) defined as “Path to log files”. see Naming Conventions [Page 12]. The term log file management tools refers to components of the Admin Tools that perform log file management tasks: • • • • • • • • mirror • • brarchive brrestore db2uext2 (User Exit) db6adutl libdb6ds (brarchive/brrestore library) libdb6tp (brarchive/brrestore library) libdb6sc (brarchive/brrestore library) sddb6mir (4. usually /db2/<DBSID>/log_dir/NODExxxx. File init<DBSID>.

Refers to the movement or copying of a file back to disk from longer-term storage. The IBM storage product ADSM has been renamed to TSM (Tivoli Storage Manager). Executable db2uext2. Refer to the DB2 documentation in Appendix F: References [Page 223]. protocol file restore retrieving retrieval retrieve directory roll-forward SAP DB2 Control Center Extensions TSM User Exit July 2006 229 . Used directly by DB2 to archive log files out of the log directory to either the archive directory. For more information about released platforms and availability. which extends the functionality of the DB2 Control Center to perform SAP-specific database administration tasks. For more information. usually /db2/<DBSID>/log_retrieve. see Admin Tools: Enhancements and Changes [Page 13]. which indicates what the tool has done and contains any results or errors. such as one of the Admin Tools. which is the opposite of archiving. Not to be confused with restore. This will often require a database roll-forward afterwards. Refers to the directory where brrestore stores log files. Refers to a file generated by an application. Product installed together with the Admin Tools. see Setting and Updating Passwords [Page 116].service. Also used by DB2 to retrieve log files in order to perform roll-forward operations after a database restore operation. The Admin Tools have been modified to support this SAP system feature. It is defined in the ini file as DB2DB6_RETRIEVE_PATH. For more information. This means that you can install an additional SAP system into an existing database. Refers to the extraction of database transaction data from log files. password file Refers to file dscdb6. This information is added to a database after a restore operation in order to bring it up to date. see SAP Log File Management [Page 28]. This may be done after a system failure or in order to generate a database copy. This is normally only necessary after a system failure. Refers to the action of restoring the database from a backup. For more information. See the term User Exit for an example. or directly to TSM.sap.neighboring machine Multiple Components in One Database (MCOD) Multiple Components in One Database is referred to as MCOD. For more information. Contents are set using the dscdb6up utility.com/platforms and choose Multiple Components in One Database (MCOD). For more information.conf containing encrypted passwords. see SAP Service Marketplace at www. see Installation and Setup of the DB2 Control Center Extensions [Page 60]. see Naming Conventions [Page 12].

230 July 2006 .

Sign up to vote on this title
UsefulNot useful