homogeneous and heterogeneous system copy for sap systems ba

94
Homogeneous and Heterogeneous System Copy for SAP Systems Based on SAP Web Application Server ABAP 6.40 SR1 Document Version 1.50 - May 24, 2005 SAP NetWeaver ’04 Installation Guide

Upload: others

Post on 12-Sep-2021

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

HHSSoAAD

S

I

AP NetWeaver ’04

omogeneous and eterogeneous ystem Copy for AP Systems Based n SAP Web pplication Server BAP 6.40 SR1

ocument Version 1.50 - May 24, 2005

nstallation Guide

Page 2: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

SAP AG Neurottstraße 16 69190 Walldorf Germany T +49/18 05/34 34 24 F +49/18 05/34 34 20 www.sap.com

© Copyright 2004 SAP AG. All rights reserved. SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary.

No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice. Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors.

Microsoft, Windows, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation. These materials are subject to change without notice. These materials

are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.

IBM, DB2, DB2 Universal Database, OS/2, Parallel Sysplex, MVS/ESA, AIX, S/390, AS/400, OS/390, OS/400, iSeries, pSeries, xSeries, zSeries, z/OS, AFP, Intelligent Miner, WebSphere, Netfinity, Tivoli, and Informix are trademarks or registered trademarks of IBM Corporation in the United States and/or other countries. Oracle is a registered trademark of Oracle Corporation.

UNIX, X/Open, OSF/1, and Motif are registered trademarks of the

Open Group. Disclaimer Some components of this product are based on Java™. Any code change in these components may cause unpredictable and severe malfunctions and is therefore expressively prohibited, as is any decompilation of these components.

Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registered trademarks of Citrix Systems, Inc.

Any Java™ Source Code delivered with this product is only to be used by SAP’s Support Services and may not be modified or altered in any way.

HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C®, World Wide Web Consortium, Massachusetts Institute of Technology.

Java is a registered trademark of Sun Microsystems, Inc.

Documentation in the SAP Service Marketplace You can find this documentation at the following Internet address: JavaScript is a registered trademark of Sun Microsystems, Inc., used

under license for technology invented and implemented by Netscape. service.sap.com/instguides

MaxDB is a trademark of MySQL AB, Sweden.

Page 3: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

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

SAP License Agreement for STLport SAP License Agreement for STLport

between

SAP Aktiengesellschaft Systems, Applications, Products in Data Processing

Neurottstrasse 16 69190 Walldorf

Germany ( hereinafter: SAP )

and

you

( hereinafter: Customer ) 1. Subject Matter of the Agreement

a. SAP grants Customer a non-exclusive, non-transferable, royalty-free license to use the STLport.org C++ library (STLport) and its documentation without fee.

b. By downloading, using, or copying STLport or any portion thereof Customer agrees to abide by the intellectual property laws, and to all of the terms and conditions of this Agreement.

c. The Customer may distribute binaries compiled with STLport (whether original or modified) without any royalties or restrictions.

d. Customer shall maintain the following copyright and permission notices on STLport sources and its documentation unchanged: Copyright 2001 SAP AG

e. The Customer may distribute original or modified STLport sources, provided that: • The conditions indicated in the above permission notice

are met; • The following copyright notices are retained when

present, and conditions provided in accompanying permission notices are met:

Copyright 1994 Hewlett-Packard Company Copyright 1996,97 Silicon Graphics Computer Systems, Inc. Copyright 1997 Moscow Center for SPARC Technology. Copyright 1999,2000 Boris Fomitchev Copyright 2001 SAP AG Permission to use, copy, modify, distribute and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. Hewlett-Packard Company makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. Permission to use, copy, modify, distribute and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. Silicon Graphics makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. Permission to use, copy, modify, distribute and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. Moscow Center for SPARC

Page 4: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

Technology makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. Boris Fomitchev makes no representations about the suitability of this software for any purpose. This material is provided "as is", with absolutely no warranty expressed or implied. Any use is at your own risk. Permission to use or copy this software for any purpose is hereby granted without fee, provided the above notices are retained on all copies. Permission to modify the code and to distribute modified code is granted, provided the above notices are retained, and a notice that the code was modified is included with the above copyright notice. Permission to use, copy, modify, distribute and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. SAP makes no representations about the suitability of this software for any purpose. It is provided with a limited warranty and liability as set forth in the License Agreement distributed with this copy. SAP offers this liability and warranty obligations only towards its customers and only referring to its modifications.

2. Support and Maintenance

SAP does not provide software maintenance for the STLport. Software maintenance of the STLport therefore shall be not included. All other services shall be charged according to the rates for services quoted in the SAP List of Prices and Conditions and shall be subject to a separate contract.

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

4. Limited Liability a. Irrespective of the legal reasons, SAP shall only be liable for

damage, including unauthorized operation, if this (i) can be compensated under the Product Liability Act or (ii) if caused due to gross negligence or intent by SAP or (iii) if based on the failure of a guaranteed attribute.

b. If SAP is liable for gross negligence or intent caused by employees who are neither agents or managerial employees of SAP, the total liability for such damage and a maximum limit on the scope of any such damage shall depend on the extent to which its occurrence ought to have anticipated by SAP when concluding the contract, due to the circumstances known to it at that point in time representing a typical transfer of the software.

c. In the case of Art. 4.2 above, SAP shall not be liable for indirect damage, consequential damage caused by a defect or lost profit.

d. SAP and the Customer agree that the typical foreseeable extent of damage shall under no circumstances exceed EUR 5,000.

e. The Customer shall take adequate measures for the protection of data and programs, in particular by making backup copies at the minimum intervals recommended by SAP. SAP shall not be liable for the loss of data and its recovery, notwithstanding the other limitations of the present Art. 4 if this loss could have been avoided by observing this obligation.

f. The exclusion or the limitation of claims in accordance with the present Art. 4 includes claims against employees or agents of SAP.

Page 5: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

Typographic Conventions Icons Type Style Description

Example Text Words or characters quoted from the screen. These include field names, screen titles, pushbuttons labels, menu names, menu paths, and menu options.

Cross-references to other documentation

Example text Emphasized words or phrases in body text, graphic titles, and table titles

EXAMPLE TEXT Technical names of system objects. These include report names, program names, transaction codes, table names, and key concepts of a programming language when they are surrounded by body text, for example, SELECT and INCLUDE.

Example text Output on the screen. This includes file and directory names and their paths, messages, names of variables and parameters, source text, and names of installation, upgrade and database tools.

Example text Exact user entry. These are words or characters that you enter in the system exactly as they appear in the documentation.

<Example text> Variable user entry. Angle brackets indicate that you replace these words and characters with appropriate entries to make entries in the system.

EXAMPLE TEXT Keys on the keyboard, for example, F2 or ENTER.

Icon Meaning

Caution

Example

Note

Recommendation

Syntax

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

Page 6: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

6

Homogeneous and Heterogeneous System Copy for SAP Systems Based on SAP WAS 6.40 SR1 .............................................8

1 Planning .............................................................................................10 2 Preparations ......................................................................................14 3 Database-Specific Procedures ........................................................18

3.1 Oracle-Specific Procedure .................................................................. 19 3.1.1 Generating the Control File Structure .........................................................................21 3.1.2 Preparing the Target System......................................................................................24 3.1.3 Creating an Offline Backup.........................................................................................27 3.1.4 Restoring the Database Files on the Target System..................................................27 3.1.5 Restarting SAPinst......................................................................................................28

3.2 MS SQL Server-Specific Procedure.................................................... 29 3.3 IBM DB2 UDB for UNIX and Windows Specific Procedure ............... 30 3.4 IBM DB2 UDB for z/OS Specific Procedure........................................ 32 3.5 IBM DB2 UDB for iSeries Specific Procedure.................................... 33 3.6 Informix-Specific Procedure................................................................ 34 3.7 MaxDB-Specific Procedure ................................................................. 35

4 R3load Procedures ...........................................................................38 4.1 R3load Procedure on UNIX.................................................................. 40

4.1.1 Setting the Library Path Environment Variable...........................................................40 4.1.2 Generation of DDL statements ...................................................................................42 4.1.3 Running SAPinst to Export the Database...................................................................43

4.2 R3load Procedure on Windows........................................................... 47 4.2.1 Generation of DDL statements ...................................................................................48 4.2.2 Running SAPinst to Export the Database...................................................................48

4.3 R3load Procedure on IBM eServer iSeries......................................... 52 4.3.1 Preparing the Windows Host for the SAP System Installation ...................................52 4.3.2 Preparing a Windows User Account and iSeries User Profile....................................53 4.3.3 Installing TMKSVR and Creating an Installation Share..............................................54 4.3.4 Generation of DDL statements ...................................................................................56 4.3.5 Running SAPinst to Export the Database...................................................................56

4.4 Setting up the Target System.............................................................. 60 4.4.1 Transferring the Export Files to the Target Host ........................................................60 4.4.2 Installing the Target System .......................................................................................61 4.4.3 RELOAD Procedure....................................................................................................62

5 R3load Procedures using the Migration Monitor...........................63 5.1 R3load Procedure with Migration Monitor on UNIX .......................... 64 5.2 R3load Procedures with Migration Monitor on Windows ................. 65 5.3 Configuring the Import and Export Properties Files ......................... 66 5.4 Starting the Migration Monitor ............................................................ 75 5.5 Restarting R3load Processes.............................................................. 77

Page 7: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

7

5.6 Output Files of the Migration Monitor ................................................ 78 5.7 Setting up the Target System using the Migration Monitor.............. 79

5.7.1 Installing the Target System Using the Migration Monitor ..........................................79 6 Final Activities...................................................................................81

6.1 Performing Follow-On Actions in the Source System ...................... 82 6.2 Performing Follow-On Actions in the Target System ....................... 83

7 Additional Information......................................................................87 7.1 Remote Installation with SAPinst ....................................................... 88

7.1.1 Starting SAPinst on the Remote Host.........................................................................89 7.1.2 Starting SAPinst GUI on the Local Host .....................................................................90

7.2 Interrupted Installation with SAPinst.................................................. 92

Page 8: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

1 Planning

Homogeneous and Heterogeneous System Copy for SAP Systems Based on SAP WAS 6.40 SR1 Purpose When a homogeneous system copy is performed, the target SAP system is installed on the same operating system and the same database system as the source SAP system. The contents of the database are copied from the source to the target system.

During a heterogeneous system copy, the operating system or the database system is changed. Migration is a synonym for heterogeneous system copy. Familiarize yourself with the migration procedure. For detailed information, see:

• SAP System Copy & Migration page on SAP Service Marketplace at service.sap.com/systemcopy.

• SAP OS/DB Migration page on SAP Service Marketplace at service.sap.com/osdbmigration.

Additionally to the information contained on this page, check the SAP OS/DB Migration Planning Guide that is available in the Media Library.

• SAP Note 82478

A homogeneous system copy should only be done by a person with experience in copying systems and with knowledge of the operating system, the database, and the ABAP Dictionary. A heterogeneous system copy must be done by a certified system support consultant or a certified SAP Technical Consultant.

Create an SAPNet - R/3 Frontend message in the application area BC-INS-UNX (UNIX), BC-INS-NT (Windows), or BC-INS-AS4 (IBM eServer iSeries) if you experience problems during the homogeneous system copy. In the case of a heterogeneous system copy (OS/DB migration), create an SAPNet - R/3 Frontend message in the application area BC-INS-MIG if you experience problems.

Terminology

• Homogeneous System Copy

The copy of the system is installed on the same operating system and database platform as the original system.

• Heterogeneous System Copy

During the copy, either the operating system or the database system is switched, or both. Heterogeneous system copy is a synonym for migration.

• Source System and Target System

The SAP system containing the original database is called the source system and the system to which the database copy is to be imported is called the target system. Their SAP system names are abbreviated to SOURCE_SAPSID and TARGET_SAPSID (IBM

8

Page 9: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

1 Planning

eServer iSeries: source_<SID> and target_<SID>). The terms source database and target database are also used in this description.

• System Copy

Duplication of an SAP system. Certain SAP parameters may change in a copy. When a system copy is made, all the instances are newly installed, but the database is set up using a copy of the source system database.

• Database Copy

Database-dependent part of the system copy.

• Placeholders

Placeholders such as <SAPSID> are used in commands. They are used in the same way as in the SAP system installation documentation, and must be replaced with the values valid for your site.

The following additional placeholders are used:

Placeholder Meaning How to find out <S_HOST> System name of the source host Command hostname

<T_HOST> System name of the target host Command hostname

<S_SAPSID> SAP system ID of the source system <SAPSID> of the original system

<T_SAPSID> SAP system ID of the target system <SAPSID> of the target system

<S_DBSID> Database ID of the source system <DBSID> of the original system

<T_DBSID> Database ID of the target system <DBSID> of the target system

Constraints • A system copy should only be done by a person with experience in copying systems

and with knowledge of the operating system, the database, and the ABAP Dictionary.

• Client transport is not supported as a system copy method. Transporting production clients is not supported at all. You can use client transport for the initial set up of a SAP system infrastructure. The client copy procedure is not handled in this documentation.

• Export and import of a database with the installation tools for reorganization purposes is not described in this documentation, and is not supported by SAP. Use the appropriate tools for database reorganization.

• If you have made modifications in your development system, and want to copy your quality assurance or production system onto the development system, see SAP Note 130906.

• Copying data from SAP R/2 Systems to an SAP system based on SAP Web Application Server ABAP is not described in this documentation. Copying data from non-SAP systems to SAP systems is not described in this documentation either.

• If you want to convert a non-Unicode systems to a Unicode systems or perform system copy of a Unicode systems, see SAP Note 548016.

9

Page 10: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

1 Planning

1 Planning Purpose Before you begin with the practical system copy tasks, it is essential to have a planning phase in which you make a number of fundamental decisions that influence the subsequent system copy procedure. Careful planning is a prerequisite for the successful system copy of the system.

SAP recommends that you make a system copy in order to set up a test, demo, training or standby system (Oracle and Informix: standby systems cannot be created with a system copy). You should perform upgrades in a test system first. This way you can identify customer-specific problems which might result from modifications.

The SAP system infrastructure (development, quality assurance and production system) can be set up without making a system copy as follows:

• Install all SAP systems (begin with the development system). Customize the development system as described in the implementation documentation.

• Transport the client-dependent and client-independent data to the quality assurance and production systems.

However, if you do not follow this concept, you can also install a system, customize it and then perform a system copy.

When copying a system which contains production data it is important to choose the right moment for the copy. This could be a month-end or year-end closing. Make sure that there is a well-defined starting point for the data in the new system.

Prerequisites

Read the following SAP Note before beginning the system copy. This note contains the most recent information regarding the system copy. SAP Note 784931 System Copy for SAP Systems Based on SAP Web AS 6.40 SR1 Make sure that you have the most recent version of the note. SAP Notes are located on SAP Service Marketplace at service.sap.com/notes.

A consistent system copy can only be ensured if you perform all steps described in this documentation.

The system copy is applicable for:

• Setting up system landscapes (where the SAP systems have different SAPSIDs).

• Creating systems for testing, demonstration, training and standby. Depending on the purpose of the system, it may be advisable to use the same SAP system name, even though the system cannot be included in a system group for transports in this case.

The SAP system release of the source and target systems must be the same.

Process Flow ...

1. Obtain the latest versions of the SAP Notes.

2. In the case of a major change in hardware configuration (for example, new machine type, new hard disk configuration, new file system type), consult your SAP-authorized hardware partner.

10

Page 11: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

1 Planning

3. Create a plan for performing the system copy.

Take into account the downtime of the source system (for preparations and copying) when planning the system copy.

4. Decide which homogeneous system copy method you want to use:

With database-specific tools (tools provided by the database vendor):

Some database vendors offer specific tools for copying a database. These tools allow you to:

Restore a backup of one database (source DB) in another one (target DB) (backup method)

Unload the source DB and load the data into the target DB.

With SAP tools (R3load procedure):

The system copy is carried out with SAP tools. This method should be used if database-specific methods are either not available or not suitable.

Copying an SAP system with these tools is described in section R3load Procedures.

For a heterogeneous system copy, only the R3load procedure is available.

Neither of these methods is supported for all database systems. See the following table to check which copy methods are available for your database system:

Database OS Platform Available Methods

UNIX Use one of the following:

• The R3load method (see section R3load Procedure on UNIX).

• The MaxDB backup/restore method [Page 35]

MySQL MaxDB

In this documentation we refer to the MySQL MaxDB database as MaxDB from now on.

Windows Use one of the following:

• The R3load method (see section R3load Procedure on Windows).

• The MaxDB backup/restore method [Page 35]

IBM DB2 Universal Database for eServer iSeries

eServer iSeries Use the R3load method (see section R3load Procedure on eServer iSeries) or the Save/Restore Library method (see SAP Note 585277).

IBM DB2 Universal Database for UNIX and Windows

UNIX or Windows

Use one of the following:

• The R3load method (see the corresponding section R3load Procedure on UNIX or R3load Procedure on Windows)

• The backup method of IBM DB2 Universal Database for UNIX and Windows is supported for SAP systems based on SAP Web AS 6.40 SR1. For more information, see IBM DB2 UDB for UNIX and Windows Specific Procedure [Page 30].

11

Page 12: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

1 Planning

IBM DB2 Universal Database for z/OS

eServer zSeries Use one of the following:

• The R3load method (see section R3load Procedure on UNIX or R3load Procedure on Windows).

• The IBM DB2 Universal Database for z/OS specific procedure as described in IBM DB2 UDB for z/OS Specific Procedure [Page 32].

UNIX Use one of the following:

• The R3load method (see section R3load Procedure on UNIX).

• The Informix backup/restore method [Page 34].

Informix

Windows Use one of the following:

• The R3load method (see section R3load Procedure on Windows).

• The Informix backup/restore method [Page 34].

UNIX Use one of the following:

• The R3load method (see section R3load Procedure on UNIX)

• The R3load method with Export/Import Monitors (see section R3load Procedure with Export/Import Monitors)

• The Oracle backup/restore method (see section Database-Specific Procedures → Oracle-Specific Procedure)

Oracle

Windows Use one of the following:

• The R3load method (see section R3load Procedure on Windows)

• The Oracle backup/restore method (see section Database-Specific Procedures → Oracle-Specific Procedure, and SAP Note 676468).

• The R3load method with Export/Import Monitors (see section R3load Procedure with Export/Import Monitors).

MS SQL Server Windows Use one of the following:

• The R3load method (see section R3load Procedure on Windows)

• The Backup/Restore or Detach/Attach Method (see section Database-Specific Procedures → MS SQL Server-Specific Procedure).

5. Order the right version of the installation kit before starting the system copy.

6. Choose an SAP system name. The new SAP system name <TARGET_SAPSID> can be chosen freely (during a new installation), but to meet the requirements of the

12

Page 13: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

1 Planning

Workbench Organizer you must choose different SAP system names for different systems.

7. Make sure that the versions of the SAP system and the installation tools are the same on the target and source systems (exceptions are only allowed if they are described in an SAP Note).

Several SAP systems can be operated on a single host without encountering any problems. Nevertheless, SAP recommends that you use a separate host for each system because an SAP system upgrade may depend on an OS upgrade. If the SAP systems are on separate hosts, it is possible to upgrade them at different times.

The source system must be in a consistent state before it can be copied.

8. Heterogeneous System Copy: Get Migration Key

If you change the operating system or the database system during the copy (heterogeneous system copy), you need a migration key. You can generate the migration key via SAP Service Marketplace at service.sap.com/migrationkey. Enter the installation number of your source system when your are requesting the key.

13

Page 14: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

2 Preparations

2 Preparations Before you start the system copy, you must perform steps to prepare the procedure.

Organizational Preparations

• Required DVDs

Make sure that all required CDs / DVDs for the system copy are available. You do no longer require a special migration CD. The tools are located on the SAP Installation MasterDVD.

In case you want to perform a copy of a non-R/3 SAP system as a pilot project, see SAP Note 543715 (APO, BW), SAP Note 693168 (IMIG) and SAP Note 611232 (released CRM/EBP products).

• Tool Versions

Check that you have the appropriate tool versions for your SAP Kernel.

• SAP License

Once installation is complete and the SAP system copy has been imported, you will require a new license key for the target system. The license key of the source system is not valid for this system. You can order a new license key for the target system as follows:

SAP Service Marketplace at service.sap.com.

Remote Connection to SAP support to request help with these tasks. For more information see service.sap.com/remoteconnection.

Telefax

For more information, see SAP Note 94998.

• Archive Files

You must make data archived in the source system (data that does not reside in the database but was moved to a different storage location using SAP Archive Management) accessible in the target system. Adapt the file residence information in the target system. Refer to the SAP Online Documentation (SAP Library → Cross-Application Components → Archiving Application Data) for help.

Access to archive files is platform-independent.

• Configuration Analysis / Hardware Analysis

The following factors have to be determined:

The number of application servers

The expected size of the database

Additional disks or other hardware required

Required memory

See Hardware and Software Requirements Check in the SAP system installation documentation to determine the system requirements.

• Test Run / Schedule

14

Page 15: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

2 Preparations

Perform a test run of the system copy. The time taken by the test run is used to calculate the system downtime:

If your target system will replace your source system, try to perform a complete test run, meaning that the entire database is exported from the source system, transferred to the target system and imported there. Approximately system downtime will be equal to the total test time (that is, time for export, transport and import).

If you do not want to replace your source system, a partial test run (export of entire database or parts of it) may suffice to calculate the system downtime. The source system will only be down for the time of the export.

Calculating the system downtime is particularly important for very large databases (VLDB) or when tapes are being used. The test run is also done to determine the amount of export data. You should choose the best data transfer method (for example, FTP or tape). We recommend to perform read/write actions only on local file systems. Do not use NFS-mounted file systems, as:

Reading from NFS-mounted file systems may fail.

Writing to NFS-mounted file systems may cause corrupted dumps.

Define a schedule for the test migration and the final migration.

Technical Preparations

In order to make a consistent copy of the database, it is necessary to prepare the source system and to carry out some subsequent actions on the target system. This is not necessary when performing a test run.

The following list describes important preparatory actions. For further information on SAP system administration, see the SAP Online Documentation.

• Preparing the Source System

Before starting a system copy, check the minimal kernel patch level which is required by the support package level of the source system. It may be necessary to replace the SAP kernel which is delivered with the kernel CD of the installation kit and installed during the installation of the target system by a newer kernel patch level before starting the target system. If you have to replace the delivered SAP kernel, you can do that after the installation of the central instance.

No canceled or pending update requests should be in the system. Check this via: Tools → Administration → Monitor → Update (SM13). If canceled or pending updates exist, these must be updated again or deleted from all clients. You can see whether canceled or pending updates exist by checking if table VBDATA contains any entries. Proceed as follows in order to find the canceled or open updates:

i. Call transaction SM13.

ii. Delete the default values for the client, user, and time.

iii. Choose all update requests.

If canceled or pending records exist, then these must be updated again or deleted. Check whether this action was successful using transaction SE16 for table VBDATA.

15

Page 16: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

2 Preparations

Cancel all released jobs: Tools → CCMS → Jobs → Maintenance. This also applies to the jobs which must run periodically (see SAP Note 16083). Select all jobs (include start after event): Job → Schedule Job → Cancel.

Adapt the operation mode timetable to make sure that no switching of operating modes takes place while a system is being copied: Administration → CCMS → Configuration → Operation mode calendar.

Note the logical system names of all clients: ...

i. If you plan to overwrite an existing system with a system copy (i.e. the source and target systems will both exist after the system copy), make sure you note the logical system names of all clients in the system that will be overwritten (transaction SCC4). As the logical system names will be overwritten, in case of differences, they must be changed back to their original names (as they existed in the system that is overwritten) in the follow-on actions after the system copy.

ii. BW customers: When planning an SAP BW system copy, read SAP Note 325525.

iii. If you create a new system with a system copy (i.e., create an upgrade test system), the logical naming strategy for this new system should be consistent with your existing logical system naming convention. See OSS note 184447 if you are still planning your BW system landscape.

iv. If your system copy is used to replace hardware for the DB server, migrate to a different database system or operating system (i.e., source system for the copy is the same as the copy target), no changes to logical system names are required.

Before the export, delete QCM tables from your system. Proceed as follows: ...

i. Before deleting you must always check

that the tables are consistent (no restart log or conversion procedure termination must be displayed)

that the data of the original table is legible

If application programs do not run correctly which use the affected original table, do not delete the QCM table yet.

ii. Start transaction SE14.

iii. Choose Extras → Invalid temp. table

All QCM tables that can be deleted are displayed.

iv. Mark the tables and delete them.

FI customers: You can perform an additional consistency check by running the job SAPF190 before the system copy in the source system, as well as after the copy in the target system, and then comparing the results. No customer data may be changed in the meantime. (Accounting → Financial Accounting → General ledger → Periodic Processing → Closing → Check/count → Comparison)

FI customers: You can further check consistency by running the jobs RFUMSV00 (tax on sales/purchases), RAGITT01 (asset history sheet), RAZUGA01 (asset acquisitions), RAABGA01 (fixed asset retirements) before the system copy in the source system, as well as after the copy in the target system, and then comparing the results. No customer data may be changed in the meantime.

16

Page 17: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

2 Preparations

CO customers: You can perform an additional consistency check by running the report group 1SIP before the system copy in the source system, as well as after the copy in the target system, and then comparing the results. No customer data may be changed in the meantime.

Prerequisites for an export: Before performing an export, make sure that: - No upgrade-prepare is performed. - No incremental conversion is in progress. To test if an incremental conversion is in progress, start the transaction ICNV. If there are any table entries in the TICNV, an incremental conversion is in progress. In this case, you have the following options: 1. Defer the migration until the incremental conversion has finished. 2. Try to finish the incremental conversion by performing the following steps:

• If the tables are in state ‘For conversion’ or in state ‘Done’, delete the entries by choosing Control Delete Entry.

• If the tables are in any other state, you have to finish the incremental conversion. Choose the button Assistant and proceed according to the Online Documentation.

Only Heterogeneous System Copy: Before you start the export of your source system, make sure that the tables TATGPC and TATGPCA are empty. To do so, use your database utility and delete the contents of these tables with the following statements: DELETE from TATGPC DELETE from TATGPCANormally both tables are empty. If you do not delete the contents of these tables you will encounter problems while importing the data to your target system because of non NULL capable fields in these tables.

17

Page 18: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

3 Database-Specific Procedures

3 Database-Specific Procedures The following sections describe database-specific procedures for the homogeneous system copy. Database-specific methods are not available for all database systems. For information on the availability, see the section Planning [Page 10] in this documentation and check the SAP Service Marketplace for SAP Notes describing the homogeneous system copy for your database system.

18

Page 19: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

3 Database-Specific Procedures

3.1 Oracle-Specific Procedure Purpose In an SAP system environment, you can create a homogeneous copy of an Oracle database by copying database files. This method is suitable for creating an exact copy of an existing database. The source of the copy can be an offline backup or the file system of your source host.

SAPinst is used for the installation on the target system host as described in the installation documentation for your SAP component. Only the SAPinst steps for setting up and loading the database steps are modified.

As of SAP Web AS 6.40 SR 1, the new OraBRCopy Java tool replaces the former R3COPY shell script. It works on Unix and Windows as well. The tool generates a file CONTROL.SQL into the current working directory, which can be used without further adaptions on the target system..

The tool is located on the SAP Installation Master DVD:

• Unix:

(<DVD-DIR>:/IM_<xx>/SAPINST/UNIX/COMMON/INSTALL/ORA/ORABRCOPY.SAR)

• Windows:

(<DVD-DIR>:\IM_<xx>\SAPINST\NT\COMMON\INSTALL\ORA\ORABRCOPY.SAR)

For a detailed description of the OraBRCopy tool refer to the delivered documentation ORABRCopy.pdf which is part of the OraBRCOPY.SAR archive.

Advantages

• Existing offline backups can be used (provided redo logs were cleaned up with forced log switches).

• Procedure is faster than the R3load method.

Disadvantages

• Offline backup/copy of database files in a heterogeneous environment is not possible as hardware of the source and target systems must be binary compatible.

• Source system host and target system host must be different.

• SAP system and database must be shut down during offline backup/copy of database files.

• You cannot change the database schema and the tablespace names.

Prerequisites Make sure that the following requirements are met:

• You use the same Oracle release and patch level for your database in the source and target system.

• If you want to upgrade your database from 32-bit to 64-bit, add the following lines at the bottom of the control.sql file:

shutdown immediate;

startup restrict

19

Page 20: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

3 Database-Specific Procedures

spool utlirp.log

@?/rdbms/admin/utlirp.sql

spool off

alter system disable restricted session;

• You must have installed JRE version 1.4.1 or higher on your system

• The JAVA_HOME environment variable must point to the JRE directory.

• The classes12.jar must exist in the <ORACLE_HOME>/jdbc/lib directory (installed using a standard Oracle installation).

• The backup must be done offline.

• The source and target systems must run on different hosts for security reasons.

• The source and target systems must be binary compatible.

If you use Windows, note that the source or target system must be 32 or 64-bit systems (I386 or IA64). You can copy from 32-bit systems to 64-bit systems and vice versa.

• UNIX only: The hard disk type and the disk management system of the source and target systems must be the same.

• Make sure that all redo log groups are archived.

If your source system uses the US7ASCII character set, you must choose this character set when installing the target system. SAPinst prompts for the character set during the installation (key: Database Character Set). The installation default is WE8DEC or UTF8 for Unicode systems. To find out the character set used by the source system, connect to the source database as user sap<schemaid> or sapr3 with sqlplus and enter: SELECT * FROM V$NLS_PARAMETERS;

Process Flow ...

1. Generate the control file structure for the target database on the source system.

2. Prepare the target system.

3. If required, create an offline backup of the source database.

4. Restore the data files, log files, trace file and structure information file on the target system by using the offline backup or by copying the listed files directly from the source host.

5. Restart SAPinst.

Result You finished this part of the system copy. To complete the system copy, you have to perform the steps in section Final Activities [Page 81].

20

Page 21: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

3 Database-Specific Procedures

3.1.1 Generating the Control File Structure Prerequisites

We recommend that you shut down the SAP system before you perform the following steps. The database must still be running.

Procedure ...

1. Create an installation directory <INSTDIR> (UNIX: with permissions 777) on the source system.

2. Copy the ORABRCOPY.SAR archive from the SAP Installation Master DVD to the installation directory and extract it using SAPCAR:

You find the archive in the following directory:

For Unix:

(<DVD-DIR>:/IM_<xx>/SAPINST/<UNIX>/COMMON/INSTALL/ORA/ORABRCOPY.SAR)

Windows:

(<DVD-DIR>:\IM_<xx>\SAPINST\NT\COMMON\INSTALL\ORA\ORABRCOPY.SAR)

3. Start the OraBRCopy tool as an OS user with Oracle DBA privileges (user ora<dbsid> on UNIX, user <sapsid>adm on Windows):

On UNIX, enter the following commands: ./ora_br_copy.sh –targetSid <TARGET_DBSID> -password <system’s password> -listenerPort <listener port>

On Windows, enter the following commands: ora_br_copy.bat –targetSid <TARGET_DBSID> -password <system’s password> -listenerPort <listener port>

The tool will create the files CONTROL.SQL, CONTROL.TRC and init<targetSID>.ora in your installation directory, shutdown and restart the database and perform the required log switches.

If an error occurs, check the log file: <INSTDIR>/ora.brcopy.log

4. Verify the CONTROL.SQL control file using the CONTROL.TRC trace file.

21

Page 22: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

3 Database-Specific Procedures

Example for Windows In the following example for Windows, entries of CONTROL.SQL written in bold should be compared to the trace file:

REM ====================================================================

REM CONTROL.SQL

REM

REM SAP AG Walldorf

REM Systeme, Anwendungen und Produkte in der Datenverarbeitung

REM

REM (C) Copyright SAP AG 2004

REM ====================================================================

REM Generated at:

REM Fri Sep 17 08:33:25 CEST 2004

REM for target system NEW

REM on

REM Windows 2000 5.0 x86

CONNECT / AS SYSDBA

STARTUP NOMOUNT

CREATE CONTROLFILE REUSE

SET DATABASE "NEW"

RESETLOGS

ARCHIVELOG

MAXLOGFILES 255

MAXLOGMEMBERS 3

MAXDATAFILES 1022

MAXINSTANCES 50

MAXLOGHISTORY 1134

LOGFILE

GROUP 1 (

'D:\ORACLE\NEW\ORIGLOGA\LOG_G11M1.DBF',

'D:\ORACLE\NEW\MIRRLOGA\LOG_G11M2.DBF'

) SIZE 50M,

GROUP 2 (

'D:\ORACLE\NEW\ORIGLOGB\LOG_G12M1.DBF',

'D:\ORACLE\NEW\MIRRLOGB\LOG_G12M2.DBF'

) SIZE 50M,

22

Page 23: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

3 Database-Specific Procedures

GROUP 3 (

'D:\ORACLE\NEW\ORIGLOGA\LOG_G13M1.DBF',

'D:\ORACLE\NEW\MIRRLOGA\LOG_G13M2.DBF'

) SIZE 50M,

GROUP 4 (

'D:\ORACLE\NEW\ORIGLOGB\LOG_G14M1.DBF',

'D:\ORACLE\NEW\MIRRLOGB\LOG_G14M2.DBF'

) SIZE 50M

DATAFILE

'D:\ORACLE\NEW\SAPDATA1\SYSTEM_1\SYSTEM.DATA1',

'D:\ORACLE\NEW\SAPDATA3\IMS_1\IMS.DATA1',

'D:\ORACLE\NEW\SAPDATA3\IMS_2\IMS.DATA2',

'D:\ORACLE\NEW\SAPDATA3\IMS_3\IMS.DATA3',

'D:\ORACLE\NEW\SAPDATA3\IMS_4\IMS.DATA4',

'D:\ORACLE\NEW\SAPDATA4\IMS_5\IMS.DATA5',

'D:\ORACLE\NEW\SAPDATA4\IMS_6\IMS.DATA6',

'D:\ORACLE\NEW\SAPDATA4\IMS_7\IMS.DATA7',

'D:\ORACLE\NEW\SAPDATA4\IMS_8\IMS.DATA8',

'D:\ORACLE\NEW\SAPDATA4\IMS_9\IMS.DATA9',

'D:\ORACLE\NEW\SAPDATA1\IMS620_1\IMS620.DATA1',

'D:\ORACLE\NEW\SAPDATA1\IMS620_2\IMS620.DATA2',

'D:\ORACLE\NEW\SAPDATA1\IMS620_3\IMS620.DATA3',

'D:\ORACLE\NEW\SAPDATA1\IMS620_4\IMS620.DATA4',

'D:\ORACLE\NEW\SAPDATA2\IMS620_5\IMS620.DATA5',

'D:\ORACLE\NEW\SAPDATA2\IMS620_6\IMS620.DATA6',

'D:\ORACLE\NEW\SAPDATA2\IMS620_7\IMS620.DATA7',

'D:\ORACLE\NEW\SAPDATA2\IMS620_8\IMS620.DATA8',

'D:\ORACLE\NEW\SAPDATA2\IMS620_9\IMS620.DATA9',

'D:\ORACLE\NEW\SAPDATA3\IMS620_10\IMS620.DATA10',

'D:\ORACLE\NEW\SAPDATA4\IMS620_11\IMS620.DATA11',

'D:\ORACLE\NEW\SAPDATA1\IMSUSR_1\IMSUSR.DATA1',

'D:\ORACLE\NEW\SAPDATA2\ROLL_1\ROLL.DATA1'

;

ALTER DATABASE OPEN RESETLOGS;

ALTER TABLESPACE PSAPTEMP ADD TEMPFILE 'D:\ORACLE\NEW\SAPDATA3\TEMP_1\TEMP.DATA1'

SIZE 350M REUSE AUTOEXTEND OFF;

23

Page 24: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

3 Database-Specific Procedures

Comments on the example: MAXLOGFILES 255

The numbers must be greater or equal to the corresponding numbers in the trace file.

GROUP 1 (

'D:\ORACLE\NEW\ORIGLOGA\LOG_G11M1.DBF',

'D:\ORACLE\NEW\MIRRLOGA\LOG_G11M2.DBF'

) SIZE 50M,

Group 2 (

The sizes of the respective groups must be equal to the sizes of the corresponding groups in the trace file. 'D:\ORACLE\NEW\SAPDATA1\SYSTEM_1\SYSTEM.DATA1',

'D:\ORACLE\NEW\SAPDATA3\IMS_1\IMS.DATA1',

… 'D:\ORACLE\NEW\SAPDATA1\IMS620_1\IMS620.DATA1'

The count of the data files must be equal to the count of the corresponding data files in the trace file.

ALTER TABLESPACE PSAPTEMP ADD TEMPFILE 'D:\ORACLE\NEW\SAPDATA3\TEMP_1\TEMP.DATA1'

SIZE 350M REUSE AUTOEXTEND OFF;

The size must be equal to the corresponding size in the trace file.

The number of the rows with ALTER TABLESPACE must be equal to the number of the corresponding rows in the trace file.

3.1.2 Preparing the Target System Prerequisites Make sure that the sapdata<n> file systems on the target system host are large enough.

Procedure ...

1. Install the target SAP system with SAPinst as described in the installation documentation for your SAP component.

When you install the central instance and the database instance, make sure that you cannot change the database schema names. The schema names of the source and target system must be identical.

...

24

Page 25: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

3 Database-Specific Procedures

When SAPinst prompts for the installation type, choose:

System Copy / Oracle Backup/Restore.

Install until SAPinst stops to restore the database files on the target system.

The following message is displayed:

SAPinst now stops the installation. Please proceed as follows:....

2. UNIX: Install the Oracle database software on your target system:

a. If necessary, extract the Oracle stage archives manually.

b. Install the Oracle Software as described in the installation documentation for your SAP component.

3. Create the following directories on the target system, if they do not exist:

UNIX:

/oracle/<TARGET_DBSID>/mirrlog<x>

/oracle/<TARGET_DBSID>/origlog<x>

/oracle/<TARGET_DBSID>/sapdata<x>

/oracle/<TARGET_DBSID>/sapreorg

/oracle/<TARGET_DBSID>/saparch

/oracle/<TARGET_DBSID>/oraarch

/oracle/<TARGET_DBSID>/saptrace

/oracle/<TARGET_DBSID>/saptrace/background

/oracle/<TARGET_DBSID>/saptrace/usertrace

/oracle/<TARGET_DBSID>/origlogA/cntrl

/oracle/<TARGET_DBSID>/sapdata1/cntrl

/oracle/<TARGET_DBSID>/saparch/cntrl

/oracle/<Target_DBSID>/sapcheck

Windows:

<drive>:\oracle\<TARGET_DBSID>\mirrlog<x>

<drive>:\oracle\<TARGET_DBSID>\origlog<x>

<drive>:\oracle\<TARGET_DBSID>\sapdata<x>

<drive>:\oracle\<TARGET_DBSID>\sapreorg

<drive>:\oracle\<TARGET_DBSID>\saparch

<drive>:\oracle\<TARGET_DBSID>\oraarch

<drive>:\oracle\<TARGET_DBSID>\saptrace

<drive>:\oracle\<TARGET_DBSID>\saptrace\background

<drive>:\oracle\<TARGET_DBSID>\saptrace\usertrace

25

Page 26: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

3 Database-Specific Procedures

<drive>:\oracle\<TARGET_DBSID>\origlogA\cntrl

<drive>:\oracle\<TARGET_DBSID>\sapdata1\cntrl

<drive>:\oracle\<TARGET_DBSID>\saparch\cntrl

<drive>:\oracle\<Target_DBSID>\sapcheck

Note that for Windows, one of the cntrl files can also be located in the directory <drive>:\oracle\<TARGET_DBSID>\sapdata1\system_1\cntrl

4. Make sure that the following directories are empty (except the subdirectory saparch/cntrl).

UNIX: /oracle/<TARGET_DBSID>/saparch and /oracle/<TARGET_DBSID>/oraarch

Windows: <drive>:\oracle\<TARGET_DBSID>\saparch and <drive>:\oracle\<TARGET_DBSID>\oraarch

5. UNIX: All directories must be owned by the user ora<target_dbsid>.

To achieve this enter the following command: chown ora<target_dbsid>:dba<directory>

6. Windows: For all Oracle directories set the security settings for the built-in accounts and groups SYSTEM, Administrators, SAP_<SAPSID>_GlobalAdmin (domain installation), and SAP_<SAPSID>_LocalAdmin (local installation) as follows:

a. In the Windows Explorer, right-click the Oracle root directory and choose Properties.

b. Under Security, choose Advanced.

c. Uncheck Allow inheritable permissions from the parent …. (Windows Server 2003), or Inherit from parent the permission entries that apply to child objects (Windows 2000).

d. In the upcoming dialog, choose Copy, to copy the permission entries that were previously applied from the parent to this object.

e. Choose OK.

f. Set the permissions for the above-mentioned accounts SYSTEM, Administrators, SAP_<DBSID>_GlobalAdmin, or SAP_<DBSID>_LocalAdmin to Full Control.

g. Delete all other accounts.

26

Page 27: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

3 Database-Specific Procedures

3.1.3 Creating an Offline Backup Create an offline backup if required. There are different possibilities to prepare the actual transfer of the database files:

• If you have an existing offline backup which is up-to-date, you can use it (provided redo logs were cleaned up with forced log switches).

• If you want to transport the database file (for example, on tape) or if you have to perform the database shut-down at a certain time, stop the database (normal shut-down) and perform a complete offline backup. You can use the trace file CONTROL.TRC created by OraBrCOPY to determine the file system trees that have to be saved.

• Otherwise, stop the database (normal shutdown) and copy the database files when the actual transfer to the target system takes place. You do not have to perform any preparations for the actual transfer now. Proceed with the next step.

3.1.4 Restoring the Database Files on the Target System

If you do not use an offline backup but copy the database files directly from the source to the target system host, make sure that you shut down the database on the source system before you copy the listed files from the source to the target directories.

...

1. Copy the following files from the source to the target system host either by using an offline backup or by copying the listed files from the source directories to the target directories:

The table shows the directories on Unix.

For Windows you have the corresponding directories, for example <drive>:\oracle\<DBSID>\sapdata<x>:

Source and Target Directory Files /oracle/<DBSID>/sapdata<x> All files

/oracle/<DBSID>/origlog<x> All files

/oracle/<DBSID>/mirrlog<x> All files

source: <INSTDIR>

target: <INSTDIR>

CONTROL.SQL

source: <INSTDIR> target: /oracle/<DBSID>/<DB_VERSION>_<BIT>/dbs

init<TARGET_DBSID>.ora

• If you use an existing offline backup, the source data files and log files

are not located in the directories shown in the table.

• On Windows, the installation directory of the target system is normally located in the directory:

27

Page 28: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

3 Database-Specific Procedures

%programfiles%\sapinst_instdir\NW04SR1\WebAS_ABAP_ORA_NUC\DB

2. Windows: After you have copied the database files, make sure that the files on the source and target system are not located in different directories or drives. If required, make the corresponding changes in the control.sql and the init<DBSID>.ora file.

3. UNIX: Verify that the created directories and copied files have the owner ora<target_dbsid>, belong to the group dba, and have the permissions 740.

4. Make sure that the control files are not restored. If necessary, remove them.

The file names are specified by the parameter control_files of the init<TARGET_DBSID>.ora file.

3.1.5 Restarting SAPinst Procedure ...

1. Restart SAPinst. Continue as described in the installation documentation for your SAP component.

2. Request a new license key from SAP. For more information, see the installation documentation for your SAP component, section Post-Installation Activities - Installing and Using the SAP License and SAP Note 94998.

28

Page 29: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

3 Database-Specific Procedures

3.2 MS SQL Server-Specific Procedure Purpose In an SAP system environment, you can create a homogeneous system copy of an MS SQL Server database by using the backup/restore method or the detach/attach method. For more information, see SAP Notes 193816 and 151603. The SAPinst installation tool supports both methods.

The backup/restore method and the detach/attach method have the following advantages compared to the R3load method:

• You can use an existing backup.

• These methods are much faster than the R3load method.

Process Flow 3. You run SAPinst to install the central instance.

4. You back up or detach the MS SQL Server database that you want to copy.

5. You restore or attach the database on the target database server instance.

6. You download the SAP Tools for MS SQL Server from SAP Service Marketplace at service.sap.com/msplatforms → Microsoft → SQL Server.

For more information, see SAP Note 683447.

7. You run SAP Tools for MS SQL Server, choose Migration setup in the root menu, and follow the dialogs.

Alternatively, you can perform the Postprocessing step of SAP Note 151603. However, this involves many manual steps. It is much easier to make a system copy with SAP Tools for MS SQL Server.

29

Page 30: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

3 Database-Specific Procedures

3.3 IBM DB2 UDB for UNIX and Windows Specific Procedure Purpose In an SAP system environment, you can create a homogeneous system copy of a DB2 database using the backup method or by relocating your database. The relocation of the database is usually used in conjunction with split mirror (for more information, see SAP Note 594301 and the DB2 documentation). This section provides information on the backup method.

SAPinst is used for the installation on the target system host as described in the installation documentation for your SAP component. Only the SAPinst steps for setting up and loading the database steps are replaced by a database restore.

Advantages of the Backup Method

• You can use existing offline backups.

• Using the backup method is faster than the R3load method.

Disadvantages of the Backup Method

An offline backup or copy of database files in a heterogeneous environment is not possible as the hardware of the source and target systems must be binary compatible.

With DB2 UDB for UNIX and Windows, it is possible to use backup images cross platform for AIX, Solaris and HP-UX.

Prerequisites • For security reasons, the source and target systems should run on different hosts.

If your source and target system reside on the same host, you have to use the redirected restore or relocate your database.

• The source and target systems should be binary compatible.

• If errors occur when restoring the backup on the target system, the complete restore must be repeated.

Process Flow ...

1. You perform an offline backup or restore an existing backup copy. For the restore of your database, you can choose between one of the following options:

Simple database restore

To perform a database restore, use the DB2 restore command. For more information see the IBM DB2 documentation DB2 Command Reference.

Redirected restore

To perform a redirected restore, use tool brdb6brt that retrieves a database backup and creates a CLP script for the restore of this backup image. For more detailed information on how to use tool brdb6brt, see the documentation Database Administration Guide: SAP on IBM DB2 Universal Database for UNIX and Windows section Usage of Tool brdb6brt and the IBM DB2 documentation DB2 Command Reference.

30

Page 31: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

3 Database-Specific Procedures

Be aware of the following constraints, when using the backup method for a homogeneous system copy:

• You cannot change the connect user. During the dialog phase you have to make sure, that you enter exactly the name of the connect user like you did on your source system.

• The tablespace names remain the same during the database restore. However, you may change them after the installation.

• If you want to change the container names on the target system, you have to adapt the container names in the redirected restore script and then perform a redirected restore. For more information, see the documentation Database Administration Guide: SAP on IBM DB2 Universal Database for UNIX and Windows, section Usage of Tool brdb6brt.

2. You run SAPinst to install the central instance.

3. You run SAPinst to install the database instance.

During the installation phase you will be prompted to perform the database restore. For more information, see SAP Note 784931.

4. Perform the database restore and continue with the installation.

5. If required, you can modify the tablespace names after the installation using the following command:

db2 rename tablespace <old name> to <new name>

db2 rename tablespace <SAPSID_SOURCE>#STABD to <SAPSID_TARGET>#STABD

In addition, you have to update the tablespace names in tables TSDB6, IADB6 and TADB6 using the following commands:

For table TSDB6, enter the following SQL command: update <connect_user_name>.tsdb6 set tabspace = '<SAPSID_TARGET>#'||substr(tabspace,5,length(tabspace)-4), indspace='<SAPSID_TARGET>#'||substr(indspace,5,length(indspace)-4)

For table IADB6, enter the following SQL command: update <connect_user_name>.iadb6 set tabspace = '<SAPSID_TARGET>#'||substr(tabspace,5,length(tabspace)-4)

For table TADB6, enter the following SQL command: update <connect_user_name>.tadb6 set tabspace = '<SAPSID_TARGET>#'||substr(tabspace,5,length(tabspace)-4)

See also:

• Database Administration Guide: SAP on IBM DB2 Universal Database for UNIX and Windows

• IBM DB2 documentation → DB2 Command Reference

31

Page 32: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

3 Database-Specific Procedures

3.4 IBM DB2 UDB for z/OS Specific Procedure Purpose In an SAP system environment, you can create a homogeneous system copy of a DB2 database using the offline system copy method.

Advantage of the Offline System Copy Method This method is faster than the R3load method.

Restriction of the Offline System Copy Method At the moment, you cannot copy an individual MCOD component to another system. You can only copy the complete system.

The offline system copy must be performed by an experienced database administrator.

For more information, see SAP Note 680746.

32

Page 33: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

3 Database-Specific Procedures

3.5 IBM DB2 UDB for iSeries Specific Procedure Purpose In an SAP system environment, you can create a homogeneous system copy of a DB2 database using the SAV/RSTLIB system copy method.

Advantage of the Offline System Copy Method This method is faster than the R3load method.

For more information, see SAP Note 585277.

33

Page 34: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

3 Database-Specific Procedures

3.6 Informix-Specific Procedure Purpose In an SAP system environment, you can create a homogeneous system copy of an Informix database using the backup and restore method. This is possible for databases running on UNIX or Windows operating systems. The SAP installation tool, SAPinst, supports the system copy.

Advantages of the Backup and Restore Method

• You can use an existing backup.

• This method is faster than the R3load method.

Disadvantages of the Backup and Restore Method

Source system host and target system host should be different.

Prerequisites You can find the documentation SAP Database Guide: Informix referred to below at:

help.sap.com → Documentation → SAPNetWeaver → English → SAP NetWeaver → Application Platform (SAP Web Application Server) → Databases → IBM Informix

Process Flow ...

1. You back up the Informix database that you want to copy.

For more information on database backup, see the Informix documentation or the SAP documentation SAP Database Guide: Informix.

2. You run SAPinst to install the central instance.

3. You run SAPinst to install the database instance.

During the installation phase SAPinst prompts you to select the database instance installation method in screen Selecting the Database Instance installation Method.

4. You choose System Copy / Restore of the database using a database specific method.

SAPinst displays the following message and waits for you to perform the restore.

Please restore your Informix database NOW. After you have completed this and the database is online again, press ‘OK’.

5. You restore your Informix database.

For more information on database restore, see the Informix documentation or the SAP documentation SAP Database Guide: Informix.

6. If required, you rename your target database system ID, T_DBSID.

7. You drop the table SAPUSER in the target database system.

8. You choose OK in SAPinst to continue.

34

Page 35: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

3 Database-Specific Procedures

3.7 MaxDB-Specific Procedure Purpose In an SAP system environment, you can create a homogeneous copy of a MaxDB database by using the backup and restore method. This method is suitable for creating an exact copy of an existing database. The source of the copy is a complete data backup of your source database.

The SAPinst tool is used for the installation on the target system host as described in the installation documentation for your SAP component. In SAPinst you select the backup and restore method as the database installation method. SAPinst stops before the database instance initialization and asks you to perform the recovery on the target database. After you have performed recovery and post-recovery activities you can continue the installation in SAPinst.

This description is not valid for the liveCache system copy.

Prerequisites • CPU architecture

You can use the backup and restore method to copy systems to the same CPU architecture. That is, you can copy a system based on a swap byte architecture to another system based on swap byte architecture. You can also copy a RISC-based system to another RISC-based system. For example, the following combinations are possible:

HP-UX <-> Sun Solaris

Sun Solaris <-> AIX

Windows <-> HP Tru64

Windows <-> Linux

Windows 32-bit <-> Windows 64-bit

However, you cannot copy between the following systems:

HP-UX <-> Windows NT

HP Tru64 <-> Sun Solaris

You can copy backups from 32-bit systems to 64-bit systems.

• Data backup

You perform the complete data backup of your source database.

• Recovery tool

You are using the MaxDB Database Manager (DBMGUI) version 7.5.0 Build 12 or above.

You can find more information on DBMGUI at either of the following:

dev.mysql.com/doc → MaxDB by MySQL → MaxDB Online Library → Tools

help.sap.com → Documentation → SAPNetWeaver → English → SAP NetWeaver → Application Platform (SAP Web Application Server) → Databases → MySQL MaxDB → Tools → Database Manager GUI

• Database software

35

Page 36: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

3 Database-Specific Procedures

The database software on the target host must have the same version as the software on the source host. The build number of the software version on the target host must be greater than or equal to the version on the source host.

• Size of the data on the target system

The size of the target system must be greater than the used space on the source system. You can find the size of the used pages on the source system as follows: dbmcli –d <database_name> -u <dbm_user>,<password> -n <database_server> -u SQL sap<sid>,<password> sql_execute 'SELECT USEDPERM FROM SERVERDBSTATISTICS'

The result of this query is the amount of used space, expressed as the number of 8 KB pages. By dividing this value by 128 you can get the used space expressed in MB. When SAPinst prompts you, configure the database data volumes according to this value.

Process Flow ...

1. You do the following on the source system:

a. You create a complete data backup using the DBMGUI tool:

DBMGUI → Backup → Backup Wizard → Complete

b. You make the backup medium available on the target host.

2. You do the following on the target system:

a. You start SAPinst to configure the database instance parameters.

SAPinst stops before database initialization and asks you to perform the data recovery.

b. You start the data recovery wizard from DBMGUI:

i. You register your database instance in the DBMGUI

ii. You check the database instance is in the admin state.

iii. You choose Recovery → Recovery with Initialization …

iv. In type of recovery you select Restore a medium.

v. You specify the backup medium.

vi. You start the restore procedure.

The recovery wizard does not start the recovery immediately. It initializes the database instance first. It takes some time for the database server to format the database volumes.

c. After the restore, you check the state of the target database instance. Change the database state to online if it is not already in online state.

d. You delete the entries from the following tables to make sure that information about the backup history for update statistics in the Computing Center Management System (CCMS) from the old system does not appear in the new system:

CNHIST, CNREPRT, CNMEDIA, DBSTATHADA, DBSTAIHADA, DBSTATIADA, DBSTATTADA, SDBAADAUPD

e. Reload the system tables in the target system as follows: dbmcli -d <NEW_DBSID> -u control,control load_systab -u superdba,admin -ud domain

36

Page 37: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

3 Database-Specific Procedures

f. You change the database user SAP<OLD_SID> to SAP<NEW_SID>. The name of the database user must be exactly SAP<SID>, where <SID> is the system ID of the SAP system to be installed. The password of the user must be sap. This is necessary for the post-installation steps executed by SAPinst.

You change the database user as follows: dbmcli -d <NEW_DBSID> -u control,control –u SQL superdba,admin sql_execute rename user SAP<OLD_SID> to SAP<NEW_SID>

You change the password of the SAP<SID> database user as follows:

dbmcli –d <NEW_DBSID> -u control,control –u SQL superdba,admin sql_execute alter password SAP<NEW_SID> sap

g. You continue with SAPinst or restart it if you stopped it during the recovery.

h. After installation is completed you maintain the database connection for CCMS. For more information, see SAP Note 588515.

37

Page 38: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

4 R3load Procedures

4 R3load Procedures Purpose With the SAP installation tool SAPinst, you can export and import your database in a database-independent format. The procedure generates a database export of all SAP objects that are defined in the ABAP Dictionary.

Prerequisites

R3load Restrictions

Keep the following restrictions of R3load procedures in mind:

• SAPinst generates a database dump of all SAP objects that are defined in the ABAP Dictionary. Other objects are not exported by SAPinst.

• Changes to database objects that cannot be maintained in the ABAP Dictionary (transaction SE14), such as the distribution of tables over several tablespaces/dbspaces, are lost after the system copy.

• No indexes longer than 18 characters are allowed on the database to be exported.

• For a consistent database export, no transactions on export-relevant database objects are allowed during the export. Otherwise, the export has to be restarted. Therefore, it is recommended to shutdown the SAP system for the export. The database must still be running.

Considerations concerning the System Copy Tools

• Every installation service (dialog instance installation, for example) must have its own separate installation directory whenever you start SAPinst.

• If the target system is already existing and if you do NOT plan to perform a MCOD installation, delete the database on the target system before the import according to the corresponding description in section Additional Information of the installation documentation for your SAP component.

If the database configuration of your database is stored in the file system, it is advisable to backup these configuration files before deleting the database.

Splitting STR Files

• During the standard system copy process, all tables of the SAP system are grouped into packages, whereby all tables with the same ‘data class’ belong to the same package. The processing unit for one unload/load process is a package. The packages usually differ in number and size of contained tables, resulting in varying unload/load runtimes. The overall runtime can be reduced by creating packages of the same ‘size’, that is creating packages with a similar processing time. Splitting the default packages (one package per data class) into more and smaller pieces will help to reach this aim.

• There are several options of how to split packages. For a detailed description of the options, see the F1 help about the parameters prompted on the screen Split STR Files while running SAPinst to export the database. The options can be used separately or - when using the new Java based splitting tool - combined.

• 'Splitting of STR Files' is part of the 'Advanced Export Parameters' and is disabled by default. If you select the splitting option and unless you did not already perform some tests, using the splitting tool parameters selected by SAPinst is a good starting point.

38

Page 39: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

4 R3load Procedures

If you want to split STR file, it is mandatory that EXT files for the target database system are created before. You will find the EXT files in your export dump directory, subdirectory DB/<DBTYPE>, for example DB/ORA.

Process Flow • On UNIX, see R3load on UNIX [Page 40].

• On Windows, see R3load on Windows [Page 47].

• On IBM eServer iSeries, see R3load on IBM eServer iSeries [Page 52]

39

Page 40: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

4 R3load Procedures

4.1 R3load Procedure on UNIX Purpose This section describes the R3load system copy procedure for Oracle, Informix, IBM DB2 UDB for UNIX and Windows, IBM DB2 UDB for z/OS, and SAP DB on UNIX platforms.

Process Flow The R3load procedure consists of the following steps: ...

1. Heterogeneous system copy: Generate the migration key via SAP Service Marketplace.

You need a migration key for a heterogeneous system copy. You can generate the migration key required for the heterogeneous system copy via SAP Service Marketplace at service.sap.com/migrationkey.

2. Export the source database:

a. Make sure that the QCM tables are deleted from your system [Page 14].

b. IBM DB2 UDB for UNIX and Windows, Informix and Oracle only: Set the library path environment variable [Page 40].

c. Generate DDL statements [Page 55].

d. Run SAPinst to export the database [Page 42].

3. Set up the target system [Page 60].

Result You finished this part of the system copy. To complete the system copy, you have to perform the steps in section Final Activities [Page 81].

4.1.1 Setting the Library Path Environment Variable Use This section is only valid for IBM DB2 UDB for UNIX and Windows, Informix and Oracle.

You need to set the library path environment variable of user root before starting SAPinst.

Procedure As user root, set the library path environment variable on your installation host according to the following tables:

<ORACLE_HOME> is the home directory that you set up for the oracle instance <DBSID>: /oracle/<DBSID>/920_32 if your operating system is of 32 bit, or /oracle/<DBSID>/920_64 if your operating system is of 64 bit.

Value of Library Path Environment Variable

40

Page 41: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

4 R3load Procedures

DB Version

Operating System

Variable Value

AIX /usr/sap/<SAPSID>/SYS/exe/run:.

Linux (32 Bit); Linux IA64 (64 Bit); Solaris

/usr/sap/<SAPSID>/SYS/exe/run:.

IBM DB2 UDB for UNIX and Windows

HP-UX: /usr/sap/<SAPSID>/SYS/exe/run:/opt/IBM/db2/V8.1/lib64:.

Informix All UNIX operating systems

/informix/<SAPSID>/lib:/ \ informix/<SAPSID>/lib/esql

HP Tru64 UNIX

<sapmnt>/<SAPSID>/exe: \ /<ORACLE_HOME>/lib:/oracle/client/ \ 92x_64/lib

Linux <sapmnt>/<SAPSID>/exe: \

/<ORACLE_HOME>/lib

Oracle 8.1.7

Oracle 9.2.0

All other UNIX operating systems

<sapmnt>/<SAPSID>/exe

Name of Library Path Environment Variable

Operating System Variable Name

AIX LIBPATH

All other UNIX operating systems

LD_LIBRARY_PATH

If you are using the Bourne shell (sh): <Variable Name>=<Variable Value> \ export <Variable Name> That is, if your operating system is Linux and your database is Oracle: LD_LIBRARY_PATH=/sapmnt/<SAPSID>/exe: \ <ORACLE_HOME/lib

If you restart SAPinst at a later time, make sure the variable is still set.

41

Page 42: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

4 R3load Procedures

4.1.2 Generation of DDL statements Use To migrate non-standard database objects, you need to generate DDL statements using the ABAP report SMIGR_CREATE_DDL.

You need to follow this procedure before starting SAPinst.

Procedure 4. Log on to the system as system administrator in the productive BW-client.

5. Call transaction SE38 and run the program SMIGR_CREATE_DDL.

6. Select the target database. Depending on the database manufacturer, you might need to select the database version. Value help supports you in the selection of database version. In general, you should not enter a database version that is not available in the value help.

7. You are able to select Unicode Migration if you also wish to perform Unicode system copy (from UC to UC) or a Unicode conversion (from non-UC to UC).

8. Specify an empty working directory to which the files generated by the report will be written.

9. Optional: You can restrict the generation of DDL statements to specific table types or individual tables.

10. Execute the program. The DDL statements are generated and are written to the specified directory.

If no DB specific objects exists in the database, then no SQL files will be generated. As long as the report terminates with status ‘successfully’, this is not an error!

See also:

SAP Note 771209 for additional database specific information.

42

Page 43: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

4 R3load Procedures

4.1.3 Running SAPinst to Export the Database

We recommend that you shut down the SAP system before the export. The database must still be running. Otherwise, the target system may be inconsistent.

Use This procedure tells you how to run SAPinst to export the database of your SAP system.

The following sections describe a local export, that is, SAPinst and SAPinst GUI run on the same host.

However, you can also perform a remote export using a standalone SAPinst GUI on a separate Windows or UNIX host. This enables you to perform the installation on a remote host while monitoring it with SAPinst GUI from a local host. If you want to perform a remote installation, also see section Performing a Remote Installation with SAPinst [Page 88].

Prerequisites ...

• Make sure that your operating system does not delete the temporary directory TEMP, TMP, TMPDIR or /tmp and its subdirectories when the system is rebooted.

SAPinst normally creates the installation directory sapinst_instdir directly below the temporary directory. SAPinst finds the temporary directory by checking the value of the environment variables TEMP, TMP, or TMPDIR. If no value is set for these variables, SAPinst uses /tmp as default installation directory. The SAPinst Self-Extractor extracts the SAPinst executables to the temporary directory, TEMP, TMP, TMPDIR or /tmp. These executables are deleted again after SAPinst has stopped running.

If SAPinst cannot find a temporary directory, the installation terminates with the error FCO-00058.

• Make sure that you have at least 50 MB of free space in the installation directory for each ABAP installation service. In addition, you need 60 ‒ 200 MB free space for the SAPinst executables. If you cannot provide 200MB free space in the temporary directory, you can set one of the environment variables TEMP,TMP, or TMPDIR to another directory with 200 MB free space for the SAPinst executables.

Each SAP instance requires a separate installation directory.

• Make sure that umask is set to 022 for user root. As user root, enter the following command: umask 022

• If you want to perform a standard, that is, a local installation with SAPinst, the DISPLAY environment variable to must be set to <host_name>:0.0, where <host_name> is the host on which the SAPinst GUI will be displayed.

• If required, you can terminate SAPinst and the SAPinst Self-Extractor by pressing Ctrl+C.

43

Page 44: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

4 R3load Procedures

• If required, delete directories with the name sapinst_exe.xxxxxx.xxxx after SAPinst has finished. Sometimes these remain in the temporary directory.

If there are errors with SAPinst Self-Extractor, you can find the Self-Extractor log file dev_selfex.out in the temporary directory.

We recommend that you keep all installation directories until you are fully satisfied that the system is completely and correctly installed.

• Oracle only:

Make sure that the password for the database user SAP<SCHEMAID> or SAPR3 is SAP and that the password for the database user system is manager:

a. Log on as user ora<dbsid>.

b. If the password of user system is not manager, enter: brconnect -u system/<passwd> -c –f chpass –o system –p manager

c. Enter: brconnect –c –f chpass -o SAP<SAPSCHEMAID> -p SAP

• IBM DB2 Universal Database for Unix and Windows only:

Before you start the export of existing SAP System, you have to download the current version of R3szchk from SAP Service Marketplace at the Internet address service.sap.com/patches and copy it into directory /usr/sap/<SAPSID>/SYS/exe/run/.

Procedure ...

1. Log on to your host as user root.

2. Mount the SAP Installation Master DVD.

For more information on mounting DVDs, see section “Mounting a CD / DVD for <your OS>” in the documentation SAP Web Application Server 6.40 SR 1 ABAP on <your OS>: <your database> Part II - Installation and Post-Installation.

Mount the DVDs locally. We do not recommend using Network File System (NFS) as reading from NFS-mounted DVDs may fail.

3. Start SAPinst from the SAP Installation Master DVD in one of the following ways:

Using the default installation directory (recommended)

Enter the following commands: cd <SAP_Installation_Master_DVD>/IM<x>_<OS>/SAPINST/UNIX/<OS>

./sapinst

SAPinst creates a directory called sapinst_instdir, which is the current working directory for your installation, below the temporary directory of your operating system.

Using an alternative installation directory If you want to use an alternative installation directory, set the environment variable TEMP, TMP, or TMPDIR.

44

Page 45: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

4 R3load Procedures

SAPinst uses the port 21212 during the installation for communication with SAPinst GUI. If this port is already used by another service you must add the parameter SAPINST_DIALOG_PORT=<free_port_number> to the relevant sapinst command above. For example: ./sapinst SAPINST_DIALOG_PORT=<free_port_number>

SAPinst GUI normally starts automatically by displaying the Welcome screen.

However, if there is only one component to install, SAPinst directly displays the first input dialog without the Welcome screen.

4. In the Welcome screen, select ABAP System → <your database> → <Unicode or non-Unicode> → ABAP Database Content Export.

5. Choose Next.

6. If you generated SQL files with DDL statements (see Generation of DLL Statements [Page 55]), then copy now the generated files into the SAPinst installation directory.

7. Follow the instructions in the SAPinst input dialogs and enter the required parameters.

To find more information about each parameter, use the F1 key in SAPinst. If you need information about input parameters, position the cursor on the field of the respective parameter and choose F1.

After you have entered all required input parameters, SAPinst starts the export and displays the progress during the processing phase.

Troubleshooting

If an export process aborts due to a hardware failure (e.g. filesystem full), you have to repeat the export of the complete package. Remove the dump files <package>.<nnn>, the TOC file <package>.TOC, the log file <package>.log and make sure that all tables in the TSK file <package>.*TSK* have the status flag 'xeq' or 'err' set.

• If there is not enough disk space in the export directory, the R3load database export will fail. You will then find error messages in the log files SAP*.log.

You can subsequently move the dump files that have been created from the file system in which the export directory is located to a different file system during the export. Currently there is no possibility to automatically distribute the export over different file systems.

• If an error occurs during the dialog phase, SAPinst:

Stops the export.

Displays a dialog that informs you about the error.

You can now directly view the log file by choosing View Logs.

Finally you must abort the export with OK and try to solve the problem.

• If an error occurs during the processing phase, SAPinst:

Stops the export.

Displays a dialog that informs you about the error.

You can now:

45

Page 46: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

4 R3load Procedures

Directly view the log file by choosing View Logs.

Try to solve the problem.

Continue the export by choosing Retry.

Abort the export by choosing OK.

See also: Continuing an Interrupted Installation [Page 92].

46

Page 47: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

4 R3load Procedures

4.2 R3load Procedure on Windows Purpose This section describes the R3load system copy procedure for Oracle, Informix, IBM DB2 Universal Database for UNIX and Windows, IBM DB2 UDB for z/OS, MS SQL Server and SAP DB on Windows platforms.

Process Flow The R3load procedure consists of the following steps: ...

1. For a heterogeneous system copy, generate the migration key in the SAP Service Marketplace.

You need a migration key for a heterogeneous system copy. You can generate the migration key required for the heterogeneous system copy in SAP Service Marketplace at service.sap.com/migrationkey.

2. Export the source database: ...

a. Before the export, delete QCM tables from your system. Proceed as follows:

i. Before deleting you must check that

the tables are consistent (no restart log or conversion procedure termination must be displayed)

the data of the original table is legible

If application programs do not run correctly which use the affected original table, do not delete the QCM table yet.

ii. Start transaction SE14.

iii. Choose Extras → Invalid temp. table

All QCM tables that can be deleted are displayed.

iv. Mark the tables and delete them.

b. Generate DLL-statements [Page 55].

c. Run SAPinst to export the database [Page 48].

3. Set up the target system [Page 60].

Result You finished this part of the system copy. To complete the system copy, you have to perform the steps in section Final Activities [Page 81].

47

Page 48: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

4 R3load Procedures

4.2.1 Generation of DDL statements Use To migrate non-standard database objects, you need to generate DDL statements using the ABAP report SMIGR_CREATE_DDL.

You need to follow this procedure before starting SAPinst.

Procedure 4. Log on to the system as system administrator in the productive BW-client.

5. Call transaction SE38 and run the program SMIGR_CREATE_DDL.

6. Select the target database. Depending on the database manufacturer, you might need to select the database version. Value help supports you in the selection of database version. In general, you should not enter a database version that is not available in the value help.

7. You are able to select Unicode Migration if you also wish to perform Unicode system copy (from UC to UC) or a Unicode conversion (from non-UC to UC).

8. Specify an empty working directory to which the files generated by the report will be written.

9. Optional: You can restrict the generation of DDL statements to specific table types or individual tables.

10. Execute the program. The DDL statements are generated and are written to the specified directory.

If no DB specific objects exists in the database, then no SQL files will be generated. As long as the report terminates with status ‘successfully’, this is not an error!

See also:

SAP Note 771209 for additional database specific information.

4.2.2 Running SAPinst to Export the Database

It is recommended to shutdown the SAP system before the export. The database must still be running. Otherwise, the target system may be inconsistent.

Use ...

You use this procedure to run SAPinst to export the database of your SAP system. The following describes a standard export, that is, SAPinst and SAPinst GUI run on the same host.

However, you can also perform a remote export using a standalone SAPinst GUI on a separate Windows or UNIX host. This enables you to perform the installation on a remote

48

Page 49: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

4 R3load Procedures

host while monitoring it with SAPinst GUI from a local host. If you want to perform a remote installation, also see section Performing a Remote Installation with SAPinst [Page 88].

Prerequisites ...

• SAPinst normally creates the installation directory sapinst_instdir directly below the Program Files directory. If SAPinst is not able to create sapinst_instdir directly below the Program Files directory, SAPinst tries to create sapinst_instdir in the directory, to which the environment variable TEMP is set.

Each SAP instance requires a separate installation directory.

• The SAPinst Self-Extractor extracts the executables to a temporary directory (TEMP, TMP, TMPDIR, or SystemRoot). These executables are deleted after SAPinst has stopped running. Directories with the name sapinst_exe.xxxxxx.xxxx sometimes remain in the temporary directory. You can safely delete them.

In the temporary directory you can also find the SAPinst Self-Extractor log file dev_selfex.out, which might be useful if an error occurs.

• If you want to terminate SAPinst and the SAPinst Self-Extractor, do one of the following:

Right-click the icon for the SAPinst output window located in the Windows tray and choose Exit.

Click the icon for the SAPinst output window located in the Windows tray and chooseFile → Exit.

• You need at least 50 MB of free space in the installation directory for each ABAP installation service. In addition, you need 60-200 MB free space for the SAPinst executables.

We recommend that you keep all installation directories until the system is completely and correctly installed.

If SAPinst cannot find a temporary directory, the installation terminates with the error FCO-00058.

• Oracle, MS SQL Server, IBM DB2 UDB for UNIX and Windows, IBM DB2 UDB for z/OS:

Before you start the export of an existing SAP system, check if the current version of R3szchk and R3ldcdl (IBM DB2 UDB for z/OS) is available on your kernel DVD.

If not, download the current file from SAP Service Marketplace at:

service.sap.com/patches and copy it to directory \usr\sap\<SAPSID>\SYS\exe\run\.

Procedure ...

1. Log on to your host as a user who is a member of the local administration group.

2. Insert the SAP Installation Master DVD in your DVD drive.

3. Double-click sapinst.exe from the following path:

49

Page 50: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

4 R3load Procedures

<DVD drive>:\IM<x>_<OS>\SAPinst\NT\<OS>

SAPinst uses the ports 21212 and 21213 during the installation for communication with SAPinst GUI. You get an error message if one of these ports is already in use. In this case, you must do the following:

• Open a command prompt. • Change to <DVD drive>:\IM<x>_<OS>\SAPINST\NT\<OS> and run

.\sapinst.exe SAPINST_DIALOG_PORT=<port> where <port> is an unused port on your host.

4. Select ABAP System → <your database> → <Unicode or Non-Unicode> → ABAP Database Content Export and choose Next.

5. If you generated SQL files with DDL statements (see Generation of DLL Statements [Page 55]), then copy now the generated files into the SAPinst installation directory.

6. Follow the instructions in the SAPinst input dialogs and enter the required parameters.

If you need more information about input parameters, position the cursor on the field of the respective parameter and press F1.

If SAPinst prompts you to log off, log off and log on again. The installation restarts automatically.

If you have entered all required information during the dialog phase, SAPinst starts the export and displays the export progress during the processing phase.

Troubleshooting

If an export process aborts due to a hardware failure (e.g. filesystem full), you have to repeat the export of the complete package. Remove the dump files <package>.<nnn>, the TOC file <package>.TOC, the log file <package>.log and make sure that all tables in the TSK file <package>.*TSK* have the status flag 'xeq' or 'err' set.

• If there is not enough disk space in the export directory, the R3load database export will fail. You will then find error messages in the log files SAP*.log.

You can subsequently move the dump files that have been created from the file system in which the export directory is located to a different file system during the export. Currently there is no possibility to automatically distribute the export over different file systems.

• If an error occurs during the input phase, SAPinst:

Stops the installation.

Displays a dialog that informs you about the error.

You can now directly view the log file by choosing View Logs.

You must abort the installation with OK and try to solve the problem.

• If an error occurs during the processing phase, SAPinst:

Stops the installation.

Displays a dialog that informs you about the error.

You can now:

50

Page 51: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

4 R3load Procedures

Directly view the log file by choosing View Logs.

Try to solve the problem

Retry the installation by choosing Retry.

Abort the installation by choosing OK.

For more information, see Continuing an Interrupted Installation with SAPinst [Page 92].

51

Page 52: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

4 R3load Procedures

4.3 R3load Procedure on IBM eServer iSeries Purpose This section describes the R3load system copy procedure for IBM DB2 UDB on iSeries.

Process Flow The R3load procedure consists of the following steps: ...

1. Heterogeneous system copy: Generate the migration key via SAP Service Marketplace.

You need a migration key for a heterogeneous system copy. You can generate the migration key required for the heterogeneous system copy via SAP Service Marketplace at service.sap.com/migrationkey.

2. Preparing the Windows Host for the SAP System Installation [Page 52].

3. Preparing a Windows User Account and iSeries User Profile [Page 53].

4. Installing TMKSVR and Creating an Installation Share [Page 54].

5. Generate DDL statements [Page 55].

6. Running SAPinst to Export the Database [Page 56].

7. Setting up the Target System [Page 60]. If you have installed your SAP system on SAP R/3 release pTarget database IBM DB2 UDB for OS/390 and z/OS only:

rior to 3.0D, you have to delete QCM tables from your system as described in SAP Note 9385 before the export.

Result You finished this part of the system copy. To complete the system copy, you have to perform the steps in the section Final Activities [Page 81].

4.3.1 Preparing the Windows Host for the SAP System Installation Use The Java-based SAPinst graphical user interface (GUI) called SAPinst GUI requires a Java Development Kit (Java™ 2 SDK, Standard Edition) with graphical capabilities (AWT, Swing). Since IBM eServer iSeries does not provide a graphical user interface, you must install the JDK on a Windows host to perform the installation with SAPinst.

Prerequisites To prepare the system for SAPinst and SAPinst GUI you need to do the following:

• Necessary operating system versions: Windows NT/2000/2003/XP

• Check your Java Runtime Environment (JRE) on the host where SAPinst GUI runs, because the JRE cannot be integrated into the SAPinst GUI executable for all platforms due to licensing issues.

• Set the system path if you install on Windows.

52

Page 53: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

4 R3load Procedures

Procedure The J2EE Engine requires a Java Development Kit (Java™ 2 SDK, Standard Edition). Therefore, make sure a valid JDK version is installed on every host on which you want to install an SAP instance including the J2EE Engine.

For more information on the JDK versions that are released for the SAP Web Application Server, SAP components based on SAP Web AS and the J2EE Engine, see SAP Service Marketplace at service.sap.com/platforms → Product Availability Matrix → SAP NetWeaver → SAP NetWeaver ’04 → JSE Platforms.

JDK is not part of the SAP shipment. If necessary, you need to download and install it. To check the version of an already installed JDK, enter: java -version If you have more than one Java Virtual Machine (JVM) installed on your system (for example, you have two JDKs with different versions installed), make sure that the JAVA_HOME environment variable is set to the valid <JAVA_HOME> directory. Make sure that %JAVA_HOME%\bin is included in your system path.

4.3.2 Preparing a Windows User Account and iSeries User Profile Use For the installation you need to create a user account on your Windows installation host and a user profile on the iSeries you want to install.

The following requirements apply:

• The iSeries user profile and the Windows user account must have the same name and password.

• The iSeries user profile must have user class *SECOFR and all special authorities that belong to user QSECOFR.

• The Windows user account must have administrator rights on the Windows installation host.

Procedure

The user name SAPINST and the password SAP are used in the procedures as examples.

Windows : ... Create a local user.

i. Create a local user.

ii. In the field User name, enter your installation user name, for example, SAPINST.

iii. In the fields Password and Confirm password, enter the password SAP.

53

Page 54: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

4 R3load Procedures

iv. Deselect User must change password at next logon.

v. Assign the new user SAPINST to group Administrators.

iSeries:

Execute the following command: CRTUSRPRF USRPRF(SAPINST) PASSWORD(SAP) USRCLS(*SECOFR) TEXT('Test User for SAP Installation') SPCAUT(*USRCLS)

4.3.3 Installing TMKSVR and Creating an Installation Share Use The TMKSVR is the interface between iSeries and Windows for the installation with SAPinst. SAPinst is running on Windows, but has to install the product on iSeries. This means that all actions required for iSeries are initiated remotely on Windows but executed locally using the TMKSVR. The communication is done using TCP/IP.

In addition, an installation share on the iSeries host needs to be created and mapped to the Windows installation host, which is done automatically by the TMKSVR.

The TMKSVR has to be installed and an installation share has to be created on all iSeries hosts where instances of an SAP system should be installed.

Prerequisites • An FTP server must be running on iSeries.

• You must prepare a user. For more information on how users are prepared, see Preparing a Windows User Account and iSeries User Profile [Page 53].

• Copy the SAP Installation Master DVD from the DVD drive to the iSeries.

Procedure ...

1. Log on to your Windows host as the installation user. For more information, see Preparing a Windows User Account and iSeries User Profile [Page 53].

2. Run SETUP.EXE from the directory IM(x)_OS400_64\SAPINST\AS400\TMKSVR on the DVD containing the installation package. You can start the setup program by double-clicking it in the Windows Explorer.

To find the SAPinst executable in your platform-specific IM<x> directory, look in the README.TXT file on the SAP Installation Master DVD.

The following dialog box appears:

54

Page 55: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

4 R3load Procedures

3. Enter the following values:

iSeries Hostname Enter the name of the iSeries host where you want to install TMKSVR.

iSeries Administrator (QSECOFR or similar) Enter iSeries user. For more information, see Preparing a Windows User Account and iSeries User Profile [Page 53].

Update existing TMKSVR instances Do not select this option.

Yes, create TMKSVR instance Select this option.

TMKSVR instance number Leave the value at 0.

TMKSVR Instance Port (also referred to as the Dispatcher Port) Leave the value at 59975, if possible. Only change this port number if you encounter problems during installation because the port is in use.

Result The installation uses FTP to install and start the TMKSVR on iSeries. During installation, the TMKSVR library is created on iSeries. If you want a TMKSVR instance to be created, a library named TMKSVR<nn> is also created, where <nn> is the instance number (for example, TMKSVR00).

A NetServer share named ROOTBIN will be created on the iSeries host. You can map it now to your Windows PC or let SAPinst do it during the installation.

For more information, see the documentation install.pdf on the DVD in directory IM<x>_OS400_64\SAPINST\AS400\TMKSVR.

55

Page 56: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

4 R3load Procedures

4.3.4 Generation of DDL statements Use To migrate non-standard database objects, you need to generate DDL statements using the ABAP report SMIGR_CREATE_DDL.

You need to follow this procedure before starting SAPinst.

Procedure 4. Log on to the system as system administrator in the productive BW-client.

5. Call transaction SE38 and run the program SMIGR_CREATE_DDL.

6. Select the target database. Depending on the database manufacturer, you might need to select the database version. Value help supports you in the selection of database version. In general, you should not enter a database version that is not available in the value help.

7. You are able to select Unicode Migration if you also wish to perform Unicode system copy (from UC to UC) or a Unicode conversion (from non-UC to UC).

8. Specify an empty working directory to which the files generated by the report will be written.

9. Optional: You can restrict the generation of DDL statements to specific table types or individual tables.

10. Execute the program. The DDL statements are generated and are written to the specified directory.

If no DB specific objects exists in the database, then no SQL files will be generated. As long as the report terminates with status ‘successfully’, this is not an error!

See also:

SAP Note 771209 for additional database specific information.

4.3.5 Running SAPinst to Export the Database

This section refers to “installation of an instance”. This can be viewed as a synonym for “export an SAP system”.

Use This procedure tells you how to run SAPinst to install one or more SAP instances. It describes an installation where SAPinst GUI and SAPinst server are running on the same Windows host.

SAPinst creates the installation directory \usr\sap\sapinst on iSeries.

56

Page 57: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

4 R3load Procedures

Prerequisites • TMKSVR is up and running: WRKACTJOB SBS (TMKSVR00) (there must be a DISPATCH

job). For more information, see Installing TMKSVR and Creating an Installation Share [Page 54].

• The Windows host is set up. For more information, see Preparing the Windows Host for the SAP System Installation.

• The users required for the installation are prepared. For more information, see Preparing a Windows User Account and iSeries User Profile [Page 53].

• Make sure that the JAVA_HOME environment variable is set correctly on your Windows host.

Procedure ...

1. Log on to the Windows host as the installation user. For more information, see Preparing a Windows User Account and iSeries User Profile [Page 53]:

2. Start SAPinst from the SAP Installation Master DVD in one of the following ways:

• Using the default installation directory sapinst.exe

• in the path <Mapped_Drive>:\<Copied SAP Installation Master DVD>\IM<x>_OS400_64\SAPINST\OS400\AS400.

SAPinst uses the port 21212 and 21213 during the installation for communication with the SAPinst GUI. If this port is already used by another service you must add the parameter SAPINST_DIALOG_PORT=<free_port_number> to the relevant sapinst command above.

For example: sapinst.exe SAPINST_DIALOG_PORT=<free_port_number>

• Using an alternative installation directory

Change to your installation directory.

Enter the following command to start SAPinst from the SAP Installation Master DVD: <Mapped_Drive>:\<Copied SAP Installation Master DVD>\IM<x>_OS400_64\SAPINST\OS400\AS400\sapinst.exe

3. The SAPinst/TMKSVR – Session Parameters dialog box appears and prompts you for the target iSeries parameters. Enter your values.

57

Page 58: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

4 R3load Procedures

The SAPinst GUI now starts automatically by displaying the Welcome screen.

4. In the Welcome screen, select ABAP System <your database> <Unicode or Non-Unicode> ABAP Database Content Export and then choose Next.

5. If you generated SQL files with DDL statements (see Generation of DLL Statements [Page 55]), then copy now the generated files into the SAPinst installation directory.

6. Follow the instructions in the SAPinst input dialogs and enter the required parameters.

To find more information on each parameter, use the F1 key in SAPinst. If you need information about input parameters, position the cursor on the field of the respective parameter and press F1.

After you have entered all required input parameters, SAPinst starts the installation and displays the progress of the installation.

When the installation has successfully completed, the screen Finished installation is displayed.

Troubleshooting

If an export process aborts due to a hardware failure (e.g. filesystem full), you have to repeat the export of the complete package. Remove the dump files <package>.<nnn>, the TOC file <package>.TOC, the log file <package>.log and make sure that all tables in the TSK file <package>.*TSK* have the status flag 'xeq' or 'err' set.

• If an error occurs during the dialog phase, SAPinst:

Stops the installation.

Displays a dialog that informs you about the error.

You can now directly view the log file by choosing View Logs.

Finally you must abort the installation with OK and try to solve the problem.

• If an error occurs during the processing phase, SAPinst:

58

Page 59: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

4 R3load Procedures

Stops the installation.

Displays a dialog that informs you about the error.

You can now directly view the log file by choosing View Logs.

Try to solve the problem.

Retry the installation by choosing Retry.

Abort the installation by choosing OK.

For more information, see Interrupted Installation with SAPinst [Page 92].

59

Page 60: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

4 R3load Procedures

4.4 Setting up the Target System Purpose With the SAP installation tool SAPinst you can install the target system and import the database files that you have exported from the source system.

Process Flow Perform the following actions: ...

1. Transfer the export files to the target host. [Page 60]

2. Install the target system and use the database export to load the database during the installation process. [Page 60]

3. If you want to load data from a system into the existing database of another system, perform the RELOAD Procedure [Page 62]

4.4.1 Transferring the Export Files to the Target Host Procedure ...

1. On the target host, create a directory <EXPDIR> with sufficient space for the database export files available.

2. Copy all files and directories (recursively) that are located on the source host in the migration export directory from the source host to the target host.

If you transfer the files with ftp, make sure that you use binary mode for transferring the files <EXPDIR>/DATA/*.00<n> and use ASCII mode for transferring all other files.

3. Check the permissions of the transferred files on the target host. All files have to be accessible for user <sapsid>adm of the target system.

60

Page 61: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

4 R3load Procedures

4.4.2 Installing the Target System

Make sure there is enough free space on the target system for the database load. To find out the size of the export and the sizes of the tablespaces or dbspaces that will be created, look at the file DBSIZE.XML located in the directory <DRIVE>:\<EXPDIR>\DB\<DATABASE> (Windows) or <EXPDIR>/DB/<DATABASE> (UNIX).

Procedure ...

1. You start SAPinst as described in the installation documentation for your SAP component.

2. To install the target system follow the instructions in the SAPinst input dialogs and enter the required parameters up to the window Selecting the Database Instance Installation Method. On this screen, you choose System Copy/Migration.

If you need more information about input parameters, position the cursor on the field of the respective parameter and press F1.

3. When SAPinst displays the CD Browser-Window and asks for the CD Export Migration, enter the path to the export directory <EXPDIR>.

4. When SAPinst displays the window General Load Parameters, specify the following settings:

Migration Key: If you perform a heterogeneous system copy, enter the migration key.

General Settings:

Specify the order in which the packages are loaded (alphabetical order, according to the size or custom order)

If you choose Load packages in custom order the additional window Data Load Options is displayed (see below).

DB code page: You normally do not have to change this value.

Number of parallel jobs: Specify the number of parallel R3load processes.

Advanced Configuration of Packages

If you choose Individual configuration for task file generation the window Task File Generation Options is displayed.

If you choose Individual configuration for data load the window Data Load Options is displayed.

Advanced package configuration should only be performed by certified database administrators. We recommend that you use the default settings if possible.

5. Complete the installation as described in the installation documentation for your SAP component.

61

Page 62: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

4 R3load Procedures

If you have to restart the import after an error, just restart SAPinst. The import is continued with the table that was not imported successfully.

4.4.3 RELOAD Procedure Use You want to load data from a system (for example, your productive system) into the existing Oracle database of another system (for example, your test system).

The RELOAD service reinstalls the target database while keeping the SAP settings. Data stored in the target database is deleted. Then, data from the source database is reloaded.

RELOAD is not intended to add additional data (that is, merge data from two databases by keeping old data and adding new data). After the RELOAD procedure, only data from the source database is left.

The RELOAD service is not available for MCOD systems. During the RELOAD procedure the database is created again and therefore all data (and all database schemas) is lost.

At the moment, this RELOAD service is available for Oracle databases only. The RELOAD service cannot be used to refresh any database schema in an MCOD system.

Procedure ...

1. Dialog input:

On the screen ABAP System > Database Instance Installation Method, choose System Copy / Migration by Reload: Refresh the database content of a non-MCOD system (R3load).

2. Additional input for the procedure:

Before you start the installation of the target system,

To save any changes made to this file, make a backup of the file init<SID>.ora located in <ORACLE_HOME>/dbs.

Delete all entries of the directories saparch and oraarch in your target system.

From your old instance, delete all data files located in your sapdata directories and all control files.

3. To save your database configuration, proceed as follows after the installation of the new system has been finished successfully:

Make sure that the parameters of your old init<SID>.ora file (that you backed up in step 2) are also contained in the new init<SID>.ora file that was created by SAPinst.

62

Page 63: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

5 R3load Procedures using the Migration Monitor

5 R3load Procedures using the Migration Monitor Purpose The Migration Monitor is a tool which helps you to perform and control the unload and load process during the system copy procedure.

From SAP Web AS 6.40 on the Migration Monitor is integrated into the SAPinst system copy tool, but it is also possible to use the monitor for copying older releases by starting it manually.

The Migration Monitor will

• create R3load command files

• create R3load task files if required

• start the R3load processes to unload the data

• transfer packages from the source to the target host if required

• start the R3load processes to load the data as soon as a package is available

• inform the person performing the system copy in case of errors.

The Migration Monitor has to be started on the source database host (=> Export Monitor) and on the target database host (=> Import Monitor).

The advantage of using the Migration Monitor is, that R3load Procedures run faster.

The Migration Monitor is currently available for Oracle only.

Prerequisites You have to stick to the same restrictions and considerations that apply to the R3load procedures without using Migration Monitor (see Prerequisites of R3load Procedures [Page 38]).

In addition, you have to keep the following restrictions in mind:

• The version of your Java Runtime Environment (JRE) on both the export and the import host must be 1.4.1 or higher.

• The JAVA_HOME environment variable on both the export and the import host must point to the relative JRE directory.

• The correct directory structure for R3load dump files must exist on both the source and target host.

Process Flow • On UNIX, see R3load with Migration Monitor on UNIX.

• On Windows, see R3load with Migration Monitor on Windows.

63

Page 64: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

5 R3load Procedures using the Migration Monitor

5.1 R3load Procedure with Migration Monitor on UNIX Purpose This section describes the R3load system copy procedure with Migration Monitor for Oracle on UNIX platforms.

Process Flow The R3load procedure with Migration Monitor consists of the following steps: ...

1. Unpack the MIGMON.SAR SAPCAR archive:

The file is located in <SAP Installation Master DVD> /UNIX/COMMON/INSTALL.

2. Configure the export properties file [Page 66] export_monitor_cmd.properties.

3. Heterogeneous system copy: Generate the migration key on SAP Service Marketplace.

You need a migration key for a heterogeneous system copy. You can generate the migration key required for the heterogeneous system copy on SAP Service Marketplace at service.sap.com/migrationkey.

4. Set up the target system [Page 79].

5. Export the source database:

a. Make sure that the QCM tables are deleted from your system [Page 14].

b. Set the library path environment variable [Page 40].

c. Generate DDL statements [Page 55].

d. Run SAPinst to export the database [Page 42].

e. Start the Migration Monitor [Page 75].

f. Check the output files [Page 78] of the Migration Monitor.

Result You have finished this part of the system copy. To complete the system copy, you have to perform the steps in the Final Activities [Page 81] section.

64

Page 65: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

5 R3load Procedures using the Migration Monitor

5.2 R3load Procedures with Migration Monitor on Windows Purpose This section describes the R3load system copy procedure with Migration Monitor for Oracle on Windows.

Process Flow The R3load procedure with Migration Monitor consists of the following steps: ...

1. Unpack the MIGMON.SAR SAPCAR archive:

2. The file is located in <SAP Master CD> \NT\COMMON\INSTALL.

3. Configure the export properties file [Page 66] export_monitor_cmd.properties.

4. Heterogeneous system copy: Generate the migration key on SAP Service Marketplace.

You need a migration key for a heterogeneous system copy. You can generate the migration key required for the heterogeneous system copy on SAP Service Marketplace at service.sap.com/migrationkey.

5. Build up the target system [Page 60].

6. Export the source database:

a. Make sure that the QCM tables are deleted from your system [Page 14].

b. Generate DDL statements [Page 55].

c. Run SAPinst to export the database [Page 48].

d. Start the Migration Monitor [Page 75].

e. Check the output files [Page 78] for the Migration Monitor.

Result You have finished this part of the system copy. To complete the system copy, you have to perform the steps in the Final Activities [Page 81] section.

65

Page 66: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

5 R3load Procedures using the Migration Monitor

5.3 Configuring the Import and Export Properties Files Use You have to configure both the export properties file export_monitor_cmd.properties and the import properties file import_monitor_cmd.properties as specified in the tables below.

Options that refer to both scripts:

• Common options

• E-mail options

• Trace options

Options, which concern only the export property file export_monitor_cmd.properties :

• Export options

• Network exchange options

• FTP exchange options

• Export socket options

• FTP copy options

Some of these options are mandatory for the Export Monitor.

Options, which concern only the import property file import_monitor_cmd.properties :

• Import options

• Import exchange options

• Import socket options

Some of these options are mandatory for the Import Monitor.

Features

Help Options

Name Description Comments help Migration Monitor help

?

The Migration Monitor tool will display the help on the available parameters, if you call it with either –help or -?

Common Options

Name Description Comments monitorTimeout Migration Monitor timeout in

seconds During a timeout, the Migration Monitor thread sleeps and checks every x seconds whether there is

66

Page 67: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

5 R3load Procedures using the Migration Monitor

work to do.

The normal sleep duration is 30 – 120 seconds.

Trace Options

Name Description Comments Trace Trace level Possible values:

All, off, 1 (error), 2 (warning), 3 (info), 4 (config, default), 5, 6, 7 (trace)

Email Options

Name Description Comments

mailServer SMTP server Server name or IP address of the company SMTP server

mailFrom “From” email address

mailto “To” email address Can contain an address list separated by ‘;’ or spaces.

Export Options

Option Description Comments

exportDirs List of export directories Separator on Windows is “;”, on UNIX “:”.

The exportDirs parameter points to the directory where the R3load dump files will be written to. In the exportDirs directory, the subdirectories DATA, DB and DB/<target_DBTYPE> (e.g. DB/ORA) have to exist.

installDir SAPinst start directory The directory where the installation tool (SAPinst, R3SETUP) is started; if you run the Migration Monitor without using the installation tools, then the installation directory is the directory, where the R3load TSK and log files will be written.

omit R3load omit value (makes sense for import only)

67

Page 68: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

5 R3load Procedures using the Migration Monitor

All options below are for the server mode. The Import Monitor always runs in the server mode. If you want to run the Export Monitor in the server mode, specify the parameter ‘Server’ in the Export Monitors properties file.

server Server operating mode Running in server mode means, the Monitor will creates R3load TSK files (if necessary), R3load cmd files and start the R3load processes.

orderBy Package order Can be the 'name' or path of the file that contains package names.

r3loadExe Path of the R3load executable Optional; the default is R3load.

If only the name of the R3load executable is available, then JVM looks for the R3load executable using OS-specific process search rules.

tskFiles 'yes' to create task files; 'no' to skip

Before version 4.6 must be set to ‘no’; starting from version 4.7 ‘yes’.

If the R3load task files ‘*.TSK’ already exist then the monitor will not overwrite them.

extFiles 'yes' to include EXT files;

'no' to skip

Add EXT file entries to cmd files;

If the EXT files cannot be found in /expDirs/DB/<target_DBTYPE> the package processing is aborted.

Always use ‘extFiles=no’ for the export!

dataCodepage Code page for data files See SAP Note 552464.

Possible values: 4102, 4103, 1100

taskArgs Additional R3load arguments for the TASK phase

Appended to the R3load command line.

Options already set by the monitor:

-ctf; -l; -o (if the omit argument is specified).

loadArgs Additional R3load arguments for the LOAD phase

Appended to the R3load command line.

Options already set by the

68

Page 69: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

5 R3load Procedures using the Migration Monitor

monitor:

-e; -datacodepage; -l; -p;

-r; -socket (if the socket option is specified); -o (if the omit argument is specified and task files are not used, that is, the value of the tskFiles option is no).

expJobNum Number of parallel export jobs; the default is 1.

Any positive number; 0 for an unlimited number of jobs.

Network exchange options

Option Description Comments

net Network operating mode Exported dump files must be visible on the import host to use this mode.

netExchangeDir Network exchange directory Used for communication between the export and Import Monitors.

Must be writable for Export Monitor and readable for Import Monitor. The Export Monitor will write a file <package>.SGN to the netExchangeDir as a signal for the Import Monitor, that the package is exported successfully and the import could be started.

FTP exchange options

Option Description Comments

ftp FTP operating mode Exported dump files will be transferred automatically from the source host (directory exportDirs) to the target host (directory importDirs) using FTP.

ftpHost Remote FTP host Name or IP address of the import server

ftpUser Name of the remote FTP user The ftpUser specified here should be the <sapsid>adm to make sure, that the package files can be read by during the import (which is started as <sapsid>adm).

69

Page 70: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

5 R3load Procedures using the Migration Monitor

ftpPassword Password of the remote FTP user

Security risk ftpExportDirs List of remote FTP directories

for export dump Both ‘;’ or ‘:’ separators are valid.

This is the directory on the target host to which the dump will be transfered. The value will be the same as for ‘importDirs’ in the Import Monitors property file.

ftpExchangeDir Remote FTP exchange directory

Used for communication between the export and Import Monitors. Must be writable for the Export Monitor and readable for the Import Monitor. The Export Monitor will write a file <package>.SGN to the ftpExchangeDir as a signal for the Import Monitor, that the package is exported successfully and the import could be started.

ftpJobNum Number of parallel FTP jobs; the default is 1.

Any positive number; 0 for an unlimited number of jobs.

Export socket options

Option Description Comments

socket Socket operating mode R3load will not write dump files to the file system but the export and import work through the socket connection.

host Remote import host Name or IP address of the import host.

port Host port number Must be the same as the port number on the import host. Any free port on the import host from 1024 to 65535.

FTP copy options

Option Description Comments

ftpCopy FTP copy operating mode Used as a separate program call for migration with sockets. All files produced by R3lctl and R3szchk will be transferred from the source to

70

Page 71: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

5 R3load Procedures using the Migration Monitor

the target host using FTP.

exportDirs List of export directories Separator on Windows: ‘;’ Separator on UNIX: ‘:’ In the exportDirs directory, the subdirectories DATA, DB and DB/<target_DBTYPE> (for example DB/ORA) have to exist. The R3load STR files have to exist in the subdirectory DATA, the DDL*.TPL files in the subdirectory DB, and the R3load EXT files (if required) in the subdirectory DB/<target_DBTYPE>.

ftpHost Remote FTP host Name or IP address of the import server.

ftpUser Name of the remote FTP user The ftpUser specified here should be the <sapsid>adm to make sure, that the package files can be read by during the import (which is started as <sapsid>adm).

ftpPassword Password of the remote FTP user

Security risk ftpExportDirs List of remote FTP directories

for export dump Both ‘;’ or ‘:’ separators are valid. This is the directory on the target host to which the dump will be transfered. The value will be the same as for ‘importDirs’ in the Import Monitors property file.

Mandatory options for the Export Monitor

Mode Options

Client mode: installDir, exportDirs,

one of the options ftp, nfs, socket (and their related parameters)

Server mode: installDir, exportDirs, tskFiles, extFiles,

one of the options ftp, nfs, socket (and their related parameters)

FTP copy exportDirs, ftpHost, ftpUser, ftpPassword, ftpExportDirs, ftpExchangeDir

71

Page 72: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

5 R3load Procedures using the Migration Monitor

The value of the dbType option is determined automatically in the shell script/batch files from the dbms_type environment variable.

Import Options

Option Description Comments

importDirs List of import directories Separator on Windows: ‘;’

Separator on UNIX: ‘:’

The importDirs parameter points to the directory with the R3load dump files. In the importDirs directory, the subdirectories DATA, DB and DB/<target_DBTYPE> (e.g. DB/ORA) have to exist.

installDir Installation directory Directory where the installation tool (SAPinst, R3SETUP) is started; if you run the Migration Monitor without using the installation tools, then the installation directory is the directory, where the R3load TSK and log files will be written.

orderBy Package order This option is used only if the Import Monitor works without the Export Monitor in stand-alone mode, that is, all export dump files are available on the import host before the Import Monitor is started.

Values can be:

name : load packages in alphabetical order,

size : load packages starting with the largest one,

or a path of the file that contains package names.

r3loadExe Path of the R3load executable Optional; the default is R3load.

If only the name of the R3load executable is available then JVM looks for the R3load executable using OS-specific process search rules.

tskFiles 'yes' to create task files; 'no' Before version 4.6, must be set to ‘no’; starting from

72

Page 73: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

5 R3load Procedures using the Migration Monitor

to skip version 4.7 ‘yes’.

If task files already exist then the monitor does not overwrite them.

extFiles 'yes' to include EXT files; 'no' to skip them

Add EXT file entries to cmd files;

If the EXT files cannot be found in /importDirs/DB/<target_DBTYPE> the package processing is aborted.

dbCodepage Database code page for the target database

See SAP Note 552464.

Possible values: 4102, 4103, 1100

migrationKey Migration key

omit R3load omit value Can contain only 'DTIPV' letters.

-o D : omit data; do not load data

-o T: omit tables; do not create tables

-o I: omit indexes; do not create indexes

-o P: omit primary keys; do not create primary keys

-o V: omit views; do not create views

If you want to combine several omit options, list these options without blank (for example -o TV).

taskArgs Additional R3load arguments for the TASK phase

Appended to the R3load command line.

Options already used by the monitor:

-ctf; -l; -o (when the omit argument is specified).

loadArgs Additional R3load arguments for the LOAD phase

Appended to the R3load command line.

Options already used by the monitor:

-i; -dbcodepage; -l; -p;

-k; -r; -socket (if the socket option is specified); -o (if the omit argument is

73

Page 74: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

5 R3load Procedures using the Migration Monitor

specified and task files are not used, that is, the value of tskFiles option is no).

impJobNum Number of parallel import jobs; the default is 1.

Any positive number; 0 for an unlimited number of jobs

Import exchange options

Option Description Comments exchangeDir Exchange directory If this option is not set, then

the monitor runs in stand-alone mode, that is without the Export Monitor.

All the export dump files or the SAP export CDs from the installation kit must be available on the import host and be specified with the parameter importDirs (for example, in the properties file).

Import socket options

Option Description Comments

socket Socket operating mode

port Server port number Any free port from 1024 to 65535.

Mandatory options for the Import Monitor

Mode Options

Server mode (default) installDir, importDirs, tskFiles, extFiles,

one of the options exchangeDir or socket (and its related parameters)

Stand-alone mode installDir, importDirs, tskFiles, extFiles

The value of the dbType option is determined automatically in the shell script/batch files from the dbms_type environment variable.

74

Page 75: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

5 R3load Procedures using the Migration Monitor

5.4 Starting the Migration Monitor Use The Migration Monitor can be started using:

• UNIX shell scripts export_monitor.sh / import_monitor.sh

• Windows batch files export_monitor.bat / import_monitor.bat

• The JRE java tool (this way is preferable when the command line is generated in an external application such as SAPinst).

The application allows you to specify options in the command line or in the export or import property files [Page 66]. The names of the property files are export_monitor_cmd.properties and import_monitor_cmd.properties.

Templates for these files are included in the application archive and must be located in the current user’s working directory.

The options specified in the command line take precedence over the corresponding options in the application property file. Options are case sensitive; any options that are not recognized are ignored.

To specify an option in the command line, enter -optionName optionValue; in the application property file, insert a new line optionName=optionValue.

Example of a command line for a UNIX terminal: ./export_monitor.sh –ftp ./export_monitor.sh –ftpCopy ./export_monitor.sh –socket –host import_server –port 5000

Example of a command line for Windows cmd.exe: export_monitor.bat –net export_monitor.bat -socket

Procedure For the export with Migration Monitor, proceed as follows: ...

1. Run the export of the ABAP system.

2. Select the SAPinst option Export using Migration Monitor

3. To specify the correct monitor options, create or edit the export_monitor_cmd.properties file.

4. If you use FTP access, verify that the required directories exist on the import server before the Migration Monitor is started. The file import_dirs.sh or import_dirs.bat can be used to create a correct directory structure.

5. To specify the correct monitor options, create or edit the file export_monitor_cmd.properties.

6. If FTP access is used, verify that the required directories exist on the import server before the export files are copied to the import server. The script import_dirs.sh / the batch file import_dirs.bat can be used to create the correct directory structure.

75

Page 76: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

5 R3load Procedures using the Migration Monitor

7. Sockets only: If FTP access is used, transfer all export files to the import server using the –ftpCopy monitor option

8. Sockets only: Start the Import Monitor and wait until it starts listening at the specified port

9. Start the Migration Monitor as user <sapsid>adm after the export process has been started

10. If any export errors occur, restart the Migration Monitor as soon as the problem is fixed.

11. After all packages have been loaded successfully, continue/restart the installation tool and finish the installation.

Using the Export Monitor in parallel with SAPinst: The Export Monitor can be started as an additional tool for the SAPinst standard export process. In this case, the monitor transfers any completed export packages to the target host. The Export Monitor can be started in parallel with SAPinst, but only after the dump directories are created on both the export and import server.

For the import with Import Monitor, proceed as follows: ...

1. Install the Central Instance.

2. Run the installation of the Database Instance.

If you want to start the installation of the target system before the export of the source system has been started, make sure that at least the files <importDir>/LABEL.ASC and <importDir>/DB/<your database>/DBSIZE.{TPL|XML} <importDir>/DB/DDL<your database>.TPL exist and contain the correct data

3. Select the SAPinst option Installation using Migration Monitor

4. Create or edit the import_monitor_cmd.properties file to specify the correct monitor options.

5. After the exit step, stop SAPinst

6. Sockets only: Make sure that all files on the export server generated by SAPinst (with R3ldctl/R3szchk) are copied to or available on the import server (including all STR, EXT package-specific files).

7. Start the Migration Monitor as user <sapsid>adm.

8. If any import errors occur, restart the Migration Monitor as soon as the problem is fixed.

9. After all packages have been loaded successfully, restart or continue with the installation tool and finish the installation.

For more information, see the documentation Migration Monitor – User’s Guide on the SAP Installation Master DVD

76

Page 77: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

5 R3load Procedures using the Migration Monitor

5.5 Restarting R3load Processes Use The state file allows package states to be manually updated to restart failed R3load processes.

For example, if package processing failed and the package state has the value –, the state can be set to 0 and processing of the package will be started again.

Activities • To restart package processing, set the package state from – to 0.

• To skip package processing, set the package state from 0 or – to +. (This is not recommended, because it can cause inconsistent data files or database content.)

• If the package is currently being processed (the package state is ?), then any manual modifications of the package state are ignored.

• Sockets only: You cannot restart processes.

77

Page 78: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

5 R3load Procedures using the Migration Monitor

5.6 Output Files of the Migration Monitor Use During the system copy procedure, the Migration Monitor writes to the following log files:

• Export

export_monitor.log

export_state.properties

• Import

import_monitor.log

import_state.properties

Features The export state file contains package state lines such as:

SAPUSER=++

The format of the line is <PACKAGE>=<STATE>. Possible values for <STATE> are:

0 Package export/import has not started.

? Package export/import is in progress.

- Package export/import has finished with errors.

+ Package export/import has finished successfully.

If any ftp/net exchange options are used, then the export state file may contain a second <STATE> column, which refers to the state of the package transfer.

Then the export state file contains package state lines such as the following:

SAPUSER=++

The format of the line is <PACKAGE>=<STATE>. Possible values for <STATE> are:

0 Package export has not yet started.

? Package export is in progress

- Package export has finished with errors.

+0 Package export has finished successfully;

package transfer has not yet started.

+? Package transfer is in progress.

+- Package transfer has finished with errors.

++ Package transfer has finished successfully.

78

Page 79: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

5 R3load Procedures using the Migration Monitor

5.7 Setting up the Target System using the Migration Monitor Purpose With the SAP installation tool SAPinst you can install the target system and import the database files that you have exported from the source system.

In addition you have to configure the import scripts [Page 66] and to invoke the Migration Monitor [Page 75].

Process Flow Perform the following actions: ...

1. Configure the import properties file [Page 66].

2. Install the target system [Page 79] and use the database export to load the database during the installation process.

3. Invoke the Migration Monitor [Page 75].

4. Check the output files [Page 78] of the Migration Monitor.

5.7.1 Installing the Target System Using the Migration Monitor Prerequisites

Make sure there is enough free space in the target system for the database load. To find out the size of the export and the sizes of the tablespaces or dbspaces that are created, look at the file DBSIZE.XML located in the directory <DRIVE>:\<EXPDIR>\DB\<DATABASE> (Windows) or <EXPDIR>/DB/<DATABASE> (UNIX).

Procedure ...

1. You start SAPinst as described in the installation documentation for your SAP component.

2. To install the target system follow the instructions in the SAPinst input dialogs and enter the required parameters up to the window Selecting the Database Instance Installation Method. On this screen, you choose System Copy/Migration using Migration Monitor (R3load).

If you need more information about input parameters, position the cursor on the field of the respective parameter and press F1.

3. When SAPinst displays the CD browser-window and asks for the Export Migration CD, enter the path to the export directory <EXPDIR>.

79

Page 80: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

5 R3load Procedures using the Migration Monitor

4. Continue as described in the installation documentation for your SAP component until a dialog box appears that states: If the export has been started on the source system and the Export Monitor is running, you can now start the data load by starting the Import Monitor.

5. Check that the prerequisites in the dialog box are fulfilled by your system. If so, you can start the Migration Monitor.

6. Complete the installation as described in the installation documentation for your SAP component.

If you have to restart the import after an error, just restart SAPinst. The import is continues with the table that was not imported successfully.

80

Page 81: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

6 Final Activities

6 Final Activities To finish the system copy of your SAP system: ...

1. Perform follow-on actions in the source system [Page 82].

2. Perform follow-on actions in the target system [Page 83].

81

Page 82: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

6 Final Activities

6.1 Performing Follow-On Actions in the Source System ...

1. Reschedule your canceled jobs: Tools → CCMS → Jobs → Maintenance (SM37).

2. Using CCMS, adapt your operation mode timetable to the original status: Tools → CCMS → Configuration → Operation mode calendar (SM63).

82

Page 83: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

6 Final Activities

6.2 Performing Follow-On Actions in the Target System Procedure

Actions on Operating System Level ...

1. Adapt the configuration files on operating system level to meet network and SAP requirements.

2. Adapt additional SAP software components (for example, RFC, CPIC, SAP ArchiveLink) if required.

3. Adapt additional non-SAP software components (for example, archiving systems, monitoring tools, job schedulers) if required.

4. Adapt backup programs (for example BRBACKUP, BRARCHIVE, BACKINT) if required.

5. Adapt non-SAP directories, file systems, NFS mounts, etc. if required.

6. Check the SAP parameters of the default and instance profiles.

7. Check your UNIX shell files for special entries.

8. Check crontab or AT jobs.

9. Check operating system files (for example, .netrc, .rhosts).

10. Check operating system printers.

11. Oracle: Adapt the database profiles init<SAPSID>.ora, init<SAPSID>.dba and init<SAPSID>.sap.

Actions on Database Level ...

1. Before starting the SAP system, make sure that the logging mechanism of the database is active.

2. Check the parameters in the database profiles.

3. Oracle: Delete all entries from the following tables: DBSTATHORA, DBSTAIHORA, DBSTATIORA, DBSTATTORA.

4. Oracle: Delete the user OPS$<SOURCE_SAPSID>ADM.

5. Oracle: If you changed the <DBSID> during the system copy, it is recommended to adapt the global_name parameter with the following SQL command: alter database rename global_name to <NEW_DBSID>;

If the parameter is not existing on your system, ignore this step.

Actions on SAP System Level ...

1. Run installation check: Administration → System administration → Administration → Installation Check (transaction SM28).

2. Configure the Workbench Organizer (SE06) with the option Database Copy. This releases all transport, repair, and customizing requests that have not been released in the source system.

3. Adapt the transport parameters and transport routes in the Transport Management System (TMS):

83

Page 84: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

6 Final Activities

a. Choose transaction STMS → Overview → Systems.

b. Select the system and select the tab Transporttool.

To adapt the transport routes:

Choose transaction STMS → Overview → Transport routes.

4. Delete all entries from the following tables: ALCONSEG, ALSYSTEMS, DBSNP, MONI, OSMON, PAHI, SDBAD, SDBAH, SDBAP, SDBAR.

5. Delete canceled and finished jobs.

Execute ABAP program RSBTCDEL, marking the field delete with forced mode: Tools → ABAP Workbench → ABAP Editor (SE38).

6. Adapt all jobs needed in the target system:

a. Copy the old jobs.

b. Modify the new jobs.

c. Delete the old jobs.

7. Check the consistency of the Temporary Sequential Objects (TemSe) by searching for files of TemSe objects for which no TemSe objects exist: Administration → CCMS → Spool → TemSe administration (SP12). For more information, see SAP Note 16875.

8. Adapt the definition of the printers to meet the new system requirements:

Device types and character set definitions

Spool servers

Output management systems (OMS)

9. Delete entries in table DDLOG for buffer synchronization. Synchronize the buffers as described in SAP Note 36283. Adapt the client information for the logical system.

10. Adapt the RFC destination: Tools → Administration → Administration → Network → RFC destinations (SM59). Clean the transactional RFC: Tools → Administration → Monitor → Transactional RFC (SM58). See the relevant description in the SAP Online Documentation.

11. Create new operation modes and remove old ones: ...

a. Create new operation modes and instance definitions.

b. Maintain the timetable using the new operation modes.

c. Delete the old operation modes and old instance definitions.

12. Adapt the operation mode time tables (CCMS): Administration → CCMS → Configuration → Operation mode calendar (SM63).

13. Adapt the instances and profiles (CCMS): Administration → CCMS → Configuration → OP modes/instances (RZ04).

14. Define or remove the SAP system users: Tools → Administration → User maintenance → Users (SU01). Furthermore, revise the authorizations of the system users.

15. Delete all entries from tables TPFET and TPFHT. These contain information about changes made to the profile of your source system: Administration → CCMS → Configuration → Profile Maintenance (RZ10).

IBM DB2 UDB for iSeries: Use the commands CLRPFM R3<SID>DATA/TPFET and CLRPFM R3<SID>DATA/TPFHT.

84

Page 85: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

6 Final Activities

16. Adapt other CCMS settings (for example, alert thresholds, reorganization parameters of CCMS table MONI) if required.

17. Delete all entries from table TLOCK which holds the repair requests from your source system.

18. Make data archived in the source system (data that does not reside in the database but was moved to a different storage location using SAP Archive Management) accessible in the target system. Adapt the file residence information in the target system. Refer to the SAP Online Documentation (SAP Web Application Server → System Administration → Application Data Archiving and Reorganization) for help.

19. Redefine database actions (backup, update statistics, etc.) if you have used the DBA calendar in the source system (DB13).

20. Check logon groups and assignment of application servers to logon groups (SMLG).

21. Check the connection to SAPNet - R/3 Frontend (OSS1).

22. Check self-defined external commands (SM69).

23. Check the thresholds (RZ06).

24. Check entries of the following tables in all involved systems:

TXCOM (SM54)

THOSTS (SM55)

25. Check the logical system names: Refer to the discussion of logical system names in the preparation section of this guide [Page 14]. If your circumstance is such that logical system names must be changed in the system that results from the copy, then perform this logical system name change at this time per OSS notes 103228 and 544509. Your corporate logical system naming strategy should be observed when making this change.

BW customers: If you have copied a BW system, read SAP Note 325525.

26. Check for every client in your SAP system the detail settings (client role, changes and transports for client-dependent objects, changes for client-independent objects, protection level, restrictions) (SCC4).

27. Check if you can delete clients that will no longer be used in the target system (SCC5).

28. Check the contexts and segments of remote application servers for the SAP Monitoring Infrastructure if required (RZ21).

29. Configure the domain controller in the Transport Management System (TMS) by using transaction code STMS.

30. Post-processing concerning customer objects: ...

If customer objects are not original in the new system, modify the corresponding entries in table TADIR.

If you encounter problems modifying a customer development class using transaction SMTS or SM31, try to use the option Validate (ENTER) instead of the option Save to save your changes.

31. ABAP Program Loads

The ABAP loads are platform-dependent programs which are generated during runtime and which are stored in database tables. They are not exported when you use the R3load procedure to copy your SAP system. The ABAP loads are generated in the target system when they are first used. This may, however, reduce production system

85

Page 86: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

6 Final Activities

performance. To avoid this, you can use transaction SGEN to generate the missing loads.

Load generation requires a large amount of system resources. You should schedule the generation job to run overnight.

For a detailed description of the features, see the online documentation in transaction SGEN by choosing Information on the SAP Load Generator, or in the Job Monitor by choosing Job Monitor.

32. If you did not change the database when copying the system, you have to start program RS_BW_POST_MIGRATION in the background with variant SAP&POSTMGR. Otherwise, if you changed the database when copying the system, you have to start program RS_BW_POST_MIGRATION in the background with variant SAP&POSTMGRDB. Program RS_BW_POST_MIGRATION performs necessary modifications on DB specific objects (mainly BW objects)..

Checking the Target System

The following actions are suitable for checking the consistency of the target system: ...

1. Perform initial consistency check (SM28).

2. Check the system log on all application servers (SM21).

3. Check the consistency of the database (DB02).

4. Perform server check (SM51).

5. Test transactions frequently used by the customer.

6. FI customers: Run the job SAPF190 (accounting reconciliation) and compare the results to those gained on the source system before the system copy (Accounting → Financial Accounting → General ledger → Periodic Processing → Closing → Check/count → Comparison).

7. FI customers: Run the jobs RFUMSV00 (tax on sales/purchases), RAGITT01 (asset history sheet), RAZUGA01 (asset acquisitions), RAABGA01 (fixed asset retirements) and compare the results to those gained on the source system before the system copy.

8. CO customers: Run the report group 1SIP and compare the results to those gained on the source system before the system copy.

86

Page 87: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

7 Additional Information

7 Additional Information

87

Page 88: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

7 Additional Information

7.1 Remote Installation with SAPinst Purpose You can run the SAPinst GUI in standalone mode to perform a remote installation.

This enables you to install an SAP system on another host (the remote host) while monitoring the installation with the SAPinst GUI on your local Windows or UNIX computer (the local host).

Prerequisites • Make sure that you have performed the preparation activities for your local host

(SAPinst GUI host) and your remote host.

For more information, see Installation Preparations in this documentation.

• Both computers are in the same network and can ping each other.

To test this:

Log on to your remote host and enter the command ping <local host>.

Log on to the local host and enter the command ping <remote host>.

• SAPinst ports

SAPinst uses the port 21212 during the installation for communication with the SAPinst GUI. If one of these ports is already used by another service, SAPinst aborts the installation with an appropriate error message.

In this case, you must start SAPinst or the SAPinst GUI from the command prompt as follows:

In the following commands, <free_port_number> defines an unused port number. Since SAPinst also uses <free_port_number> + 1, this must also be free. For example, if you enter 60000 as <free_port_number>, SAPinst uses the port 60000.

UNIX:

SAPinst: ./sapinst SAPINST_DIALOG_PORT=<free_port_number>

SAPinst GUI: ./sapinstgui.sh -port <free_port_number>

Windows:

SAPinst: sapinst SAPINST_DIALOG_PORT=<free_port_number>

SAPinst GUI: sapinstgui.bat -port <free_port_number>

Process Flow ...

1. You start the SAPinst server on your remote host.

2. You start the SAPinst GUI on your local host.

3. You perform the installation using the SAPinst GUI.

For more information, see:

88

Page 89: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

7 Additional Information

• Starting SAPinst on the Remote Host [Page 89]

• Starting SAPinst GUI on the Local Host [Page 90]

7.1.1 Starting SAPinst on the Remote Host Use You use this procedure to run SAPinst on the remote host when you want to run SAPinst as a remote installation [Page 88]. The remote host is the host where you want to install the SAP system.

Prerequisites You have prepared your system for SAPinst, that is you must have set the DISPLAY environment variable to <host_name>:0.0, where <host_name> is the host on which the SAPinst GUI will be displayed.

Procedure

Your Remote Host Runs on a Windows Platform ...

1. Log on to your remote host as a user who is a member of the local administration group.

2. Insert the installation DVD in your DVD drive.

3. Start SAPinst from the SAP Installation Master DVD:

Enter the following commands: <DVD drive>:\IM<x>_<OS>\SAPinst\NT\<OS>\sapinst.exe SAPINST_START_GUI=false

4. SAPinst now gets started without the SAPinst GUI and waits for the connection to the SAPinst GUI. That is, you see the following at the command prompt:

guiengine: no GUI connected; waiting for a connection on host <host_name>, port <port_number> to continue with the installation

5. Start the SAPinst GUI on your local host, as described in Starting SAPinst GUI on the Local Host [Page 90].

Your Remote Host Runs on a UNIX Platform ...

1. Log on to your remote host as user root.

2. Mount the SAP Installation Master DVD.

3. Mount the DVD locally. We do not recommend using Network File System (NFS).

4. Start SAPinst from the SAP Installation Master DVD:

Using the default installation directory

Enter the following commands: cd <SAP_Installation_Master_DVD>/IM<x>_<OS>/SAPINST/UNIX/<OS>

./sapinst SAPINST_START_GUI=false

89

Page 90: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

7 Additional Information

5. SAPinst now gets started without the SAPinst GUI and waits for the connection to the SAPinst GUI. That is, you see the following at the command prompt:

guiengine: no GUI connected; waiting for a connection on host <host_name>, port <port_number> to continue with the installation

6. Start the SAPinst GUI on your local host, as described in Starting SAPinst GUI on the Local Host [Page 90].

7.1.2 Starting SAPinst GUI on the Local Host Use You use this procedure to run SAPinst GUI on the local host when you want to run SAPinst as a remote installation [Page 88]. The local host is the host where you want to control the installation with the SAPinst GUI.

Prerequisites You have prepared your system for SAPinst, that is you must have set the DISPLAY environment variable to <host_name>:0.0, where <host_name> is the host on which the SAPinst GUI will be displayed.

Procedure Your Local Host Runs on a Windows Platform ...

1. Log on to your local Windows host.

2. Insert the installation DVD into your DVD drive.

3. Change to the following directory: cd <DVD drive>:\IM<x>_<OS>\SAPinst\NT\<OS>

4. Start the SAPinst GUI in one of the following ways:

With additional parameters:

Enter the following from the Windows command line: startinstgui.bat host -<host_name> -port <port_number>

<host_name> is the host name of the installation host

<port_number> is the same port as SAPinst uses on the remote host

Without additional parameters:

i. Enter the follwing from the Windows command line: startinstgui.bat

The SAPinst GUI starts and tries to connect to SAPinst on the local host. However, normally there is no SAPinst running on the local host.

Therefore, the SAPinst GUI cannot connect and the SAP Installation GUI Connection dialog appears.

ii. Enter the host name of the Installation Host and the same Port as SAPinst uses on the remote host and choose Log on.

5. Perform the installation from your local host.

90

Page 91: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

7 Additional Information

Your Local Host Runs on a UNIX Platform ...

1. Log on to your local UNIX host as user root.

2. Mount your installation DVD

Mount the DVD locally. We do not recommend using Network File System (NFS).

3. Change to the following directory: cd <SAP_Installation_Master_DVD>/IM<x>_<OS>/SAPINST/UNIX/<OS>

4. Start the SAPinst Gui in one of the following ways:

With additional parameters:

Enter the following from the UNIX command line: ./startInstGui.sh –host <host_name> -port <port_number>

<host_name> is the host name of the installation host

port_number> is the same port as SAPinst uses on the remote host

Without additional parameters:

i. Enter the following from the UNIX command line: startinstgui.sh

The SAPinst GUI starts and tries to connect to SAPinst on the local host. However, normally there is no SAPinst running on the local host.

Therefore, the SAPinst GUI cannot connect and the SAP Installation GUI Connection dialog appears.

ii. Enter the host name of the Installation Host and the same Port as SAPinst uses on the remote host and choose Log on.

5. Perform the installation from your local host.

91

Page 92: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

7 Additional Information

7.2 Interrupted Installation with SAPinst Use The SAP system installation might be interrupted for one of the following reasons:

• An error occurred during the processing phase:

SAPinst does not abort the installation in error situations. If an error occurs during the processing phase, the installation will hold and a dialog box appears. The dialog box contains a short description about the choices listed in the following table as well as a path to a log file that contains detailed information about the error.

• You interrupted the installation by choosing Cancel.

The following table describes the options in the dialog box:

If you choose...

Meaning

View Log A frame appears with history information (log files) about the steps that you performed last . These log files contain a short description of the error that has occurred. The dialog box will remain in the background, so you can choose one of the following two options (Retry or Stop) after viewing the log information.

Retry Since SAPinst records the installation progress in the keydb.xml file, you can continue the installation by choosing Retry.

The installation continues from the point of failure without repeating any

of the previous steps.

We recommend that you view the entries in the log files, try to solve the problem and then choose Retry.

If the same or a different error occurs again, the dialog box will appear again.

Stop The dialog box and the SAPinst GUI will be closed. The installation stops but SAPinst records the installation progress in the keydb.xml file. Thus, you can continue the installation from point of failure without repeating any of the previous steps. See the procedure below.

Reset You must restart from the beginning, that is, with the default keydb.xml file.

You must delete the previous installation before you restart SAPinst. For more information about deleting a SAP Web AS installation, see Deletion of an SAP System Installation in the documentation Component Installation Guide - SAP Web Application Server Java 6.40 SR 1 on <OS>: <DB>, Part II — Installation and Post-Installation.

92

Page 93: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

7 Additional Information

UNIX only: You can also terminate SAPinst by choosing Ctrl+C. However, we do not recommend that you use Ctrl+C, because this kills the process immediately .

Procedure The following procedures describe the steps to restart an installation, which you stopped by choosing Stop, or to continue an interrupted installation after an error situation.

Log on to your remote host as a user who is a member of the local administration group. ...

1. Insert the installation DVD in your DVD drive.

2. Enter the following commands from the Windows command prompt:

cd <DVD drive>:\IM<x>_<OS>\SAPinst\NT\<OS>

sapinst.exe

3. From the tree structure in the Welcome screen, select the installation task that you want to continue and choose Next.

If there is only one component to install, SAPinst directly displays the dialog What do you want to do? without presenting the Welcome screen.

The What do you want to do? screen appears.

4. In the What do you want to do? screen, decide between the following alternatives and choose OK.

Alternative Behavior

Run a new Installation

The installation will not be continued.

Instead, SAPinst deletes the mentioned installation directory for the chosen installation service and starts the installation from the beginning.

The log files from the old installation are put into a backup directory with the following naming convention:

<log_day_month_year_hours_minutes_seconds> (for example, log_01_Oct_2003_13_47_56).

Continue old installation

The installation that was interrupted is continued from the point of failure.

UNIX

Log on to your local UNIX host as user root.

5. Mount your installation DVD.

Mount the DVD locally. We do not recommend using Network File System (NFS).

6. Enter the following commands:

cd <SAP_Installation_DVD>/IM<x>_<OS>/SAPINST/UNIX/<OS>

93

Page 94: Homogeneous and Heterogeneous System Copy for SAP Systems Ba

7 Additional Information

./sapinst

7. From the tree structure in the Welcome screen, select the installation task that you want to continue and choose Next.

If there is only one component to install, SAPinst directly displays the dialog What do you want to do? without presenting the Welcome screen.

The What do you want to do? screen appears.

8. In the What do you want to do? screen, decide between the following alternatives and choose OK.

Alternative Behavior

Run a new Installation

The installation will not be continued.

Instead, SAPinst deletes the mentioned installation directory for the chosen installation service and starts the installation from the beginning.

The log files from the old installation are put into a backup directory with the following naming convention:

<log_day_month_year_hours_minutes_seconds> (for example, log_01_Oct_2003_13_47_56).

Continue old installation

The installation that was interrupted is continued from the point of failure.

94