You are on page 1of 49

Quick-start guide to FlashCopy Manager

for SAP on IBM DB2® Database with


IBM® Storwize® V7000,
IBM SAN Volume Controller® or
IBM DS8000® Storage System

A Best Practices Paper

This paper can be found in the IBM Techdocs library.

Version 2.3 (2010-10-01)

Axel Westphal (awestphal@de.ibm.com)


Wilhelm Gardt (willigardt@de.ibm.com)

IBM Systems and Technology Group (STG)


IBM System Storage - Advanced Technical Support (ATS)
European Storage Competence Center (ESCC), Mainz, Germany
Quick Start Guide to FlashCopy Manager for SAP on DB2 database 2

Trademarks
The following are trademarks of the International Business Machines Corporation in the United States and/or other countries:
AIX, eServer, FICON, IBM, IBM (logo), iSeries, OS/390, pSeries, RS/6000, POWER, WebSphere, xSeries, z/OS, zSeries,
IBM XIV Storage System, IBM Storwize V7000, DS4000, DS6000, DS8000, SAN Volume Controller, System Storage,
FlashCopy, System p, System z, System x, System I, Lotus, Lotus Notes, Notes, Domino

For a complete list of IBM Trademarks, see www.ibm.com/legal/copytrade.shtml


The following are trademarks or registered trademarks of other companies:
Java and all Java-related trademarks and logos are trademarks of Sun Microsystems, Inc.
SAP, SAP R/3 Enterprise, NetWeaver and SAP ERP are trademarks of SAP AG in Germany, other countries, or both.
UNIX is a registered trademark of The Open Group in the United States and other countries.
Microsoft, Windows, Windows Server 2008, SQL Server 2008 and Excel are registered trademarks of Microsoft Corporation.
Intel is a registered trademark of Intel Corporation.
Other company product and service names may be trademarks or service marks of their respective owners.

Disclaimer
This paper is intended to be used as a guide to help people working with IBM Storage Systems. It discusses findings based on
configurations that were created and tested under laboratory conditions. These findings may not be realized in all customer
environments, and implementation in such environments may require additional steps, configurations, and performance
analysis. This information does not constitute a specification or form part of the warranty for any IBM products. Specific
parameters or settings that are described in this document may have been set to meet the requirements of this study and do not
necessarily represent “correct”, “preferred” or “recommended” settings for a production environment.
No part of this document may be reproduced or transmitted in any form without written permission from IBM Corporation.
Product data is subject to change without notice. This information could include technical inaccuracies or typographical errors.
IBM may make improvements and/or changes in the product(s) and/or program(s) at any time without notice. Any statements
regarding IBM's future direction and intent are subject to change or withdrawal without notice, and represent goals and
objectives only. References in this document to IBM products, programs, or services do not imply that IBM intends to make such
products, programs or services available in all countries in which IBM operates or does business. Any reference to an IBM
Program Product in this document is not intended to state or imply that only that program product may be used. Any functionally
equivalent program, that does not infringe IBM's intellectually property rights, may be used instead. It is the user's responsibility
to evaluate and verify the operation of any non-IBM product, program or service.
THE INFORMATION PROVIDED IN THIS DOCUMENT IS DISTRIBUTED "AS IS", WITHOUT ANY WARRANTY, EITHER
EXPRESS OR IMPLIED. IBM EXPRESSLY DISCLAIMS ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE OR NONINFRINGEMENT OR INTEROPERABILITY.
IBM shall have no responsibility to update this information. IBM products are warranted according to the terms and conditions of
the agreements (e.g., IBM Customer Agreement, Statement of Limited Warranty, International Program License Agreement,
etc.) under which they are provided. IBM is not responsible for the performance or interoperability of any non-IBM products
discussed herein.
The provision of the information contained herein is not intended to, and does not, grant any right or license under any IBM
patents or copyrights. Inquiries regarding patent or copyright licenses should be made, in writing, to:
IBM Director of Licensing, IBM Corporation, North Castle Drive, Armonk, NY, 10504-1785, U.S.A.
The use of this information or the implementation of any of these techniques is a customer responsibility and depends on the
customer’s ability to evaluate and integrate them into their operating environment. Customers attempting to adapt these
techniques to their own environments do so at their own risk.

Page 2 of 49 © COPYRIGHT IBM CORPORATION, 2010 Version: 2.3 (2010-10-01)


Quick Start Guide to FlashCopy Manager for SAP on DB2 Database 3

Abstract
Backups of SAP® systems are normally performed within a window during batch processing because
the impact of the backup load on a database or application can be best tolerated. Compressing all
backup activities into this backup window causes an extremely high peak workload for the system
infrastructure (network, servers, tape drives). Because of growing database volumes, an increasing
number of SAP systems and the business need for 24-by-7 application availability, the backup window
can become a key obstacle in meeting service-level requirements.
Storage-based FlashCopy or snapshot solutions provide the operational flexibility necessary for
today‘s IT infrastructure:

• Zero impact backups can be started any time during the daily operation of an SAP system,
because the FlashCopy technique minimizes the impact on the application (server-processor
load, database-backup window).

• Backups can be made in two steps: point-in-time copy to disk and delayed (or immediate)
backup to tape (to balance tape load and more efficiently use the existing infrastructure.

• Backups can be made more frequently (to disk) to minimize the amount of log files between
backups and, hence, the time needed for forward recovery to the latest point before failure.
IBM® Tivoli® Storage FlashCopy® Manager software provides fast application-aware backups and
restores by leveraging advanced snapshot technologies in IBM storage systems.
Starting with version 2.2, FlashCopy Manager also supports the cloning of an SAP database. In SAP
terms, this is called a Homogeneous System Copy — that is, the System Copy runs the same
database and operating system (OS) as the original environment. Again, FlashCopy Manager
leverages the FlashCopy or snapshot features of IBM storage system to create a point-in-time copy of
the SAP database.

By using the FlashCopy Manager cloning feature for SAP, the effort of creating a system copy can be
reduced from two days (or more) to just a few hours.

This paper covers the installation and configuration of FlashCopy Manager for SAP on an IBM DB2®
database.Operating systems are IBM AIX® and SUSE Linux Enterprise Server® (SLES). IBM
DS8000® storage server, IBM Storwize V7000 and IBM System Storage SAN Volume Controller (an
IBM virtualization offering) have been used as backend storage systems.

Remark: The correct name of the software product is “IBM Tivoli® Storage FlashCopy® Manager”. To
facilitate readability of the text, the short name “FlashCopy® Manager” is used in this document.

Page 3 of 49 © COPYRIGHT IBM CORPORATION, 2010 Version: 2.3 (2010-10-01)


Quick Start Guide to FlashCopy Manager for SAP on DB2 Database 4

Table of contents
1 Products overview ...................................................................................................................5
1.1 IBM System Storage DS8000 .........................................................................................5
1.2 IBM System Storage SAN Volume Controller .................................................................5
1.3 IBM Storwize V7000........................................................................................................6
1.4 IBM Tivoli Storage FlashCopy Manager .........................................................................6
2 Hardware and software setup (in the Mainz lab).....................................................................9
2.1 Hardware and software ...................................................................................................9
2.2 Volume and volume group layout..................................................................................10
2.3 FlashCopy Manager differences on AIX and Linux.......................................................11
3 FlashCopy Manager prerequisites ........................................................................................13
3.1 Overview........................................................................................................................13
3.2 Preinstallation tasks ......................................................................................................14
3.3 Secure Shell ..................................................................................................................14
3.4 Installation and configuration of the CIM Agent (DS8000)............................................14
3.4.1 Configuring the CIM agent to access DS8000......................................................16
3.5 CIM agent setup for IBM SAN Volume Controller and IBM Storwize V7000 ................17
3.6 TSM client and server ...................................................................................................17
3.7 TSM for Enterprise Resource Planning.........................................................................18
3.8 DB2 instance creation ...................................................................................................19
4 FlashCopy Manager installation and configuration ...............................................................20
4.1 Software installation ......................................................................................................20
4.2 Configuration for disk-only backup................................................................................21
4.3 Switching from disk-only to offloaded backup ...............................................................23
5 Backup and restore scenarios ...............................................................................................25
5.1 Disk-only backup ...........................................................................................................26
5.2 Offload to Tivoli Storage Manager ................................................................................28
5.3 Restore from snapshot ..................................................................................................29
5.4 Backup and restore from TSM Server...........................................................................30
5.5 Additional functions .......................................................................................................30
6 Backup schedule options.......................................................................................................32
7 Cloning of an SAP Database.................................................................................................33
7.1 Preprocessing and postprocessing scripts....................................................................34
7.2 SAP cloning steps .........................................................................................................35
7.3 Configuration for backup and cloning............................................................................36
7.3.1 DB2 database schema..........................................................................................38
7.4 Cloning parameters .......................................................................................................39
7.5 Cloning functions...........................................................................................................39
7.6 Cloning with SAN Volume Controller 5.1 ......................................................................40
8 Troubleshooting.....................................................................................................................41
8.1 Error message libacsdb2.a............................................................................................41
8.2 How to reset the FlashCopy Manager acsrepository ....................................................41
8.3 Database online backup not allowed ............................................................................41
8.4 UNIX user shell definitions ............................................................................................42
9 Appendix................................................................................................................................43
9.1 Setup script protocol for SAP on DB2 and IBM DS8000 ..............................................43
9.2 Setup script protocol for SAP on DB2 and IBM DS8000 with offload to TSM Server...45
9.3 Setup script protocol for SAP on DB2 and SVC with backup and cloning....................47

Page 4 of 49 © COPYRIGHT IBM CORPORATION, 2010 Version: 2.3 (2010-10-01)


Quick Start Guide to FlashCopy Manager for SAP on DB2 Database 5

1 Products overview

1.1 IBM System Storage DS8000


IBM System Storage® DS8000® is a cabinet-mounted, self-contained disk-storage subsystem. It is
designed for the higher demands of data storage and data availability that most large organizations
face today.
The DS8000 series gains benefits from using IBM POWER™ processor-based technology. Its
extended connectivity, with up to 128 Fibre Channel (FC) IBM FICON® ports, makes it suitable for
multiple server environments in both the open systems and IBM System z® environments. Depending
on your needs, the DS8000 system can be equipped with SATA drives, FC drives and IBM Solid®
State Drives.

Its switched Fibre Channel architecture, dual-processor complex implementation, high-availability


design and the advanced point-in-time copy as well as the remote mirror and copy functions that it
incorporates make the DS8000 system suitable for mission-critical business functions. See the
following IBM Redbook® documents and other related, found at these Web sites:
• www.redbooks.ibm.com/abstracts/sg246786.html?Open
• www.ibm.com/systems/storage/disk/ds8000/index.html

DS8000 FlashCopy
The primary objective of the DS8000 FlashCopy function is to very quickly create a point-in-time copy
of a source volume on a target volume. The benefits are that the point-in-time target copy is
immediately available to use for backups or testing, and that the source volume is immediately
released so that applications can continue processing with minimal application downtime. The target
volume can be either a logical or physical copy of the data, with the latter copying the data as a
background process.
For more information about DS8000 FlashCopy, refer to the IBM Redbooks® found at:
www.redbooks.ibm.com/abstracts/sg246788.html?Open

1.2 IBM System Storage SAN Volume Controller


The IBM System Storage SAN Volume Controller® (SVC) is a storage virtualization system. It enables
a single point of control for storage resources to improve business application availability and resource
usage. SVC helps increase available storage capacity to host applications. By pooling capacity from
multiple disk systems in the storage area network (SAN), storage administrators can reach beyond
traditional islands of SAN storage. See
www.ibm.com/systems/storage/software/virtualization/svc/index.html

SVC FlashCopy

The FlashCopy function creates an almost instant copy of active data for backup and cloning. SVC
supports incremental FlashCopy operations that copy only the portions of the source or target virtual
disk updated since the last FlashCopy function, and also backs up cascaded operations where the
target of one FlashCopy relationship is further copied. These abilities can help maintain and update a
test environment based on production data. See
www.redbooks.ibm.com/abstracts/sg247574.html?Open

Page 5 of 49 © COPYRIGHT IBM CORPORATION, 2010 Version: 2.3 (2010-10-01)


Quick Start Guide to FlashCopy Manager for SAP on DB2 Database 6

1.3 IBM Storwize V7000


IBM Storwize V7000 is a midrange storage system with internal disk running the SAN Volume
Controller (SVC) software stack providing the same virtualization capabilities as the SVC system
today. IBM Storwize V7000 is available since fall 2010. If desired, the SVC system can still be used to
virtualize non-IBM disk in the same overall environment in addition to virtualizing a Storwize V7000
system.
The storage system includes the advanced functions of SAN Volume Controller:
• SVC enterprise-class replication
• IBM Easy Tier functionality for efficient use of Solid State Drives (SSD)
• SVC heterogeneous virtualization to simplify migration from installed storage

The system’s disk backend is formed by modular hardware building blocks: twelve 3.5” or twenty-four
2.5” drives (see Figure 1) and dual controllers in a two unit (2U) drawer. Solid State Drives can be
included in 24 bay enclosures.
The device management of IBM Storwize V7000 is web-based and modelled after the popular user
interface of IBM XIV® storage system.

Figure 1: IBM Storwize V7000 Enclosure Front View – example with 24 Drive Bays

1.4 IBM Tivoli Storage FlashCopy Manager


In today's IT world, where application servers are operational 24 hours a day, the data on these
servers must be fully protected. With the rapid increase in the amount of data on these servers, their
critical business needs and the shrinking backup windows, traditional backup and restore methods can
be reaching their limits in meeting these challenging requirements. Snapshot operations can help
minimize the impact caused by backups and provide near-instant restore capabilities. Because a
snapshot operation typically takes much less time than the time for a tape backup, the window during
which the data is being backed up can be reduced. This helps with more frequent backups and
increases the flexibility of backup scheduling and administration because the time spent for forward
recovery through transaction logs after a restore is minimized.

IBM Tivoli Storage FlashCopy Manager uses the copy-services capabilities of intelligent storage
subsystems to create point-in-time copies. These are application-aware copies (FlashCopy or
snapshot) of the production data. This copy is then retained on disk as a backup, allowing for a fast
restore operation (flashback). FlashCopy Manager also allows mounting the copy on an auxiliary
server (backup server) as a logical copy. This copy (instead of the original production-server data) is
made accessible for further processing. This processing includes creating a backup to Tivoli Storage
Manager (disk or tape) or doing backup verification functions (for example, the Database Verify Utility).

If a backup to Tivoli Storage Manager fails, IBM Tivoli Storage FlashCopy Manager can restart the
backup after the cause of the failure is corrected. In this case, data already committed to Tivoli

Page 6 of 49 © COPYRIGHT IBM CORPORATION, 2010 Version: 2.3 (2010-10-01)


Quick Start Guide to FlashCopy Manager for SAP on DB2 Database 7

Storage Manager is not resent.

FlashCopy Manager supports the cloning of an SAP database since release 2.2. In SAP terms, this is
called a Homogeneous System Copy, that is, the system copy runs the same database and operating
system as the original environment. Again, FlashCopy Manager leverages the FlashCopy or Snapshot
features of the IBM storage system to create a point-in-time copy of the SAP database.

The SAP System Copy guidelines describe a number of additional actions to perform in the copied
SAP system (for example, disable Remote Function Call [RFC] destinations and disable batch-job
processing). IBM can provide a number of scripts to automate some of these tasks. However, these
scripts are not part of the FlashCopy Manager software package and must be ordered separately.

The FlashCopy technology is ideally suited for database cloning, especially for large and intensively
used databases, because it is fast (short time to recover and access the copy) and can be used in an
ad hoc manner (database online, no load on production). Figure 2 gives an overview of the supported
applications and storage servers that can use FlashCopy Manager.

Remark: FlashCopy Manager for Windows® supports Microsoft® SQL Server® and Microsoft
Exchange applications. IBM DS3000®, DS4000® and DS5000® storage systems are supported by
Windows through Volume Shadow Copy Service (VSS).

Page 7 of 49 © COPYRIGHT IBM CORPORATION, 2010 Version: 2.3 (2010-10-01)


Quick Start Guide to FlashCopy Manager for SAP on DB2 Database 8

Figure 2: Supported applications and storage systems


For more information about Tivoli Storage FlashCopy Manager, refer to
www.ibm.com/software/tivoli/products/storage-flashcopy-mgr .

Page 8 of 49 © COPYRIGHT IBM CORPORATION, 2010 Version: 2.3 (2010-10-01)


Quick Start Guide to FlashCopy Manager for SAP on DB2 Database 9

2 Hardware and software setup (in the Mainz lab)


This paper covers the installation and configuration of IBM Tivoli FlashCopy Manager with SAP on
DB2. The operating systems are IBM AIX and SUSE Linux Enterprise Server release (SLES 10).
The information in this paper is based on FlashCopy Manager tests that were run for SAP R/3 on a
DB2 9.5 database at the IBM Systems Lab Europe in Mainz, Germany. The backup and restore
scenarios were tested with FlashCopy Manager 2.1. The cloning feature for SAP systems became
available with FlashCopy Manager release 2.2 and was tested during a follow-on project to update this
paper.

2.1 Hardware and software


Several configuration steps are necessary on an AIX or Linux host to attach it to a storage system.
Host-attachment guides and further information for DS8000 and SVC are available on the following
IBM storage support Web pages.
• Information centers for DS8000 and SVC:
http://publib.boulder.ibm.com/infocenter/dsichelp/ds8000ic/index.jsp
http://publib.boulder.ibm.com/infocenter/svcic/v3r1m0/index.jsp

• DS8000 Host Attachment Kit for AIX:


www.ibm.com/support/dlsearch.wss?rs=540&q=host+attachment&tc=ST52G7&dc=D410

• SVC host attachment guide


ftp://ftp.software.ibm.com/storage/san/sanvc/V5.1.0/pubs/English/SVC_Host_Attach_Guide.pdf

Figure 3: Hardware setup for FlashCopy Manager with SAP on DB2

Page 9 of 49 © COPYRIGHT IBM CORPORATION, 2010 Version: 2.3 (2010-10-01)


Quick Start Guide to FlashCopy Manager for SAP on DB2 Database 10

The FlashCopy Manager software was tested in SAP R/3 and SAP NetWeaver environments.
Therefore, multiple hostnames and SAP SIDs are found in this paper. The following software was
installed on the SAP system logical partitions (LPAR):
SAP R/3 Enterprise 4.7
SAP Kernel 6.40 Level 221
Database IBM DB2 9.5.0.1
Operating System AIX 5.3 TL 10

SAP ERP 6.0 SR3 NetWeaver 7.0


SAP Kernel 7.00
Database IBM DB2 9.5.0.3
Operating System AIX 6.1 TL 4

The following software was installed on the System x servers:

SAP ERP 6.0 NetWeaver 7.01 SR1


SAP Kernel 7.10
DB2 9.5.0.5
Suse Linux Enterprise Server 10 SP3 operating system

System p LPAR System ID (SID) Host-system name


R/3 production system OD3 sapr3db
R/3 backup system n/a sapr3dbcl
NetWeaver production system T2P sapt2p
NetWeaver backup and clone T2C (used for cloning) sapt2c
Table 1: Production and backup and clone systems

Note: IBM Storwize V7000 storage system runs the (SVC) software stack starting with SVC
release 6.1 in fall 2010. Thus, the below explanations for SVC are also valid for IBM Storwize
V7000.

2.2 Volume and volume group layout


FlashCopy Manager requires a well-defined volume layout on the storage subsystem and a resulting
volume group structure on AIX and Linux.The FlashCopy Manager preinstallation checklist (see 3.2
specifies the required volume groups. Distinct volume groups must be defined for:
• Data files (sapdata)
• Database logs (log_dir)
• DB2 instance directory (db2<sid>)
• SAP and DB2 binaries (for example /sapmnt and /db2)
The DS8000 and SVC volume names or IDs defined for the SAP production system and the
FlashCopy target volumes are shown in Table 2 to Error! Reference source not found..
SAP production LPAR Volume group Extent Volume IDs Volume FlashCopy
pool size target volumes
SID: OD3 Data P4,P5 4104,4204 60 GB 4E10,4F10
Logs P5 4105,4205 20 GB 4E11, 4F11
db2_dir P4,P5 4107,4207 2 GB 4E12, 4F12
SAP/DB2 P4,P5 4106,4206 20 GB
Swap P4,P5 4103,4203 10 GB
System P5 4000 20 GB
Table 2: DS8000 storage-system layout

Note: The FlashCopy Manager tests were run on DS8000 first. For the tests on other storage

Page 10 of 49 © COPYRIGHT IBM CORPORATION, 2010 Version: 2.3 (2010-10-01)


Quick Start Guide to FlashCopy Manager for SAP on DB2 Database 11

systems, only the database and the database log files were migrated to these storage systems.

Remark: In the case of the data files, database logs and SAP/DB2 software, two logical volumes were
created on separate DS8000 extent pools to distribute the I/O load across the available DS8000
resources, according to DS8000 best practices

SAP production LPAR Volume Volume IDs Volume FlashCopy target


Group size volumes
SID: T2P sapdata SAP_T2P_DATA1 85 GB SAP_T2C_DATA1
SAP_T2P_DATA2 SAP_T2C_DATA2
saplog SAP_T2P_LOG 20 GB SAP_T2C_LOG
Table 3: SVC or IBM Storwize V7000 volume definitions for production and backup servers

As shown in Table 4, the volume group and file-system layouts for the DS8000 and SAN Volume
Controller system can be identical.
Volume group File system Size
sapdatavg /db2/OD3/sapdata1 15 GB
/db2/OD3/sapdata2 20 GB
/db2/OD3/sapdata3 15 GB
/db2/OD3/sapdata4 20 GB
/db2/OD3/saptemp1 1 GB

Log_dir /db2/OD3/log_dir 10 GB

Db2_dir /db2/OD3/db2od3 1 GB

sapdb2* /sapmnt/OD3 5 GB
/usr/sap 5 GB
/db2/OD3 20 GB
Table 4: AIX volume group layout

If the FlashCopy Manager offload feature is used, a backup server with a DB2 instance must be
installed. The volume layout, as described here for the production system, is also required for the
backup system. For the FlashCopy solution on the backup server, either new logical volumes for
database logs and data must be defined or the existing volumes are overwritten.

2.3 FlashCopy Manager differences on AIX and Linux


The FlashCopy Manager preinstallation checklist (see chapter 3.2 ) shows the supported versions of
AIX and Linux. The default installation path for these operating systems is slightly different (see Table
5)..

Operating system Default installation path Space required [MB]


AIX /usr/Tivoli/tsfcm/acs_2.2.x.x 650
Linux /opt/Tivoli/tsfcm/acs_2.2.x.x 250
Table 5: Installation paths and required space

FlashCopy Manager version 2.2 added the operating systems Linux and Solaris to the support list.
Linux and AIX support different file system types. Consequently, FlashCopy Manager requires JFS2 or
JFS on AIX and ext2 or ext3 on Linux. On Linux the logical volume manager LVM2 is a prerequisite for
the installation of FlashCopy Manager 2.2

FlashCopy Manager supports LVM mirroring for AIX high availability environments. A forced mount is
required in an LVM mirroring environment on AIX. FlashCopy Manager for Linux does not support
high-availability clustered environments,

Page 11 of 49 © COPYRIGHT IBM CORPORATION, 2010 Version: 2.3 (2010-10-01)


Quick Start Guide to FlashCopy Manager for SAP on DB2 Database 12

Linux startup uses the lvm.conf file to configure LVM. An additional configuration step is required for a
FlashCopy Manager setup on Linux.
If using the Linux multipath daemon it has to be ensured that only multipath pseudo devices are used
in the lvm.conf file and thus visible to LVM. The filter statement in the devices {} section of the lvm.conf
file must be edited accordingly. However, if the SAN boot device is managed by LVM, it must not be
excluded .

Example:
devices {
...
filter = [ "a|^/dev/mapper/mpath.*|", "r|.*|" ]

}

The FlashCopy Manager commands are identical on Linux and AIX.

Page 12 of 49 © COPYRIGHT IBM CORPORATION, 2010 Version: 2.3 (2010-10-01)


Quick Start Guide to FlashCopy Manager for SAP on DB2 Database 13

3 FlashCopy Manager prerequisites


The installation of Tivoli FlashCopy Manager requires several preinstallation tasks. There tasks are
described in an essential document: the preinstallation checklist (see chapter 3.2 ), which defines
hardware and software requirements and describes the volume group layout for the SAP environment.

3.1 Overview
This section describes the theoretical background of an SAP backup and restore solution. The
concept and products are not explained in detail. Existing links in the document provide references to
product manuals, Whitepapers and other relevant documentation.
A DB2 Database backup must take several file types into consideration: control files, data files, online-
redo logs and offline redo logs (also called an archive).
In an SAP environment with a DB2 database, it is possible to control backup and restore operation
with DB2 commands. This includes backup and restore to and from local files, to and from a Tivoli
Storage Manager (TSM) Server, as well as FlashCopy backup and restore.

DB2 directly interfaces with other software products to provide extended backup and restore functions:
• With Tivoli Storage Manager to provide backup and restore to and from TSM storage pools
• With Tivoli FlashCopy Manager to provide FlashCopy backup and restore
In other words, when calling the BACKUP DATABASE or RESTORE DATABASE commands, the
use clause of the DB2 backup and restore commands can be used to specify TSM or FlashCopy
usage to manage database or tablespace backup or restore operations.

Examples: Syntax of the DB2 backup command: db2 restore database … use snapshot …
Syntax of the DB2 backup command: db2 backup database … use tsm …
This means it is possible to use different backup and restore methods of DB2 in parallel, specifying the
appropriate method in the use clause (for example, TSM or SNAPSHOT).

SAP provides an interface description that lets vendors of backup and restore software connect their
software products to the SAP backup and recovery procedures. IBM Tivoli offers Tivoli Storage
Manager for Enterprise Resource Planning® (also: TSM for ERP or Data Protection for SAP) to
interact with the IBM backup and restore solution (that is, Tivoli Storage Manager). TSM for ERP in
combination with Tivoli Storage Manager provides a reliable solution that enables backup and restore
of DB2 database-based SAP systems. It is integrated with DB2 backup and recovery facilities and
applies SAP backup and recovery procedures.

TSM for ERP provides file-level backup and restore; FlashCopy Manager works at the volume level.

Recommendation: Consider TSM for ERP as a complement to FlashCopy Manager for backups to
tape and for archiving database redo logs or log files.

If FlashCopy Manager is used to offload existing disk-only backups to a TSM Server, a DB2 instance
must be installed on the associated backup server. See subchapter 3.8 .

Furthermore, an offload backup with FlashCopy Manager requires that the user name and group
name of the database-instance owner on the production system are also available on the backup
server with the same user ID (UID) and group ID (GID).

Further reading: Data Protection for SAP - Installation and User’s Guide for DB2
(http://publib.boulder.ibm.com/infocenter/tsminfo/v6/index.jsp ) and

Page 13 of 49 © COPYRIGHT IBM CORPORATION, 2010 Version: 2.3 (2010-10-01)


Quick Start Guide to FlashCopy Manager for SAP on DB2 Database 14

Database Administration Guide: SAP on IBM DB2 Universal Database for UNIX and Windows (found
at SAP Service Marketplace at: http://service.sap.com/instguides )

3.2 Preinstallation tasks


The most recent preinstallation task checklist for FlashCopy Manager can be found at:
www.ibm.com/support/docview.wss?uid=swg21428707
in the manual entitled IBM Tivoli Storage FlashCopy® Manager Version 2.2 Hardware and Software
Requirements.
The checklist defines hardware and software requirements and describes the volume layout for the
SAP environment. To have a smooth installation of FlashCopy Manager, it is absolutely necessary
that all requirements are fulfilled.

For a list of considerations and decisions before installing IBM Tivoli Storage FlashCopy® Manager
Version for AIX, refer to the Installation Planning Sheet that is also available under the previous link.

3.3 Secure Shell


A FlashCopy Manager environment that uses one or more backup servers (for example, to offload
backup data to TSM) requires FlashCopy Manager software on production and backup systems. It is
possible to separately install and configure FlashCopy Manager on the backup systems running the
setup scripts on the backup servers.

However, it is more efficient to maintain the configuration centrally on the production system and
create or modify the backup systems’ configuration from this central instance. In the latter case,
communication is required between the production and backup systems.

Two options are available:


• A Secure Shell (OpenSSH) connection
• An NFS-share of the FlashCopy Manager configuration directory (ACS_DIR) and the
database instance-specific installation directory (INST_DIR)
NFS sharing of directories is possible, but OpenSSH is preferred for FlashCopy Manager. If Secure
Shell is used, installation and configuration updates are controlled centrally on the production server.

If IBM DS8000 Storage System is used, a CIM Agent must also be installed on the servers to control
the storage-based copy services. OpenSSH and the CIM Agent must work together with an OpenSSL
(Secure Sockets Layer) library.

AIX 6.1 and SLES 10 include OpenSSH and OpenSSL software packages. For previous versions of
AIX the software components are available for download on the Web:
• OpenSSL: ibm.com/systems/p/os/aix/linux/toolbox/download.html
(follow the link 'AIX Toolbox Cryptographic Content' on the right)
• OpenSSH comes with AIX 6.1. Check to see that this version works before downloading and
installing it from http://sourceforge.net/projects/openssh-aix/files/#

3.4 Installation and configuration of the CIM Agent (DS8000)


IBM Tivoli Storage FlashCopy Manager accesses FlashCopy services on DS8000 or SAN Volume
Controller through a CIM server. Depending on the storage subsystem microcode level, this CIM
server is either embedded directly into the storage subsystem or required to be installed and
configured as a proxy CIM server in the environment.

Page 14 of 49 © COPYRIGHT IBM CORPORATION, 2010 Version: 2.3 (2010-10-01)


Quick Start Guide to FlashCopy Manager for SAP on DB2 Database 15

Starting with SAN Volume Controller 4.3.1 and DS8000 R4.1, the CIM server is embedded in the
storage device and, therefore, does not require being installed and configured separately. For prior
SAN Volume Controller and DS8000 releases, a proxy CIM server is required and must be configured
to manage the necessary storage clusters. Refer to the DS8000 and SAN Volume Controller
documentation for configuration details. IBM Tivoli Storage FlashCopy Manager supports both
configuration options for those SAN Volume Controller and DS8000 releases that support both a proxy
CIM server and an embedded CIM server.

A DS CIM agent consists of the components shown in Figure 4. The main components are the CIM
object manager (CIMOM), the service-location protocol (SLP) and the device provider. A device can
be a storage server, such as the DS8000 storage server. The CIM agent registers itself with the SLP
Service Agent (SLP SA) to enable discovery by the client application. The SLP is a directory service
daemon that a client application calls to locate the CIM Object Manager. The client application and the
CIMOM communicate through CIM messages. The CIMOM and device provider communicate through
method calls made from the CIMOM to the provider. The device provider communicates with the
device through proprietary calls.

Figure 4: DS CIM Agent components

The DS CIM agent can coexist with the CIM client on the same server. However, installation on the
backup system is preferred (see Figure 5) because, on the production system, the CIMOM and
particularly Java™ can impact performance.

Page 15 of 49 © COPYRIGHT IBM CORPORATION, 2010 Version: 2.3 (2010-10-01)


Quick Start Guide to FlashCopy Manager for SAP on DB2 Database 16

Production DB Backup

FlashCopy Manager FlashCopy Manager

CIM Client - Pegasus CIM Client - Pegasus

CIM user

CIM Agent V5.4.0.x

Proxy CIM Agent

DS user

HMC

DS 8000

Figure 5: DS CIM agent for DS8000

To install the CIM agent for DS8000 or SVC, download the free available software package from:
ibm.com/support/search.wss?rs=1118&tc=STC4NKB&atrn=SWVersion&atrv=5.4*&atrwcs=on&dc=D400&dtm,

During the installation of the CIM agent, the following values have to be specified:
Parameter Value
Install directory /opt/ibm/dsagent
HTTPS port 5989
HTTP port 5988

3.4.1 Configuring the CIM agent to access DS8000


The CIM agent has to be configured to access the DS8000 storage server. For the configuration on
AIX, the CIM command-line interface must be started in the CIM agent installation directory:
/opt/IBM/dsagent/bin/.

With the dscimcli command, each DS server that the CIM agent has to access must be defined. The
format of the dscimcli command is as follows:
./dscimcli mkdev <hmc-ip> -type ds –user <user> –password <password>
In this example, the dscimcli command configures a DS8000 with the HMC IP 9.155.62.11 and the
user cimsap:
bash-3.00# ./dscimcli mkdev 9.155.62.11 -type ds -user cimsap -password passw2rd
Device successfully added.
After the DS8000 storage server has been defined, the following command verifies that the device is
added and has connected:

bash-3.00# ./dscimcli lsdev -l


Type IP IP2 Username Storage Image Status Code Level Min Codelevel
=========================================================================
DS 9.155.62.11 - cimsap IBM.2107-7581991 successful 5.3.1.104 5.1.0.309

Page 16 of 49 © COPYRIGHT IBM CORPORATION, 2010 Version: 2.3 (2010-10-01)


Quick Start Guide to FlashCopy Manager for SAP on DB2 Database 17

Environment-variable settings are needed to issue CIM agent management commands. The start of
the envConf profile script sets these UNIX shell variables: source <dest-path>/config/envConf,
where <dest-path> is the destination directory where the CIM agent is installed.

The following commands stop, start and check the status of the CIM agent:
Start the CIM agent with: startagent
Stop the CIM agent with stopagent
CIM agent status: cimagentstatus
Verify the service-location protocol (SLP) install. SLP is a directory service called by a client
application to find the CIM Object Manager. Open a command-prompt window and type the following
command to see that SLP is started: # ps -ef | grep slpd. If the SLP daemon is started, the following
output is shown:
bash-3.00# ps -ef | grep slpd
daemon 438298 1 0 12:51:30 - 0:00 /opt/IBM/dsagent/slp/sbin/slpd
Verify the installation of the CIM agent. Check that the cimserver daemon is installed and started by
typing the following command: # ps -ef | grep cimserv
bash-3.00# ps -ef | grep cimserv
root 540692 1 0 12:51:29 - 0:09 [cimserve]

FlashCopy Manager can connect to the DS CIM agent when the following parameters are specified in
the FlashCopy Manager profile DEVICE_CLASS section:
COPYSERVICES_HARDWARE_TYPE DS8000
COPYSERVICES_PRIMARY_SERVERNAME <ip-address of the server running the CIM agent>
COPYSERVICES_USERNAME <CIM user>

Further information is also available in the preinstallation checklist of FlashCopy Manager

3.5 CIM agent setup for IBM SAN Volume Controller and IBM
Storwize V7000
Since SVC version 4.3.1, the CIM agent runs on the SVC nodes and can be directly accessed through
the SVC Cluster IP address. Similarly a CIM agent is available on IBM Storwize V7000. No specific
configuration is required for FlashCopy Manager. FlashCopy Manager can connect to the CIM agents
on IBM SVC and IBM Storwize V7000 when the following parameters are specified in the FlashCopy
Manager profile DEVICE_CLASS section:
COPYSERVICES_HARDWARE_TYPE SVC
COPYSERVICES_PRIMARY_SERVERNAME <ip-address of SVC-Cluster or Master Console>
COPYSERVICES_USERNAME <cimuser>

Further information is available in the preinstallation FlashCopy Manager checklist.

3.6 TSM client and server


For offloaded backups, FlashCopy Manager requires a Tivoli Storage Manager (TSM) client
installation on both the production and backup server. In addition, TSM can be used for other
purposes (for example, archival of the database logs and backup of the FlashCopy Manager
repository).

The client configuration is performed on the production and backup servers. In this setup, the TSM
Server is running on the p590-tic-1-v49.mainz.de.ibm.com server, which is reflected in the TSM
configuration files, as shown in Figure 5 and Figure 6.

Page 17 of 49 © COPYRIGHT IBM CORPORATION, 2010 Version: 2.3 (2010-10-01)


Quick Start Guide to FlashCopy Manager for SAP on DB2 Database 18

SErvername SAPTSM
COMMMethod TCPip
TCPPort 1500
TCPServeraddress 9.155.87.188
errorlogname /tmp/tsmerrlog

Figure 6: Example of TSM dsm.sys configuration file

SErvername SAPTSM

Figure 7: Example for TSM dsm.opt configuration file


The basic Tivoli Storage Manager Server code has to be installed on the backup server or any other
server and configured with an administrative ID and the storage pools must be available. For more
information about planning and installing a Tivoli Storage Manager server, refer to the product
documentation, or the IBM Redbooks document, IBM Tivoli Storage Manager Implementation Guide,
SG24-5416 (ibm.com/support/docview.wss?uid=pub1sg24541603).

It is recommended to have a separate policy domain with a policy set, management class and copy
group in Tivoli Storage Manager for each of the Tivoli Data Protection modules. In this setup, a
separate policy domain and policy set for FlashCopy Manager have been defined.
On the TSM server in the test environment, the following TSM objects exist:
TSM policy domain: opsapdom
TSM management class: osapmclass
TSM node: sapr3db2
Note: Typically, separate management classes are defined for backup (BACKUPMGTCLASS) and
archive (ARCHIVEMGTCLASS). Additional management classes must be considered to back up file-
system contents, database logs and copies of the database logs.

3.7 TSM for Enterprise Resource Planning


IBM Tivoli Storage Manager for ERP quickly and confidently restores an SAP database after almost any
business interruption. It provides SAP backup and recovery on Oracle and SAP on DB2 environments.
(Note: TSM for ERP is not needed if using only the FlashCopy Manager Cloning feature.)

The data-moving functions of TSM for ERP are implemented in a shared library, accessed by DB2
when a backup or restore command is issued.

Tivoli Storage Manager for Enterprise Resource Planning can be considered as a solution for backups
to tape, as well as archiving database-redo logs or log files.

TSM for ERP (6.1 or later) has to be installed on the production and backup servers. During the
installation, the following information has to be specified:
• DB2 SID
• TSM Server name
• TSM Policy domain
• TSM management class
• TSM node name
After the installation of TSM for ERP, the password for TSM Server access must be configured to TSM
for ERP. The backom command must be started on the production server with the DB2 administrative
user ID db2<sid> (here: db2od3).

Page 18 of 49 © COPYRIGHT IBM CORPORATION, 2010 Version: 2.3 (2010-10-01)


Quick Start Guide to FlashCopy Manager for SAP on DB2 Database 19

Output of the backom command:

Figure 8: backom command to create the password

The backom command (Figure 8) connects TSM for ERP with the TSM server and stores the TSM
node password inside an encrypted file called init<SID>.bki. After this command has run, it is also
confirmed that TSM for ERP can connect to the TSM Server.

It is good practice to configure the directory in which the TSM for ERP configuration files are stored as
a Network File System (NFS). Thus, the backup server can access the configuration files over NFS
and many TSM for ERP configuration steps have to be done only one time on the production server.

3.8 DB2 instance creation


If a backup server is installed and configured to use FlashCopy Manager’s offload feature, a database
instance with the same version as the database instance on the production server is required to be
installed on the backup server.

The following example shows the creation of a DB2 instance after the DB2 database-server software
has been installed.

Example:
# create DB2 instance as user root:
$ /opt/IBM/db2/V9.5/instance/db2icrt -u db2od3 db2od3
DBI1070I Program db2icrt completed successfully.

# show a list of instances:


$ su - db2od3
$ db2ilist
db2od3

Page 19 of 49 © COPYRIGHT IBM CORPORATION, 2010 Version: 2.3 (2010-10-01)


Quick Start Guide to FlashCopy Manager for SAP on DB2 Database 20

4 FlashCopy Manager installation and configuration


IBM Tivoli Storage FlashCopy Manager must be installed on the production system. For offloaded
backups to a Tivoli Storage Manager server, it must also be installed on the backup system. The
FlashCopy Manager installation directory is /usr/tivoli/tsfcm/acs_2.1.x.x on AIX and
/opt/tivoli/tsfcm/acs_2.2.x.x on Linux. An X server has to be installed on the production system to
install FlashCopy Manager with a graphical wizard. For this setup a VNC server was used (see
www.tightvnc.com). The installation package uses the following name format:

<version>-TIV-TSFCM-<OS-platform>.bin

For the purpose of clarity, the examples in the chapters 4 and 5 refer to the AIX operating system
platform. On Linux some software package names or directory paths may be different.

4.1 Software installation


Installing FlashCopy Manager is done quickly. There are three possible modes for the installation:
• GUI mode: This requires a running X-Server ./2.1.0.0-TIV-TSFCM-AIX.bin
• Console mode: This offers the same features as GUI mode ./2.1.0.0-TIV-TSFCM-AIX.bin –i
console
• Silent mode: An unattended setup requires a properties file. ./2.1.0.0-TIV-TSFCM-AIX.bin –i –
f <properties_file>
The main steps of the FlashCopy Manager installation are shown in Figure 9.

Figure 9: Overview of the installation and configuration workflow

Page 20 of 49 © COPYRIGHT IBM CORPORATION, 2010 Version: 2.3 (2010-10-01)


Quick Start Guide to FlashCopy Manager for SAP on DB2 Database 21

The installation must be performed as root user:


1) Log on to the production server as root user.
2) Using the GUI mode, enter ./2.1.0.0-TIV-TSFCM-AIX.bin.
3) Follow the instruction that are displayed.
4) Check the summary of the install wizard, as shown in Figure 10. Be sure to enter the correct
instance id of the database.
5) After the installation has finished, log into the server as the database owner and start the
setup_db2.sh script. This script asks a lot of setup questions that are described in the next
chapter.

Figure 10: Preinstallation summary

4.2 Configuration for disk-only backup


After installing FlashCopy Manager, a profile is required to run FlashCopy Manager. In the following
example, FlashCopy Manager is configured for running a backup to disk only. To create the profile, log
in as the database-instance owner and run the setup_db2.sh script on the production system. The
script asks several questions for the content of the profile. The main questions are:
• Configuration from PS or BS?
o PS: FlashCopy Manager is configured from PS with subsequent remote deployment
to BS through SSH. This is the recommended configuration.
o BS: This option is required if no SSH is available or no NFS share is possible.
• Enter the directory where the profile will be stored:
o /db2/<instance owner’s home directory>/acs (for example, /db2/db2od3/acs)
• Are you going to perform offloaded backups to Tivoli Storage Manager?
o NO: Sections and parameters related to offloaded backups are omitted
• Path of the IBM Tivoli Storage FlashCopy Manager directory {ACS_DIR}
o /db2/<instance owner’s home directory>/acs (for example, /db2/db2od3/acs)
• Hostname and port of the machine running the Management Agent {ACSD} (<hostname>
<port>)

Page 21 of 49 © COPYRIGHT IBM CORPORATION, 2010 Version: 2.3 (2010-10-01)


Quick Start Guide to FlashCopy Manager for SAP on DB2 Database 22

o <hostname of the production server> 57328


• Path to the repository directory {ACS_REPOSITORY}
o /db2/<instance owner’s home directory>/acs/acsrepository (for example,
/db2/db2od3/acs/acsrepository)
The setup script creates a profile that shows the specified parameter settings in the FlashCopy
Manager directory (ACS_DIR). This file can be recreated and modified by rerunning the setup script
(see chapter 4.3 ) but can also be edited manually. (Note: Some parameter changes require a restart
of the FlashCopy Manager processes, which are automatically done by the setup script.)
FlashCopy Manager profile example:
db2od3> cat /db2/db2od3/acs/profile
>>> GLOBAL
ACS_DIR /db2/db2od3/acs
ACSD sapr3db2 57328
# TRACE NO
<<<

>>> ACSD
ACS_REPOSITORY /db2/db2od3/acs/acsrepository
# ADMIN_ASSISTANT NO
# REPOSITORY_LABEL TSM
<<<

>>> CLIENT
# BACKUPIDPREFIX DB2___
APPLICATION_TYPE SAP
PARTITION_GROUP OPTIONAL_ONLY
# MAX_VERSIONS ADAPTIVE
# LVM_FREEZE_THAW AUTO
NEGATIVE_LIST WARN
# TIMEOUT_FLASH 120
# DEVICE_CLASS STANDARD
<<<

>>> DEVICE_CLASS STANDARD


COPYSERVICES_HARDWARE_TYPE DS8000
COPYSERVICES_PRIMARY_SERVERNAME p590-tic-1-v49.mainz.de.ibm.com
# COPYSERVICES_SECONDARY_SERVERNAME
# COPYSERVICES_USERNAME superuser
# COPYSERVICES_COMMPROTOCOL HTTPS
# COPYSERVICES_CERTIFICATEFILE NO_CERTIFICATE
# COPYSERVICES_SERVERPORT 5989
FLASHCOPY_TYPE INCR
# COPYSERVICES_TIMEOUT 6
# RESTORE_FORCE NO
# STORAGE_SYSTEM_ID
TARGET_SETS VOLUMES_FILE
VOLUMES_FILE /db2/db2od3/acs/od3.od3.standard.node0000.fct
<<<

Page 22 of 49 © COPYRIGHT IBM CORPORATION, 2010 Version: 2.3 (2010-10-01)


Quick Start Guide to FlashCopy Manager for SAP on DB2 Database 23

The Appendix shows complete FlashCopy Manager setup protocols for DS8000 storage systems. The
setup script creates the profile in the ACS_DIR directory and adds the CLIENT section for disk-only
backups to the profile. After the setup script runs, a target volumes file must be created for the storage
system (here: DS8000) in the ACS_DIR directory. FlashCopy Manager requires that the target
volumes are defined in a file.

The name of the target volume file has the ending .fct and is specified during the running of the setup
script. The target volumes file contains the LUN IDs of the storage system, see Figure 11.

>>> TARGET_SET volumes_set_1


TARGET_VOLUME 75819914E10 - -
TARGET_VOLUME 75819914E11 - -
TARGET_VOLUME 75819914E12 - -
TARGET_VOLUME 75819914F10 - -
TARGET_VOLUME 75819914F11 - -
TARGET_VOLUME 75819914F12 - -
<<< volumes_set 1
Figure 11: DS8000 target-set definition file

As mentioned, in case of a disk-only backup, the database administrator has to take care of the
database logs. They are not automatically backed up by FlashCopy Manager.
Independently of the backup type that is used, the system administrator must explicitly back up the
FlashCopy Manager repository (for example, /db2/db2od3/acs/acsrepository). This directory contains
the backup history of FlashCopy Manager. In case of a server crash, the repository has to be restored.

4.3 Switching from disk-only to offloaded backup


If FlashCopy Manager is already installed and configured on the system without the offload-backup
option, it is recommended to rerun the setup_db2.sh script to modify the FlashCopy Manager profile
instead of changing the configuration files manually.
Example:
Preparing to install on Production System
Found profile /db2/db2od3/sqllib/acs/profile
Do you want to:
(c)reate a new profile
(r)euse the profile unchanged
(m)odify the profile
Please enter one of the strings in parentheses:
m
The management daemon seems to be running.
Do you want me to stop it to proceed with the configuration? [Y/N]
y
Stopping FCM management daemon on your request.
Deactivating FCM management daemon.
Currently off-loaded backups are not configured. Do you want to configure off-loaded
backups? [y|n]
y
The setup script adds a new section named OFFLOAD to the FlashCopy Manager profile.
>>> OFFLOAD
BACKUP_METHOD DB2
# OPTIONS
# PARALLELISM AUTO
# NUM_SESSIONS 1
# NUM_BUFFERS AUTO
# BUFFER_SIZE AUTO
<<<

Page 23 of 49 © COPYRIGHT IBM CORPORATION, 2010 Version: 2.3 (2010-10-01)


Quick Start Guide to FlashCopy Manager for SAP on DB2 Database 24

The Appendix shows the complete FlashCopy Manager setup protocols for the DS8000 storage
system.

Page 24 of 49 © COPYRIGHT IBM CORPORATION, 2010 Version: 2.3 (2010-10-01)


Quick Start Guide to FlashCopy Manager for SAP on DB2 Database 25

5 Backup and restore scenarios


This chapter describes basic backup and restore scenarios that are supported by FlashCopy
Manager. For the examples tested at the IBM lab, the following information is provided:
• The command line to invoke the backup or restore
• Output information required for follow-on activities (for example, backup IDs required for a
potential restore)
Figure 12 and Figure 13 show the backup and restore options of FlashCopy Manager:
1. A disk-only backup of the production environment, leveraging the FlashCopy or snapshot
feature of the storage system
2. A backup server, offloading the database backup on the FlashCopy target volumes to a TSM
server
3. A restore of the disk-only backup to the production environment, reversing an existing
FlashCopy or snapshot
4. A restore from the TSM server to the production environment
Notes:
• For a disk-only backup or restore, neither a backup server nor a TSM server is required
(scenarios 1 and 3).
• A TSM restore writes directly to the production environment (scenario 4).
• The TSM server can be installed on the backup server.

Figure 12: Backup options for FlashCopy Manager

Page 25 of 49 © COPYRIGHT IBM CORPORATION, 2010 Version: 2.3 (2010-10-01)


Quick Start Guide to FlashCopy Manager for SAP on DB2 Database 26

Figure 13: Restore options for FlashCopy Manager

5.1 Disk-only backup


A disk-only backup leverages the point-in-time copy function of the storage system to create copies of
the LUNs that host the database. A disk-only backup requires no backup server or TSM server. A disk-
only backup is initiated with the db2 backup command and the use snapshot clause.

DB2 creates a timestamp for the backup image ID that is displayed in the output of the db2 backup
command and can also be read out with the FlashCopy Manager db2acsutil utility or the db2 list
history command. This timestamp is required to initiate a restore.

Command-line examples:
db2od3> db2 backup database OD3 online use snapshot

Backup successful. The timestamp for this backup image is : 20090811122318


db2od3> db2 list history backup all for OD3|grep 2009
B D 20090721135745001 F D S0000284.LOG S0000284.LOG
Start Time: 20090721135745
End Time: 20090721140223
B D 20090810160337001 N F S0000286.LOG S0000286.LOG
Start Time: 20090810160337
End Time: 20090810160357
B D 20090810161021001 N F S0000287.LOG S0000287.LOG
Start Time: 20090810161021
End Time: 20090810161041
B D 20090810161249001 F F S0000288.LOG S0000288.LOG
Start Time: 20090810161249
End Time: 20090810161309
R D 20090810162401001 F 20090721135745
Start Time: 20090810162401
End Time: 20090810163128
B D 20090811122318001 N F S0000296.LOG S0000296.LOG
Start Time: 20090811122318
End Time: 20090811122340

Page 26 of 49 © COPYRIGHT IBM CORPORATION, 2010 Version: 2.3 (2010-10-01)


Quick Start Guide to FlashCopy Manager for SAP on DB2 Database 27

The DS8000 command-line interface shows that the FlashCopy pairs have been created.
dscli> lsflash -l 4104 4105 4107 4204 4205 4207
Date/Time: 11. August 2009 12:25:22 CEST IBM DSCLI Version: 5.4.2.402 DS: IBM.2107-7581991
ID SrcLSS SequenceNum Timeout ActiveCopy Recording Persistent Revertible
SourceWriteEnabled TargetWriteEnabled BackgroundCopy OutOfSyncTracks DateCreated
DateSynced State AllowTgtSE Pmir
======================================================================
4104:4E10 41 0 60 Enabled Enabled Enabled Disabled
Enabled Enabled Enabled 828332 Tue Aug 11
12:22:15 CEST 2009 Tue Aug 11 12:22:15 CEST 2009 Valid Disabled No
4105:4E11 41 0 60 Enabled Enabled Enabled Disabled
Enabled Enabled Enabled 186072 Tue Aug 11
12:22:15 CEST 2009 Tue Aug 11 12:22:15 CEST 2009 Valid Disabled No
4107:4E12 41 0 60 Disabled Enabled Enabled Disabled
Enabled Enabled Enabled 32700 Tue Aug 11
12:22:15 CEST 2009 Tue Aug 11 12:22:15 CEST 2009 Valid Disabled No
4204:4F10 42 0 60 Enabled Enabled Enabled Disabled
Enabled Enabled Enabled 822760 Tue Aug 11
12:24:14 CEST 2009 Tue Aug 11 12:24:14 CEST 2009 Valid Disabled No
4205:4F11 42 0 60 Enabled Enabled Enabled Disabled
Enabled Enabled Enabled 211360 Tue Aug 11
12:24:14 CEST 2009 Tue Aug 11 12:24:14 CEST 2009 Valid Disabled No
4207:4F12 42 0 60 Disabled Enabled Enabled Disabled
Enabled Enabled Enabled 0 Tue Aug 11
12:24:14 CEST 2009 Tue Aug 11 12:24:14 CEST 2009 Valid Disabled No

The FlashCopy Pairs must be synchronized — that is, the number of OutOfSync tracks must be zero
before initiating a FlashCopy Restore.
db2od3> /opt/IBM/db2/V9.5/bin/db2acsutil query
Instance Database Part Image Time Host First Log
========== ========== ==== ============== ========== ==========
db2od3 OD3 0 20090821153352 sapr3db2 306
db2od3> /opt/IBM/db2/V9.5/bin/db2acsutil query status
Instance Database Part Image Time Status
========== ========== ==== ==============
========================================
db2od3 OD3 0 20090821153352 Remotely mountable + Repetitively restorable + Swap
restorable + Physical protection + Full copy + Tape backup pending + Tape backup in progress
(167936 / 167936 MB)
The FlashCopy mappings in a SAN Volume Controller can be seen in the graphical user interface or
command line. Figure 14 shows the output of the SVC lsfcmap command, which shows all existing
FlashCopy relationships in the SVC cluster.

IBM_2145:SAP_TSA_SVC_1:admin>svcinfo lsfcmap
id name source_vdisk_id source_vdisk_name target_vdisk_id target_vdisk_name group_id
group_name status progress copy_rate clean_progress incremental partner_FC_id
partner_FC_name restoring
1 FCMG6UJJFZN0000 34 SAP_T2P_DATA1 25 SAP_T2C_DATA1 1
FCMG6UJJFZNSAPT idle_or_copied 100 100 100 on no
2 FCMG6UJJFZN0001 35 SAP_T2P_DATA2 30 SAP_T2C_DATA2 1
FCMG6UJJFZNSAPT idle_or_copied 100 100 100 on no
3 FCMG6UJJFZN0002 33 SAP_T2P_LOG 38 SAP_T2C_LOG 1
FCMG6UJJFZNSAPT idle_or_copied 100 100 100 on no

Figure 14: SAN Volume Controller FlashCopy mapping

Page 27 of 49 © COPYRIGHT IBM CORPORATION, 2010 Version: 2.3 (2010-10-01)


Quick Start Guide to FlashCopy Manager for SAP on DB2 Database 28

On IBM Storwize V7000 the FlashCopy relationships can be verified in the graphical-user interface
which is modelled after the popular user interface of IBM XIV storage system. Figure 15 shows the
FlashCopy relationships that were created by FlashCopy Manager for a disk-only backup of the SAP
database.

Figure 15: IBM Storwize V7000 FlashCopy mappings

5.2 Offload to Tivoli Storage Manager


An existing disk-only backup can be offloaded to a TSM server. A backup server accesses the data on
the FlashCopy target volumes and forwards the data to a TSM server ,which in-turn stores it in one of
its storage pools (tape or disk).

FlashCopy Manager supports multiple FlashCopy targets, enabling the creation of several backup
versions. Nevertheless, a disk-only backup is usually overwritten in shorter intervals than a TSM
backup, which is usually kept for weeks.
Note: On IBM DS8000, IBM SAN Volume Controller and IBM Storwize V7000 FlashCopy target
volumes must be preallocated.
An existing disk-only backup must be in the TAPE_BACKUP_PENDING status to offload it to a TSM
server. Snapshot backups must already be created with the TSM_BACKUP flag to prepare a
subsequent tape backup. This flag must be specified either as part of the backup command or as a
profile parameter, thus applying to all backups.
The parameter is specified in the Tivoli Storage Manager for ERP init<SID>.utl profile:
TAPE_BACKUP_FROM_SNAPSHOT YES|NO

Page 28 of 49 © COPYRIGHT IBM CORPORATION, 2010 Version: 2.3 (2010-10-01)


Quick Start Guide to FlashCopy Manager for SAP on DB2 Database 29

An offload to TSM is initiated with the FlashCopy Manager tsm4acs utility. It is useful to check the
status of existing disk-only backups before starting the offload.

Command-line examples:
db2od3> /opt/IBM/db2/V9.5/bin/db2acsutil query status
Instance Database Part Image Time Status
========== ========== ==== ==============
========================================
db2od3 OD3 0 20090821153352 Remotely mountable + Repetitively restorable + Swap
restorable + Physical protection + Full copy + Tape backup pending (167936 / 167936 MB)
db2od3> /db2/db2od3/sqllib/acs/tsm4acs -f tape_backup -d OD3
IBM Tivoli Storage FlashCopy(R) Manager offload agent
- Version 2, Release 1, Level 0.0 BETA for AIX LF 64-bit -
Build: 405 generated on Jul 31 2009
(c) Copyright IBM Corporation, 2000, 2009, All Rights Reserved.

FMM0005I Start of program at: Thu Aug 27 13:57:13 CEST 2009 .


FMM8800I The command is: tape_backup

IBM Tivoli Storage FlashCopy(R) Manager offload agent


- Version 2, Release 1, Level 0.0 BETA for AIX LF 64-bit -
Build: 405 generated on Jul 31 2009
(c) Copyright IBM Corporation, 2000, 2009, All Rights Reserved.

FMM0005I Start of program at: Thu Aug 27 13:57:14 2009 .


FMM8800I The command is: tape_backup
FMM6501I Initializing 'mount' request.
FMM6502I Executing 'mount' request.

FMM6555I Selected snapshot backup with ID 'db2od3,OD3,20090821153352'.


FMM6503I Terminating 'mount' request.
FMM6512I The 'mount' request for database 'OD3' with partitions (0) processed successfully.
FMM6520I Starting database instance 'db2od3'.
FMM6521I Database instance 'db2od3' was started successfully.
FMM6531I Cataloging database 'OD3' on path '/db2/OD3'.
FMM6537I Database 'OD3' on path '/db2/OD3' already cataloged.
FMM6508I Initializing partition(s) '0' of database 'OD3' as standby.
FMM6510I Partition(s) '0' of database 'OD3' initialized successfully.
FMM6540I 13:57:39: Starting backup of database 'OD3', partition(s) '0' with the following options:
METHOD /usr/tivoli/tsm/tdp_r3/db264/libtdpdb264.a
SESSIONS 1
OPTIONS none
BUFFERS automatic
BUFFERSIZE automatic
PARALLELISM automatic

5.3 Restore from snapshot


A disk-only backup can be restored and recovered with DB2 commands. Snapshots are done on a
volume group level. In other words, the storage-based snapshot feature is not aware of the database
and file systems structures and cannot perform restore operations on the file or tablespace level. Only
the volume groups are backed up and restored by FlashCopy Manager.

The following example shows restore, forward recovery and activation of the database with the
appropriate DB2 commands: db2 restore, db2 rollforward, db2 activate.

Page 29 of 49 © COPYRIGHT IBM CORPORATION, 2010 Version: 2.3 (2010-10-01)


Quick Start Guide to FlashCopy Manager for SAP on DB2 Database 30

Command-line example:
db2od3> db2 restore database OD3 use snapshot taken at 20090811122318
SQL2539W Warning! Restoring to an existing database that is the same as the
backup image database. The database files will be deleted.
Do you want to continue ? (y/n) y
SQL1035N The database is currently in use. SQLSTATE=57019

# su - od3adm
sapr3db2:od3adm 1> stopsap
db2od3> db2 restore database OD3 use snapshot taken at 20090811122318
SQL2539W Warning! Restoring to an existing database that is the same as the
backup image database. The database files will be deleted.
Do you want to continue ? (y/n) y
DB20000I The RESTORE DATABASE command completed successfully.
db2od3> db2 start db manager
DB20000I The START DATABASE MANAGER command completed successfully.
db2od3> db2 rollforward database od3 complete
Rollforward Status

Input database alias = od3


Number of nodes have returned status = 1

Node number =0
Rollforward status = not pending
Next log file to be read =
Log files processed = S0000296.LOG - S0000297.LOG
Last committed transaction = 2009-08-11-10.23.37.000000 UTC

DB20000I The ROLLFORWARD command completed successfully.


db2od3> db2 activate db OD3
DB20000I The ACTIVATE DATABASE command completed successfully.

5.4 Backup and restore from TSM Server


Backing up and restoring to and from a TSM server are not specific to FlashCopy Manager. This
means that the DB2 backup and restore utilities can be used with appropriate options, as if
FlashCopy Manager is not installed.

5.5 Additional functions


The tsm4acs utility with the -f mount option can be used to access the database on the FlashCopy
targets volumes from the backup server without offloading the data to a TSM server. A possible use
can be the creation of a new SAP environment for testing purposes. The access can be terminated
with tsm4acs using the -f unmount option.

Troubleshooting hint: If an offload backup to TSM has been interrupted (for example, by a server
restart), the mount state can still be reflected in the FlashCopy Manager repository and can be
reported by the db2acsutil utility. In this case, a tsm4acs call with the unmount option is required
before restarting the offload (with the tsm4acs utility, using the tape_backup flag).

Examples:
$ /db2/db2od3/sqllib/acs/tsm4acs -f mount -d OD3 -T 20090819094306

Page 30 of 49 © COPYRIGHT IBM CORPORATION, 2010 Version: 2.3 (2010-10-01)


Quick Start Guide to FlashCopy Manager for SAP on DB2 Database 31

IBM Tivoli Storage FlashCopy(R) Manager offload agent


- Version 2, Release 1, Level 0.0 BETA for AIX LF 64-bit -
Build: 405 generated on Jul 31 2009
(c) Copyright IBM Corporation, 2000, 2009, All Rights Reserved.

FMM0005I Start of program at: Wed Aug 19 09:47:54 CEST 2009 .


FMM8800I The command is: mount
FMM6501I Initializing 'mount' request.
FMM6502I Executing 'mount' request.
FMM6555I Selected snapshot backup with ID 'db2od3,OD3,20090819094306'.
FMM6503I Terminating 'mount' request.
FMM6512I The 'mount' request for database 'OD3' with partitions (0) processed successfully.
FMM0020I End of program at: Wed Aug 19 09:48:08 CEST 2009 .
FMM0021I Elapsed time: 14 sec .
FMM0024I Return code is: 0.

$ lsvg -o
OD3tdp3
OD3tdp2
OD3tdp1
swap
sapdb2
rootvg

$ df -g
Filesystem GB blocks Free %Used Iused %Iused Mounted on
/dev/hd4 0.66 0.39 41% 3117 4% /
/dev/hd2 3.12 0.62 81% 38597 21% /usr
/dev/hd9var 0.03 0.00 94% 494 44% /var
/dev/hd3 2.00 0.72 65% 285 1% /tmp
/dev/hd1 0.03 0.03 8% 98 2% /home
/proc - - - - - /proc
/dev/hd10opt 1.66 0.06 97% 17089 52% /opt
sapr3db2:/db2/OD3/dbs 1.25 1.24 1% 22 1% /db2/OD3/dbs
/dev/usrsaplv 5.00 4.84 4% 228 1% /usr/sap
/dev/sapod3lv 1.25 1.24 1% 22 1% /db2/OD3
/dev/sapdb2od3lv 1.00 0.27 73% 1025 2% /db2/db2od3
/dev/db2dirlv 0.94 0.92 2% 31 1% /db2/OD3/db2od3
/dev/logdirlv 5.00 3.40 33% 59 1% /db2/OD3/log_dir
/dev/sapdata1lv 15.00 6.50 57% 40 1% /db2/OD3/sapdata1
/dev/sapdata2lv 20.00 11.50 43% 40 1% /db2/OD3/sapdata2
/dev/sapdata3lv 15.00 6.50 57% 40 1% /db2/OD3/sapdata3
/dev/sapdata4lv 20.00 11.50 43% 40 1% /db2/OD3/sapdata4
/dev/saptemplv 1.00 1.00 1% 12 1% /db2/OD3/saptemp1

$ /db2/db2od3/sqllib/acs/tsm4acs -f unmount -d OD3

IBM Tivoli Storage FlashCopy(R) Manager offload agent


- Version 2, Release 1, Level 0.0 BETA for AIX LF 64-bit -
Build: 405 generated on Jul 31 2009
(c) Copyright IBM Corporation, 2000, 2009, All Rights Reserved.

FMM0005I Start of program at: Wed Aug 19 09:52:16 CEST 2009 .


FMM8800I The command is: unmount
FMM6501I Initializing 'unmount' request.
FMM6502I Executing 'unmount' request.
FMM6555I Selected snapshot backup with ID 'db2od3,OD3,20090819094306'.
FMM6503I Terminating 'unmount' request.
FMM6512I The 'unmount' request for database 'OD3' with partitions (0) processed successfully.
FMM0020I End of program at: Wed Aug 19 09:52:27 CEST 2009 .
FMM0021I Elapsed time: 11 sec .
FMM0024I Return code is: 0.

Page 31 of 49 © COPYRIGHT IBM CORPORATION, 2010 Version: 2.3 (2010-10-01)


Quick Start Guide to FlashCopy Manager for SAP on DB2 Database 32

6 Backup schedule options


Multiple options are possible to schedule a backup operation, for example:
• A crontab entry on UNIX
• A Tivoli Storage Manager schedule
• An entry in the SAP DBA planning calendar (SAP transaction DB13 or DBACOCKPIT)
Note that the planning calendar’s ability to specify command-line options is limited. This means that
the profile must include all required DB2 backup parameters.
This is a rudimental example of how to schedule a DB2 backup using UNIX onboard tools.
Example:
Step 1: Create a shell script that initiates a backup.
db2od3> cat mybackup.sh
#!/bin/ksh
su - db2od3 << EOF
DB2 backup database OD3 online use snapshot
EOF

db2od3>
Step 2: Create a crontab entry that schedules the shell script at a specified time (here: each
weekday at 15 minutes before midnight).
sapr3db2:root > cat /var/spool/cron/crontabs/root

45 23 * * * /db2/db2od3/mybackup.sh 1>/db2/db2od3/mybackup.log 2>&1
...

Page 32 of 49 © COPYRIGHT IBM CORPORATION, 2010 Version: 2.3 (2010-10-01)


Quick Start Guide to FlashCopy Manager for SAP on DB2 Database 33

7 Cloning of an SAP Database


A productive SAP environment consists of multiple systems: a production system, a quality assurance
(QA) system, a development system and more. SAP recommends that you perform a system copy if
you are planning to set up a test system, demo system or training system.

See: https://service.sap.com/systemcopy or
http://help.sap.com/saphelp_nw70/helpdata/en/a2/2f0c173a5e43d19585724239ff4de7/content.htm

Possible reasons to perform system copies are the following:


• Create test and quality assurance systems that are recreated regularly from the production
systems to test new developments with the most actual production data
• Create migration or upgrade systems from a production system prior to phasing in a new
release or functions into production
• Create education systems from a master training system to reset before starting a new course
• Create dedicated reporting system to offload a workload from production

SAP defines a System Copy as the duplication of an SAP system. Certain SAP parameters might
change in a copy. When you perform a system copy, the SAP SAPinst procedure installs all the
instances again, but instead of the database export delivered by SAP, it uses a copy of the user’s
source-system database to set up the database. Commonly, a backup of the source-system database
is used to perform a system copy.

SAP differentiates between two system copy modes: A Homogeneous System Copy uses the same
operating system and database platform as the original system. A Heterogeneous System Copy
changes either the operating system or the database system, or both. Heterogeneous system copy is
a synonym for migration.

Performing an SAP system copy by backing up and restoring a production system is a longsome task
(two to three days). Changes to the target system are usually applied either manually or supported by
user-written scripts. SAP strongly recommends to perform a system copy only if you have experience
in copying systems and have a good knowledge of the operating system, the database, the ABAP
Dictionary and the Java Dictionary.

Starting with version 2.2, Tivoli FlashCopy Manager supports the cloning (in SAP terms: the
heterogeneous system copy) of an SAP database. The product leverages the FlashCopy or snapshot
features of IBM storage systems to create a point-in-time copy of the SAP source database in
minutes, instead of hours. The cloning process of an SAP database is shown in Figure 16.

FlashCopy Manager automatically performs these tasks:


• Create a consistent FlashCopy of the volumes on which the production database resides.
• Configure, import and mount the FlashCopy volumes on the clone system.
• Recover the database on the clone system.
• Rename the database to match the name of the clone database that resides on the clone
system.
• Start the clone database on the clone system.

Page 33 of 49 © COPYRIGHT IBM CORPORATION, 2010 Version: 2.3 (2010-10-01)


Quick Start Guide to FlashCopy Manager for SAP on DB2 Database 34

Figure 16: Overview of the Cloning process

The cloning function is useful to create quality assurance (QA) or test systems from production
systems. The renamed clone system can be integrated into the SAP Transport System that an SAP
user defined for his SAP landscape. Then, updated SAP program sources and other SAP objects can
be transported to the clone system for testing purposes.

Figure 173: SAP Cloning Example - Upgrade and Application Test

7.1 Preprocessing and postprocessing scripts


The cloning process of FlashCopy Manager delivers an open database on the clone system. The SAP
System Copy guidelines describe a number of additional actions to be performed in the copied SAP
system, for example:
• Disable Remote Function Call (RFC) destinations.
• Disable batch-job processing.

Some of these actions defuse the cloned system — that is, anticipate the running of SAP tasks that
are planned in the production system, but that must not be performed or even repeated in the cloned
system (for example, data transfer to or from other applications, batch jobs or spool jobs).

IBM can provide a number of preprocessing and postprocessing scripts that automate some important
actions. FlashCopy Manager provides the ability to automatically run these scripts before and after
clone creation and before the cloned SAP system is started.

Page 34 of 49 © COPYRIGHT IBM CORPORATION, 2010 Version: 2.3 (2010-10-01)


Quick Start Guide to FlashCopy Manager for SAP on DB2 Database 35

Typical preprocessing scripts are scripts that do the following:


• Gather (exporting) information from the currently active clone database before it is refreshed
with a new clone (for example, information about users and roles of users)
• Shut down the SAP system and the database

Typical postprocessing scripts are scripts that do the following:


• Import the user and role information gathered at preprocessing time to the newly cloned
database
• Disable batch-job processing on the cloned database
• disable remote function call definitions
• Clean up tables that are not needed on the cloned database, such as spool and printer job
information

The preprocessing and postprocessing scripts are SQL and UNIX Shell scripts and are not part of the
FlashCopy Manager software package and can be separately ordered from IBM. Contact IBM to find
out about the supply chain as well as terms and conditions of these scripts.

Note: Cloning a FlashCopy Backup image is not supported. If multiple clones are required, these are
always created from the same up-and-running production or source system — not from an offline
backup image.

7.2 SAP cloning steps

Figure 18: Cloning steps

The basic cloning steps are shown in Figure 18 and will be explained in more detail. The cloning
function is started from the command line on the production system using the tsm4acs command with
the –f option.
1. Start cloning on the production system with the tsm4acs –f create_clone command.
Note: All cloning commands are started as the DB2 Admin on the production system.
2. The preprocessing scripts run against the clone database. This task is optional and depends
on available preprocessing scripts on the clone. The scripts are not part of the FlashCopy
Manager software.
3. A consistent FlashCopy or snapshot backup, including database logs, is created on the
storage server (DS8000 or SVC).
4. Mount P01 on the clone system and rename the PVIDs, logical volumes and volume groups.
5. The database on the clone system is recovered.
6. The database is renamed to match the name (SID) of the clone database.

Page 35 of 49 © COPYRIGHT IBM CORPORATION, 2010 Version: 2.3 (2010-10-01)


Quick Start Guide to FlashCopy Manager for SAP on DB2 Database 36

7. The postprocessing scripts run against the clone database. This task is optional and depends
on the available postprocessing scripts on the clone. The scripts are not part of the FlashCopy
Manager software.

7.3 Configuration for backup and cloning


After the installation of FlashCopy Manager, a profile is required to successfully run it. In the following
example, FlashCopy Manager is configured for running a backup to disk and cloning of the SAP
database. To create the profile, log in as the database-instance owner and run the setup_db2.sh script
on the production system. The script asks several questions for the content of the profile. The main
questions are:
• Configuration from PS or BS?
o PS: FlashCopy Manager is configured from PS with subsequent remote deployment
to BS through SSH. This is the recommended configuration.
o BS: This option is required if no SSH is available or no NFS share is possible.
• Enter the directory where the profile will be stored:
o /db2/<instance owner’s home directory>/acs (for example, /db2/db2od3/acs)
• In which mode do you want to configure FlashCopy Manager?
For backup and cloning, enter option (1)
(1) Backup and cloning
(2) Backup only
(3) Cloning only
• Are you going to perform offloaded backups to Tivoli Storage Manager?
o NO: Sections and parameters related to offloaded backups are omitted.
• Path of the IBM Tivoli Storage FlashCopy Manager directory {ACS_DIR}
o /db2/<instance owner’s home directory>/acs (for example, /db2/db2od3/acs)
• Hostname and port of machine running Management Agent {ACSD} (<hostname> <port>)
o <hostname of the production server> 57328
• Device class(es) {DEVICE_CLASS} (<list of dev classes> USE_FOR_CLONING <list of
clone database names>
o This parameter specifies the device class used, when backing up the clone database
(for example, STANDARD USE_FOR_CLONING T2C). In this example, T2C is the
clone database name.
The setup script creates a profile that shows the specified parameter settings in the FlashCopy
Manager directory (ACS_DIR). This file can be recreated and modified by rerunning the setup script
(see chapter 4.3 ) but can also be edited manually.
Note that some parameter changes require a restart of the FlashCopy Manager processes, which is
automatically done by the setup script. Here is a FlashCopy Manager profile example for backup and
cloning:
# cat /db2/db2t2p/acs/profile
>>> GLOBAL
ACS_DIR /db2/db2t2p/acs
ACSD sapt2p 57328
# TRACE NO
<<<

>>> ACSD
ACS_REPOSITORY /db2/db2t2p/acs/acsrepository
# ADMIN_ASSISTANT NO

Page 36 of 49 © COPYRIGHT IBM CORPORATION, 2010 Version: 2.3 (2010-10-01)


Quick Start Guide to FlashCopy Manager for SAP on DB2 Database 37

# REPOSITORY_LABEL TSM
<<<

>>> CLIENT
# BACKUPIDPREFIX DB2___
APPLICATION_TYPE SAP
# PARTITION_GROUP
TSM_BACKUP NO
# MAX_ok VERSIONS ADAPTIVE
# LVM_FREEZE_THAW AUTO
# NEGATIVE_LIST NO_CHECK
# TIMEOUT_FLASH 120
# GLOBAL_SYSTEM_IDENTIFIER
DEVICE_CLASS FLASH_BACKUP
<<<

>>> CLONING
DEVICE_CLASS STANDARD USE_FOR_CLONING T2C
APPLICATION_TYPE SAP
<<<

>>> DEVICE_CLASS STANDARD


COPYSERVICES_HARDWARE_TYPE SVC
COPYSERVICES_PRIMARY_SERVERNAME 9.155.66.107
# COPYSERVICES_USERNAME superuser
CLONE_DATABASE YES
SVC_COPY_RATE 100
# SVC_CLEAN_RATE 50
# COPYSERVICES_COMMPROTOCOL HTTPS
# COPYSERVICES_CERTIFICATEFILE NO_CERTIFICATE
# COPYSERVICES_SERVERPORT 5989
FLASHCOPY_TYPE INCR
# COPYSERVICES_TIMEOUT 6
# RESTORE_FORCE NO
# STORAGE_SYSTEM_ID
RECON_INTERVAL 6
TARGET_SETS VOLUMES_FILE
VOLUMES_FILE /db2/db2t2p/acs/t2p.volumes_file.fct
<<<

>>> DEVICE_CLASS DISK_ONLY


COPYSERVICES_HARDWARE_TYPE SVC
COPYSERVICES_PRIMARY_SERVERNAME 9.155.66.107
# COPYSERVICES_USERNAME superuser
# CLONE_DATABASE NO
SVC_COPY_RATE 100
# SVC_CLEAN_RATE 50
# COPYSERVICES_COMMPROTOCOL HTTPS
# COPYSERVICES_CERTIFICATEFILE NO_CERTIFICATE
# COPYSERVICES_SERVERPORT 5989
FLASHCOPY_TYPE NOCOPY
# COPYSERVICES_TIMEOUT 6
# RESTORE_FORCE NO
# STORAGE_SYSTEM_ID
RECON_INTERVAL 6
TARGET_SETS VOLUMES_FILE
VOLUMES_FILE /db2/db2t2p/acs/t2p.volumes_file.fct
<<<
The Appendix shows the complete FlashCopy Manager setup protocols for DS8000 and SVC storage
systems. The setup script creates the profile in the ACS_DIR directory and adds the CLIENT section
for disk-only backups and the CLONING section to the profile. After the setup script has run, a target

Page 37 of 49 © COPYRIGHT IBM CORPORATION, 2010 Version: 2.3 (2010-10-01)


Quick Start Guide to FlashCopy Manager for SAP on DB2 Database 38

volumes file must be created for the storage system (here: SVC) in the ACS_DIR directory. FlashCopy
Manager requires that the target volumes are defined in a file and that there is a target set for backup
and a target set for cloning.

The name of the target volumes file has the ending .fct and is specified when running the setup script.
The target volumes file contains the volumes names of the SVC, see Figure 19. For a DS8000, the
LUN IDs have to be specified in the .fct target volumes file.

>>> TARGET_SET volumes_set_1


DEVICE_CLASS STANDARD USE_FOR_CLONING T2C
TARGET_VOLUME SAP_T2C_DATA1 - -
TARGET_VOLUME SAP_T2C_DATA2 - -
TARGET_VOLUME SAP_T2C_LOG - -
<<< volumes_set_1
>>> TARGET_SET volume_set_2
DEVICE_CLASS FLASH_BACKUP
TARGET_VOLUME T2P_SE_DATA1 - -
TARGET_VOLUME T2P_SE_DATA2 - -
TARGET_VOLUME T2P_SE_LOG - -
<<< volume_set_2
Figure 19: IBM SVC or IBM Storwize V7000 target-set definition file

As mentioned, in case of a disk-only backup, the database administrator has to take care of the
database logs. They are not automatically backed up by FlashCopy Manager.

Independently of the backup type that will be used, the system administrator must explicitly back up
the FlashCopy Manager repository (for example, /db2/db2od3/acs/acsrepository). This directory
contains the backup history of FlashCopy Manager. In case of a server crash, the repository has to be
restored.

7.3.1 DB2 database schema


In DB2, database objects, such as tables, are named using a two-part naming convention
(schema_name.object_name). The first part is referred to as the database schema and has to be
specified with the db2_db6_schema parameter on the clone. The schema must be the same as on the
production system; otherwise, R3trans cannot connect to the clone database and SAP fails to start.

The following files from the user <clone-sid>adm on the clone server have to be changed, to contain
the correct database schema in the variable db2_db6_schema.
• .dbenv.sh
• .dbenv.csh
• .dbenv_sap<sid>.sh
• .dbenv_sap<sid>.csh
The file dcsdb6.conf also has to include the user sap<sid> (SAP user of the production system).
R3trans checks dscdb6.conf for the database user and does connect to the clone database. Those
steps must run on the clone, to configure dcsdb6.conf:
1. Log in as <sid>adm user and switch to root
2. Enter the dscdb6up -create <connect_user password> <sidadm password> command.
3. This message appears: Password file '/usr/sap/T2C/SYS/global/dscdb6.conf' successfully
written

Page 38 of 49 © COPYRIGHT IBM CORPORATION, 2010 Version: 2.3 (2010-10-01)


Quick Start Guide to FlashCopy Manager for SAP on DB2 Database 39

7.4 Cloning parameters


The cloning function has to be started with the tsm4acs command from the command line and as DB2
administrator of the production system. The following parameters are available:
-C specifies the name of the cloned database residing on the clone system
-d specifies the name of the production database (optional)
-u specifies the clone instance owner user ID
-X name of the configuration file that contains the preprocessing script names
-Y name of the configuration file that contains the postprocessing script names

7.5 Cloning functions


All FlashCopy cloning functions are issued from the command-line interface using the following
tsm4acs command with the -f option.

• preproc_clone: This function starts preprocessing scripts, such as stopping SAP and
DB2 on the clone.

• create_clone: This function creates a clone database and mounts the target disk on the
clone.

• postproc_clone: This function starts postprocessing scripts on the clone.

• delete_clone: This function unmounts and deletes the clone database.

• refresh_clone: Use this function to refresh an existing clone database.

Note: The preprocessing and postprocessing scripts are not part of the FlashCopy Manager software.

Command examples:
(1) Run pre-processing scripts to stop the SAP and database processes:
./tsm4acs -f preproc_clone -u db2t2c -C T2C -X /db2/db2t2c/sqllib/acs/SQL-scripts/PreProcessing.ini

(2) Delete an existing clone system


tsm4acs -f delete_clone -C T2C -u db2t2c

(3) Create a new clone


./tsm4acs -f create_clone -C T2C -u db2t2c

(4) Run postprocessing scripts


./tsm4acs -f postproc_clone -u db2t2c -C T2C -Y /db2/db2t2c/sqllib/acs/SQL-scripts/PostProcessing.ini

(5) Refresh an existing clone and run preprocessing and postprocessing scripts before and after refreshing
./tsm4acs -f refresh_clone -u db2t2c -C T2C -Y /db2/db2t2c/sqllib/acs/SQL-scripts/PostProcessing.ini -
X /db2/db2t2c/sqllib/acs/SQL-scripts/PreProcessing.ini

The Preprocessing.ini and Postprocessing.ini configuration files contain the list of Shell scripts to be
run. For example:

/db2/db2t2c/sqllib/acs/SQL-scripts/PostProcessing2_Grant_sidadm.sh
/db2/db2t2c/sqllib/acs/SQL-scripts/PostProcessing2_Reset_System_Change.sh
/db2/db2t2c/sqllib/acs/SQL-scripts/PostProcessing2_BTC.sh

Page 39 of 49 © COPYRIGHT IBM CORPORATION, 2010 Version: 2.3 (2010-10-01)


Quick Start Guide to FlashCopy Manager for SAP on DB2 Database 40

/db2/db2t2c/sqllib/acs/SQL-scripts/PostProcessing2_DDLOG.sh
/db2/db2t2c/sqllib/acs/SQL-scripts/PostProcessing2_ResetPassword.sh
/db2/db2t2c/sqllib/acs/SQL-scripts/PostProcessing2_External_Commands.sh
/db2/db2t2c/sqllib/acs/SQL-scripts/PostProcessing2_PARAMVALUE.sh
/db2/db2t2c/sqllib/acs/SQL-scripts/PostProcessing2_RFC_R3_noNslookup.sh sapt2c 9.155.57.89

7.6 Cloning with SAN Volume Controller 5.1


With SAN Volume Controller (SVC´) 5.1, multiple space-efficient targets taken from a single source
volume are interdependent upon each other (cascade). As a consequence, during restore, younger
targets of the same source are deleted.

Because of this behaviour of SVC, it is recommended not to have the target volumes for FlashCopy
Cloning of a production database and FlashCopy Backup of the same database on the same SVC
cluster. If AIX LVM mirroring is used, then the recommendation is to use FlashCopy Cloning on one of
the SVC clusters and FlashCopy Backup on the other SVC cluster.

FlashCopy Cloning is not allowed on space-efficient target volumes for FlashCopy Cloning and also
not on full target volumes with FlashCopy type NOCOPY (copyrate = 0).

Page 40 of 49 © COPYRIGHT IBM CORPORATION, 2010 Version: 2.3 (2010-10-01)


Quick Start Guide to FlashCopy Manager for SAP on DB2 Database 41

8 Troubleshooting
Here are some of the issues experienced when setting up and testing FlashCopy Manager with
backup, restore and FlashCopy Cloning.

8.1 Error message libacsdb2.a


The SQL error in Figure 20 is a typical error message from FlashCopy Manager, which indicates that
the FlashCopy Manager log files contain a more precise error message. The logs are located on the
production server and the backup or clone server in the /db2/db2<sid>/acs/logs directory. Look into
the summary.log for detailed error messages. In the subdirectory details, as the name implies, more
information about the error will be available.

Figure 20: SQL error message

8.2 How to reset the FlashCopy Manager acsrepository


It might be necessary to reset the FlashCopy Manager repository, for example, when the storage
server has to be replaced or a FlashCopy backup cannot be deleted out of the backup history from
FlashCopy Manager. In this case, simply deleting the acsrepository is not enough. The acsgen and
acsd processes on the production server have to be in sync with the content of the repository.

The following steps have to be run on the production system:


1.) Delete the directory /db2/db2<sid>/acs/acsrepository
2.) ./setup_db2.sh –a stop -d /db2/db2<sid>/sqllib
3.) ./setup_db2.sh –a start –d /db2/db2<sid>/sqllib

If a backup or clone server is available ,it might be necessary to kill the acsgen process on the backup
and clone server. The process automatically restarts after deletion.

8.3 Database online backup not allowed


The following SQL error message can occur when running the db2 backup online db <database>
use snapshot command or when running a tsm4acs –f create_clone … command.

Taking online backups is only supported if the database is configured for archive logging. During an
online-backup operation, all activities against the database are logged. When an online-backup image
is restored, the logs must be rolled forward at least to the point in time at which the backup operation
completed. This operation cannot be performed when the database is not logging for forward
recovery. Forward recovery is placed into effect by setting the LOGRETAIN parameter and then
performing an offline backup of the database.
BKI____I Cloning database T2P.
run: db2 backup database T2P online use snapshot options \"createclone=yes
application_type=SAP originalsid=T2P clonesid=T2C profile=/db2/db2t2p/sqllib/acs/profile\"
include logs without prompting
SQL2413N Online backup is not allowed because the database is not recoverable
or a backup pending condition is in effect.

Page 41 of 49 © COPYRIGHT IBM CORPORATION, 2010 Version: 2.3 (2010-10-01)


Quick Start Guide to FlashCopy Manager for SAP on DB2 Database 42

BKI____E Flashcopy of the database failed with rc 1024.


FMM0020I End of program at: Tue Mar 2 15:32:06 GMT+01:00 2010 .
FMM0021I Elapsed time: 17 sec .
FMM0024I Return code is: 2.
To set LOGREATIN in the DB2 database, enter the db2 update db cfg for <SID> using
LOGRETAIN ON command. After this is done, running an offline backup of the database is required
so that subsequent online backups of the database will be allowed. The following DB2 command
shows that the database can be used for online backups.
db2t2p> db2 get db cfg for T2P | grep -i retain
Number of frequent values retained (NUM_FREQVALUES) = 10
Number of quantiles retained (NUM_QUANTILES) = 20
Log retain for recovery status = RECOVERY
Log retain for recovery enabled (LOGRETAIN) = RECOVERY
First log archive method (LOGARCHMETH1) = LOGRETAIN
Number of database backups to retain (NUM_DB_BACKUPS) = 12

8.4 UNIX user shell definitions


Some FlashCopy Manager functions are implemented as UNIX shell scripts. It is easily missed that
FlashCopy Manager requires the DB2 administration users on UNIX levels to use Korn Shell by
default. SAP applications use the C Shell per default.

In case of a wrong shell definition, FlashCopy Manager will display an error message similar to the
following example. The user definition can be changed with the UNIX system administration tools (for
example, the AIX smitty users command).
> ./tsm4acs -f create_clone -C T2C -u db2t2c

FMM0005I Start of program at: Tue Mar 2 15:31:51 GMT+01:00 2010 .
BKI____I Checking the clone system status of the database T2C.
BKI____I Successfully checked the clone system status of the database T2C.
FMM0020I End of program at: Tue Mar 2 15:31:56 GMT+01:00 2010 .
FMM0021I Elapsed time: 05 sec .
FMM0024I Return code is: 0.
BKI____I Checking the clone system status of the database T2P.
BKI____I Successfully checked the clone system status of the database T2P.
FMM1506E Failed to execute command ' PYTHONHOME=/db2/db2t2c/sqllib/acs/xpyv su - db2t2p
-c "/db2/db2t2c/sqllib/acs/tsm4acs -f check_clone -d T2P -N ALL -C T2C -Z DB2 -u db2t2p -l
/db2/db2t2c/acs -c 57328@sapt2p -t -k
':(:string=8,ESD_Guid:version=16,ESD_Serializable,1:version=8,ESD_Guid,1:uint=10:)' 2>&1"
2>&1'.

Page 42 of 49 © COPYRIGHT IBM CORPORATION, 2010 Version: 2.3 (2010-10-01)


Quick Start Guide to FlashCopy Manager for SAP on DB2 Database 43

9 Appendix
The appendix shows three protocols of a FlashCopy Manager setup using the script setup_db2.sh:
1. FlashCopy Manager setup for DS8000 for disk-only backup
2. FlashCopy Manager setup for DS8000 with offload backup
3. FlashCopy Manager setup for SAP Cloning on SVC
In the first example, a new profile is created. In the second example, the existing profile is modified to
include the offload feature of FlashCopy Manager.

The sections that are specific to a storage system are indicated in bold blue font type. In these
examples, the storage-specific DEVICE CLASS is named STANDARD.

9.1 Setup script protocol for SAP on DB2 and IBM DS8000
# su - db2od3

db2od3> cd /db2/db2od3/sqllib/acs

db2od3> ./setup_db2.sh

checking /db2/db2od3/sqllib/acs/acsgen ...


OK

Select one of these configurations:


(1) On-Site Production System configuration with optional remote Backup System configuration
(2) On-Site Backup System configuration
Enter '1' to configure IBM Tivoli Storage FlashCopy(R) Manager on the production server with the option to remotely
synchronize the configuration of one or multiple backup systems using Secure Shell.
Enter '2' to configure IBM Tivoli Storage FlashCopy(R) Manager on the backup system as a 'separate installation'.

1
Preparing to install on Production System
Please enter the directory where the profile will be stored: [/db2/db2od3/acs]
selected profile path: /db2/db2od3/acs
Deactivating TSM ACS management daemon.
Is this DB2 instance used for SAP? [Y/N]
y
Are you going to perform off-loaded backups to Tivoli Storage Manager? [y|n]
n
Welcome to new wizard!

Special commands:
'?' -> Show help for current parameter
'!d' -> Delete current parameter instance (only applicable to multi-instance parameters)

FMM8422I Creating new profile '/db2/db2od3/acs/profile' for application 'SAP' ...

****** Profile parameters for section GLOBAL : ******

Path of the IBM Tivoli Storage FlashCopy(R) Manager directory {ACS_DIR} = [/db2/db2od3/acs]
Hostname and port of machine running Management Agent {ACSD} (<hostname> <port>) = [sapr3db2 57328]
Low level tracing {TRACE} (YES|NO) = [NO]

****** Profile parameters for section ACSD : ******

Path to the repository directory {ACS_REPOSITORY} = [/db2/db2od3/acs/acsrepository] /db2/db2od3/acs/acsrepository


Support for Administration Assistant {ADMIN_ASSISTANT} (<hostname> <port>|NO) = [NO]
Prefix for volume names {REPOSITORY_LABEL} = [TSM]

****** Profile parameters for section CLIENT : ******

Identifier for backups of this database instance in the repository {BACKUPIDPREFIX} (<string>) = [DB2___]
Skipping preset parameter: APPLICATION_TYPE (SAP)
Partition group for multi-partition DB2 databases {PARTITION_GROUP} (<string>) = [] OPTIONAL_ONLY
Do you want to add another instance of this parameter? [y, n] n
Maximum number of snapshot versions {MAX_VERSIONS} (<number>|ADAPTIVE) = [ADAPTIVE]
Freeze/thaw filesytem {LVM_FREEZE_THAW} (<seconds> |YES|NO|AUTO) = [AUTO]
Negative list {NEGATIVE_LIST} (<filename>|NO_CHECK|WARN|ERROR) = [NO_CHECK] WARN

Page 43 of 49 © COPYRIGHT IBM CORPORATION, 2010 Version: 2.3 (2010-10-01)


Quick Start Guide to FlashCopy Manager for SAP on DB2 Database 44

Timeout {TIMEOUT_FLASH} for phase 'flash' (<in seconds>) = [120]


Device class(es) {DEVICE_CLASS} (<list of dev classes> [USE_AT <weekdays>] [FROM <time> TO <time>]) = [STANDARD]
Do you want to add another instance of this parameter? [y, n] n

****** Profile parameters for section DEVICE_CLASS STANDARD: ******

Type of Storage system {COPYSERVICES_HARDWARE_TYPE} (DS8000|SVC|XIV) = *input mandatory* DS8000


Server name/address of host running CIM Agent {COPYSERVICES_PRIMARY_SERVERNAME} = [localhost] p590-
tic-1-v49.mainz.de.ibm.com
Hostname of backup Copy Services server {COPYSERVICES_SECONDARY_SERVERNAME} = []
Username for storage device {COPYSERVICES_USERNAME} = [superuser]
Communication protocol {COPYSERVICES_COMMPROTOCOL} (HTTPS|HTTP) = [HTTPS]
Certificate file for HTTPS {COPYSERVICES_CERTIFICATEFILE} (<filename>|NO_CERTIFICATE) =
[NO_CERTIFICATE]
Copy Services server port number {COPYSERVICES_SERVERPORT} = [5989]
Flashcopy type {FLASHCOPY_TYPE} (INCR|COPY|NOCOPY) = [COPY] INCR
Timeout for CIM Agent calls {COPYSERVICES_TIMEOUT} (<minutes> ) = [6]
Force restore {RESTORE_FORCE} (YES|NO) = [NO]
Storage system ID of referred cluster {STORAGE_SYSTEM_ID} = []
Target volumes set {TARGET_SETS} (VOLUMES_DIR|VOLUMES_FILE) = *input mandatory* VOLUMES_FILE
Filename of the target volumes file {VOLUMES_FILE} = *input mandatory*
/db2/db2od3/acs/od3.od3.standard.node0000.fct

FMM8426I Saving profile '/db2/db2od3/acs/profile' ...


FMM1555I Profile successfully created.

Do you want to continue by specifying passwords for the defined sections? [Y/N]
Y

Please enter the password for authentication with the ACS daemon: [***]

Please enter the password for device section STANDARD: [***]


Enter the password of the DS8000 user here.

FMM8437I Verifying password...


FMM0005I Start of program at: Wed Dec 2 12:31:16 CET 2009 .
FMM4184I CIM Agent version for DS8000: '5.2.0'.
FMM0020I End of program at: Wed Dec 2 12:31:18 CET 2009 .
FMM0021I Elapsed time: 02 sec .
FMM6959I Script 'LIBPATH=/db2/db2od3/sqllib/acs/pegasus /db2/db2od3/sqllib/acs/fmcima -l /db2/db2od3/sqllib/acs -f
checkpw' returned with code 0.

Creating password file at /db2/db2od3/acs/shared/pwd.acsd.


A copy of this file needs to be available to all components that connect to acsd.

IBM Tivoli Storage FlashCopy(R) Manager requires at least two daemon processes to be running at all times.
The management daemon (acsd) and the generic device agent (acsgen) are typically registered in the /etc/inittab on the
production server by the configuration wizard.
Both daemon processes restart after a system reboot.
If installing in a High Availability environment, both daemon processes must be started from the High Availability environment.
If you specify YES, these two daemon processes are not be added to the /etc/inittab and the required executable files and
command-line options display.
Make sure these two daemon processes are started by the High Availability scripts. If you specify NO, /etc/inittab is used.
Do you want to install in a High Availability environment? [Y/N]
n
A backup system must be installed and configured when off-loaded backups to Tivoli Storage Manager are performed or when
FlashCopy backup consistency verification is needed during a forced mount. Note that remote connections from the production
system to the backup system must already exist to use Open SSH. Specify YES to use OpenSSH. When prompted to specify
which DEVICE_CLASS should be enabled on the backup system, either select from the list of available DEVICE_CLASS
parameters or press Enter to select all listed DEVICE_CLASS parameters. Specify NO if OpenSSH is not available, the
INST_DIR and ACS_DIR use NFS to share between the production system and backup system, or you want to configure the
backup system in a separate step. Do you want to install a new Backup System using the Open Secure Shell (OpenSSH)
protocol? [Y/N]
n

db2od3>

Page 44 of 49 © COPYRIGHT IBM CORPORATION, 2010 Version: 2.3 (2010-10-01)


Quick Start Guide to FlashCopy Manager for SAP on DB2 Database 45

9.2 Setup script protocol for SAP on DB2 and IBM DS8000 with
offload to TSM Server
db2od3> ./setup_db2.sh

checking /db2/db2od3/sqllib/acs/acsgen ...


OK

Select one of these configurations:


(1) On-Site Production System configuration with optional remote Backup System configuration
(2) On-Site Backup System configuration
Enter '1' to configure IBM Tivoli Storage FlashCopy(R) Manager on the production server with the option to remotely
synchronize the configuration of one or multiple backup systems using Secure Shell.
Enter '2' to configure IBM Tivoli Storage FlashCopy(R) Manager on the backup system as a 'separate installation'.

1
Preparing to install on Production System
Found profile /db2/db2od3/sqllib/acs/profile
Do you want to:
(c)reate a new profile
(r)euse the profile unchanged
(m)odify the profile
Please enter one of the strings in parentheses:
m
The TSM ACS management daemon seems to be running.
Do you want me to stop it to proceed with the configuration? [Y/N]
y
Stopping TSM ACS management daemon on your request.
Deactivating TSM ACS management daemon.
Is this DB2 instance used for SAP? [Y/N]
y
Are you going to perform off-loaded backups to Tivoli Storage Manager? [y|n]
y
Welcome to new wizard!

Special commands:
'?' -> Show help for current parameter
'!d' -> Delete current parameter instance (only applicable to multi-instance parameters)

FMM8421I Modifying existing profile '/db2/db2od3/acs/profile' for application 'SAP' ...

****** Profile parameters for section GLOBAL : ******

Path of the IBM Tivoli Storage FlashCopy(R) Manager directory {ACS_DIR} = [/db2/db2od3/acs]
Hostname and port of machine running Management Agent {ACSD} (<hostname> <port>) = [sapr3db2 57328]
Low level tracing {TRACE} (YES|NO) = [NO]

****** Profile parameters for section ACSD : ******

Path to the repository directory {ACS_REPOSITORY} = [/db2/db2od3/acs/acsrepository] /db2/db2od3/acs/acsrepository


Support for Administration Assistant {ADMIN_ASSISTANT} (<hostname> <port>|NO) = [NO]
Prefix for volume names {REPOSITORY_LABEL} = [TSM]

****** Profile parameters for section OFFLOAD : ******

Skipping preset parameter: BACKUP_METHOD (DB2)


Options for backup utility {OPTIONS} (<string>|@filename ) = []
Number of table spaces read in parallel {PARALLELISM} (<number>|AUTO) = [AUTO]
Number of I/O sessions {NUM_SESSIONS} = [1] 2
Number of buffers {NUM_BUFFERS} (<number>|AUTO) = [AUTO]
Size of buffer for building backup image {BUFFER_SIZE} (<number>|AUTO) = [AUTO]

****** Profile parameters for section CLIENT : ******

Identifier for backups of this database instance in the repository {BACKUPIDPREFIX} (<string>) = [DB2___]
Skipping preset parameter: APPLICATION_TYPE (SAP)
Partition group for multi-partition DB2 databases {PARTITION_GROUP} (<string>) = [OPTIONAL_ONLY]
Do you want to add another instance of this parameter? [y, n] n
Create backup from snapshot {TSM_BACKUP} (NO|YES|TSM_ONLY|MANDATE|LATEST [USE_FOR <list of device classes>])
= [YES] YES
Do you want to add another instance of this parameter? [y, n] n
Maximum number of snapshot versions {MAX_VERSIONS} (<number>|ADAPTIVE) = [ADAPTIVE]
Freeze/thaw filesytem {LVM_FREEZE_THAW} (<seconds> |YES|NO|AUTO) = [AUTO]
Negative list {NEGATIVE_LIST} (<filename>|NO_CHECK|WARN|ERROR) = [WARN]
Timeout {TIMEOUT_FLASH} for phase 'flash' (<in seconds>) = [120]
Device class(es) {DEVICE_CLASS} (<list of dev classes> [USE_AT <weekdays>] [FROM <time> TO <time>]) = [STANDARD]

Page 45 of 49 © COPYRIGHT IBM CORPORATION, 2010 Version: 2.3 (2010-10-01)


Quick Start Guide to FlashCopy Manager for SAP on DB2 Database 46

Do you want to add another instance of this parameter? [y, n] n

****** Profile parameters for section DEVICE_CLASS STANDARD: ******

Type of Storage system {COPYSERVICES_HARDWARE_TYPE} (DS8000|SVC|XIV) = [DS8000]


Server name/address of host running CIM Agent {COPYSERVICES_PRIMARY_SERVERNAME} = [p590-tic-1-
v49.mainz.de.ibm.com]
Hostname of backup Copy Services server {COPYSERVICES_SECONDARY_SERVERNAME} = []
Username for storage device {COPYSERVICES_USERNAME} = [superuser]
Communication protocol {COPYSERVICES_COMMPROTOCOL} (HTTPS|HTTP) = [HTTPS]
Certificate file for HTTPS {COPYSERVICES_CERTIFICATEFILE} (<filename>|NO_CERTIFICATE) =
[NO_CERTIFICATE]
Copy Services server port number {COPYSERVICES_SERVERPORT} = [5989]
Flashcopy type {FLASHCOPY_TYPE} (INCR|COPY|NOCOPY) = [INCR]
Timeout for CIM Agent calls {COPYSERVICES_TIMEOUT} (<minutes> ) = [6]
Force restore {RESTORE_FORCE} (YES|NO) = [NO]
Storage system ID of referred cluster {STORAGE_SYSTEM_ID} = []
Target volumes set {TARGET_SETS} (VOLUMES_DIR|VOLUMES_FILE) = [VOLUMES_FILE]
Filename of the target volumes file {VOLUMES_FILE} = [/db2/db2od3/acs/od3.od3.standard.node0000.fct]

FMM8426I Saving profile '/db2/db2od3/acs/profile' ...


FMM1555I Profile successfully created.

Do you want to continue by specifying passwords for the defined sections? [Y/N]
n

IBM Tivoli Storage FlashCopy(R) Manager requires at least two daemon processes to be running at all times.
The management daemon (acsd) and the generic device agent (acsgen) are typically registered in the /etc/inittab on the
production server by the configuration wizard.
Both daemon processes restart after a system reboot.
If installing in a High Availability environment, both daemon processes must be started from the High Availability environment.
If you specify YES, these two daemon processes are not be added to the /etc/inittab and the required executable files and
command-line options display.
Make sure these two daemon processes are started by the High Availability scripts. If you specify NO, /etc/inittab is used.
Do you want to install in a High Availability environment? [Y/N]
n
The off-loaded backup to Tivoli Storage Manager will be performed by the IBM Tivoli Storage FlashCopy(R) Manager offload
agent 'tsm4acs'.
Specify YES to perform the off-loaded backup immediately after the FlashCopy backup completes. This adds 'tsm4acs' to the
/etc/inittab.
The default is to run 'tsm4acs' as a daemon process on the production server.
In High Availability environments, no entry is made to /etc/inittab since 'tsm4acs' must be added to the High Availability script.
Specify NO to schedule off-loaded backups individually with a crontab entry.
Do you want off-loaded tape backups to begin immediately after the snapshot? [Y/N]
n
A backup system must be installed and configured when off-loaded backups to Tivoli Storage Manager are performed or when
FlashCopy backup consistency verification is needed during a forced mount. Note that remote connections from the production
system to the backup system must already exist to use Open SSH. Specify YES to use OpenSSH. When prompted to specify
which DEVICE_CLASS should be enabled on the backup system, either select from the list of available DEVICE_CLASS
parameters or press Enter to select all listed DEVICE_CLASS parameters. Specify NO if OpenSSH is not available, the
INST_DIR and ACS_DIR use NFS to share between the production system and backup system, or you want to configure the
backup system in a separate step. Do you want to install a new Backup System using the Open Secure Shell (OpenSSH)
protocol? [Y/N]
y
Please enter the hostname of the backup system:
sapr3db2
sapr3db2 is reachable.
Enter the device classes to use for this Backup System. Make sure each device class is separated by a comma.
Here a list of device classes which are defined in the profile: STANDARD
To use all defined device classes just hit enter.

The authenticity of host 'sapr3db2 (9.155.66.101)' can't be established.


RSA key fingerprint is 22:e1:16:d3:9e:60:93:b7:94:e4:a5:54:b1:3f:df:22.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'sapr3db2,9.155.66.101' (RSA) to the list of known hosts.
root@sapr3db2's password:

start copying...
x /db2/db2od3/acs/profile_BS, 71 bytes, 1 media blocks.
x /db2/db2od3/acs/shared
x /db2/db2od3/acs/shared/pwd.acsd, 414 bytes, 1 media blocks.
copy completed.
start agents

checking /db2/db2od3/sqllib/acs/acsgen ...


OK

Successfully installed the Backup System.

Page 46 of 49 © COPYRIGHT IBM CORPORATION, 2010 Version: 2.3 (2010-10-01)


Quick Start Guide to FlashCopy Manager for SAP on DB2 Database 47

A backup system must be installed and configured when off-loaded backups to Tivoli Storage Manager are performed or when
FlashCopy backup consistency verification is needed during a forced mount. Note that remote connections from the production
system to the backup system must already exist to use Open SSH. Specify YES to use OpenSSH. When prompted to specify
which DEVICE_CLASS should be enabled on the backup system, either select from the list of available DEVICE_CLASS
parameters or press Enter to select all listed DEVICE_CLASS parameters. Specify NO if OpenSSH is not available, the
INST_DIR and ACS_DIR use NFS to share between the production system and backup system, or you want to configure the
backup system in a separate step. Do you want to install a new Backup System using the Open Secure Shell (OpenSSH)
protocol? [Y/N]
n

db2od3>

9.3 Setup script protocol for SAP on DB2 and SVC with backup and
cloning
The sections that are specific to a storage system are indicated in bold blue font type. In this
example, the storage-specific DEVICE CLASS sections are named STANDARD and DISK_ONLY.
The setup_db2.sh script was started on the production system:

db2t2p> ./setup_db2.sh

checking /db2/db2t2p/sqllib/acs/acsgen ...


OK

Select one of these configurations:


(1) On-Site Production System configuration with optional remote Backup System configuration
(2) On-Site Backup System configuration
Enter '1' to configure IBM Tivoli Storage FlashCopy(R) Manager on the production server with the option to remotely
synchronize the configuration of one or multiple backup systems using Secure Shell.
Enter '2' to configure IBM Tivoli Storage FlashCopy(R) Manager on the backup system as a 'separate installation'.

1
Preparing to install on Production System
Found profile /db2/db2t2p/sqllib/acs/profile
Do you want to:
(c)reate a new profile
(r)euse the profile unchanged
(m)odify the profile
Please enter one of the strings in parentheses:
m
The management daemon seems to be running.
Do you want me to stop it to proceed with the configuration? [Y/N]
y
Stopping FCM management daemon on your request.
Deactivating FCM management daemon.
Is this DB2 instance used for SAP? [Y/N]
Y
In which mode do you want to configure FlashCopy Manager:
(1) backup and cloning
(2) backup only
(3) cloning only
Please enter one of the numbers in parentheses:
1
Currently off-loaded backups are not configured. Do you want to configure off-loaded backups? [y|n]
N
Welcome to new wizard!

Special commands:
'?' -> Show help for current parameter
'!d' -> Delete current parameter instance (only applicable to multi-instance parameters)

FMM8421I Modifying existing profile '/db2/db2t2p/acs/profile' for application 'SAP' ...

****** Profile parameters for section GLOBAL : ******

Path of the IBM Tivoli Storage FlashCopy(R) Manager directory {ACS_DIR} = [/db2/db2t2p/acs]
Hostname and port of machine running Management Agent {ACSD} (<hostname> <port>) = [sapt2p 57328]

****** Profile parameters for section ACSD : ******

Path to the repository directory {ACS_REPOSITORY} = [/db2/db2t2p/acs/acsrepository]


Support for Administration Assistant {ADMIN_ASSISTANT} (<hostname> <port>|NO) = [NO]
Prefix for volume names {REPOSITORY_LABEL} = [TSM]

Page 47 of 49 © COPYRIGHT IBM CORPORATION, 2010 Version: 2.3 (2010-10-01)


Quick Start Guide to FlashCopy Manager for SAP on DB2 Database 48

****** Profile parameters for section OFFLOAD : ******

Skipping preset parameter: BACKUP_METHOD (DB2)


Options for backup utility {OPTIONS} (<string>|@filename ) = []
Number of table spaces read in parallel {PARALLELISM} (<number>|AUTO) = [AUTO]
Number of I/O sessions {NUM_SESSIONS} = [1]
Number of buffers {NUM_BUFFERS} (<number>|AUTO) = [AUTO]
Size of buffer for building backup image {BUFFER_SIZE} (<number>|AUTO) = [AUTO]

****** Profile parameters for section CLIENT : ******

Identifier for backups of this database instance in the repository {BACKUPIDPREFIX} (<string>) = [DB2___]
Skipping preset parameter: APPLICATION_TYPE (SAP)
Partition group for multi-partition DB2 databases {PARTITION_GROUP} (<string>) = []
Do you want to add another instance of this parameter? [y, n] n
Create backup from snapshot {TSM_BACKUP} (NO|YES|TSM_ONLY|MANDATE|LATEST [USE_FOR <list of device classes>])
= [YES] NO
Do you want to add another instance of this parameter? [y, n] n
Maximum number of snapshot versions {MAX_VERSIONS} (<number>|ADAPTIVE) = [ADAPTIVE]
Freeze/thaw filesytem {LVM_FREEZE_THAW} (YES|NO|AUTO) = [AUTO]
Negative list {NEGATIVE_LIST} (<filename>|NO_CHECK|WARN|ERROR) = [NO_CHECK]
Timeout {TIMEOUT_FLASH} for phase 'flash' (<in seconds>) = [120]
Skipping preset parameter: GLOBAL_SYSTEM_IDENTIFIER ()
Device class(es) {DEVICE_CLASS} (<list of dev classes> [USE_AT <weekdays>] [FROM <time> TO <time>]) = [STANDARD]

FMM9339E The specified device class STANDARD is already in use by CLONING section.

Device class(es) {DEVICE_CLASS} (<list of dev classes> [USE_AT <weekdays>] [FROM <time> TO <time>]) = [STANDARD]
DISK_ONLY

****** Profile parameters for section CLONING : ******

Device class(es) {DEVICE_CLASS} (<list of dev classes> USE_FOR_CLONING <list of clone database names>) =
[STANDARD USE_FOR_CLONING T2C]
FLASH_DIR_LIST (<filename>) = []

****** Profile parameters for section DEVICE_CLASS STANDARD: ******

Type of Storage system {COPYSERVICES_HARDWARE_TYPE} (DS8000|SVC|XIV) = [SVC]


Server name/address of host running CIM Agent {COPYSERVICES_PRIMARY_SERVERNAME} = [9.155.66.107]
Username for storage device {COPYSERVICES_USERNAME} = [superuser]
Skipping preset parameter: CLONE_DATABASE (YES)
Priority of background copy process {SVC_COPY_RATE} (<0-100> ) = [100]
Priority of the SVC cleaning process SVC_CLEAN_RATE (<0-100> ) = [50]
Communication protocol {COPYSERVICES_COMMPROTOCOL} (HTTPS|HTTP) = [HTTPS]
Certificate file for HTTPS {COPYSERVICES_CERTIFICATEFILE} (<filename>|NO_CERTIFICATE) =
[NO_CERTIFICATE]
Copy Services server port number {COPYSERVICES_SERVERPORT} = [5989]
Flashcopy type {FLASHCOPY_TYPE} (INCR|COPY|NOCOPY) = [COPY] INCR
Timeout for CIM Agent calls {COPYSERVICES_TIMEOUT} (<minutes> ) = [6]
Force restore {RESTORE_FORCE} (YES|NO) = [NO]
Storage system ID of referred cluster {STORAGE_SYSTEM_ID} = []
Interval for reconciliation {RECON_INTERVAL} (<hours> ) = [12] 6
Target volumes set {TARGET_SETS} (VOLUMES_DIR|VOLUMES_FILE|<list of target set names>) =
[VOLUMES_FILE]
Filename of the target volumes file {VOLUMES_FILE} = [/db2/db2t2p/acs/t2p.volumes_file.fct]

****** Profile parameters for section DEVICE_CLASS DISK_ONLY: ******


Type of Storage system {COPYSERVICES_HARDWARE_TYPE} (DS8000|SVC|XIV) = [SVC]
Server name/address of host running CIM Agent {COPYSERVICES_PRIMARY_SERVERNAME} = [9.155.66.107]
Username for storage device {COPYSERVICES_USERNAME} = [superuser]
Skipping preset parameter: CLONE_DATABASE (NO)
Priority of background copy process {SVC_COPY_RATE} (<0-100> ) = [100]
Priority of the SVC cleaning process SVC_CLEAN_RATE (<0-100> ) = [50]
Communication protocol {COPYSERVICES_COMMPROTOCOL} (HTTPS|HTTP) = [HTTPS]
Certificate file for HTTPS {COPYSERVICES_CERTIFICATEFILE} (<filename>|NO_CERTIFICATE) =
[NO_CERTIFICATE]
Copy Services server port number {COPYSERVICES_SERVERPORT} = [5989]
Flashcopy type {FLASHCOPY_TYPE} (INCR|COPY|NOCOPY) = [COPY] NOCOPY
Timeout for CIM Agent calls {COPYSERVICES_TIMEOUT} (<minutes> ) = [6]
Force restore {RESTORE_FORCE} (YES|NO) = [NO]
Storage system ID of referred cluster {STORAGE_SYSTEM_ID} = []
Interval for reconciliation {RECON_INTERVAL} (<hours> ) = [12] 6
Target volumes set {TARGET_SETS} (VOLUMES_DIR|VOLUMES_FILE|<list of target set names>) =
[VOLUMES_FILE]
Filename of the target volumes file {VOLUMES_FILE} = [/db2/db2t2p/acs/t2p.volumes_file.fct]

FMM8426I Saving profile '/db2/db2t2p/acs/profile' ...

Page 48 of 49 © COPYRIGHT IBM CORPORATION, 2010 Version: 2.3 (2010-10-01)


Quick Start Guide to FlashCopy Manager for SAP on DB2 Database 49

FMM1555I Profile successfully created.

Do you want to continue by specifying passwords for the defined sections? [Y/N]

Y
IBM Tivoli Storage FlashCopy(R) Manager requires at least two daemon processes to be running at all times.
The management daemon (acsd) and the generic device agent (acsgen) are typically registered in the /etc/inittab on the
production server by the configuration wizard.
Both daemon processes restart after a system reboot.
If installing in a High Availability environment, both daemon processes must be started from the High Availability environment.
If you specify YES, these two daemon processes are not be added to the /etc/inittab and the required executable files and
command-line options display.
Make sure these two daemon processes are started by the High Availability scripts. If you specify NO, /etc/inittab is used.

Do you want to install in a High Availability environment? [Y/N]


N

The off-loaded backup to Tivoli Storage Manager will be performed by the IBM Tivoli Storage FlashCopy(R) Manager offload
agent 'tsm4acs'.
Specify YES to perform the off-loaded backup immediately after the FlashCopy backup completes. This adds 'tsm4acs' to the
/etc/inittab.
The default is to run 'tsm4acs' as a daemon process on the production server.
In High Availability environments, no entry is made to /etc/inittab since 'tsm4acs' must be added to the High Availability script.
Specify NO to schedule off-loaded backups individually with a crontab entry.

Do you want off-loaded tape backups to begin immediately after the snapshot? [Y/N]
N

A backup system must be installed and configured when off-loaded backups to Tivoli Storage Manager are performed
or when FlashCopy backup consistency verification is needed during a forced mount.
Note that remote connections from the production system to the backup system must already exist to use Open SSH.
Specify YES to use OpenSSH. When prompted to specify which DEVICE_CLASS should be enabled on the backup system,
either select from the list of available DEVICE_CLASS parameters or press Enter to select all listed DEVICE_CLASS
parameters.
Specify NO if OpenSSH is not available, the INST_DIR and ACS_DIR use NFS to share between the production system and
backup system,
or you want to configure the backup system in a separate step.

Do you want to install a new Backup System using the Open Secure Shell (OpenSSH) protocol? [Y/N]
N
Do you want to update the Clone instance db2t2c on sapt2c? [Y/N]
Y
root@sapt2c's password:

start copying...
copy completed.
start agents

checking /db2/db2t2c/sqllib/acs/acsgen ...


OK

successfully updated Clone Instance

Do you want to install a new Cloning instance using the ssh protocol? [Y/N]
N

db2t2p>

Page 49 of 49 © COPYRIGHT IBM CORPORATION, 2010 Version: 2.3 (2010-10-01)

You might also like