sap netweaver 7.0 - system copy procedures - abap

124
38%/,& 6\VWHP &RS\ *XLGH 6 \ V W H P & R S \ I R U 6 $ 3 6 \ V W H P V % D V H G R Q 6 $ 3 1 H W : H D Y H U V 6 5 $ % $ 3 7DUJHW $XGLHQFH n System administrators n Technology consultants Document version: 1.0 ‒ June 01, 2006

Upload: nospammail

Post on 02-Dec-2014

116 views

Category:

Documents


7 download

TRANSCRIPT

Page 1: SAP Netweaver 7.0 - System Copy Procedures - ABAP

PUBLIC

System Copy Guide

System Copy for SAPSystems Based on SAPNetWeaver 2004s SR1ABAPTarget Audience

n System administrators

n Technology consultants

Document version: 1.0 ‒ June 01, 2006

Page 2: SAP Netweaver 7.0 - System Copy Procedures - ABAP

SAP AGDietmar-Hopp-Allee 16

69190 WalldorfGermany

T +49/18 05/34 34 34F +49/18 05/34 34 20

www.sap.com

© Copyright 2006 SAP AG. All rights reserved.

No part of this publication may be reproduced or transmittedin any form or for any purpose without the express permissionof SAP AG. The information contained herein may be changedwithout prior notice.

Some software products marketed by SAP AG and itsdistributors contain proprietary software components of othersoftware vendors.

Microsoft, Windows, Outlook, and PowerPoint are registeredtrademarks of Microsoft Corporation.

IBM, DB2, DB2 Universal Database, OS/2, Parallel Sysplex,MVS/ESA, AIX, S/390, AS/400, OS/390, OS/400, iSeries, pSeries,xSeries, zSeries, z/OS, AFP, Intelligent Miner, WebSphere,Netfinity, Tivoli, Informix, i5/OS, POWER, POWER5, OpenPowerand PowerPC are trademarks or registered trademarks of IBMCorporation.

Oracle is a registered trademark of Oracle Corporation.UNIX, X/Open, OSF/1, and Motif are registered trademarks of

the Open Group.Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame,

VideoFrame, and MultiWin are trademarks or registeredtrademarks of Citrix Systems, Inc.

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

Java is a registered trademark of Sun Microsystems, Inc.JavaScript is a registered trademark of SunMicrosystems, Inc.,

used under license for technology invented and implemented byNetscape.

MaxDB is a trademark of MySQL AB, Sweden.

SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver,and other SAP products and services mentioned herein as well astheir respective logos are trademarks or registered trademarks ofSAP AG in Germany and in several other countries all over theworld. All other product and service names mentioned are thetrademarks of their respective companies. Data contained in thisdocument serves informational purposes only. National productspecifications may vary.

These materials are subject to change without notice. Thesematerials are provided by SAP AG and its affiliated companies(“SAP Group”) for informational purposes only, withoutrepresentation or warranty of any kind, and SAP Group shall notbe liable for errors or omissions with respect to the materials.The only warranties for SAP Group products and services arethose that are set forth in the express warranty statementsaccompanying such products and services, if any. Nothing hereinshould be construed as constituting an additional warranty.

DisclaimerSome components of this product are based on Java™. Any codechange in these components may cause unpredictable and severemalfunctions and is therefore expressively prohibited, as is anydecompilation of these components.

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

Documentation in the SAP Service MarketplaceYou can find this document at the following address:service.sap.com/instguides

ii PUBLIC June 01, 2006

Page 3: SAP Netweaver 7.0 - System Copy Procedures - ABAP

Typographic Conventions

Example Description

<> Angle brackets indicate that you replace these words or characters with appropriate entries tomake entries in the system, for example, “Enter your <User Name>”.

® Arrows separating the parts of a navigation path, for example, menu options

Example Emphasized words or expressions

Example Words or characters that you enter in the system exactly as they appear in the documentation

Example Textual cross-references to a URL, for example, www.sap.com

/example Shortcuts added to the URL of a homepage to enable quick access to specific content on theWeb

123456 Hyperlink to an SAP Note, for example, SAP Note 123456

Example n Words or characters quoted from the screen. These include field labels, screen titles,pushbutton labels, menu names, and menu options.

n Cross-references to other documentation or published works

Example n Output on the screen following a user action, for example, messagesn Source code or syntax quoted directly from a programn File and directory names and their paths, names of variables and parameters, and names of

installation, upgrade, and database tools

EXAMPLE Technical names of system objects. These include report names, program names, transactioncodes, database table names, and key concepts of a programming language when they aresurrounded by body text, for example, SELECT and INCLUDE

EXAMPLE Keys on the keyboard

June 01, 2006 PUBLIC iii

Page 4: SAP Netweaver 7.0 - System Copy Procedures - ABAP

Document History

.Caution

Before you start the implementation, make sure you have the latest version of this document.You can find the latest version in SAP Service Marketplace at the following internet address:service.sap.com/instguides.

The following table provides an overview on the most important document changes.

Version Date Description

1.00 06/01/2006 Initial Version

iv PUBLIC June 01, 2006

Page 5: SAP Netweaver 7.0 - System Copy Procedures - ABAP

Table of Contents

Chapter 1 Homogeneous and Heterogeneous System Copy for SAP Systems Based on SAPNetWeaver 2004s SR1 . . . . . . . . . . . . . . . . . . . . . . . . . 1

Chapter 2 Planning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

Chapter 3 Preparations . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93.1 General Preparations . . . . . . . . . . . . . . . . . . . . . . . . . 93.2 Technical Preparations . . . . . . . . . . . . . . . . . . . . . . . . 113.3 Installing the Java Runtime Environment . . . . . . . . . . . . . . . . . . 13

Chapter 4 System Copy Process . . . . . . . . . . . . . . . . . . . . . . . . 154.1 Database-Specific System Copy . . . . . . . . . . . . . . . . . . . . . 154.1.1 Oracle-Specific Procedure . . . . . . . . . . . . . . . . . . . . . . . 174.1.1.1 Generating the Control File Structure . . . . . . . . . . . . . . . . . . . 184.1.1.2 Creating an Offline Backup . . . . . . . . . . . . . . . . . . . . . . . 214.1.1.3 Preparing the Target System . . . . . . . . . . . . . . . . . . . . . . 224.1.1.4 Restoring the Database Files on the Target System . . . . . . . . . . . . . . 244.1.2 MS SQL Server-Specific Procedure . . . . . . . . . . . . . . . . . . . . 254.1.3 IBM DB2 UDB for UNIX and Windows Specific Procedures . . . . . . . . . . . 264.1.4 IBM DB2 UDB for z/OS Specific Procedures . . . . . . . . . . . . . . . . . 284.1.4.1 Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294.1.4.2 Additional Information . . . . . . . . . . . . . . . . . . . . . . . . 304.1.4.2.1 Step 3: Run SQL Statements in the Source System . . . . . . . . . . . . . . 304.1.4.2.1.1 SQL Statement Number 01 . . . . . . . . . . . . . . . . . . . . . . . 304.1.4.2.1.2 SQL Statement Number 02 . . . . . . . . . . . . . . . . . . . . . . . 314.1.4.2.1.3 SQL Statement Number 03 . . . . . . . . . . . . . . . . . . . . . . . 324.1.4.2.1.4 SQL Statement Number 04 . . . . . . . . . . . . . . . . . . . . . . . 334.1.4.2.1.5 SQL Statement Number 05 . . . . . . . . . . . . . . . . . . . . . . . 344.1.4.2.1.6 SQL Statement Number 06 . . . . . . . . . . . . . . . . . . . . . . . 354.1.4.3 SQL Statement Number 07 . . . . . . . . . . . . . . . . . . . . . . . 364.1.4.4 SQL Statement Number 08 . . . . . . . . . . . . . . . . . . . . . . . 374.1.4.5 SQL Statement Number 09 . . . . . . . . . . . . . . . . . . . . . . . 384.1.4.6 Step 5: Printing the Bootstrap Data Sets . . . . . . . . . . . . . . . . . . 404.1.4.7 Step 6: Making Copies of Source Data Sets . . . . . . . . . . . . . . . . . 404.1.4.8 Step 7: Creating the Target System . . . . . . . . . . . . . . . . . . . . 434.1.4.9 Step 8a: Changing the Bootstrap Data Sets (BSDS) . . . . . . . . . . . . . . 464.1.4.10 Step 8b: Start the Target System . . . . . . . . . . . . . . . . . . . . . 474.1.4.11 Step 8c: Creating a New STOGROUP Using the HLQ of the Target System . . . . . . 484.1.4.12 Step 8d: Stopping Index Spaces . . . . . . . . . . . . . . . . . . . . . 49

June 01, 2006 PUBLIC v

Page 6: SAP Netweaver 7.0 - System Copy Procedures - ABAP

4.1.4.13 Step 8e: Changing the User-Defined Indexes in the DB2 Catalog . . . . . . . . . 494.1.4.14 Step 8f: Restart the Index Spaces . . . . . . . . . . . . . . . . . . . . . 504.1.4.15 Step 8g: Creating the Temporary Files for the DB2 Target System . . . . . . . . . 504.1.4.16 Step 8h: Implementing HLQ of the Target System in the Work File Database . . . . . 514.1.5 IBM DB2 for iSeries Specific Procedure . . . . . . . . . . . . . . . . . . . 594.1.6 MaxDB-Specific Procedure . . . . . . . . . . . . . . . . . . . . . . . 604.2 Database Independent System Copy . . . . . . . . . . . . . . . . . . . . 624.2.1 System Copy Procedure on UNIX . . . . . . . . . . . . . . . . . . . . 634.2.2 System Copy Procedure on Windows . . . . . . . . . . . . . . . . . . . 654.2.3 System Copy Procedure on IBM eServer iSeries . . . . . . . . . . . . . . . 664.2.3.1 Preparing the Windows Host for the SAP System Installation . . . . . . . . . . . 664.2.3.2 Preparing a Windows User Account and iSeries User Profile . . . . . . . . . . . 674.2.3.3 Installing TMKSVR and Creating an Installation Share . . . . . . . . . . . . . 674.2.4 Generating DDL statements . . . . . . . . . . . . . . . . . . . . . . 704.2.5 Preparing the Export . . . . . . . . . . . . . . . . . . . . . . . . . 704.3 Exporting the Source System Using SAPinst . . . . . . . . . . . . . . . . . 714.3.1 Running SAPinst on UNIX to Perform the Export . . . . . . . . . . . . . . 714.3.2 Running SAPinst on Windows to Perform the Export . . . . . . . . . . . . . 764.3.3 Running SAPinst on IBM eServer iSeries to Perform the Export . . . . . . . . . . 804.3.4 Restarting R3load Processes . . . . . . . . . . . . . . . . . . . . . . . 844.4 Setting Up the Target System . . . . . . . . . . . . . . . . . . . . . . 844.4.1 Installing the Target System . . . . . . . . . . . . . . . . . . . . . . 85

Chapter 5 Follow-Up Activities . . . . . . . . . . . . . . . . . . . . . . . . 895.1 Performing Follow-Up Activities in the Source System . . . . . . . . . . . . . 895.2 Performing Follow-Up Activities in the Target System . . . . . . . . . . . . . 895.2.1 Performing Follow-Up Activities for ABAP . . . . . . . . . . . . . . . . . 89

Chapter 6 Additional Information . . . . . . . . . . . . . . . . . . . . . . . 956.1 R3load Procedures Using the Migration Monitor . . . . . . . . . . . . . . . 956.1.1 Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . 956.1.2 Starting the Migration Monitor . . . . . . . . . . . . . . . . . . . . 1026.1.3 Output Files . . . . . . . . . . . . . . . . . . . . . . . . . . . 1086.2 Using SAPinst GUI . . . . . . . . . . . . . . . . . . . . . . . . . 1086.3 Interrupted Installation with SAPinst . . . . . . . . . . . . . . . . . . 1096.4 Performing a Remote Export Using SAPinst . . . . . . . . . . . . . . . . 1126.4.1 Starting SAPinst on the Remote Host (Optional) . . . . . . . . . . . . . . 1126.4.2 Starting SAPinst GUI Separately (Optional) . . . . . . . . . . . . . . . . 114

vi PUBLIC June 01, 2006

Page 7: SAP Netweaver 7.0 - System Copy Procedures - ABAP

1 Homogeneous and Heterogeneous System Copy for SAP Systems Based on SAP NetWeaver 2004s SR1

1 Homogeneous and Heterogeneous SystemCopy for SAP Systems Based on SAPNetWeaver 2004s SR1

Purpose

As of SAP NetWeaver 2004s you can copy ABAP systems, ABAP+Java systems and Java systems in one run usingeither database-specific methods or database-independent methods.

Terminology

n Homogeneous System CopyDuring the system copy you use the same operating system and database platform as the original system.

n Heterogeneous System CopyDuring the system copy, you change either the operating system or the database system, or both.Heterogeneous system copy is a synonym for migration.

n Source System and Target SystemThe SAP system containing the original database is called the source system and the system to which thedatabase copy is to be imported is called the target system. Their SAP system names are abbreviated toSOURCE_SAPSID and TARGET_SAPSID (IBM eServer iSeries: source_<SID> and target_<SID>). The termssource database and target database are also used in this description.

n System CopyDuplication of an SAP system. Certain SAP parameters might change in a copy. When you perform asystem copy, SAPinst installs all the instances again, but it uses a copy of the source system database to setup the database.

n Database CopyDatabase-dependent part of the system copy.

n PlaceholdersPlaceholders such as <SAPSID> are used in commands. They are used in the same way as in the SAP systeminstallation documentation. You must replace them with the values valid for your site.The following additional placeholders are used:

Placeholder Meaning How to find out

<SAPSID> SAP system ID

<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

June 01, 2006 PUBLIC 1

Page 8: SAP Netweaver 7.0 - System Copy Procedures - ABAP

1 Homogeneous and Heterogeneous System Copy for SAP Systems Based on SAP NetWeaver 2004s SR1

Placeholder Meaning How to find out

<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

Information on SAP Service Marketplace

For more information about system copy, see the documentation on SAP Service Marketplace:

n SAP System Copy & Migration page on SAP Service Marketplace at service.sap.com/systemcopy.n 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 isavailable in the Media Library.

n SAP Note 82478

.Caution

Only perform a system copy if you have experience in copying systems and good knowledge of theoperating system, the database, and - depending on the system to be copied - the ABAP Dictionary orthe Java Dictionary. Only perform a heterogeneous system copy if you are a certified system supportconsultant or a certified SAP Technical Consultant.

.Note

If you have problems during the system copy, create a customer message as follows:l For homogeneous system copy, use the application area BC-INS-UNX (UNIX), BC-INS-NT

(Windows), or BC-INS-AS4 (IBM eServer iSeries)l For heterogeneous system copy, use the application area BC-INS-MIG

Constraints

n SAP does not support client transport as a system copy method. Transporting production clients is notsupported at all. You can use client transport for the initial setup of a SAP system infrastructure. Thisdocumentation does not cover the client copy procedure.

n This documentation does not describe how to export and import a database with the installation tools forreorganization purposes. Use the appropriate tools for database reorganization, as SAP does not supportthis installation option.

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

n This documentation describes how to copy data from one SAP system to another SAP system based on SAPNetWeaver Application Server. This documentation does not describe how to copy data from non-SAPsystems to SAP systems.

n If you want to convert a non-Unicode system to a Unicode systems or perform the system copy of aUnicode system, see SAP Note 551344.

n For the development of Java applications, we strongly recommend that you follow the rules mentionedbelow. Otherwise, we cannot guarantee that you will be able to copy your J2EE Engine later with the SAPtools to change your underlying operating system and/or database system.

2 PUBLIC June 01, 2006

Page 9: SAP Netweaver 7.0 - System Copy Procedures - ABAP

1 Homogeneous and Heterogeneous System Copy for SAP Systems Based on SAP NetWeaver 2004s SR1

n When you perform a system copy, all software units or usage types in the source system are copied tothe target system. This means that none of the usage types in the target system can be excluded fromthe system copy, nor can you select usage types.

n Dos and Don'ts for system copy:l Do:u Save configuration data and runtime data in the J2EE database only. If you absolutely need to save this

data to the file system level, youmust use the Software DeploymentManager (SDM) to save the data.

u Follow the Open SQL standard.

uMake sure that all communication runs through the database pool.l Don't:u Save any system and infrastructure-specific data in business objects. Use a pointer to the central

storage of such information, for example:

t SAP SystemID and SID (SAPSID =SID=system name)

t Host name

t IP addresses

t Services and Ports

t Logical destinations and logical system names

t Other technical infrastructure names

u Use file system persistency.

u Set up dependencies between Java and ABAP.

u Try to copy the Java part of an ABAP+Java system to a Java standalone system or vice versa.

June 01, 2006 PUBLIC 3

Page 10: SAP Netweaver 7.0 - System Copy Procedures - ABAP

This page is intentionally left blank.

Page 11: SAP Netweaver 7.0 - System Copy Procedures - ABAP

2 Planning

2 Planning

This section describes how to plan your system copy.

.Recommendation

SAP recommends that youmake a system copy in order to set up a test, demo, training, or standby system.

Only valid for: Oracle

You cannot create standby systems with a system copy. You should perform upgrades in a test systemfirst. This way you can identify customer-specific problems that might result frommodifications.End of: Oracle

You can apply the system copy for:

n Setting up system landscapes (where the SAP systems have different SAPSIDs).n Creating systems for testing, demonstration, training, and standby. Depending on the purpose of the

system, it might be advisable to use the same SAP system ID, even though this prevents you from includingthe system in a system group for transports.

.Caution

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

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

n Install all SAP systems, starting with the development system. Customize the development system asdescribed in the implementation documentation.

n Transport the client-dependent and client-independent data to the quality assurance and productionsystems.

However, if you do not follow this concept, you can also install a system, customize it and then perform asystem 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.

Process

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

2. Create a plan to perform the system copy.Consider the downtime of the source system (for preparations and copying) when planning the systemcopy.

3. Obtain the latest versions of the SAP Notes that are refered to in this documentation.

June 01, 2006 PUBLIC 5

Page 12: SAP Netweaver 7.0 - System Copy Procedures - ABAP

2 Planning

Read the following SAP Note for up-to-date information:SAP Note 926085 (Homogeneous and Heterogeneous System Copy for SAP Systems Based on SAP NetWeaver 2004s SR1)Make sure that you have the most recent version of the SAP Notes, which you can find on SAP ServiceMarketplace at service.sap.com/notes.

4. Decide which system copy procedure you want to use:n The database-specific procedure [page 15] using tools provided by the database vendor

Some database vendors offer specific tools for copying a database. These tools let you:l Restore a backup of one database (source database) in another one (target database) (backupmethod)l Unload the source database and load the data into the target database

n The database-independent procedure [page 62] using SAP toolsUse this method if database-specific methods are either not available or not suitable.

.Note

For a heterogeneous system copy, only the database-independent method is available.

These methods are not supported for all database systems. See the following table to check which copymethods are available for your database system:

Database OS Platform Available Methods

UNIX Use one of the following:n System Copy Procedure on UNIX [page 63] using R3load for the

ABAP part and Jload for the Java partn MaxDB-specific procedure [page 60] for a homogeneous system

copy only (ABAP+Java, Java, ABAP)

MaxDB

Windows Use one of the following:n

System Copy Procedure on Windows [page 65] using R3load for theABAP part and Jload for the Java part

nMaxDB-specific procedure [page 60] for a homogeneous systemcopy only (ABAP+Java, Java, ABAP)

IBM DB2UniversalDatabase foriSeries

IBM eServer iSeries Use one of the following:n System Copy Procedure on IBM eServer iSeries [page 66] using R3load

for the ABAP part and Jload for the Java partn IBM eServer iSeries Specific Procedure [page 59] for a

homogeneous system copy only (ABAP+Java, Java, ABAP)For more information, see SAP Note 585277.

IBM DB2UniversalDatabase forUNIX andWindows

UNIX or Windows Use one of the following:n System Copy Procedure on UNIX [page 63] using R3load for the

ABAP part and Jload for the Java partn System Copy Procedure on Windows [page 65] using R3load for the

ABAP part and Jload for the Java partn The backup method of IBM DB2 Universal Database for

UNIX and Windows is supported for SAP systems based onSAP NetWeaver 2004s SR1. For more information, see IBMDB2 UDB for UNIX and Windows Specific Procedure [page 26].

6 PUBLIC June 01, 2006

Page 13: SAP Netweaver 7.0 - System Copy Procedures - ABAP

2 Planning

Database OS Platform Available Methods

IBM DB2UniversalDatabase forz/OS

IBM eServer zSeries Use one of the following:n The R3load method (see System Copy Procedure on UNIX [page

63] or System Copy Procedure on Windows [page 65]).n The IBM DB2 Universal Database for z/OS specific procedure

as described in IBMDB2 UDB for z/OS Specific Procedure [page 28].

UNIX Use one of the following:n The R3load method (see System Copy Procedure on UNIX [page

63])n The R3load method with Export/Import Monitors (see

R3load Procedures Using the Migration Monitor [page 95])n Homogeneous System Copy only: The Oracle

backup/restore method (see Oracle-Specific Procedure [page 17] )

Oracle

Windows Use one of the following:n

The R3load method for the ABAP part and the Jload methodfor the Java part of the system(see System Copy Procedure on Windows [page 65])

nThe R3load method with Export/Import Monitors(see R3load Procedures Using the Migration Monitor [page 95]).

nHomogeneous system copy only:The Oracle backup/restore method (see Oracle-Specific Procedure[page 17] and SAP Note 676468).

MS SQL Server Windows Use one of the following:n The R3load method for the ABAP part and the Jload method

for the Java part of the system (see System Copy Procedure onWindows [page 65])

n The R3load method with Export/Import Monitors (seeR3load Procedures Using the Migration Monitor [page 95]).

n Homogeneous system copy only: The Backup/Restore orDetach/Attach Method (seeMS SQL Server-Specific Procedure[page 25] and SAP Notes 193816 and 151603).

5. Order the right version of the installation kit before starting the system copy.6. Choose an SAP system ID. You can choose the new SAP system ID <TARGET_SAPSID> freely during a new

installation.

.Caution

To meet the requirements of the Workbench Organizer, you must choose different SAP system IDs fordifferent SAP systems.

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

June 01, 2006 PUBLIC 7

Page 14: SAP Netweaver 7.0 - System Copy Procedures - ABAP

2 Planning

.Note

You can operate several SAP systems on a single host without encountering any problems.Nevertheless, SAP recommends that you use a separate host for each system because an SAP systemupgrade might depend on an OS upgrade. If the SAP systems are on separate hosts, you can upgradethem at different times.

.Caution

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

8 PUBLIC June 01, 2006

Page 15: SAP Netweaver 7.0 - System Copy Procedures - ABAP

3 Preparations

3 Preparations

Before you start the system copy, you must perform the following preparation steps:

3.1 General Preparations

n Required DocumentationThe documentation System Copy for SAP Systems Based on SAP NetWeaver 2004s SR1 describes only the exporton the source system in a detailed way.For the installation of the target system, you also need the installation guide for your SAP solution, which isavailable on SAP Service Marketplace:SAP NetWeaver 2004s: Installation Guide — SAP NetWeaver 2004s SR1 <technical stack> on <OS> : <DB>at service.sap.com/installnw2004s.SAP ERP 2005: Installation Guide — SAP ERP 2005 SR1 <technical stack> on <OS> : <DB> atservice.sap.com/erp-inst.SAP CRM 5.0: Installation Guide — SAP CRM 5.0 SR1 <technical stack> on <OS> : <DB> atservice.sap.com/crm-inst

SAP SRM 5.0: Installation Guide — SAP SRM 5.0 SR1 <technical stack> on <OS> : <DB> atservice.sap.com/srm-inst

SAP SCM 5.0: Installation Guide — SAP SCM 5.0 SR1 <technical stack> on <OS> : <DB> atservice.sap.com/instguides ® mySAP Business Suite Solutions ® mySAP SCM ® Using SAP SCM 5.0 Server.

n Required DVDsMake sure that all required DVDs for the system copy are available:

.Caution

The DVD names listed below are abbreviated.You can find the full names of all media shipped with SAP NetWeaver 2004s inMedia Information for SAPNetWeaver 2004s on SAP Service Marketplace at service.sap.com/installNW2004s.

l Installation Master DVD

n If you want to perform a copy of an SAP system with BI as a pilot project, see SAP Note 543715.n If you want to copy ABAP systems with very large databases, see SAP Note 693168 (IMIG).n Tool versions

Check that you have the appropriate tool versions for your SAP kernel.n SAP license

Once the installation is completed and the SAP system copy has been imported, you will require a newlicense key for the target system. The license key of the source system is not valid for this system. Forinformation about ordering and installing the SAP license, see help.sap.com/nw2004s ® SAP NetWeaver ®SAP NetWeaver Library ® SAP NetWeaver by Key Capability ® Solution Life Cycle Management ® SAP Licenses

June 01, 2006 PUBLIC 9

Page 16: SAP Netweaver 7.0 - System Copy Procedures - ABAP

3 Preparations

3.1 General Preparations

Formore information about SAP license keys, see SAP ServiceMarketplace at service.sap.com/licensekey.n For a heterogeneous system copy you need to get a migration key by generating it on SAP Service

Marketplace at service.sap.com/migrationkey.n Archive files:

Data that has been archived in the source system (data that does not reside in the database but was movedto a different storage location using SAP Archive Management) must be made accessiblein the target system. Adapt the file residence information in the target system. For moreinformation, see: help.sap.com/nw2004s ® SAP NetWeaver Library ® SAP NetWeaver by KeyCapability ® Solution Life Cycle Management ® Data Archiving .Access to archive files is platform-independent.

n Configuration analysis and hardware analysisYou need to determine the:l Number of application serversl Expected size of the databasel Additional disks or other hardware requiredl Required memory

.Note

See the section on hardware and software requirements in the SAP system installationdocumentation to determine the system requirements.

n Test run and schedulel Perform a test run of the system copy. You can use the time taken by the test run to calculate the

system downtime:

u If your target system will replace your source system, try to perform a complete test run. Thismeans that the entire database is exported from the source system, transferred to the target systemand imported there. System downtime is approximately equal to the total test time (that is, timefor export, transport, and import).

u If you do not want to replace your source system, a partial test run (export of the entire databaseor parts of it) can be sufficient to calculate the system downtime. The source system is only downfor the time of the export.Calculating the system downtime is particularly important for very large databases (VLDB) or whentapes are being used. The test run is also to determine the amount of export data. Choose the bestdata transfer method (for example, FTP or tape). We recommend that you perform read/writeactions only on local file systems.Do not use NFS-mounted file systems because:

t Reading from NFS-mounted file systems might fail

t Writing to NFS-mounted file systems might cause corrupted dumpsl Define a schedule for the test migration and the final migration.

10 PUBLIC June 01, 2006

Page 17: SAP Netweaver 7.0 - System Copy Procedures - ABAP

3 Preparations

3.2 Technical Preparations

3.2 Technical Preparations

To make a consistent copy of the database, you need to prepare the source system and perform somesubsequent actions on the target system. This is not necessary when performing a test run.The following describes important preparations. For more information about SAP system administration,

see the SAP Online Documentation.

n Preparing the source systeml Before you start a system copy, check the minimum kernel patch level required by the support package

level of the source system. It might be necessary to replace the SAP kernel delivered with the kernelDVD of the installation kit and installed during the installation of the target system by a newer kernelpatch level before starting the target system. If you have to replace the delivered SAP kernel, you can dothis after the installation of the central instance.

l No canceled or pending update requests should be in the system. Check this by choosing Tools ®Administration ® Monitor ® Update (transaction SM13).If canceled or pending updates exist, you must update these again or delete them from all clients. Youcan see whether canceled or pending updates exist by checking if table VBDATA contains any entries.Find the canceled or open updates as follows:1. Call transaction SM13.2. Delete the default values for the client, user, and time.3. Choose all update requests.

If canceled or pending records exist, you must update these again or delete them. Check whetherthis action was successful using transaction SE16 for table VBDATA.

l Set all released jobs from Released to Scheduled:Tools ® CCMS ® Background Processing ® Jobs - Overview and Administration (transaction SM37)You also need to do this for jobs that must run periodically (see SAP Note 16083). Select all jobs(include start after event) as follows:Job ® Released ® Scheduled

l Adapt the operation mode timetable to make sure that no switching of operating modes takes placewhile a system is being copied as follows:Tools ® CCMS ® Configuration ® Operation mode calendar (transaction SM63)

l Write down the logical system names of all clients:1. If you plan to overwrite an existing system with a system copy (for example, the source and target

systems will both exist after the system copy), make sure you write down the logical system names ofall clients in the system that will be overwritten (transaction SCC4).As the logical system names will be overwritten, in the event of differences, you must change themback to their original names (as they existed in the system that is overwritten) in the follow-onactions after the system copy.

2. BI (formerly BW) customers: When planning the copy of a system with BI (formerly BW), readSAP Note 325525.

3. If you create a new system with a system copy (that is, create an upgrade test system), make sure thatthe logical naming strategy for this new system is consistent with your existing logical system namingconvention. If you are still planning your BI (formerly BW) system landscape, see SAP Note 184447.

June 01, 2006 PUBLIC 11

Page 18: SAP Netweaver 7.0 - System Copy Procedures - ABAP

3 Preparations

3.2 Technical Preparations

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

l Before the export, delete QCM tables from your system as follows:1. Before deleting you must always checku That the tables are consistent ‒ no restart log or conversion procedure termination must be

displayed

u That the data of the original table can be read

u If application programs that use the affected original table do not run correctly, do not deletethe QCM table yet.

2. Call transaction SE14.3. Choose Extras ® Invalid temp. table

All QCM tables that can be deleted are displayed.4. Mark the tables and delete them.

l FI customers: You can perform an additional consistency check by running the job SAPF190 before thesystem copy in the source system, as well as after the copy in the target system, and then comparing theresults. Make sure that no customer data is changed in the meantime. You can do this as follows:Accounting ® Financial Accounting ® General ledger ® Periodic Processing ® Closing ® Check/count ® Comparison

l 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) beforethe system copy in the source system, as well as after the copy in the target system, and then comparingthe results. Make sure that no customer data is changed in the meantime.

l ABAP system, ABAP+Java system: CO customers: You can perform an additional consistency check byrunning the report group 1SIP before the system copy in the source system, as well as after the copyin the target system, and then comparing the results. Make sure that no customer data is changedin the meantime.

.Caution

Prerequisites for an export:Before performing an export, make sure that no incremental conversion is in progress.To test if an incremental conversion is in progress, run transaction ICNV. If there are any tableentries in table TICNV, an incremental conversion is in progress. In this case, you have the followingoptions:1. Defer the migration until the incremental conversion has finished.2. Try to finish the incremental conversion by performing the following steps:

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

u If the tables are in any other state, you have to finish the incremental conversion. Choose Assistantand proceed according to the online documentation.

12 PUBLIC June 01, 2006

Page 19: SAP Netweaver 7.0 - System Copy Procedures - ABAP

3 Preparations

3.3 Installing the Java Runtime Environment

.Caution

Heterogeneous System Copy only: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 thefollowing statements:DELETE from TATGPC

DELETE from TATGPCA

Normally both tables are empty. If you do not delete the contents of these tables you willencounter problems while importing the data to your target system because of non NULL capablefields in these tables.

n Prepare the system for SAPinst: Install the Java Runtime Environment [page 13].

3.3 Installing the Java Runtime Environment

You need to prepare your system for SAPinst. This includes the installation of a Java Runtime Environment(JRE), which is required both for SAPinst and the SAPinst GUI.

Only valid for: UNIX;Windows

.Note

If required, you can perform a remote installation using a standalone SAPinst GUI on a separate Windowsor UNIX host. This lets you perform the installation on a remote host, controlling it with the SAPinst GUIfrom a local host. If you want to perform a remote installation, see Starting SAPinst on the Remote Host [page112]. In this case, you need at least a JRE on the local host to start the SAPinst GUI there.

End of: UNIX;Windows

Procedure

1. Check the JRE versions that are released for SAP systems in the Product Availability Matrix (PAM):a) Go to service.sap.com/pam.b) On the right-hand panel, choose SAP NetWeaver ® SAP NetWeaver 2004s ® JSE Platforms.c) Choose tab strip JSE Platforms.For additional information on the recommended JDK version, see SAP Note 709140.

2. Make sure a valid JRE version is installed, as follows:n If JRE is not already installed

Since JRE is not part of the SAP shipment, you need to download and install it. JRE is part of JDK(Java Development Kit).

n If JRE is already installedCheck the installed version of JRE by entering:java -version

June 01, 2006 PUBLIC 13

Page 20: SAP Netweaver 7.0 - System Copy Procedures - ABAP

3 Preparations

3.3 Installing the Java Runtime Environment

.Note

SAPinst checks environment variable SAPINST_JRE_HOME for a valid Java runtime environment.If SAPINST_JRE_HOME is not found, SAPinst also checks JAVA_HOME.

Only valid for: UNIX Linux

.Note

If you use a Sun Java VM, you have to perform the following:Edit the configuration file $JAVA_HOME/jre/lib/security/java.security and replace entry

securerandom.source=file:/dev/random with securerandom.source=file:/dev/urandom.

End of: UNIX Linux

14 PUBLIC June 01, 2006

Page 21: SAP Netweaver 7.0 - System Copy Procedures - ABAP

4 System Copy Process

4 System Copy Process

You have to perform one of the following methods for a system copy:

n Database-specific method [page 15] for a homogeneous system copyn Database-independent method [page 62] for a homogeneous or heterogeneous system copy

4.1 Database-Specific System Copy

The following sections describe database-specific methods for the homogeneous system copy. Database-specificmethods are not available for all database systems. For more information on which methods are availablefor your database, see Planning [page 5] and check the SAP Service Marketplace for SAP Notes describing thehomogeneous system copy for your database system.

Process

Follow the sequence of steps described in the process flows below for a:

n Central Systemn Distributed Systemn High Availability System

Central System

For performing the export for a central system, you need to proceed as follows on the central system host:

Process Flow on the Source System (Export)

1. You generate the control file structure for the target database [page 18].2. If required, you create an offline backup of the source database [page 21].

Process Flow on the Target System

1.

Only valid for: Windows

You install the database software as described in the installation guide of your SAP solution.End of: Windows

2.

Only valid for: UNIX

You prepare the target system [page 22]:a) Follow the instructions on the SAPinst screens until SAPinst requests you to install the database software

and to perform the database backup/restore.b) You create the database file system (if not yet existing).c) You install the database software.End of: UNIX

June 01, 2006 PUBLIC 15

Page 22: SAP Netweaver 7.0 - System Copy Procedures - ABAP

4 System Copy Process

4.1 Database-Specific System Copy

3.

Only valid for: Windows

Follow the instructions on the SAPinst screens until you are requested to perform the databasebackup/restore.

.Note

If required, you have to restart SAPinst as described in the installation guide of your SAP solution.

End of: Windows

4. To complete the system copy, you have to perform the follow-up activities [page 89].

Distributed System or High Availability System

To perform the export for a distributed or high-availability system, proceed as follows:

Process Flow on the Source System (Export)

1. On the database instance host of the source system, you generate the control file structure for the target database[page 18].

2. If required, on the database instance host, you create an offline backup of the source database [page 21].

Process Flow on the Target System

1.

Only valid for: Windows

On the database instance host, you install the database software as described in the installation guideof your SAP solution.End of: Windows

2.

Only valid for: UNIX

You prepare the target system [page 22]:a) On the database instance host, follow the instructions on the SAPinst screens until SAPinst requests

you to install the database software and to perform the database backup/restore.b) On the database instance host, you create the database file system (if not yet existing).c) On the database instance host, you install the database software.End of: UNIX

3.

Only valid for: Windows

On the database instance host, follow the instructions on the SAPinst screens until you are requested toperform the database backup/restore.

.Note

If required, you have to restart SAPinst as described in the installation guide of your SAP solution.

End of: Windows

4. To complete the system copy, you have to perform the follow-up activities [page 89].

16 PUBLIC June 01, 2006

Page 23: SAP Netweaver 7.0 - System Copy Procedures - ABAP

4 System Copy Process

4.1 Database-Specific System Copy

Only valid for: Oracle

4.1.1 Oracle-Specific Procedure

Purpose

In an SAP system environment, you can create a homogeneous copy of an Oracle database by copying databasefiles. This method is suitable for creating an exact copy of an existing database. The source of the copy can bean offline backup or the file system of your source host.You use SAPinst 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 different.

Advantages

n You can use existing offline backups (provided that redo logs were cleaned up with forced log switches)n This method is faster than the R3load and Jload method.

Disadvantages

n Offline backup/copy of database files in a heterogeneous environment is not possible because the hardwareof the source and target systems must be binary-compatible.

n Source system host and target system host must be different.n You must shut down the SAP system and the database during offline backup/copy of database files.n You cannot change the database schema and the tablespace names.

Prerequisites

n You must use the same Oracle release and patch level for your database in the source and target system.n You must have prepared your system for SAPinst [page 13].n The classes12.jarmust exist in the <ORACLE_HOME>/jdbc/lib directory (installed using a standard

Oracle installation).n The backup must be done offline.n The source and target systems must run on different hosts for security reasons.n The source and target systems must be binary compatible.

.Note

Note that you can also perform a system copy from 32-bit systems to 64-bit systems and vice versa(same operating system assumed) even if source and target system are not binary compatible.

If your source system uses the US7ASCII character set, you must choose this character set when installingthe 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 usedby the source system, connect to the source database as user sap<schemaid> or sapr3 with sqlplus andenter: SELECT * FROM V$NLS_PARAMETERS;

June 01, 2006 PUBLIC 17

Page 24: SAP Netweaver 7.0 - System Copy Procedures - ABAP

4 System Copy Process

4.1 Database-Specific System Copy

Only valid for: Oracle

4.1.1.1 Generating the Control File Structure

The OraBRCopy Java tool writes a file CONTROL.SQL to the current working directory, which can be used withoutfurther adaptions on the target system.For more information about the OraBRCopy tool, see the documentation ORABRCopy.pdf, which is part

of the OraBRCOPY.SAR archive.

Prerequisites

.Recommendation

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

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 can find the archive in the following directory on the Installation Master DVD:

Only valid for: UNIX

<DVD-DIR>:/COMMON/INSTALL/ORA/ORABRCOPY.SAR

End of: UNIX

Only valid for: Windows

<DVD-DIR>:\COMMON\INSTALL\ORA\ORABRCOPY.SAR

End of: Windows

3. Make sure that all redo log groups are archived4. Start the OraBRCopy tool as an OS user with Oracle DBA privileges:

user ora<dbsid>user <sapsid>admn On UNIX, enter the following commands:

./ora_br_copy.sh –generateFiles –forceLogSwitches —targetSid <TARGET_DBSID> —password

<system's password> —listenerPort <listener port>

n On Windows, enter the following commands:ora_br_copy.bat –generateFiles –forceLogSwitches —targetSid <TARGET_DBSID> —password

<system's password> —listenerPort <listener port>

The tool creates the files CONTROL.SQL, CONTROL.TRC and init<targetSID>.ora in your installationdirectory, shuts down and restarts the database and performs the required log switches.

.Note

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

18 PUBLIC June 01, 2006

Page 25: SAP Netweaver 7.0 - System Copy Procedures - ABAP

4 System Copy Process

4.1 Database-Specific System Copy

5. Verify and, if necessary, update the CONTROL.SQL control file using the CONTROL.TRC trace file as follows.

Example for WindowsIn the following example for Windows, entries of CONTROL.SQL written in bold should be compared to thetrace 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 2005

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,

GROUP 3 (

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

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

) SIZE 50M,

June 01, 2006 PUBLIC 19

Page 26: SAP Netweaver 7.0 - System Copy Procedures - ABAP

4 System Copy Process

4.1 Database-Specific System Copy

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\IMS700_1\IMS700.DATA1',

'D:\ORACLE\NEW\SAPDATA1\IMS700_2\IMS700.DATA2',

'D:\ORACLE\NEW\SAPDATA1\IMS700_3\IMS700.DATA3',

'D:\ORACLE\NEW\SAPDATA1\IMS700_4\IMS700.DATA4',

'D:\ORACLE\NEW\SAPDATA2\IMS700_5\IMS700.DATA5',

'D:\ORACLE\NEW\SAPDATA2\IMS700_6\IMS700.DATA6',

'D:\ORACLE\NEW\SAPDATA2\IMS700_7\IMS700.DATA7',

'D:\ORACLE\NEW\SAPDATA2\IMS700_8\IMS700.DATA8',

'D:\ORACLE\NEW\SAPDATA2\IMS700_9\IMS700.DATA9',

'D:\ORACLE\NEW\SAPDATA3\IMS700_10\IMS700.DATA10',

'D:\ORACLE\NEW\SAPDATA4\IMS700_11\IMS700.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;

.Note

In the above example for Windows, entries and values of CONTROL.SQL written in bold should becompared to the trace file. The changes to be made are valid for UNIX, too.

Changes to be made

1. If you want to upgrade your database from 32-bit to 64-bit, add the following lines at the bottom of thecontrol.sql file:shutdown immediate;

startup restrict

20 PUBLIC June 01, 2006

Page 27: SAP Netweaver 7.0 - System Copy Procedures - ABAP

4 System Copy Process

4.1 Database-Specific System Copy

spool utlirp.log

@?/rdbms/admin/utlirp.sql

spool off

alter system disable restricted session;

2. MAXLOGFILES 255

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

3. 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.

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

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

…'D:\ORACLE\NEW\SAPDATA1\IMS700_1\IMS700.DATA1'

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

5. 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.

6. The number of the rows with ALTER TABLESPACEmust be equal to the number of the correspondingrows in the trace file.

End of: Oracle

Only valid for: Oracle

4.1.1.2 Creating an Offline Backup

If required, create an offline backup. There are different possibilities to prepare the actual transfer of thedatabase files:

n If you have an up-to-date offline backup, you can use it (provided that redo logs were cleaned up withforced log switches).

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

June 01, 2006 PUBLIC 21

Page 28: SAP Netweaver 7.0 - System Copy Procedures - ABAP

4 System Copy Process

4.1 Database-Specific System Copy

n You stop the database (normal shutdown) and copy the database files when the actual transfer to the targetsystem takes place. You do not have to perform any preparations for the actual transfer now. Proceedwith the next step.

End of: Oracle

Only valid for: Oracle

4.1.1.3 Preparing the Target System

PrerequisitesMake sure that 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 SAPsolution.

.Caution

On theWelcome screen, choose the required installation service:SAP NetWeaver 2004s Support Release 1 ® Additional Software Life-Cycle Tasks ® System Copy ® <DB> ® TargetSystem ® <Central System | Distributed System | High-Availability System>.

.Caution

When you perform a system copy with the Oracle backup/restore method, you cannotchange the database schema and the tablespace names of the new target system.When installing the target central instance, database instance, or dialog instance make sure that youenter the correct database schema names (which are the database schema name of the source system).The schema names of the source and target system must be identical.

n When SAPinst prompts for the installation type, choose Homogeneous System Copy (Backup/Restore).n Proceed 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. If necessary, extract the Oracle stage archives manually and install the Oracle Software as described in theinstallation documentation for your SAP solution.

3. Restore the database files on the target system.4. If they do not exist, create the following directories on the target system:

22 PUBLIC June 01, 2006

Page 29: SAP Netweaver 7.0 - System Copy Procedures - ABAP

4 System Copy Process

4.1 Database-Specific System Copy

n UNIX:

l /oracle/<TARGET_DBSID>/mirrlog<x>

l /oracle/<TARGET_DBSID>/origlog<x>

l /oracle/<TARGET_DBSID>/sapdata<x>

l /oracle/<TARGET_DBSID>/sapreorg

l /oracle/<TARGET_DBSID>/saparch

l /oracle/<TARGET_DBSID>/oraarch

l /oracle/<TARGET_DBSID>/saptrace

l /oracle/<TARGET_DBSID>/saptrace/background

l /oracle/<TARGET_DBSID>/saptrace/usertrace

l /oracle/<TARGET_DBSID>/origlogA/cntrl

l /oracle/<TARGET_DBSID>/sapdata1/cntrl

l /oracle/<TARGET_DBSID>/saparch/cntrl

l /oracle/<TARGET_DBSID>/sapcheck

n Windows:

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

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

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

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

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

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

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

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

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

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

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

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

l <drive>:\oracle\<TARGET_DBSID>\sapcheck

5. Make sure that the following directories are empty (except the subdirectory saparch/cntrl):/oracle/<TARGET_DBSID>/saparch and /oracle/<TARGET_DBSID>/oraarch

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

6. All directories must be owned by the user ora<target_dbsid>.To achieve this enter the following command:chown ora<target_dbsid>:dba<directory>

7. Set the security settings for the built-in accounts and groups SYSTEM, Administrators,

SAP_<SAPSID>_GlobalAdmin (domain installation), and SAP_<SAPSID>_LocalAdmin (local installation)for all directories 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 ….d) In the next 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.

June 01, 2006 PUBLIC 23

Page 30: SAP Netweaver 7.0 - System Copy Procedures - ABAP

4 System Copy Process

4.1 Database-Specific System Copy

g) Delete all other accounts.

End of: Oracle

Only valid for: Oracle

4.1.1.4 Restoring the Database Files on the Target System

.Caution

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

Procedure

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

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: <SAPINST_INSTDIR>

CONTROL.SQL

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

init<TARGET_DBSID>.ora

Directories on Windows:

Source and Target Directory Files

<drive>:\oracle\<DBSID>\sapdata<x> All files

<drive>:\oracle\<DBSID>\origlog<x> All files

<drive>:\oracle\<DBSID>\mirrlog<x> All files

source: <INSTDIR>target: <SAPINST_INSTDIR>

CONTROL.SQL

source: <INSTDIR>target: \oracle\<DBSID>\<DB_VERSION>_<BIT>\database

init<TARGET_DBSID>.ora

24 PUBLIC June 01, 2006

Page 31: SAP Netweaver 7.0 - System Copy Procedures - ABAP

4 System Copy Process

4.1 Database-Specific System Copy

.Note

If you use an existing offline backup, the source data files and log files are not located in the directoriesshown in the table.The installation directory of the target system is normally located in the directory:%programfiles%\sapinst_instdir\NW04S\LM\COPY\ORACLE\SYSTEM\<system_variant>

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

3. Verify that the created directories and copied files have the owner ora<target_dbsid>, belong to thegroup 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.

End of: Oracle

End of: Oracle

Only valid for: Windows MS SQL Server

4.1.2 MS SQL Server-Specific Procedure

This section describes how to perform a homogeneous system copy of an MS SQL Server database by usingthe backup/restore method, or the detach/attach method in an SAP environment. The SAPinst installationtool supports both methods.The backup/restore method and the detach/attach method have the following advantages compared to the

R3load method:

n You can use an existing backup.n These methods are much faster than the database-independent method [page 62].

.Note

l For more information about the system copy procedure, see also SAP Notes 193816 and 151603.l With SQL Server, you can use backup images across the platforms I386, IA64, x64. That is, you can

make a backup on one type of platform and use it on another type.l You can only attach SQL Server 2000 files to SQL Server 2005 but not vice versa.

Process

1. Detach the database files from the source system database or create a backup and copy the files to thetarget system.

2. Attach the database files or restore the backup of the source database on the target database server.3. Run SAPinst to install the target system by choosing the following on theWelcome screen:

<Your SAP system> ® Additional Software Life-Cycle Tasks ® System Copy ® MS SQL Server ® Target System ®<system variant> ® <technical stack>

June 01, 2006 PUBLIC 25

Page 32: SAP Netweaver 7.0 - System Copy Procedures - ABAP

4 System Copy Process

4.1 Database-Specific System Copy

.Note

n Choose the installation services exactly in the order they appear. For more information, seethe MS SQL Server installation guide for your SAP system on SAP Service Marketplace at:service.sap.com/installnw2004s.

n On the SAPinst screen SAP System > Databasemake sure to select Homogeneous System Copy (MS SQLServer-specific: Detach/Attach or Backup).

End of: Windows MS SQL Server

Only valid for: DB2 UDB for UNIX and Windows

4.1.3 IBM DB2 UDB for UNIX and Windows Specific Procedures

In an SAP system environment, you can create a homogeneous system copy of a DB2 database using the backupmethod or by relocating your database. The relocation of the database is usually used in conjunction with splitmirror. For more information, see the documentation Database Administration Guide: SAP on IBM DB2 UniversalDatabase for UNIX and Windows, section The db2inidb Tool 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.In an ABAP system, only the SAPinst steps for setting up and loading the database steps are replaced by a

database restore.

Advantages of the Backup Method

n You can use existing offline backups.n Using the backup method is faster than the database-independent method [page 62].

Disadvantages of the Backup Method

n A restore or copy of database files in a heterogeneous environment is not possible as the hardware of thesource and target systems must be binary compatible.

.Note

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

n You cannot change the database schema. The database schema will be the same as of the source system.n You cannot copy an individual MCOD component to another system. You can only copy the complete

system.

Prerequisites

n The source and target systems should be binary compatible.n If errors occur when restoring the backup on the target system, the complete restore must be repeated.

26 PUBLIC June 01, 2006

Page 33: SAP Netweaver 7.0 - System Copy Procedures - ABAP

4 System Copy Process

4.1 Database-Specific System Copy

Process

1. You perform an offline backup or restore an existing backup copy.2. To create a target system, run SAPinst on the target system host by choosing the following on theWelcome

screen:<Your SAP system> ® Additional Software Life-Cycle Tasks ® System Copy ® IBM DB2 UDB for UNIX and Windows ®Target System ® <system variant> ® <technical stack>Perform the installation options in the given sequence and follow the instructions on the SAPinst dialogs.During the installation phase SAPinst prompts you to perform the database restore.

.Caution

Be aware of the following constraints when using the backup method for a homogeneous system copy:n You cannot change the connect user.

During the dialog phase you have to make sure that you enter exactlythe name of the connect user as you did on your source system.

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

n If you want to change the container names on the target system, you have to adapt thecontainer 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 UniversalDatabase for UNIX and Windows, section Usage of Tool brdb6brt.

For the restore of your database, you can choose between one of the following options:n Simple database restore

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

n Redirected restoreFor more information, see SAP Note 870863.

3. Perform the database restore.If you have used an online backup, you have to make sure that you have access to the log files that werecreated during the online backup. You also have to perform a rollforward operation to bring the databaseinto a consistent state.You can now continue with the installation.

4. If required, you can modify the tablespace names after the installation using the following command:db2 rename tablespace <old name> to <new name>

.Example

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 thefollowing commands:n 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)

June 01, 2006 PUBLIC 27

Page 34: SAP Netweaver 7.0 - System Copy Procedures - ABAP

4 System Copy Process

4.1 Database-Specific System Copy

n For table IADB6, enter the following SQL command:update <connect_user_name>.iadb6 set tabspace =

'<SAPSID_TARGET>#'||substr(tabspace,5,length(tabspace)-4)

n For table TADB6, enter the following SQL command:update <connect_user_name>.tabdb6 set tabspace =

'<SAPSID_TARGET>#'||substr(tabspace,5,length(tabspace)-4)

More Information

n Database Administration Guide: SAP on IBMDB2 Universal Database for UNIX and Windows on SAP Service Marketplaceat service.sap.com/installNW2004sInstallation.

n IBM DB2 documentation ® DB2 Command Reference

End of: DB2 UDB for UNIX and Windows

4.1.4 IBM DB2 UDB for z/OS Specific Procedures

In an SAP system environment, you can create a homogeneous system copy of a DB2 database using theoffline system copy method.This document assumes that the database schema of your SAP system is SAPR3. If you employ a different

schema, adapt the references to SAPR3 in the following SQL statements and jobs to reflect the actual schemaname.The following section describes an offline system copymethod for SAP systems on IBMDB2 UDB for z/OS.For more information, see SAP Note 870381.For this example system copy, the high level qualifier of the source system is assumed to be D8A0 of the

target system D8B0.

Advantage of the Offline System Copy Method

This method is faster than the database-independent method [page 62].

Restriction of the Offline System Copy Method

At the moment, you cannot copy an individual MCOD component to another system. You can only copy thecomplete system.

.Note

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

You can find an adapted procedure for an online system copy in the IBM documentation High Availabilityfor SAP on zSeries Using Autonomic Computing Technologies.

Prerequisites

The following prerequisites must be fulfilled to use this method:

n The permissions of the source and target systems must be completely separate. The source system mustnot be able to use the resources of the target system, and the target system must not be able to use theresources of the source system.

28 PUBLIC June 01, 2006

Page 35: SAP Netweaver 7.0 - System Copy Procedures - ABAP

4 System Copy Process

4.1 Database-Specific System Copy

n RACF authorization for the target DB2 subsystem is complete.n Source and target systems must work with DB2 managed objects.n Tablespaces are not partitioned.n The system copy is made from a non-data sharing system to a non-data sharing system.n Procedures of the source and the target system are defined in the DB2 PROCLIB.n Source and target systems have their appropriate entries in the APF list.n Volumes of the source and target systems are managed by SMS.n Source and target systems run with the same DB2 service level.

Variables Used in this Procedure

n Source System = D8A0

n Target System = D8B0

n Storage Group = TEMPORA

n High Level Qualifier = HLQn Boot Strap Data Set = BSDS

4.1.4.1 Procedure

The offline system copy can be divided into the following steps:

1. Check the Source System for ConsistencyCorrect any problems before continuing (see SQL Statement Number 9 [page 38])

2. Stop and Restart the Source Systemwith the ACCESS (MAINT) command option to prohibit any authorization IDs other than install SYSADMand install SYSOPR.

3. Run SQLs in the Source Systemto collect all DB2 catalog objects to be modified in the target system and keep the results in a safe place. Formore information, see Step 3: Run SQL Statements in the Source System [page 30].

4. Stop the Source SystemMODE (QUIESCE) command option.

5. Print the Bootstrap Data SetsFor more information, see Step 5: Printing the Bootstrap Data Sets [page 40].

6. Make Copies of the Source Data Setswhich includes:n DB2 bootstrap data setsn DB2 logcopy data setsn All DB2 VSAM data sets belonging to the source systemFor more information, see Step 6: Making Copies of Source Data Sets [page 40].

7. Create the Target System

June 01, 2006 PUBLIC 29

Page 36: SAP Netweaver 7.0 - System Copy Procedures - ABAP

4 System Copy Process

4.1 Database-Specific System Copy

.Note

The source system is no longer needed for the subsequent process. This reduces downtime for thesource system.Restore the dumps in the environment of the target system. Ensure that all RESTORE jobs rename therestored objects of the source system by specifying the high level qualifier of the target system.

For more information, see Step 7: Creating the Target System [page 43].8. Manipulate the Bootstrap Data Sets of the Target System

Start the target system and change the objects as follows:n Step 8a: Changing the Bootstrap Data Sets (BSDS) [page 46]n Step 8b: Start the Target System [page 47]n Step 8c: Creating a New Storage Group Using the HLQ of the Target System [page 48]n Step 8d: Stopping Index Spaces [page 49]n Step 8e: Changing the User-Defined Indexes in the DB2 Catalog [page 49]n Step 8f: Restart the Index Spaces [page 50]n Step 8g: Creating the Temporary Files for the Target System [page 50]n Step 8h: Implementing the HLQ in the Work File Database [page 51]

4.1.4.2 Additional Information

The following sections contain additional information about the steps involved in the homogeneous systemcopy procedure for DB2 for z/OS.In the following steps, storage groups must be modified to apply the new high level qualifier. This can be

achieved by dropping and recreating the storage groups with the new high level qualifier (and volumes).To prepare the DB2 catalog of the target system, you must run JCL jobs created by SQLs running in the

source system.

4.1.4.2.1 Step 3: Run SQL Statements in the Source System

Prerequisites

As described earlier in this section, you must stop and restart the source system with the ACCESS(MAINT)command option to prevent changes and to obtain consistent data.

Activities

Execute all the following SQL statements in the source system:

4.1.4.2.1.1 SQL Statement Number 01

With this statement, you identify user-defined indexes that you need to change in the DB2 catalog. For moreinformation, see Step 8e: Changing the User-Defined Indexes in the DB2 Catalog [page 49].

30 PUBLIC June 01, 2006

Page 37: SAP Netweaver 7.0 - System Copy Procedures - ABAP

4 System Copy Process

4.1 Database-Specific System Copy

Statement

.Syntax001 SELECT NAME, DBNAME, INDEXSPACE

002 FROM SYSIBM.SYSINDEXES

003 WHERE DBNAME = 'DSNDB06'

004 AND CREATOR <> 'SYSIBM';

Output

.Example

---------+---------+---------+---------+---------+-----

NAME DBNAME INDEXSPACE

---------+---------+---------+---------+---------+-----

SYSTBLSP~0 DSNDB06 SYSTBLSP

SYSTABLE~0 DSNDB06 SYSTABLE

SYSIXPART~0 DSNDB06 SYSIXPAR

4.1.4.2.1.2 SQL Statement Number 02

With this statement, you identify all databases that you want to stop at a later point in time in the target system:

Statement

.Syntax001 SELECT ' -STOP DATABASE ('

002 CONCAT STRIP(NAME,T,' ')

003 CONCAT ')'

004 FROM SYSIBM.SYSDATABASE

005 WHERE STGROUP <> ' '

006 AND TYPE <> 'W'

007 ORDER BY NAME;

June 01, 2006 PUBLIC 31

Page 38: SAP Netweaver 7.0 - System Copy Procedures - ABAP

4 System Copy Process

4.1 Database-Specific System Copy

Output

.Example

-STOP DATABASE (A000XAAA)

-STOP DATABASE (A000XAAB)

-STOP DATABASE (A000XAAC)

-STOP DATABASE (A000XAAD)

-STOP DATABASE (A000XAAE)

-STOP DATABASE (A000XAAF)

-STOP DATABASE (A000XAAG)

-STOP DATABASE (A000XAAH)

-STOP DATABASE (A000XAAI)

-STOP DATABASE (A000XAAJ)

-STOP DATABASE (A000XAAK)

-STOP DATABASE (A000XAAL)

.

.

.

etc.

4.1.4.2.1.3 SQL Statement Number 03

With this statement, you identify all tablespaces to be connected at a later point in time to the temporarystorage group TEMPORA:

Statement

.Syntax001 SELECT ' ALTER TABLESPACE '

002 CONCAT STRIP(A.DBNAME,T,' ')

003 CONCAT '.' CONCAT STRIP(A.TSNAME,T,' ')

004 CONCAT ' USING STOGROUP TEMPORA; COMMIT;'

005 FROM SYSIBM.SYSTABLEPART A,

006 SYSIBM.SYSTABLESPACE B

007 WHERE A.DBNAME=B.DBNAME

008 AND A.TSNAME=B.NAME

009 AND A.STORNAME <> ' '

010 AND A.PARTITION=0;

32 PUBLIC June 01, 2006

Page 39: SAP Netweaver 7.0 - System Copy Procedures - ABAP

4 System Copy Process

4.1 Database-Specific System Copy

Output

.Example

ALTER TABLESPACE A000XAAA.ABAPTREE USING STOGROUP TEMPORA; COMMIT;

ALTER TABLESPACE A000XAAA.ABAPTREE USING STOGROUP TEMPORA; COMMIT;

ALTER TABLESPACE A000XAAA.ADIRACCE USING STOGROUP TEMPORA; COMMIT;

ALTER TABLESPACE A000XAAA.ADOWNERR USING STOGROUP TEMPORA; COMMIT;

ALTER TABLESPACE A000XAAA.ADRCOMCS USING STOGROUP TEMPORA; COMMIT;

ALTER TABLESPACE A000XAAA.ADRDIFIN USING STOGROUP TEMPORA; COMMIT;

ALTER TABLESPACE A000XAAA.ADRGS2 USING STOGROUP TEMPORA; COMMIT;

ALTER TABLESPACE A000XAAA.ADR10 USING STOGROUP TEMPORA; COMMIT;

4.1.4.2.1.4 SQL Statement Number 04

With this statement , you identify all indexes to be connected with storage group TEMPORA.

Statement

.Syntax001 SELECT 'ALTER INDEX "'

002 CONCAT STRIP(IXCREATOR,T, ' ')

003 CONCAT '"."' CONCAT STRIP(IXNAME,T,' ')

004 CONCAT '" USING STOGROUP TEMPORA; COMMIT;'

005 FROM SYSIBM.SYSINDEXPART

006 WHERE IXCREATOR <> 'SYSIBM'

007 AND PARTITION=0;

June 01, 2006 PUBLIC 33

Page 40: SAP Netweaver 7.0 - System Copy Procedures - ABAP

4 System Copy Process

4.1 Database-Specific System Copy

Output

.Example

ALTER INDEX "DSNACC"."UTLEX01" USING STOGROUP TEMPORA; COMMIT;

ALTER INDEX "DSNACC"."UTLSTX01" USING STOGROUP TEMPORA; COMMIT;

ALTER INDEX "DSNACC"."UTPEBX01" USING STOGROUP TEMPORA; COMMIT;

ALTER INDEX "DSNACC"."UTPETX01" USING STOGROUP TEMPORA; COMMIT;

ALTER INDEX "DSNACC"."UTPEX01" USING STOGROUP TEMPORA; COMMIT;

ALTER INDEX "DSNACC"."UTPRCX01" USING STOGROUP TEMPORA; COMMIT;

ALTER INDEX "DSNACC"."UTRESTARTX" USING STOGROUP TEMPORA; COMMIT;

ALTER INDEX "DSNACC"."UTRESTART2X" USING STOGROUP TEMPORA; COMMIT;

ALTER INDEX "DSNACC"."UTTMDX01" USING STOGROUP TEMPORA; COMMIT;

ALTER INDEX "DSNACC"."UTTMPX01" USING STOGROUP TEMPORA; COMMIT;

.

.

etc.

4.1.4.2.1.5 SQL Statement Number 05

Storage groups in the target system still contain the high level qualifier of the source system. With thisstatement, you identify storage groups to be dropped at a later point in time with the following statement:

Statement

.Syntax001 SELECT ' DROP STOGROUP '

002 CONCAT STRIP(NAME,T,' ')

003 CONCAT '; COMMIT;'

004 FROM SYSIBM.SYSSTOGROUP

005 WHERE CREATOR <> 'SYSIBM'

006 AND NAME <> 'TEMPORA';

34 PUBLIC June 01, 2006

Page 41: SAP Netweaver 7.0 - System Copy Procedures - ABAP

4 System Copy Process

4.1 Database-Specific System Copy

Output

.Example

DROP STOGROUP SYSDEFLT; COMMIT;

DROP STOGROUP SAPU1I; COMMIT;

DROP STOGROUP SAPU1D; COMMIT;

DROP STOGROUP SAPSOI; COMMIT;

DROP STOGROUP SAPSOD; COMMIT;

DROP STOGROUP SAPESI; COMMIT;

DROP STOGROUP SAPESD; COMMIT;

DROP STOGROUP SAPPRI; COMMIT;

DROP STOGROUP SAPPRD; COMMIT;

DROP STOGROUP SAPLOI; COMMIT;

.

.

etc.

4.1.4.2.1.6 SQL Statement Number 06

With this statement, you identify storage groups to be created at a later point in time with the high levelqualifier of the target system. In this case, we assume that FR01 is the high level qualifier of the target system.

Statement

.Syntax001 SELECT ' CREATE STOGROUP '

002 CONCAT STRIP(NAME,T,' ')

003 CONCAT ' VOLUMES(''*'')'

004 CONCAT ' VCAT <FR01>; COMMIT;'

005 CONCAT '; COMMIT;'

006 FROM SYSIBM.SYSSTOGROUP

007 WHERE CREATOR <> 'SYSIBM'

008 AND NAME <> 'TEMPORA';

Storage Group Naming Conventions

Some storage group names may have to be adapted for all storage groups for which the creator is your SQLIDand not SAPR3. The naming convention is as follows:

ABAP Storage Group Naming Convention

Schema Storagegroup Name

SAPR3 SAP<SI><I|D>

other <SID><SI><I|D>

June 01, 2006 PUBLIC 35

Page 42: SAP Netweaver 7.0 - System Copy Procedures - ABAP

4 System Copy Process

4.1 Database-Specific System Copy

.Note

<SI> signifies the two-character STORAGEID of the table type (TABART).

Java Storage Group Naming Convention

Schema Storage Group Name

<schema> <schema>

.Caution

For Java, the schema name is also the name of the storage group. You must not change the nameof the storage group.

Output

.Example

CREATE STOGROUP SYSDEFLT VOLUMES('*') VCAT FR01; COMMIT;; COMMIT;

CREATE STOGROUP SAPU1I VOLUMES('*') VCAT FR01; COMMIT;; COMMIT;

CREATE STOGROUP SAPU1D VOLUMES('*') VCAT FR01; COMMIT;; COMMIT;

CREATE STOGROUP SAPSOI VOLUMES('*') VCAT FR01; COMMIT;; COMMIT;

CREATE STOGROUP SAPSOD VOLUMES('*') VCAT FR01; COMMIT;; COMMIT;

CREATE STOGROUP SAPESI VOLUMES('*') VCAT FR01; COMMIT;; COMMIT;

CREATE STOGROUP SAPESD VOLUMES('*') VCAT FR01; COMMIT;; COMMIT;

CREATE STOGROUP SAPPRI VOLUMES('*') VCAT FR01; COMMIT;; COMMIT;

CREATE STOGROUP SAPPRD VOLUMES('*') VCAT FR01; COMMIT;; COMMIT;

CREATE STOGROUP SAPLOI VOLUMES('*') VCAT FR01; COMMIT;; COMMIT;

CREATE STOGROUP SAPLOI VOLUMES('*') VCAT FR01; COMMIT;; COMMIT;

CREATE STOGROUP SAPLOD VOLUMES('*') VCAT FR01; COMMIT;; COMMIT;

.

.

etc.

4.1.4.3 SQL Statement Number 07

With this statement, you connect tablespaces with their previous storage groups, which now contain thehigh level qualifier of the target system.

36 PUBLIC June 01, 2006

Page 43: SAP Netweaver 7.0 - System Copy Procedures - ABAP

4 System Copy Process

4.1 Database-Specific System Copy

Statement

.Syntax001 SELECT ' ALTER TABLESPACE "'

002 CONCAT STRIP(A.DBNAME,T,' ')

003 CONCAT '"."'

004 CONCAT STRIP(A.TSNAME,T,' ')

005 CONCAT '" USING STOGROUP '

006 CONCAT STRIP(A.STORNAME,T,' ')

007 CONCAT ';COMMIT;'

008 FROM SYSIBM.SYSTABLEPART A,

009 SYSIBM.SYSTABLESPACE B,

010 SYSIBM.SYSDATABASE C

011 WHERE A.DBNAME=B.DBNAME

012 AND A.TSNAME=B.NAME

013 AND A.DBNAME=C.NAME

014 AND B.CREATOR <> 'SYSIBM'

015 AND C.TYPE <> 'W'

016 AND A.PARTITION=0;

Output

.Example

ALTER TABLESPACE "DSNRLST"."DSNRLS01" USING STOGROUP SYSDEFLT;COMMIT;

ALTER TABLESPACE "BCXXXC5E"."SYNCLOG" USING STOGROUP SAPD7DDB;COMMIT;

ALTER TABLESPACE "BCXXXC5E"."DDDBRTH" USING STOGROUP SAPD7DDB;COMMIT;

ALTER TABLESPACE "BCXXX3UT"."DDDBTAB" USING STOGROUP SAPD7DDB;COMMIT;

ALTER TABLESPACE "BCXXX3UT"."LDDDBT3U" USING STOGROUP SAPD7DDB;COMMIT;

ALTER TABLESPACE "BCXXX3UT"."DDDBRTX" USING STOGROUP SAPD7DDB;COMMIT;

ALTER TABLESPACE "BCXXXC5E"."JMSDMSG" USING STOGROUP SAPD7DDB;COMMIT;

ALTER TABLESPACE "CC390"."UTTEMPL" USING STOGROUP SYSDEFLT;COMMIT;

ALTER TABLESPACE "CC390"."UTPROC" USING STOGROUP SYSDEFLT;COMMIT;

ALTER TABLESPACE "CC390"."UTRSTRT" USING STOGROUP SYSDEFLT;COMMIT;

.

.

etc.

4.1.4.4 SQL Statement Number 08

With this statement, you connect indexes with their previous storage groups, which now contain the high levelqualifier of the target system.

June 01, 2006 PUBLIC 37

Page 44: SAP Netweaver 7.0 - System Copy Procedures - ABAP

4 System Copy Process

4.1 Database-Specific System Copy

Statement

.Syntax001 SELECT ' ALTER INDEX "'

002 CONCAT STRIP(IXCREATOR,T,' ')

003 CONCAT '"."'

004 CONCAT STRIP(IXNAME,T,' ')

005 CONCAT '" USING STOGROUP '

006 CONCAT STRIP (STORNAME,T,' ')

007 CONCAT ';COMMIT;'

008 FROM SYSIBM.SYSINDEXPART

009 WHERE IXCREATOR <> 'SYSIBM';

Output

.Example

ALTER INDEX "SAPD5Z"."SYSTBLSPß0" USING STOGROUP SYSDEFLT;COMMIT;

ALTER INDEX "SAPD5Z"."SYSTABLEß0" USING STOGROUP SYSDEFLT;COMMIT;

ALTER INDEX "SAPD5Z"."SYSIXPARTß0" USING STOGROUP SYSDEFLT;COMMIT;

ALTER INDEX "STEM"."DSNARL01" USING STOGROUP SYSDEFLT;COMMIT;

.

.

etc.

4.1.4.5 SQL Statement Number 09

With this statement, you identify all databases to be started after DB2 catalog manipulations:

Prerequisites

n Check if there threads

n Check for authorized utilities using the following:DISPLAY DATABASE(*) UTIL(*) and press [ENTER]

Your output should be:No authorized utility found.

If there are running utilties, you must shut them down properly before continuing.n Ensure that all DB2 objects of the source system are started RWmode.

This can be checked withDISPLAY DATABASE(*) SPACENAM(*)

with keywordRESTRICT.For more information, see DB2 UDB for z/OS and OS/390 Command Reference (SC26-9932-05).

n If there are no objects in pending status, the source system must be stopped.

38 PUBLIC June 01, 2006

Page 45: SAP Netweaver 7.0 - System Copy Procedures - ABAP

4 System Copy Process

4.1 Database-Specific System Copy

On the source system, run DSNJU004 to get information about START and END RBA of the LOG COPYDATASETS. For more information about the Print Log Map utility, see DB2 UDB for z/OS and OS/390 UtilityGuide and Reference (SC26-9945-04).

Statement

.Syntax001 //*

002 //* PRINT LOG MAP

003 //*

004 //JOBLIB DD DISP=SHR,DSN=D8A0.V810.SDSNLOAD

005 //KUCKMAL EXEC PGM=DSNJU004

006 //SYSUT1 DD DISP=SHR,DSN=D8A0.BSDS01

007 //SYSUT2 DD DISP=SHR,DSN=D8A0.BSDS02

008 //SYSPRINT DD SYSOUT=*

009 /*

Output

.Syntax001 .

002 .

003 .

004 GROUP NAME: ........

005 BSDS COPY 1 DATA SET NAME:

006 ............................................

007 BSDS COPY 2 DATA SET NAME:

008 ............................................

009 ENFM START RBA/LRSN: 000000000000

010 ACTIVE LOG COPY 1 DATA SETS

011 START RBA/TIME END RBA/TIME DATE LTIME DATA SET INFORMATION

012 -------------------- -------------------- -------- ----- --------------------

013 0034A0468000 0034AC7DFFFF 2003.106 12:12 DSN=D8A0.LOGCOPY1.DS01

014 2004.163 18:31:44.4 2004.163 20:14:45.7 PASSWORD=(NULL) STATUS=REUSABLE

015 0034AC7E0000 0034B8B57FFF 2003.106 12:12 DSN=D8A0.LOGCOPY1.DS02

016 2004.163 20:14:45.7 2004.163 20:37:23.1 PASSWORD=(NULL) STATUS=REUSABLE

017 0034B8B58000 0034C4ECFFFF 2003.106 12:12 DSN=D8A0.LOGCOPY1.DS03

018 2004.163 20:37:23.1 ........ .......... PASSWORD=(NULL) STATUS=REUSABLE

019 ARCHIVE LOG COPY 1 DATA SETS

020 NO ARCHIVE DATA SETS DEFINED FOR THIS COPY

021 ACTIVE LOG COPY 2 DATA SETS

022 NO ACTIVE DATA SETS DEFINED FOR THIS COPY

023 ARCHIVE LOG COPY 2 DATA SETS

024 NO ARCHIVE DATA SETS DEFINED FOR THIS COPY

025 .

026 .

027 .

028 etc.

June 01, 2006 PUBLIC 39

Page 46: SAP Netweaver 7.0 - System Copy Procedures - ABAP

4 System Copy Process

4.1 Database-Specific System Copy

.Note

Now, you must stop the source system.

4.1.4.6 Step 5: Printing the Bootstrap Data Sets

Prerequisites

The source system must be stopped at this point.

Statement

With this statement, you print the bootstrap data sets. You can use the output of this statement to manipulatethe bootstrap data sets in the target system.

.Syntax001 SELECT ' -START DATABASE ('

002 CONCAT STRIP(NAME,T,' ')

003 CONCAT ')'

004 FROM SYSIBM.SYSDATABASE

005 WHERE STGROUP <> ' '

006 AND TYPE <> 'W'

007 ORDER BY NAME;

Output

.Example

-START DATABASE (A000XAAA)

-START DATABASE (A000XAAB)

-START DATABASE (A000XAAC)

-START DATABASE (A000XAAD)

-START DATABASE (A000XAAE)

-START DATABASE (A000XAAF)

-START DATABASE (A000XAAG)

-START DATABASE (A000XAAH)

-START DATABASE (A000XAAI)

-START DATABASE (A000XAAJ)

-START DATABASE (A000XAAK)

-START DATABASE (A000XAAL)

.

.

etc.

4.1.4.7 Step 6: Making Copies of Source Data Sets

With these example scripts, you can make copies of the source data sets:

40 PUBLIC June 01, 2006

Page 47: SAP Netweaver 7.0 - System Copy Procedures - ABAP

4 System Copy Process

4.1 Database-Specific System Copy

.Syntax001 //*MODLOG DUMP DATABASES STARTING WITH A0 / DST

002 //*

003 //DMP0901 EXEC PGM=ADRDSSU,REGION=0M

004 //SYSPRINT DD SYSOUT=*

005 //DASD DD DSN=SYS4.DUMP.D8A0.PARTA0.QU040108,

006 // UNIT=(DASD,10),DISP=(NEW,CATLG,DELETE),

007 // SPACE=(CYL,(2000,200),RLSE)

008 //SYSIN DD *

009 DUMP -

010 OUTDD(DASD) -

011 DATASET( -

012 INCLUDE( -

013 D8A0.DSNDBC.A0*.** -

014 ) -

015 ) OPTIMIZE(3) COMPRESS -

016 ALLDATA(*) -

017 ALLEXCP

018 //*

.Syntax001 //*MODLOG DUMP DATABASES STARTING WITH A1 / DST

002 //*

003 //DMP0901 EXEC PGM=ADRDSSU,REGION=0M

004 //SYSPRINT DD SYSOUT=*

005 //DASD DD DSN=SYS4.DUMP.D8A0.PARTA1.QU040108,

006 // UNIT=(DASD,10),DISP=(NEW,CATLG,DELETE),

007 // SPACE=(CYL,(2000,200),RLSE)

008 //SYSIN DD *

009 DUMP -

010 OUTDD(DASD) -

011 DATASET( -

012 INCLUDE( -

013 D8A0.DSNDBC.A1*.** -

014 ) -

015 )OPTIMIZE(3) COMPRESS -

016 ALLDATA(*) -

017 ALLEXCP

018 //*

June 01, 2006 PUBLIC 41

Page 48: SAP Netweaver 7.0 - System Copy Procedures - ABAP

4 System Copy Process

4.1 Database-Specific System Copy

.Syntax001 //*MODLOG DUMP DATABASES STARTING WITH A2 / DST

002 //*

003 //DMP0901 EXEC PGM=ADRDSSU,REGION=0M

004 //SYSPRINT DD SYSOUT=*

005 //DASD DD DSN=SYS4.DUMP.D8A0.PARTA2.QU040108,

006 // UNIT=(DASD,10),DISP=(NEW,CATLG,DELETE),

007 // SPACE=(CYL,(2000,200),RLSE)

008 //SYSIN DD *

009 DUMP -

010 OUTDD(DASD) -

011 DATASET( -

012 INCLUDE( -

013 D8A0.DSNDBC.A2*.** -

014 ) -

015 ) OPTIMIZE(3) COMPRESS -

016 ALLDATA(*) -

017 ALLEXCP

018 //*

.Syntax001 //*MODLOG DUMP REST OF DATABASES / DST

002 //*

003 //DMP0901 EXEC PGM=ADRDSSU,REGION=0M

004 //SYSPRINT DD SYSOUT=*

005 //DASD DD DSN=SYS4.DUMP.D8A0.PARTREST.QU040108,

006 // UNIT=(DASD,10),DISP=(NEW,CATLG,DELETE),

007 // SPACE=(CYL,(2000,200),RLSE)

008 //SYSIN DD *

009 DUMP -

010 OUTDD(DASD) -

011 DATASET( -

012 INCLUDE( -

013 D8A0.DSNDBC.** -

014 ) -

015 EXCLUDE( -

016 D8A0.DSNDBC.A0*.** -

017 D8A0.DSNDBC.A1*.** -

018 D8A0.DSNDBC.A2*.** -

019 ) -

020 ) OPTIMIZE(3) COMPRESS -

021 ALLDATA(*) -

022 ALLEXCP

023 //*

42 PUBLIC June 01, 2006

Page 49: SAP Netweaver 7.0 - System Copy Procedures - ABAP

4 System Copy Process

4.1 Database-Specific System Copy

.Syntax001 //*MODLOG DUMP LOGS AND BSDS / DST

002 //*

003 //DMP0901 EXEC PGM=ADRDSSU,REGION=0M

004 //SYSPRINT DD SYSOUT=*

005 //DASD DD DSN=SYS4.DUMP.D8A0.PARTLOGS.QU040108,

006 // UNIT=(DASD,10),DISP=(NEW,CATLG,DELETE),

007 // SPACE=(CYL,(2000,300),RLSE)

008 //SYSIN DD *

009 DUMP -

010 OUTDD(DASD) -

011 DATASET( -

012 INCLUDE( -

013 D8A0.LOG*.** -

014 D8A0.BSD*.** -

015 ) -

016 ) OPTIMIZE(3) COMPRESS -

017 ALLDATA(*) -

018 ALLEXCP

019 //*

.Note

The source system can be restarted now. It is no longer needed for the following system copy process.

4.1.4.8 Step 7: Creating the Target System

With the following JCL jobs, you create the target system.In the first step, the dumps of the source system have to be restored. All data sets of the source system have

to be restored with the high level qualifier of the target system.

June 01, 2006 PUBLIC 43

Page 50: SAP Netweaver 7.0 - System Copy Procedures - ABAP

4 System Copy Process

4.1 Database-Specific System Copy

JCL ‒ Restore Examples

.Syntax001 //*

002 //* RESTORE ALL OBJECTS A0* / DIETMAR STEMMLER

003 //*

004 //RESTORE EXEC PGM=ADRDSSU

005 //*

006 //SYSPRINT DD SYSOUT=*

007 //DUMP DD DSN=SYS4.DUMP.D8A0.PARTA0.QU040108,

008 // DISP=SHR

009 //SYSIN DD *

010 RESTORE -

011 INDD(DUMP) -

012 DATASET( -

013 INCLUDE(**) -

014 ) -

015 RENUNC(D8B0) -

016 CATALOG

.Syntax001 //*

002 //* RESTORE ALL OBJECTS A1* / DIETMAR STEMMLER

003 //*

004 //RESTORE EXEC PGM=ADRDSSU

005 //*

006 //SYSPRINT DD SYSOUT=*

007 //DUMP DD DSN=SYS4.DUMP.D8A0.PARTA0.QU040108,

008 // DISP=SHR

009 //SYSIN DD *

010 RESTORE -

011 INDD(DUMP) -

012 DATASET( -

013 INCLUDE(**) -

014 ) -

015 RENUNC(D8B0) -

016 CATALOG

44 PUBLIC June 01, 2006

Page 51: SAP Netweaver 7.0 - System Copy Procedures - ABAP

4 System Copy Process

4.1 Database-Specific System Copy

.Syntax001 //*

002 //* RESTORE ALL OBJECTS A2* / DIETMAR STEMMLER

003 //*

004 //RESTORE EXEC PGM=ADRDSSU

005 //*

006 //SYSPRINT DD SYSOUT=*

007 //DUMP DD DSN=SYS4.DUMP.D8A0.PARTA2.QU040108,

008 // DISP=SHR

009 //SYSIN DD *

010 RESTORE -

011 INDD(DUMP) -

012 DATASET( -

013 INCLUDE(**) -

014 ) -

015 RENUNC(D8B0) -

016 CATALOG

.Syntax001 //*

002 //* RESTORE REST OF OBJECTS / DIETMAR STEMMLER

003 //

004 //RESTORE EXEC PGM=ADRDSSU

005 //*

006 //SYSPRINT DD SYSOUT=*

007 //DUMP DD DSN=SYS4.DUMP.D8A0.PARTREST.QU040108

008 // DISP=SHR

009 //SYSIN DD *

010 RESTORE -

011 INDD(DUMP) -

012 DATASET( -

013 INCLUDE(**) -

014 ) -

015 RENUNC(D8B0) -

016 CATALOG

June 01, 2006 PUBLIC 45

Page 52: SAP Netweaver 7.0 - System Copy Procedures - ABAP

4 System Copy Process

4.1 Database-Specific System Copy

.Syntax001 //*

002 //* RESTORE LOGS AND BSDS / DIETMAR STEMMLER

003 //*

004 //RESTORE EXEC PGM=ADRDSSU

005 //*

006 //SYSPRINT DD SYSOUT=*

007 //DUMP DD DSN=SYS4.DUMP.D8A0.PARTLOGS.QU040108,

008 // DISP=SHR

009 //SYSIN DD *

010 RESTORE -

011 INDD(DUMP) -

012 DATASET( -

013 INCLUDE(**) -

014 ) -

015 RENUNC(D8B0) -

016 CATALOG

4.1.4.9 Step 8a: Changing the Bootstrap Data Sets (BSDS)

Before starting the target system, the BSDS must be changed.Change the HLQ entry in the BSDS of the target system, using the HLQ D8B0:

.Syntax001 //*

002 //* CHANGE HLQ ENTRY IN BSDS / DIETMAR STEMMLER

003 //*

004 //* OLD HLQ WAS D8A0, NEW HLQ MUST BE D8B0

005 //*

006 //*//JOBLIB DD DISP=SHR,DSN=D8B0.V810.SDSNLOAD

007 //VERBIEGS EXEC PGM=DSNJU003

008 //SYSUT1 DD DISP=SHR,DSN=D8B0.BSDS01

009 //SYSUT2 DD DISP=SHR,DSN=D8B0.BSDS02

010 //SYSPRINT DD SYSOUT=*

011 //SYSIN DD *

012 NEWCAT VSAMCAT=D8B0

013 /*

Change the log entries in the BSDS. The START and END RBA information as of utility DSNJU004 have tobe used for the target system as follows:

46 PUBLIC June 01, 2006

Page 53: SAP Netweaver 7.0 - System Copy Procedures - ABAP

4 System Copy Process

4.1 Database-Specific System Copy

.Syntax001 //*

002 //* CHANGE LOG ENTRIES IN BSDS / DIETMAR STEMMLER

003 //*

004 //JOBLIB DD DISP=SHR,DSN=D8B0.V810.SDSNLOAD

005 //VERBIEGS EXEC PGM=DSNJU003

006 //SYSUT1 DD DISP=SHR,DSN=D8B0.BSDS01

007 //SYSUT2 DD DISP=SHR,DSN=D8B0.BSDS02

008 //SYSPRINT DD SYSOUT=*

009 //SYSIN DD *

010 DELETE DSNAME=D8A0.LOGCOPY1.DS01

011 DELETE DSNAME=D8A0.LOGCOPY1.DS02

012 DELETE DSNAME=D8A0.LOGCOPY1.DS03

013 NEWLOG DSNAME=D8B0.LOGCOPY1.DS01,COPY1,STARTRBA=0034A0468000,

014 ENDRBA=0034AC7DFFFF

015 NEWLOG DSNAME=D8B0.LOGCOPY1.DS02,COPY1,STARTRBA=0034AC7E0000,

016 ENDRBA=0034B8B57FFF

017 NEWLOG DSNAME=D8B0.LOGCOPY1.DS03,COPY1,STARTRBA=0034B8B58000,

018 ENDRBA=0034C4ECFFFF

019 /*

After changing the BSDS with these scripts, you can start the target system.

4.1.4.10 Step 8b: Start the Target System

When you start the DB2 target system for the very first time, the system is still working with the work filedatabase of the source system. However, access fails with insufficient access authority, as seen in the log.Partial example of a LOG when you start the target system for the first time:

June 01, 2006 PUBLIC 47

Page 54: SAP Netweaver 7.0 - System Copy Procedures - ABAP

4 System Copy Process

4.1 Database-Specific System Copy

.Syntax001 .

002 .

003 .

004 .

005 DSNR005I -D8B0 RESTART...COUNTS AFTER FORWARD 604

006 RECOVERY

007 IN COMMIT=0, INDOUBT=0

008 DSNR006I -D8B0 RESTART...COUNTS AFTER BACKWARD 605

009 RECOVERY

010 INFLIGHT=0, IN ABORT=0, POSTPONED ABORT=0

011 DSNP012I -D8B0 DSNPCNP0 - ERROR IN VSAM CATALOG 606

012 LOCATE FUNCTION FOR D8A0.DSNDBC.DSNDB07.DSN4K01.I0001.A001

013 CTLGRC=AAAAAA08

014 CTLGRSN=AAAAAA08

015 CONNECTION-ID=D8E0, CORRELATION-ID=003.RCRSC 02,

016 LUW-ID=*

017 IKJ56228I DATA SET D8A0.DSNDBC.DSNDB07.DSN4K01.I0001.A001 NOT IN CATALOG

018 OR CATALOG CAN NOT BE ACCESSED

019 DSNB207I -D8B0 DYNAMIC ALLOCATION OF DATA SET 608

020 FAILED. REASON=17080002.

021 DSNAME=D8A0.DSNDBC.DSNDB07.DSN4K01.I0001.A001

022 DSNT501I -D8B0 DSNITFFS RESOURCE UNAVAILABLE 609

023 CORRELATION-ID=D8E0

024 CONNECTION-ID=D8E0

025 LUW-ID=D8E0.D8E0.000000000000=0

026 REASON 00D70024

027 .

028 .

029 .

030 .

031 etc.

We strongly recommend that you maintain different RACF settings for different DB2 subsystems. If not,the target system has access to the data sets of the source system and the data of the source system couldbe changed by mistake.The work file database data must be changed later in the clone process.

4.1.4.11 Step 8c: Creating a New STOGROUP Using the HLQ of theTarget System

With this JCL job, you create a new STOGROUP using the HLQ of the target system (D8B0).

48 PUBLIC June 01, 2006

Page 55: SAP Netweaver 7.0 - System Copy Procedures - ABAP

4 System Copy Process

4.1 Database-Specific System Copy

.Syntax001 //JOBLIB DD DISP=SHR,

002 // DSN=D8B0.V710.SDSNLOAD

003 //*

004 //DSNTICU EXEC PGM=IKJEFT01,DYNAMNBR=20

005 //SYSTSPRT DD SYSOUT=*

006 //SYSPRINT DD SYSOUT=*

007 //SYSUDUMP DD SYSOUT=*

008 //SYSTSIN DD *

009 DSN SYSTEM(D8B0)

010 RUN PROGRAM(DSNTIAD) PLAN(DSNTIA71) PARM('RC0')

011 END

012 //SYSIN DD *

013 SET CURRENT SQLID='SAPR3';

014 CREATE STOGROUP TEMPORA1 VOLUMES('*') VCAT D8B0;

015 COMMIT;

4.1.4.12 Step 8d: Stopping Index Spaces

With this JCL job, you stop the appropriate index spaces.You find a list of index spaces in the output of SQL statement number 1 [page 30].

.Syntax001 //*

002 //* STOP DSNDB06 INDEXSPACES / DIETMAR STEMMLER

003 //*

004 //JOBLIB DD DISP=SHR,DSN=D8B0.V710.SDSNLOAD

005 //*

006 //*

007 //DSNTIST EXEC PGM=IKJEFT01,DYNAMNBR=20

008 //*

009 //SYSTSPRT DD SYSOUT=*

010 //SYSPRINT DD SYSOUT=*

011 //SYSUDUMP DD SYSOUT=*

012 //SYSTSIN DD *

013 DSN SYSTEM(D8B0)

014 -STOP DATABASE (DSNDB06) SPACENAM(SYSTBLSP)

015 -STOP DATABASE (DSNDB06) SPACENAM(SYSTABLE)

016 -STOP DATABASE (DSNDB06) SPACENAM(SYSIXPAR)

4.1.4.13 Step 8e: Changing the User-Defined Indexes in the DB2Catalog

After starting the target system, the user-defined indexes (the output of SQL statement number 1 [page 30]) in theDB2 catalog must be changed, working with the new HLQ of the target system D8B0. The following examplescript can be used to carry out this procedure.

June 01, 2006 PUBLIC 49

Page 56: SAP Netweaver 7.0 - System Copy Procedures - ABAP

4 System Copy Process

4.1 Database-Specific System Copy

Change the user defined DB2 catalog indexes using the new storage group TEMPORA.

.Example

//*

//* ALTER SAPR3 DB2 CATALOG INDEXES / DIETMAR STEMMLER

//*

//JOBLIB DD DISP=SHR,

// DSN=D8B0.V710.SDSNLOAD

//DSNTICU EXEC PGM=IKJEFT01,DYNAMNBR=20

//SYSTSPRT DD SYSOUT=*

//SYSPRINT DD SYSOUT=*

//SYSUDUMP DD SYSOUT=*

//SYSTSIN DD *

DSN SYSTEM(D8B0)

RUN PROGRAM(DSNTIAD) PLAN(DSNTIA71) PARM('RC0') -

LIBRARY('D8B0.V710.SDSNLOAD')

END

//SYSIN DD *

ALTER INDEX "SAPR3"."SYSTBLSP~0" USING STOGROUP TEMPORA;

ALTER INDEX "SAPR3"."SYSTABLE~0" USING STOGROUP TEMPORA;

ALTER INDEX "SAPR3"."SYSIXPART~0" USING STOGROUP TEMPORA;

COMMIT;

4.1.4.14 Step 8f: Restart the Index Spaces

At this point, you must restart the index spaces.

4.1.4.15 Step 8g: Creating the Temporary Files for the DB2 TargetSystem

Run part of DSNTIJTM to create temporary files for DB2. DSNTIJTM was generated by DSNTINST (optional) orconsists of a manually changed copy from another existing DB2 subsystem.

50 PUBLIC June 01, 2006

Page 57: SAP Netweaver 7.0 - System Copy Procedures - ABAP

4 System Copy Process

4.1 Database-Specific System Copy

.Syntax001 //DSNTIST EXEC PGM=IKJEFT01,DYNAMNBR=20

002 //STEPLIB DD DISP=SHR,DSN=D8B0.V810.SDSNLOAD

003 //SYSTSPRT DD SYSOUT=*

004 //SYSPRINT DD SYSOUT=*

005 //SYSUDUMP DD SYSOUT=*

006 //SYSTSIN DD *

007 DSN SYSTEM(D8B0)

008 -STOP DATABASE(DSNDB07)

009 RUN PROGRAM(DSNTIAD) PLAN(DSNTIA81) -

010 LIB('D8B0.V810.RUNLIB.LOAD')

011 -START DATABASE(DSNDB07)

012 END

013 //SYSIN DD *

014 DROP TABLESPACE DSNDB07.DSN4K01 ; COMMIT;

015 CREATE TABLESPACE DSN4K01 IN DSNDB07

016 BUFFERPOOL BP0

017 CLOSE NO

018 USING VCAT D8B0;

019 DROP TABLESPACE DSNDB07.DSN4K02 ; COMMIT;

020 CREATE TABLESPACE DSN4K02 IN DSNDB07

021 BUFFERPOOL BP0 CLOSE NO

022 .

023 .

Stop and restart the DB2 subsystem. The error as described in Step 5: Make Copies of the Sources Data Sets [page 40]should not occur since DB2 is working with the new temporary files.

4.1.4.16 Step 8h: Implementing HLQ of the Target System in theWork File Database

In the next step, the work file database is changed to use the new HLQ D8B0. Here you must drop work filedatabase DSNDB07 in the target system, delete the clusters for 4K and 32K and create them again.

Procedure

1. Stop and restart the target system. Error message IKJ56228I should not appear because DB2 is now workingwith its own work file database.The target system with the new HLQ D8B0 still works with storage groups using VCAT D8A0.In the following steps, the DB2 catalog is manipulated by stopping the databases, altering tablespaces andindexes, dropping and creating storage groups with the new VCAT D8B0, altering tablespaces and indexesusing the new storage groups, and starting all databases.The objects to be manipulated are identified by the results of previously described SQL statements.

2. Stop all databases

June 01, 2006 PUBLIC 51

Page 58: SAP Netweaver 7.0 - System Copy Procedures - ABAP

4 System Copy Process

4.1 Database-Specific System Copy

.Syntax001 //*

002 //* STOP ALL DATABASES / DIETMAR STEMMLER

003 //*

004 /*JOBPARM SYSAFF=*

005 //*

006 //JOBLIB DD DISP=SHR,DSN=D8B0.V710.SDSNLOAD

007 //*

008 //*

009 //DSNTIST EXEC PGM=IKJEFT01,DYNAMNBR=20

010 //*

011 //SYSTSPRT DD SYSOUT=*

012 //SYSPRINT DD SYSOUT=*

013 //SYSUDUMP DD SYSOUT=*

014 //SYSTSIN DD *

015 DSN SYSTEM(D8B0)

016 -STOP DATABASE (A000XAAP)

017 -STOP DATABASE (A000XABK)

018 -STOP DATABASE (A000XAEL)

019 -STOP DATABASE (A000XAFP)

020 -STOP DATABASE (A000XAFX)

021 .

022 .

023 .

024 etc.

3. Alter tablespaces using storage group TEMPORA

52 PUBLIC June 01, 2006

Page 59: SAP Netweaver 7.0 - System Copy Procedures - ABAP

4 System Copy Process

4.1 Database-Specific System Copy

.Syntax001 //*

002 //* ALTER TABLESPACES / DIETMAR STEMMLER

003 //*

004 /*JOBPARM SYSAFF=*

005 //JOBLIB DD DISP=SHR,DSN=D8B0.V710.SDSNLOAD

006 //*

007 //*

008 //*

009 //SYSTSPRT DD SYSOUT=*

010 //SYSPRINT DD SYSOUT=*

011 //SYSUDUMP DD SYSOUT=*

012 //SYSTSIN DD *

013 DSN SYSTEM(D8B0)

014 RUN PROGRAM(DSNTIAD) PLAN(DSNTIA71) PARM('RC0')

015 END

016 //SYSIN DD *

017 ALTER TABLESPACE A000XAAP.BDSLOIO7 USING STOGROUP TEMPORA1; COMMIT;

018 ALTER TABLESPACE A000XABK.MSSSOURC USING STOGROUP TEMPORA1; COMMIT;

019 ALTER TABLESPACE A000XAEL.ICONXGR USING STOGROUP TEMPORA1; COMMIT;

020 ALTER TABLESPACE A000XAFP.LANGOBJ USING STOGROUP TEMPORA1; COMMIT;

021 ALTER TABLESPACE A000XAF1.TWISPCXF USING STOGROUP TEMPORA1; COMMIT;

022 ALTER TABLESPACE A000XAGC.T5W8C USING STOGROUP TEMPORA1; COMMIT;

023 ALTER TABLESPACE A000XAGC.T5W8C USING STOGROUP TEMPORA1; COMMIT;

024 ALTER TABLESPACE A000XAGH.T681YXBM USING STOGROUP TEMPORA1; COMMIT;

025 ALTER TABLESPACE A000XAG6.ESLT USING STOGROUP TEMPORA1; COMMIT;

026 .

027 .

028 .

029 .

030 etc.

4. Alter indexes using storage group TEMPORA

June 01, 2006 PUBLIC 53

Page 60: SAP Netweaver 7.0 - System Copy Procedures - ABAP

4 System Copy Process

4.1 Database-Specific System Copy

.Syntax001 //*

002 //* ALTER INDEXES / DIETMAR STEMMLER

003 //*

004 /*JOBPARM SYSAFF=*

005 //JOBLIB DD DISP=SHR,DSN=D8B0.V710.SDSNLOAD

006 //*

007 //DSNTICR EXEC PGM=IKJEFT01,DYNAMNBR=20

008 //*

009 //SYSTSPRT DD SYSOUT=*

010 //SYSPRINT DD SYSOUT=*

011 //SYSUDUMP DD SYSOUT=*

012 //SYSTSIN DD *

013 DSN SYSTEM(D8B0)

014 RUN PROGRAM(DSNTIAD) PLAN(DSNTIA71) PARM('RC0')

015 END

016 //SYSIN DD *

017 ALTER INDEX SAPR3."SYSTBLSP~0" USING STOGROUP TEMPORA;

018 ALTER INDEX SAPR3."CDCLS~0" USING STOGROUP TEMPORA;

019 ALTER INDEX STEM."DSNARL01" USING STOGROUP TEMPORA;

020 ALTER INDEX DSNACC."UTLSTX01" USING STOGROUP TEMPORA;

021 ALTER INDEX DSNACC."UTPRCX01" USING STOGROUP TEMPORA;

022 ALTER INDEX DSNACC."UTPEX01" USING STOGROUP TEMPORA;

023 ALTER INDEX DSNACC."UTLEX01" USING STOGROUP TEMPORA;

024 ALTER INDEX DSNACC."UTTMPX01" USING STOGROUP TEMPORA;

025 .

026 .

027 .

028 etc.

5. Drop the storage groups

54 PUBLIC June 01, 2006

Page 61: SAP Netweaver 7.0 - System Copy Procedures - ABAP

4 System Copy Process

4.1 Database-Specific System Copy

.Syntax001 //*

002 //* DROP ALL STORAGEGROUPS (EXCLUDING TEMPORA1)

003 //* DIETMAR STEMMLER

004 //*

005 /*JOBPARM SYSAFF=*

006 //*

007 //JOBLIB DD DISP=SHR,DSN=D8B0.V710.SDSNLOAD

008 //*

009 //DSNTICR EXEC PGM=IKJEFT01,DYNAMNBR=20

010 //*

011 //SYSTSPRT DD SYSOUT=*

012 //SYSPRINT DD SYSOUT=*

013 //SYSUDUMP DD SYSOUT=*

014 //SYSTSIN DD *

015 DSN SYSTEM(D8B0)

016 RUN PROGRAM(DSNTIAD) PLAN(DSNTIA71) PARM('RC0')

017 END

018 //SYSIN DD *

019 DROP STOGROUP SYSDEFLT; COMMIT;

020 DROP STOGROUP SAPU1I; COMMIT;

021 DROP STOGROUP SAPSOI; COMMIT;

022 DROP STOGROUP SAPESI; COMMIT;

023 DROP STOGROUP SAPPRI; COMMIT;

024 DROP STOGROUP SAPLOI; COMMIT;

025 DROP STOGROUP SAPELI; COMMIT;

026 DROP STOGROUP SAPDOI; COMMIT;

027 DROP STOGROUP SAPDII; COMMIT;

028 .

029 .

030 .

031 etc.

6. Create the storage groups

June 01, 2006 PUBLIC 55

Page 62: SAP Netweaver 7.0 - System Copy Procedures - ABAP

4 System Copy Process

4.1 Database-Specific System Copy

.Syntax001 //*

002 //* CREATE NEW STORAGEGROUPS / DIETMAR STEMMLER

003 //*

004 /*JOBPARM SYSAFF=*

005 //JOBLIB DD DISP=SHR,DSN=D8B0.V710.SDSNLOAD

006 //*

007 //DSNTICR EXEC PGM=IKJEFT01,DYNAMNBR=20

008 //*

009 //SYSTSPRT DD SYSOUT=*

010 //SYSPRINT DD SYSOUT=*

011 //SYSUDUMP DD SYSOUT=*

012 //SYSTSIN DD *

013 DSN SYSTEM(D8B0)

014 RUN PROGRAM(DSNTIAD) PLAN(DSNTIA71) PARM('RC0')

015 END

016 //SYSIN DD *

017 SET CURRENT SQLID='SAPR3';

018 CREATE STOGROUP SYSDEFLT VOLUMES('*') VCAT D8B0; COMMIT;

019 CREATE STOGROUP SAPU1I VOLUMES('*') VCAT D8B0; COMMIT;

020 CREATE STOGROUP SAPSOI VOLUMES('*') VCAT D8B0; COMMIT;

021 CREATE STOGROUP SAPESI VOLUMES('*') VCAT D8B0; COMMIT;

022 CREATE STOGROUP SAPPRI VOLUMES('*') VCAT D8B0; COMMIT;

023 CREATE STOGROUP SAPLOI VOLUMES('*') VCAT D8B0; COMMIT;

024 CREATE STOGROUP SAPELI VOLUMES('*') VCAT D8B0; COMMIT;

025 .

026 .

027 .

028 .

029 etc.

7. Alter tablespaces using their previous storage group

56 PUBLIC June 01, 2006

Page 63: SAP Netweaver 7.0 - System Copy Procedures - ABAP

4 System Copy Process

4.1 Database-Specific System Copy

.Syntax001 //*

002 //* ALTER TABLESPACES / DIETMAR STEMMLER

003 //*

004 //* BACK TO PREVIOUS STORAGEGROUPS

005 //*

006 //*

007 /*JOBPARM SYSAFF=*

008 //JOBLIB DD DISP=SHR,DSN=D8B0.V710.SDSNLOAD

009 //*

010 //DSNTICR EXEC PGM=IKJEFT01,DYNAMNBR=20

011 //*

012 //SYSTSPRT DD SYSOUT=*

013 //SYSPRINT DD SYSOUT=*

014 //SYSUDUMP DD SYSOUT=*

015 //SYSTSIN DD *

016 DSN SYSTEM(D8B0)

017 RUN PROGRAM(DSNTIAD) PLAN(DSNTIA71) PARM('RC0')

018 END

019 //SYSIN DD *

020 ALTER TABLESPACE A000XAAP.BDSLOIO7 USING STOGROUP SAPSTD;COMMIT;

021 ALTER TABLESPACE A000XABK.MSSSOURC USING STOGROUP SAPSTD;COMMIT;

022 ALTER TABLESPACE A000XAEL.ICONXGR USING STOGROUP SAPSTD;COMMIT;

023 ALTER TABLESPACE A000XAFP.LANGOBJ USING STOGROUP SAPSTD;COMMIT;

024 ALTER TABLESPACE A000XAFX.T5D8E USING STOGROUP SAPSTD;COMMIT;

025 ALTER TABLESPACE A000XAF1.TWISPCXF USING STOGROUP SAPSTD;COMMIT;

026 ALTER TABLESPACE A000XAGC.T5W8C USING STOGROUP SAPSTD;COMMIT;

027 .

028 .

029 .

030 etc.

8. Alter indexes using their previous storage group

June 01, 2006 PUBLIC 57

Page 64: SAP Netweaver 7.0 - System Copy Procedures - ABAP

4 System Copy Process

4.1 Database-Specific System Copy

.Syntax001 /*JOBPARM SYSAFF=*

002 //JOBLIB DD DISP=SHR,DSN=D8B0.V710.SDSNLOAD

003 //*

004 //DSNTICR EXEC PGM=IKJEFT01,DYNAMNBR=20

005 //*

006 //SYSTSPRT DD SYSOUT=*

007 //SYSPRINT DD SYSOUT=*

008 //SYSUDUMP DD SYSOUT=*

009 //SYSTSIN DD *

010 DSN SYSTEM(D8B0)

011 RUN PROGRAM(DSNTIAD) PLAN(DSNTIA71) PARM('RC0')

012 END

013 //SYSIN DD *

014 ALTER INDEX SAPR3."SYSTBLSP~0" USING STOGROUP TEMPORA1; COMMIT;

015 ALTER INDEX SAPR3."CDCLS~0" USING STOGROUP SAPCLI; COMMIT;

016 ALTER INDEX STEM."DSNARL01" USING STOGROUP SYSDEFLT; COMMIT;

017 ALTER INDEX DSNACC."UTLSTX01" USING STOGROUP SYSDEFLT; COMMIT;

018 ALTER INDEX DSNACC."UTPRCX01" USING STOGROUP SYSDEFLT; COMMIT;

019 ALTER INDEX DSNACC."UTLEX01" USING STOGROUP SYSDEFLT; COMMIT;

020 ALTER INDEX DSNACC."UTTMPX01" USING STOGROUP SYSDEFLT; COMMIT;

021 ALTER INDEX DSNACC."UTTMPX01" USING STOGROUP SYSDEFLT; COMMIT;

022 .

023 .

024 .

025 etc.

58 PUBLIC June 01, 2006

Page 65: SAP Netweaver 7.0 - System Copy Procedures - ABAP

4 System Copy Process

4.1 Database-Specific System Copy

9. Start all databases

.Syntax001 //*

002 //* RESTART ALL DATABASES / DIETMAR STEMMLER

003 //*

004 //JOBLIB DD DISP=SHR,DSN=D8B0.V710.SDSNLOAD

005 //*

006 //DSNTIST EXEC PGM=IKJEFT01,DYNAMNBR=20

007 //*

008 //SYSTSPRT DD SYSOUT=*

009 //SYSPRINT DD SYSOUT=*

010 //SYSUDUMP DD SYSOUT=*

011 //SYSTSIN DD *

012 DSN SYSTEM(D8B0)

013 -START DATABASE (A000XAAP)

014 -START DATABASE (A000XABK)

015 -START DATABASE (A000XAEL)

016 -START DATABASE (A000XAFP)

017 -START DATABASE (A000XAFX)

018 -START DATABASE (A000XAF1)

019 -START DATABASE (A000XAGC)

020 -START DATABASE (A000XAGH)

021 -START DATABASE (A000XAG6)

022 -START DATABASE (A000XAIE)

023 .

024 .

025 .

026 etc.

If necessary, change the user authorizations of the target system. The DB2 catalog still contains theauthorizations of the source system.In addition, the WLM environments of the WLM-established stored procedures may have to be changed

if the target system is running with other WLM environments. Use the ALTER PROCEDURE statement asdescribed in the IBM documentation DB2 UDB for z/OS V8 SQL Reference.

Only valid for: DB2 UDB for iSeries

4.1.5 IBM DB2 for iSeries Specific Procedure

In an SAP system environment, you can create a homogeneous system copy of a DB2 database using theSAV/RSTLIB system copy method.

Advantage of the Offline System Copy Method

This method is faster than the database-independent method [page 62].For more information, see SAP Note 585277.

June 01, 2006 PUBLIC 59

Page 66: SAP Netweaver 7.0 - System Copy Procedures - ABAP

4 System Copy Process

4.1 Database-Specific System Copy

.Caution

You can only copy for IBM DB2 for iSeries.

End of: DB2 UDB for iSeries

Only valid for: MaxDB

4.1.6 MaxDB-Specific Procedure

In an SAP system environment, you can create a homogeneous copy of a MaxDB database by using the backupand restore method. This method is suitable for creating an exact copy of an existing database. The source ofthe 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 solution. In SAPinst you select the backup and restore method as the databaseinstallation method. SAPinst stops before the database instance initialization and asks you to perform therecovery on the target database. After you have performed recovery and post-recovery activities you cancontinue the installation in SAPinst.This description is not valid for the liveCache system copy.

Advantage

n You can use existing offline backups.n This method is faster than the database-independent method using R3load or Jload [page 62].

Disadvantage

You can only copy between systems with the same byte order. For more information, see below.

Prerequisites

n Byte order ‒ little-endian or big-endianYou can use the backup and restore method to copy systems with the same byte order. That is, you cancopy a system based on little-endian to another system based on little-endian. You can also copy a systembased on big-endian to another system based on big-endian. Check SAP Note 552464 to find out whichprocessor and operating system combination uses which byte order.

n Data backupYou perform the complete data backup of your source database.

n Recovery toolYou 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:l dev.mysql.com/doc ® MaxDB by MySQL ® MaxDB Online Library ® Toolsl help.sap.com/nw2004s ® SAP NetWeaver Library ® SAP NetWeaver by Key Capability ® Databases ®

MaxDB ® Tools ® Database Manager GUI

60 PUBLIC June 01, 2006

Page 67: SAP Netweaver 7.0 - System Copy Procedures - ABAP

4 System Copy Process

4.1 Database-Specific System Copy

n Database SoftwareThe 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 versionon the source host.

n Size of the data on the target systemThe size of the target system must be greater than the used space on the source system. You can find thesize 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. To get the usedspace in MB, divide this value by 128. When SAPinst prompts you, configure the database data volumesaccording to this value.

n JREYou must have installed JRE version 1.4.1 or higher on your system.The JAVA_HOME environment variable must point to the JRE directory.

Process

1. You do the following on the source system:a) If you do not already have a suitable recent completeMaxDB backup, 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) To install the new system you start SAPinst as follows:SAP NetWeaver 2004s ® Lifecyle Management ® System Copy ® MaxDB ® Target System ® <Central System |Distributed System | High-Availability System> .During the installation of the database instance, SAPinst stops before database initialization in the screenPerform Database Recovery and asks you to perform the data recovery.

b) You start the data recovery wizard from DBMGUIA) You register your database instance in the DBMGUIB) You check the database instance in the admin state.C) You choose Recovery ® Recovery with Initialization ...D) In type of recovery you select Restore a medium.E) You specify the backup medium.F) You start the restore procedure.

.Note

The recovery wizard does not start the recovery immediately. It initializes the database instancefirst. 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 toonline if it is not already in online state.

June 01, 2006 PUBLIC 61

Page 68: SAP Netweaver 7.0 - System Copy Procedures - ABAP

4 System Copy Process

4.2 Database Independent System Copy

d) You delete the entries from the following tables to make sure that information about the backup historyfor update statistics in the Computing Center Management System (CCMS) from the old systemdoes not appear in the new system:CNHIST, CNREPRT, CNMEDIA, DBSTATHADA, DBSTAIHADA, DBSTATIADA, DBSTATTADA, SDBAADAUPD

e) You reload the system tables in the target system as follows:dmbcli —d <NEW_DBSID> —u control,<password> load_systab —u superdba,<password> —ud

domain

.Note

Make sure that the database is online and the Xserver is up and running before continuing withSAPinst, as in the next step.

f) You continue with SAPinst or restart it if you stopped it during the recovery.g) After installation is completed you maintain the database connection for CCMS. For more information,

see SAP Note 588515.

End of: MaxDB

4.2 Database Independent System Copy

With the SAP installation tool SAPinst, you can export and import your database in a database-independentformat. SAPinst uses the R3load tool.R3load generates a database export of all SAP objects that are defined in the ABAP Dictionary and archives

the configuration and components in the file system.

Constraints

R3load and Jload Restrictions

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

n For a consistent database export, no transactions on export-relevant database objects are allowed duringthe export. Otherwise, the export has to be restarted. Therefore, it is recommended to shutdown the SAPsystem (excluding the database!) for the export. The database must still be running.

n R3load only: Changes to database objects that cannot be maintained in the ABAP Dictionary (transactionSE14), such as the distribution of tables over several tablespaces or dbspaces, are lost after the system copy.

n R3load only: Indexes longer than 18 characters are not allowed on the database to be exported.

System Copy Tools

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

n If the target system already exists and if you do not plan to perform an MCOD installation, deletethe database on the target system before the import according to the corresponding description in sectionAdditional Information of the installation documentation for your SAP component.

62 PUBLIC June 01, 2006

Page 69: SAP Netweaver 7.0 - System Copy Procedures - ABAP

4 System Copy Process

4.2 Database Independent System Copy

If the database configuration of your database is stored in the file system, we recommend you to back upthese configuration files before deleting the database.

Splitting STR Files

n During the standard system copy process, all tables of the SAP system are grouped into packages, wherebyall tables with the same “data class” belong to the same package. The processing unit for one unload/loadprocess is a package. The packages usually differ in number and size of contained tables, resulting in varyingunload/load runtimes. The overall runtime can be reduced by creating packages of the same “size”, that is,creating packages with a similar processing time. You can achieve this by splitting the default packages (onepackage per data class) into more and smaller pieces.

n There are several options of how to split packages. For a detailed description of the options, see the F1 helpabout 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.

n “Splitting of STR Files” is part of the “Advanced Export Parameters” and is disabled by default. If you selectthe splitting option and unless you did not already perform some tests, using the splitting tool parametersselected by SAPinst is a good starting point.

.Caution

If you want to split STR files, youmust first create the EXT files for the target database system. Youcan find the EXT files in your export dump directory, subdirectory DB/<DBTYPE>, for example DB/ORA.

Process Flow

n On UNIX, see System Copy Procedure on UNIX [page 63]n On Windows, see System Copy Procedure on Windows [page 65]n On IBM eServer iSeries, see System Copy Procedure on IBM eServer iSeries [page 66]

Only valid for: UNIX

4.2.1 System Copy Procedure on UNIX

This section describes the system copy procedure using R3load for Oracle, IBM DB2 UDB for UNIX andWindows, IBM DB2 UDB for z/OS, and MaxDB on UNIX platforms.

Process Flow on the Source System (Export)When performing the export you create a MIGRATION EXPORT CD image, which contains the data of theexported system, and which you use to install the target system.Follow the sequence of steps described in the process flows below for a:

n Central Systemn Distributed Systemn High-Availability System

Central SystemTo perform the export for a central system, you need to proceed as follows on the central system host:

June 01, 2006 PUBLIC 63

Page 70: SAP Netweaver 7.0 - System Copy Procedures - ABAP

4 System Copy Process

4.2 Database Independent System Copy

1. Heterogeneous system copy: You generate the migration key on SAP Service Marketplace atservice.sap.com/migrationkey. Enter the installation number of your source system when prompted.

2. Perform the export on the central system host:a) You make sure that the QCM tables are deleted from your system as described in Technical Preparations

[page 11].b) You generate DDL statements [page 70].c) You run SAPinst [page 71] to prepare the source system for parallel export/import (optional).

In SAPinst choose the installation service Export Preparation.d) You run SAPinst [page 71] to export the database instance.

In SAPinst choose the installation service Database Instance Export.

.Note

If R3load processes fail due to an error, solve the problem and perform the restart as describedin Restarting R3load Processes [page 84].

Result

You have finished this part of the system copy. To complete the system copy, you have to perform the stepsin Setting Up the Target System Using SAPinst [page 84].

Distributed System or High-Availability SystemTo perform the export for a distributed system, you need to proceed as follows:

1. Heterogeneous system copy: Generate the migration key on SAP Service Marketplace atservice.sap.com/migrationkey. Enter the installation number of your source system when prompted

2. Perform the export on the database instance host:a) You make sure that the QCM tables are deleted from your system as described in Technical Preparations

[page 11].b) You generate DDL statements [page 70].c) You run SAPinst [page 71] to prepare the source system for parallel export/import (optional).

In SAPinst choose the installation service Export Preparation.d) You run SAPinst [page 71] to export the database instance.

In SAPinst choose the installation service Database Instance Export.

.Note

If R3load processes fail due to an error, solve the problem and perform the restart as describedin Restarting R3load Processes [page 84].

.Caution

If your database instance is running on HP PA-Risc, you must proceed as described in SAP Note884452.

Result

You finished this part of the system copy. To complete the system copy, you have to perform the steps inSetting Setting Up the Target System Using SAPinst [page 84].End of: UNIX

64 PUBLIC June 01, 2006

Page 71: SAP Netweaver 7.0 - System Copy Procedures - ABAP

4 System Copy Process

4.2 Database Independent System Copy

Only valid for: Windows

4.2.2 System Copy Procedure on Windows

This section describes the system copy procedure using R3load for an ABAP system on Windows.When performing the export you create a MIGRATION EXPORT CD image, which contains the data of

the exported system, and which you use to install the target system.Follow the sequence of the steps described in the process flows below for exporting a:

n Central systemn Distributed system or High-Availability system

Process

n Central System1. a) Heterogeneous system copy: You generate the migration key on SAP Service Marketplace at

service.sap.com/migrationkey. Enter the installation number of your source system whenprompted.

b) You make sure that the QCM tables are deleted from your system as described in Technical Preparations[page 11].

c) You generate DDL statements [page 70].d) If required, you run SAPinst [page 76] to prepare the source system for parallel export/import. In

SAPinst choose the installation service Export Preparation.2. On the central system host, you run SAPinst [page 76] to export the source database.

In SAPinst choose the installation service Database Instance Export.

.Note

If the R3load processes fail due to an error, solve the problem and restart them as describedin Restarting R3load Processes [page 84].

n Distributed System or High-Availability System1. a) For a heterogeneous system copy, you generate the migration key on SAP Service Marketplace

at service.sap.com/migrationkey.Enter the installation number of your source system when prompted.

b) On the database instance host, you make sure that the QCM tables are deleted from your systemas described in Technical Preparations [page 11].

c) On the database instance host, you generate DDL statements [page 70].d) If required, on the database instance host, you run SAPinst [page 76] to prepare the source system

for parallel export/import.In SAPinst choose the installation service Export Preparation.

2. On the database instance host, you run SAPinst [page 76] to export the source database: You choose theinstallation service Database Instance Export.

End of: Windows

June 01, 2006 PUBLIC 65

Page 72: SAP Netweaver 7.0 - System Copy Procedures - ABAP

4 System Copy Process

4.2 Database Independent System Copy

Only valid for: iSeries

4.2.3 System Copy Procedure on IBM eServer iSeries

Purpose

This section describes the R3load and Jload system copy procedure for IBM DB2 UDB on iSeries.

Procedure

1. Heterogeneous system copy: Generate the migration key on SAP Service Marketplace atservice.sap.com/migrationkey. Enter the installation number of your source system when prompted.

2. Prepare the Windows Host for the SAP System Installation [page 66].3. Prepare a Windows User Account and iSeries User Profile [page 67].4. Install TMKSVR and Creating an Installation Share [page 67].5. Generate DDL statements [page 70].6. Run SAPinst to Export the Database [page 80].7. Set Up the Target System [page 84].

Result

You have finished this part of the system copy. To complete the system copy, you have to perform the stepsin Follow-Up Activities [page 89].

4.2.3.1 Preparing the Windows Host for the SAP System Installation

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

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

n Necessary operating system versions: Windows NT/2000/2003/XPn 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.n Set the system path if you install on Windows.

ProcedureThe SAP J2EE Engine requires a Java Development Kit (Java™ 2 SDK, Standard Edition). Therefore, make surea valid JDK version is installed on every host on which you want to install an SAP instance including theSAP 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 SAP J2EE Engine, see SAP Service Marketplace atservice.sap.com/platforms ® Product Availability Matrix ® SAP NetWeaver ® SAP NetWeaver '04 ® JSE Platforms

66 PUBLIC June 01, 2006

Page 73: SAP Netweaver 7.0 - System Copy Procedures - ABAP

4 System Copy Process

4.2 Database Independent System Copy

.Note

n JDK is not part of the SAP shipment. If necessary, you need to download and install it.

n To check the version of an already installed JDK, enter:java -version

n If you have more than one Java Virtual Machine (JVM) installed on your system (for example, you havetwo JDKs with different versions installed), make sure that the JAVA_HOME environment variable is setto the valid <JAVA_HOME> directory. Make sure that %JAVA_HOME%\bin is included in your system path.

Only valid for: iSeries OS/400 DB2 UDB for iSeries

4.2.3.2 Preparing a Windows User Account and iSeries User Profile

For the installation you need to create a user account on your Windows installation host and a user profile onthe iSeries you want to install.The following requirements apply:

n The iSeries user profile and the Windows user account must have the same name and password.n The iSeries user profile must have user class *SECOFR and all special authorities that belong to user QSECOFR.n The Windows user account must have administrator rights on the Windows installation host.

.Note

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

Windows:

1. Create a local user.2. In the field User name, enter your installation user name, for example, SAPINST.3. In the fields Password and Confirm password, enter the password SAP.4. Deselect User must change password at next logon.5. 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)

End of: iSeries OS/400 DB2 UDB for iSeries

Only valid for: iSeries OS/400 DB2 UDB for iSeries

4.2.3.3 Installing TMKSVR and Creating an Installation Share

The TMKSVR is the interface between iSeries and Windows for the installation with SAPinst. SAPinst is runningon Windows, but has to install the product on iSeries. This means that all actions required for iSeries are

June 01, 2006 PUBLIC 67

Page 74: SAP Netweaver 7.0 - System Copy Procedures - ABAP

4 System Copy Process

4.2 Database Independent System Copy

initiated remotely on Windows but executed locally using the TMKSVR. The communication is done usingTCP/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

n An FTP server running on iSeriesn You must prepare a user. For more information on how users are prepared, see Preparing a Windows User

Account and iSeries User Profile [page 67].n The Installation Master DVDmust be inserted in the DVD drive of your Windows host.

Procedure

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

.Note

This user must have the same user ID and password as the user that you are using for the installationon iSeries (a user with administrator rights similar to QSECOFR).

2. Run SETUP.EXE from the directory IM_OS400_PPC64\TMKSVR on the DVD containing the installationpackage. You can start the setup program by double-clicking on it in the Windows Explorer.The following dialog box appears:

68 PUBLIC June 01, 2006

Page 75: SAP Netweaver 7.0 - System Copy Procedures - ABAP

4 System Copy Process

4.2 Database Independent System Copy

Figure 1:

3. Enter the following values:n iSeries Hostname:

Enter the name of the iSeries host where you want to install TMKSVR.n iSeries Administrator (QSECOFR or similar):

Enter the iSeries user. For more information, see Preparing a Windows User Account and iSeries User Profile[page 67].

n TMKSVR instance number:Leave the value at 0.

n 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 duringinstallation because the port is in use.

ResultThe installation uses FTP to install and starts the TMKSVR on iSeries. During installation, a library namedTMKSVR<nn> is created, with <nn> being the instance number (for example, TMKSVR00).A NetServer share named ROOTBIN will be created on the iSeries host. You can map the share now to your

Windows PC or let SAPinst map it during the installation.For more information, see the documentation INSTALL.PDF on the DVD in directory

IM_OS400_PPC64\TMKSVR.End of: iSeries OS/400 DB2 UDB for iSeries

End of: iSeries

June 01, 2006 PUBLIC 69

Page 76: SAP Netweaver 7.0 - System Copy Procedures - ABAP

4 System Copy Process

4.2 Database Independent System Copy

4.2.4 Generating DDL statements

To migrate non-standard database objects, you need to generate DDL statements using the ABAP reportSMIGR_CREATE_DDL.You must perform this procedure before starting SAPinst.

Procedure

1. Log on to the system as a system administrator in the productive BI-ABAP-client.2. Call transaction SE38 and run the program SMIGR_CREATE_DDL.3. Select the target database. Depending on the database manufacturer, you might need to select the database

version. The value help supports you in selecting the database version. In general, you should not enter adatabase version that is not available in the value help.

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

5. Specify an empty working directory to which the files generated by the report are to be written.6. If required, you can restrict the generation of DDL statements to specific table types or individual tables.7. Execute the program.

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

.Caution

If no database-specific objects exist in the database, no SQL files will be generated. As long as the reportterminates with status “successfully”, this is not an error.

For additional database-specific information, see also SAP Note 888210.

4.2.5 Preparing the Export

Optionally you can prepare the source system for the export using R3load and Jload, so as to enable parallelexport/import. For this purpose you need to create certain files.The following steps are performed:

n Creating the export directory structuren Creating database structure files (*.STR)n Updating database statistics (…)n Size calculation for the target database (*.EXT,DBSIZE.XML)

These export preparations are required, if:

n You want to build up the target system to the point where the database load starts, before the export ofthe source system has finished.

n Export and import processes should run in parallel during the system copy process.

Procedure

1. You run SAPinst [page 71] to perform the service Export Preparation.

70 PUBLIC June 01, 2006

Page 77: SAP Netweaver 7.0 - System Copy Procedures - ABAP

4 System Copy Process

4.3 Exporting the Source System Using SAPinst

2. As soon as the export preparations have finished successfully, call the migration monitor with the FTP CopyOptions to transfer the generated files to the target database instance.

.Note

For more information, see the documentationMigration Monitor ‒ User’s Guide in the MIGMON.SAR archiveon the SAP Installation Master DVD.

4.3 Exporting the Source System Using SAPinst

Here you can find information about how to run SAPinst to perform the export on the source system:

n Running SAPinst on UNIX [page 71]n Running SAPinst on Windows [page 76]n Running SAPinst on IBM eServer iSeries [page 80]

Only valid for: UNIX

4.3.1 Running SAPinst on UNIX to Perform the Export

.Caution

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

This procedure tells you how to run SAPinst to export the database of your SAP system. SAPinst includes aSAPinst GUI and a GUI server, which both use Java.This section describes an export where SAPinst, SAPinst GUI, and the GUI server are running on the same

host. If required, you can instead perform a remote export with SAPinst [page 112], where SAPinst GUI is running ona separate host from SAPinst and the GUI server.When you start SAPinst, SAPinst GUI and the GUI server are also started. SAPinst GUI connects using a

secure SSL connection to the GUI server and the GUI server connects to SAPinst.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.

Prerequisites

n The SAPinst Self-Extractor extracts the SAPinst executables to the temporary directory. These executablesare deleted again after SAPinst has stopped running. If required, you can terminate SAPinst and the SAPinstSelf-Extractor by pressing Ctrl+C .

.Caution

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

n Make sure that you have at least 60 MB of free space in the installation directory for each installation service.In addition, you need 200 MB free space for the SAPinst executables. If you cannot provide 200 MB free

June 01, 2006 PUBLIC 71

Page 78: SAP Netweaver 7.0 - System Copy Procedures - ABAP

4 System Copy Process

4.3 Exporting the Source System Using SAPinst

space in the temporary directory, you can set one of the environment variables TEMP,TMP, or TMPDIR toanother directory with 200 MB free space for the SAPinst executables.

n Make sure that the DISPLAY environment variable is set to <host_name>:0.0, where <host_name> is thehost where the SAPinst GUI is displayed.

n Make sure that your SAPINST_JRE_HOME environment variable is set to a valid Java Runtime Environment(JRE).

n

Only valid for: AIX

If the operating system is AIX 64-bit, make sure that the PATH variable points to a JDK/JRE for AIX 64-bit.End of: AIX

n Before starting the export, make sure that you have at least the same amount ofdisk space available in /sapmnt/<SAPSID>/<InstanceName>/SMD/program as is used in/sapmnt/<SAPSID>/<InstanceName>/SMD/root/origin.During the export, some archives are written to the program sub-directories and SAPinst aborts if there isnot enough space.

n

Only valid for: DB2 UDB for UNIX and Windows

Before you start the export of the existing SAP System, you have to download the current versionof R3szchk from SAP Service Marketplace at service.sap.com/patches and copy it to directory/usr/sap/<>/SYS/exe/run/.End of: DB2 UDB for UNIX and Windows

1. Log on to your host as user root.

.Caution

Make sure that the root user has not set any environment variables for a different SAP system ordatabase.

2. Mount the Installation Master DVD.For more information on mounting DVDs, see sectionMounting a CD / DVD for <your OS> in the installationguide of your SAP solution.

.Note

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

3. Start SAPinst from the SAP Installation Master DVD in one of the following ways:n Using the default installation directory (recommended) Enter the following commands:

cd <Installation_Master_DVD>/IM_<OS> ./sapinst

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

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

72 PUBLIC June 01, 2006

Page 79: SAP Netweaver 7.0 - System Copy Procedures - ABAP

4 System Copy Process

4.3 Exporting the Source System Using SAPinst

n Make sure that your operating system does not delete the contents of the temporary directory /tmpor the contents of the directories to which the variables TEMP, TMP, or TMPDIR point, for example, byusing a crontab entry.

n Make sure that your current working directory is not an IM_<OS> directory belonging to anotheroperating system.

.Example

For example, the following causes an error:$ cd /sapcd2/IM_HPUX_IA64$ /sapcd2/IM_HPUX_PARISC/sapinstTo correct this enter the following:$ cd /sapcd2/IM_HPUX_PARISC$ /sapcd2/IM_HPUX_PARISC/sapinst

n During the installation, the default ports 21200 and 21212 are used for communication between SAPinst,GUI server, and SAPinst GUI. SAPinst uses port 21200 to communicate with the GUI server.The GUI server uses port 21212 to communicate with SAPinst GUI. You get an error message if one ofthese ports is already in use by another service.In this case, you must execute SAPinst using the parameter:SAPINST_DIALOG_PORT=<free_port_number_sapinst_gui_to_gui_server> \

GUISERVER_DIALOG_PORT=<free_port_number_gui_server_to_sapinst_gui.

.Note

For a list of all available SAPinst properties, enter the following command: sapinst —p.

SAPinst GUI normally starts automatically by displaying theWelcome screen.4. In theWelcome screen, choose Additional Software Life-Cycle Tasks ® System Copy ® <database> ® Source System ®

<Distribution option> ® Based on <AS ABAP and AS Java | AS Java | AS ABAP>5. Select the corresponding installation service from the tree structure according to the sequence of the

process flow for the system copy procedure that you want to perform:n Database-specific system copy procedure [page 15]n Database-independent system copy procedure [page 62]

.Caution

Make sure that you choose the installation services exactly in the order they appear for each systemvariant.

6. The following table provide an overview about the available installation services available for the export of a:n Central systemn Distributed system or high-availability system

June 01, 2006 PUBLIC 73

Page 80: SAP Netweaver 7.0 - System Copy Procedures - ABAP

4 System Copy Process

4.3 Exporting the Source System Using SAPinst

Export Services for a Central System

Export Service Remarks

Export Preparation

.NoteYou do not perform this step if you use thedatabase-specific method.

Optional step for preparing the export of a SAPNetWeaver2004s SR1 system.SAPinst performs the following steps:n Creates the export directory structuren Creates database structure files (*.STR)n Updates database statistics (…)n Calculates the size of the target database

(*.EXT,DBSIZE.XML)

Database Instance Export

.NoteYou do not perform this step if you use thedatabase-specific method.

Mandatory step for database-independent system copyprocedure. SAPinst performs the following steps:n Creates the export directory structuren Creates database structure files (*.STR)n Updates database statistics (…)n Calculates the size of the target database

(*.EXT,DBSIZE.XML)n Exports the ABAP database content

Export Services for a Distributed System or a High-Availability System

Export Service Remarks

Export Preparation

.NoteYou do not perform this step if you usethe database-specific method.

Optional step for the database-independent system copyprocedure to prepare the export of a SAP NetWeaver 2004sSR1 system.You need to perform this step on the database instancehost.SAPinst performs the following steps:n Creates the export directory structuren Creates database structure files (*.STR)n Updates database statistics(…)n Calculates the size of the target database

(*.EXT,DBSIZE.XML)

Database Instance Export

.Noten You do not perform this step if you

use the database-specific method.

Mandatory step for the database-independent systemcopy procedure.You need to perform this step on the database instancehost.SAPinst performs the following steps:n Creates the export directory structure with label filesn Creates database structure files (*STR)n Updates database statisticsn Calculates the size of the target database

(*EXT,DBSIZE.XML)n Exports the database content

7. After you have selected the required installation service, choose Next.

74 PUBLIC June 01, 2006

Page 81: SAP Netweaver 7.0 - System Copy Procedures - ABAP

4 System Copy Process

4.3 Exporting the Source System Using SAPinst

.Note

If you generated SQL files with DDL statements (see Generating DLL Statements [page 70]), copy thegenerated files into the SAPinst installation directory as soon as it has been created by SAPinst. Theinstallation directory will have been created as soon as the first input screen appears.

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

.Note

For more information about input parameters in SAPinst, position the cursor on the parameterfield and choose F1 .

9. Database-specific procedures only: On the screen SAP System > Database Export choose option System CopyMethod ® Use database specific tools.After you have entered all required input parameters, SAPinst starts the export and displays the progressduring the processing phase.

Troubleshooting

.Caution

If an export process aborts due to a hardware failure (for example, file system full), you have to repeat theexport 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 statusflag 'xeq' or 'err' set.

n If there is not enough disk space in the export directory, the R3load database export fails. You can then finderror 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 exportdirectory is located to a different file system during the export. Currently it is not possible to automaticallydistribute the export over different file systems.

n If an error occurs during the dialog phase, SAPinst:l Stops the export.l 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.

n If an error occurs during the processing phase, SAPinst:l Stops the export.l Displays a dialog that informs you about the error.You can now:l Directly view the log file by choosing View Logs.l Try to solve the problem.l Continue the export by choosing Retry.l Abort the export by choosing OK.

n System Copy - export on UNIX (especially for upgraded systems)Symptom:

June 01, 2006 PUBLIC 75

Page 82: SAP Netweaver 7.0 - System Copy Procedures - ABAP

4 System Copy Process

4.3 Exporting the Source System Using SAPinst

Processes started as <sid>adm or ora<sid> OS users cannot create or open files in the installation directory.Reason:Only members of sapinst UNIX group can access the installation directory.This group is created first by SAPinst starting from NW 2004s SR1.Solution:Associate <sid>adm and ora<sid> OS users with sapinst group manually if this association is missing.Verify /etc/group file and check if sapinst group exists and OS users are members of this group.If sapinst group does not exist yet, start SAPinst. SAPinst will create this group during startup beforeproduct catalog list will be displayed.Edit /etc/group file and associate OS users with sapinst group.Continue with the export.

See also Interrupted Installation with SAPinst [page 109].End of: UNIX

Only valid for: Windows

4.3.2 Running SAPinst on Windows to Perform the Export

.Caution

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

You use this procedure to run SAPinst to export the database of your SAP system. The following describes astandard export, that is, SAPinst, SAPinst GUI, and the GUI server are running on the same host.If required, you can instead perform a remote export where SAPinst GUI is running on a separate Windows

or UNIX host from SAPinst and the GUI server. For more information, also see Performing a Remote Installation withSAPinst [page 112].Note the following about SAPinst:

n When you start SAPinst, SAPinst GUI and the GUI server also start. SAPinst GUI connects using a secureSSL connection to the GUI server and the GUI server connects to SAPinst.

n SAPinst normally creates the installation directory sapinst_instdir, where it keeps its log files, and whichis located directly below the Program Files directory. If SAPinst is not able to create sapinst_instdirdirectly below the Program Files directory, SAPinst tries to create sapinst_instdir in the directorydefined by the environment variable TEMP.

n SAPinst creates a subdirectory for each installation service, called<sapinst_instdir>\<installation_service> which is located below %ProgramFiles%\sapinst_instdir.

n The SAPinst Self-Extractor extracts the executables to a temporary directory (TEMP, TMP, TMPDIR, orSystemRoot). 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, whichmight be useful if an error occurs.

76 PUBLIC June 01, 2006

Page 83: SAP Netweaver 7.0 - System Copy Procedures - ABAP

4 System Copy Process

4.3 Exporting the Source System Using SAPinst

.Caution

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

n If you want to terminate SAPinst and the SAPinst Self-Extractor, do one of the following:l Right-click the icon for the SAPinst output window located in the Windows tray and choose Exit.l Click the icon for the SAPinst output window located in the Windows tray and choose File ® Exit .

Prerequisites

n You are logged on as user with the required rights and privileges that authorize you to install the SAPinsttool and the SAP system. For more information, see section Granting User Rights for the Installation in yourinstallation guide.

n You need at least 50 MB of free space in the installation directory for each ABAP installation service, and atleast 130 MB of free space in the installation directory for each Java installation service. In addition, youneed 60 - 200 MB free space for the SAPinst executables.

.Recommendation

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

n Before starting the export steps on the central instance of the source system, make sure, that you have atleast the same amount of disk space available in \\SAPLOC\<SAPSID>\<InstanceName>\SDM\program as isused in \\SAPLOC\<SAPSID>\<InstanceName>\root\origin. During the export some archives are writtento the program subdirectories and SAPinst aborts if there is not enough space.

1. Insert the SAP Installation Master DVD in your DVD drive or mount it locally.2. Start SAPinst from the SAP Installation Master DVD by double-clicking sapinst.exe from the following

path:<DVD drive>:\IM_WINDOWS_<platform>

SAPinst GUI starts automatically by displaying theWelcome screen.

.Note

n During the installation, the default ports 21200 and 21212 are used for communication betweenSAPinst, GUI server, and SAPinst GUI. SAPinst uses port 21200 to communicate with the GUI server.The GUI server uses port 21212 to communicate with SAPinst GUI. You get an error message if oneof these ports is already in use by another service.In this case, open a command prompt and change to the required directory as follows:<DVD drive>:\IM_WINDOWS_<platform>.Enter the following command in a single line:sapinst.exe

SAPINST_DIALOG_PORT=<free_port_number_sapinst_gui_to_gui_server>

GUISERVER_DIALOG_PORT=<free_port_number_gui_server_to_sapinst_gui>

n For a list of all available SAPinst properties, enter the following command: sapinst —p.

June 01, 2006 PUBLIC 77

Page 84: SAP Netweaver 7.0 - System Copy Procedures - ABAP

4 System Copy Process

4.3 Exporting the Source System Using SAPinst

3. In theWelcome screen, choose Additional Software Life-Cycle Tasks ® System Copy ® <your database> ® SourceSystem ® <System Variant> ® Based on <AS ABAP and AS Java | AS Java | AS ABAP>.

4. Select the corresponding installation service from the tree structure according to the sequence of theprocess flow for the:n Database-specific system copy procedure [page 15]n Database-independent system copy procedure [page 62]The following tables provide an overview of the installation services available for the following systemvariants:n Central systemn Distributed system or high-availability system

Export Services for a Central System

Export Service Remarks

Export Preparation

.NoteYou do not perform this step if you use thedatabase-specific method.

Optional step for preparing the export of a SAPNetWeaver2004s SR1 system.SAPinst performs the following steps:n Creates the export directory structuren Creates database structure files (*.STR)n Updates database statistics (…)n Calculates the size of the target database

(*.EXT,DBSIZE.XML)

Database Instance Export

.NoteYou do not perform this step if you use thedatabase-specific method.

Mandatory step for database-independent system copyprocedure. SAPinst performs the following steps:n Creates the export directory structuren Creates database structure files (*.STR)n Updates database statistics (…)n Calculates the size of the target database

(*.EXT,DBSIZE.XML)n Exports the ABAP database content

Export Services for a Distributed System or a High-Availability System

Export Service Remarks

Export Preparation

.NoteYou do not perform this step if you usethe database-specific method.

Optional step for the database-independent system copyprocedure to prepare the export of a SAP NetWeaver 2004sSR1 system.You need to perform this step on the database instancehost.SAPinst performs the following steps:n Creates the export directory structuren Creates database structure files (*.STR)n Updates database statistics(…)n Calculates the size of the target database

(*.EXT,DBSIZE.XML)

Database Instance Export

.Note

nYou do not perform this step if you

Mandatory step for the database-independent systemcopy procedure.You need to perform this step on the database instancehost.

78 PUBLIC June 01, 2006

Page 85: SAP Netweaver 7.0 - System Copy Procedures - ABAP

4 System Copy Process

4.3 Exporting the Source System Using SAPinst

Export Service Remarksuse the database-specific method.

SAPinst performs the following steps:n Creates the export directory structure with label filesn Creates database structure files (*STR)n Updates database statisticsn Calculates the size of the target database

(*EXT,DBSIZE.XML)n Exports the database content

5. After you have selected the required installation service, choose Next.

.Note

If you generated SQL files with DDL statements (see Generating DLL Statements [page 70]), copy thegenerated files into the SAPinst installation directory, which has been created as soon as the firstinput screen appears.

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

.Note

n For more information about input parameters in SAPinst, position the cursor on the parameterfield and choose F1 .

n If you use the database-specific system copy method, on the SAPinst screen SAP System > DatabaseExport youmust choose Use database specific tools under “System Copy Method”.

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

Troubleshooting

.Caution

If an export process aborts due to a hardware failure (for example, file system full), you have to repeat theexport 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 statusflag 'xeq' or 'err' set.

n If there is not enough disk space in the export directory, the R3load database export fails. You can then finderror messages in the log files SAP*.log.You can subsequently move the dump files that have been created from the file system in which theexport directory is located to a different file system during the export. Currently there is no possibility toautomatically distribute the export over different file systems.

n If an error occurs during the dialog phase, SAPinst:l Stops the export.l 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.

June 01, 2006 PUBLIC 79

Page 86: SAP Netweaver 7.0 - System Copy Procedures - ABAP

4 System Copy Process

4.3 Exporting the Source System Using SAPinst

n If an error occurs during the processing phase, SAPinst:l Stops the export.l Displays a dialog that informs you about the error.You can now:l Directly view the log file by choosing View Logs.l Try to solve the problem.l Continue the export by choosing Retry.l Abort the export by choosing OK.See also: Interrupted Installation with SAPinst [page 109].

End of: Windows

Only valid for: iSeries

4.3.3 Running SAPinst on IBM eServer iSeries to Perform theExport

.Caution

This section refers to “installation of an instance”, which is a synonym for “export an SAP system”.

This procedure tells you how to run SAPinst to install one or more SAP instances. It describes an installationwhere SAPinst GUI and SAPinst server are running on the same Windows host.SAPinst creates the installation directory \usr\sap\sapinst on iSeries.

Prerequisites

n TMKSVR is up and running: WRKACTJOB SBS (TMKSVR00) (there must be a DISPATCH job). For moreinformation, see Installing TMKSVR and Creating an Installation Share [page 67].

n The Windows host is set up. For more information, see Preparing the Windows Host for the SAP System Installation[page 66].

n The users required for the installation are prepared. For more information, see Preparing a Windows UserAccount and iSeries User Profile [page 67].

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

1. Log on to theWindows host as the installation user. For more information, see Preparing a Windows User Accountand iSeries User Profile [page 67]:

2. Start SAPinst from the SAP Installation Master DVD in one of the following ways:n If using the default installation directory (recommended) by double-clicking sapinst.exe from the

following path:<Mapped drive>:<copied ... DVD>\IM_OS400_PPC64

80 PUBLIC June 01, 2006

Page 87: SAP Netweaver 7.0 - System Copy Procedures - ABAP

4 System Copy Process

4.3 Exporting the Source System Using SAPinst

.Note

l During the installation, the default ports SAPinst 21212 and 21213 are used for communicationbetween SAPinst, GUI server and SAPinst GUI. SAPinst uses port 21200 to communicate withthe GUI server. You get an error message if one of these ports is already in use by anotherservice. In this case, open a command prompt and change to the required directory as follows:<Mapped drive>:<copied ... DVD>\IM_OS400_PPC64

Enter the following command in a single line:sapinst.exe

SAPINST_DIALOG_PORT=<free_port_number_sapinst_gui_to_gui_server>

GUISERVER_DIALOG_PORT=<free_port_number_gui_server_to sapinst_gui>

l For a list of all available SAPinst properties, enter the following command: sapinst -p

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

Figure 2:

The SAPinst GUI now starts automatically by displaying theWelcome screen.4. In theWelcome screen, choose Additional Software Life-Cycle Tasks ® System Copy ® <your database> ® Source

System ® <System Variant> ® Based on <AS ABAP and AS Java | AS Java | AS ABAP>.5. Select the corresponding installation service from the tree structure according to the sequence of the

process flow for the:

June 01, 2006 PUBLIC 81

Page 88: SAP Netweaver 7.0 - System Copy Procedures - ABAP

4 System Copy Process

4.3 Exporting the Source System Using SAPinst

n Database-specific system copy procedure [page 15]n Database-independent system copy procedure [page 62]

.Caution

Make sure that you choose the installation services exactly in the order they appear for each systemvariant.

6. The following table provide an overview about the available installation services available for a:n Central systemn Distributed system or high-availability system

Export Services for a Central System

Export Service Remarks

Export Preparation

.NoteYou do not perform this step if you use thedatabase-specific method.

Optional step for preparing the export of a SAPNetWeaver2004s SR1 system.SAPinst performs the following steps:n Creates the export directory structuren Creates database structure files (*.STR)n Updates database statistics (…)n Calculates the size of the target database

(*.EXT,DBSIZE.XML)

Database Instance Export

.NoteYou do not perform this step if you use thedatabase-specific method.

Mandatory step for database-independent system copyprocedure. SAPinst performs the following steps:n Creates the export directory structuren Creates database structure files (*.STR)n Updates database statistics (…)n Calculates the size of the target database

(*.EXT,DBSIZE.XML)n Exports the ABAP database content

Export Services for a Distributed System or a High-Availability System

Export Service Remarks

Export Preparation

.NoteYou do not perform this step if you usethe database-specific method.

Optional step for the database-independent system copyprocedure to prepare the export of a SAP NetWeaver 2004sSR1 system.You need to perform this step on the database instancehost.SAPinst performs the following steps:n Creates the export directory structuren Creates database structure files (*.STR)n Updates database statistics(…)n Calculates the size of the target database

(*.EXT,DBSIZE.XML)

Database Instance Export

.Note

nYou do not perform this step if you

Mandatory step for the database-independent systemcopy procedure.You need to perform this step on the database instancehost.

82 PUBLIC June 01, 2006

Page 89: SAP Netweaver 7.0 - System Copy Procedures - ABAP

4 System Copy Process

4.3 Exporting the Source System Using SAPinst

Export Service Remarksuse the database-specific method.

SAPinst performs the following steps:n Creates the export directory structure with label filesn Creates database structure files (*STR)n Updates database statisticsn Calculates the size of the target database

(*EXT,DBSIZE.XML)n Exports the database content

7. After you have selected the required installation service, choose Next.8. Choose Next

.Note

If you generated SQL files with DDL statements (see Generating DLL Statements [page 70]), copy thegenerated files into the SAPinst installation directory as soon as it has been created by SAPinst:a) Choose Database and Central Instance Exportb) Choose Next.c) The installation directory has been created as soon as the first input screen appears.

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

.Note

For more information about input parameters in SAPinst, position the cursor on the parameterfield and choose F1 .

After you have entered all required input parameters, SAPinst starts the installation and displays theprogress of the installation.When the installation has successfully completed, the screen Finished installation is displayed.

Troubleshooting

.Caution

If an export process aborts due to a hardware failure (for example, file system full), you have to repeat theexport 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 statusflag 'xeq' or 'err' set.

n If an error occurs during the dialog phase, SAPinst:l Stops the installation.l Displays a dialog that informs you about the error.l You can now directly view the log file by choosing View Logs.l Finally you must abort the installation with OK and try to solve the problem.

n If an error occurs during the processing phase, SAPinst:l Stops the installation.l Displays a dialog that informs you about the error.

June 01, 2006 PUBLIC 83

Page 90: SAP Netweaver 7.0 - System Copy Procedures - ABAP

4 System Copy Process

4.4 Setting Up the Target System

You can now directly view the log file by choosing View Logs.l Try to solve the problem.l Retry the installation by choosing Retry.l Abort the installation by choosing OK.l For more information, see Interrupted Installation with SAPinst [page 109].

End of: iSeries

4.3.4 Restarting R3load Processes

The state file allows package states to be manually updated to restart failed R3load processes.

.Example

For example, if package processing failed and the package state has the value ‒, the state can be set to 0 andprocessing of the package is restarted.

Procedure

n To restart package processing, set the package state from – to 0.n 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.)n If the package is currently being processed (the package state is ?), then any manual modifications of

the package state are ignored.n Sockets only: You cannot restart processes.

More InformationSee also R3load Processes Using the Migration Monitor [page 95].

4.4 Setting Up the Target System

Purpose

You use SAPinst to install the target system and import the database files that you have exported from thesource system.

Process Flow

Central System

Perform the following steps on the central system host:

1. You prepare the central system host for the installation of your target system as described in the installationguide for your SAP system solution.

2. If you have already prepared the export [page 70] on the source system because you want to perform the exportand import in parallel, you perform the following steps:

84 PUBLIC June 01, 2006

Page 91: SAP Netweaver 7.0 - System Copy Procedures - ABAP

4 System Copy Process

4.4 Setting Up the Target System

a) If you use the FTP Exchange option during the export (transfer type FTP, communication type ExchangeDirectory on the screen SAP System > Communication Parameters for Export), you make sure that you havetransferred all files that have been generated in step Preparing the Export [page 70] on the source system.

b) You install the target system [page 85].If you did not prepare the export on the source system, you install the target system [page 85].

3. If required, on (the) dialog instance host(s), you install additional dialog instance(s) as described in theinstallation guide for your SAP system solution.

Distributed System or High-Availability System

Perform the following steps on the relevant installation hosts of your target system:

1. You prepare the central instance host and the database instance host for the installation of thecorresponding instances of your target system as described in the installation guide for your SAP systemsolution.

Only valid for: High Availability

You also prepare the central services instance host.End of: High Availability

2.

Only valid for: High Availability

You install the central services instance for the target system as described in the installation guidefor your SAP system solution.End of: High Availability

3. You perform the following steps on the database instance host:n If you have already prepared the export [page 70] on the source system, you perform the following steps:

a) If you use the FTP Exchange option during the export (transfer type FTP, communication typeExchange Directory on the screen SAP System > Communication Parameters for Export), you make sure thatyou have transferred the files, which have been generated in step Preparing the Export [page 70] on thesource system.

b) You install the database instance of the target system [page 85].n If you did not prepare the export [page 70] on the source system, you install the database instance of the target

system [page 85]4. On the central instance host, you install the central instance of the target system.5. If required, on (the) dialog instance host(s), you install additional dialog instance(s) as described in the

installation guide for your SAP system solution.

4.4.1 Installing the Target System

Prerequisites

Only valid for: Windows

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

June 01, 2006 PUBLIC 85

Page 92: SAP Netweaver 7.0 - System Copy Procedures - ABAP

4 System Copy Process

4.4 Setting Up the Target System

Only valid for: UNIX

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

.Note

As of SAP NetWeaver 2004s, RELOAD is no longer available as an executable installation service, but isperformed automatically by SAPinst. If the database software has already been unpacked or installed, or ifthe database already exists, SAPinst recognizes this automatically and skips the related steps.

Procedure

1. You prepare the target system host as described in the installation guide of your SAP solution based on SAPNetWeaver 2004s SR1.

2. You start SAPinst as described in the installation documentation for your SAP solution based on SAPNetWeaver 2004s SR1.

3. On theWelcome screen of the SAP Installation Master DVD, navigate to the following folder according to therequirements of your target system: Additional Software Life-Cycle Tasks ® System Copy ® <database> ® TargetSystem ® <Distribution option: Central System / Distributed System / High-Availability System> ® Based on <Stack option>AS ABAP and Java / AS Java / AS ABAP>.

4. You run the installation service(s) required for your system copy in the sequence they are listed in thespecific folder and according to process flow in Setting Up the Target System Using SAPinst [page 84].

5. To install the target system, you follow the instructions in the SAPinst input dialogs and enter the requiredparameters up to the screen SAP System > Database - Select the Database Instance Installation Method.On this screen, you choose the option Standard System Copy/Migration (load-based):The SAP data dump from the MIGRATION EXPORT CD image that you created during the export is loaded inthe newly installed SAP system database.

.Caution

If you perform a Unicode conversion, the data import into the target system might abort because ofmissing space in the database tablespace or dbspace. Enlarge the database or database container, inwhich the table DYNPSOURCEwill be created in the target database. The required size for the table will befifteen times larger than in the non-Unicode source system.

6. When SAPinst displays the DVD / CD browser window and asks for the Export Migration CD, enter thepath to the export directory <EXPDIR>.

7. If you perform a heterogeneous system copy, enter the Migration Key on the screen SAP System > DatabaseImport.If you want to perform export and import in parallel, choose the option Parallel Export / Import.

.Note

You must have run the service Prepare the Export on the source system [page 70], if you want to use the optionparallel export/ import for the installation of the target system.

86 PUBLIC June 01, 2006

Page 93: SAP Netweaver 7.0 - System Copy Procedures - ABAP

4 System Copy Process

4.4 Setting Up the Target System

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

.Note

If you have to restart the import after an error, just restart SAPinst. The import continues with thetable that was not imported successfully.If you have to restart failed R3load processes, see Restarting R3load Processes [page 84].

June 01, 2006 PUBLIC 87

Page 94: SAP Netweaver 7.0 - System Copy Procedures - ABAP

This page is intentionally left blank.

Page 95: SAP Netweaver 7.0 - System Copy Procedures - ABAP

5 Follow-Up Activities

5 Follow-Up Activities

To finish the system copy of your SAP system:

n Perform follow-up activities in the source system [page 89]n Perform follow-up activities in the target system [page 89]

5.1 Performing Follow-Up Activities 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).

5.2 Performing Follow-Up Activities in the Target System

5.2.1 Performing Follow-Up Activities for ABAP

Actions at Operating System Level

1. Adapt the configuration files at 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, and so on 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 at 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.

June 01, 2006 PUBLIC 89

Page 96: SAP Netweaver 7.0 - System Copy Procedures - ABAP

5 Follow-Up Activities

5.2 Performing Follow-Up Activities in the Target System

5. Oracle: If you changed the <DBSID> during the system copy, we recommend that you adapt theglobal_name parameter with the following SQL command:alter database rename global_name to <NEW_DBSID>;

If the parameter does not exist on your system, ignore this step.

Actions at SAP System Level

1. Run an installation check: Administration® System administration® Administration® Installation Check (transactionSM28).

2. Configure the Workbench Organizer (transaction SE06) with the option Database Copy. This releases alltransport, 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): a.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 ® ABAPEditor (transaction 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 forwhich no TemSe objects exist:Administration ® CCMS ® Spool ® TemSe administration (transaction SP12). For more information, see SAPNote 16875.

8. Adapt the definition of the printers to meet the new system requirements:n Device types and character set definitionsn Spool serversn Output management systems (OMS)

9. Delete entries in table DDLOG for buffer synchronization.10. Synchronize the buffers as described in SAP Note 36283 and adapt the client information for the logical

system.11. Adapt the RFC destination: Tools ® Administration ® Administration ® Network ® RFC destinations (transaction

SM59).12. Clean the transactional RFC: Tools ® Administration ® Monitor ® Transactional RFC (transaction SM58). For

more information, see the relevant description in the SAP Online Documentation.13. Start transaction SECSTORE using Check Entries. If you find erroneous entries with message text System-dependent

data for entry … changed , see SAP Note 816861.14. Create new operation modes and remove old ones:

a) Create new operation modes and instance definitions.

90 PUBLIC June 01, 2006

Page 97: SAP Netweaver 7.0 - System Copy Procedures - ABAP

5 Follow-Up Activities

5.2 Performing Follow-Up Activities in the Target System

b) Maintain the timetable using the new operation modes.c) Delete the old operation modes and old instance definitions.

15. Adapt the operation mode time tables (CCMS): Administration ® CCMS ® Configuration ® Operation modecalendar (transaction SM63).

16. Adapt the instances and profiles (CCMS): Administration ® CCMS ® Configuration ® OP modes/instances(transaction RZ04).

17. Define or remove the SAP system users: Tools ® Administration ® User maintenance ® Users (transaction SU01).Also revise the authorizations of the system users.

18. Delete all entries from tables TPFET and TPFHT. These contain information about changes made to theprofile of your source system: Administration ® CCMS ® Configuration ® Profile Maintenance (transaction RZ10).IBM DB2 UDB for iSeries: Use the commands CLRPFM R3<SID>DATA/TPFET and CLRPFM

R3<SID>DATA/TPFHT.19. Adapt other CCMS settings (for example, alert thresholds, reorganization parameters of CCMS table

MONI) if required.20. Delete all entries from table TLOCK, which holds the repair requests from your source system.21. 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 fileresidence information in the target system. For more information, see the SAP Online Documentation (SAP WebApplication Server ® System Administration ® Application Data Archiving and Reorganization).

22. Redefine database actions (backup, update statistics, and so on) if you have used the DBA calendar inthe source system (transaction DB13).

23. Check logon groups and assignment of application servers to logon groups (transaction SMLG).24. Check the connection to SAPNet - R/3 Frontend (transaction OSS1).25. Check self-defined external commands (transaction SM69).26. Check entries of the following tables in all relevant systems:n TXCOM (transaction SM54)n THOST (transaction SM55)

27. Check the logical system names. For more information, see Preparations [page 9]. If you need to changelogical system names in the system that results from the copy, change the logical system names at this timeas described in SAP Notes 103228 and 544509. Follow your corporate naming strategy for logical systemswhen making this change.BI customers: If you have copied a BI (formerly BW) system, read SAP Note 325525.

28. For every client in your SAP system check the detail settings (client role, changes and transportsfor client-dependent objects, changes for client-independent objects, protection level, restrictions)(transaction SCC4).

29. Check if you can delete clients that will no longer be used in the target system (transaction SCC5).30. Check the contexts and segments of remote application servers for the SAP Monitoring Infrastructure if

required (transaction RZ21).31. Configure the domain controller in the Transport Management System (TMS) by using transaction STMS.32. Post-processing for 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, tryto use the option Validate (ENTER) instead of the option Save to save your changes.

June 01, 2006 PUBLIC 91

Page 98: SAP Netweaver 7.0 - System Copy Procedures - ABAP

5 Follow-Up Activities

5.2 Performing Follow-Up Activities in the Target System

33. ABAP Program LoadsThe ABAP loads are platform-dependent programs that are generated during runtime and stored indatabase tables. They are not exported when you use the R3load procedure to copy your SAP system. TheABAP loads are generated in the target system when they are first used. This might, however, reduceproduction system performance. To avoid this, you can use transaction SGEN to generate the missing loads.Load generation requires a large amount of system resources. Therefore, it makes sense to schedule thegeneration job to run overnight.For a detailed description of the features, see the online documentation in transaction SGEN by choosingInformation on the SAP Load Generator, or in the Job Monitor by choosing Job Monitor.

34. If you did not change the database when copying the system, you have to start programRS_BW_POST_MIGRATION in the background with variant SAP&POSTMGR. Otherwise, if you changed thedatabase when copying the system, you have to start program RS_BW_POST_MIGRATION in the backgroundwith variant SAP&POSTMGRDB Program RS_BW_POST_MIGRATION performs necessary modifications ondatabase-specific objects (mainly BI objects).

Checking the Target SystemThe following actions are suitable for checking the consistency of the target system:

1. Perform initial consistency check (transaction SM28).2. Check the system log on all application servers (transaction SM21).3. Check the consistency of the database (transaction DB02).4. Perform server check (transaction 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 ® PeriodicProcessing ® 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 thesource system before the system copy.

8. CO customers: Run the report group 1SIP and compare the results to those gained on the source systembefore the system copy.

Replacing the PSEs in the Target SystemReplace all existing PSEs in the target systems with new ones which contain the new system's information.Proceed as follows:

1. In your ABAP system, call transaction STRUST.2. Proceed as described in the documentation Creating or Replacing a PSE in the SAP Library at

help.sap.com/nw2004s ® SAP NetWeaver Library ® SAP NetWeaver by Key Capability ® Security ® SystemSecurity ® System Security for SAP Web AS ABAP only ® Trust Manager.

92 PUBLIC June 01, 2006

Page 99: SAP Netweaver 7.0 - System Copy Procedures - ABAP

5 Follow-Up Activities

5.2 Performing Follow-Up Activities in the Target System

.Note

n Since replacing a PSE will remove all of the previously used certificates, also import all necessarytrusted certificates into the new PSE's certificate list. (Check the old PSE's certificate list.) Alsodistribute the new PSE's public-key certificate to the systems where it will be used.

n Make sure the new PSE contains the new system ID.

n Note the naming conventions to use for each PSE. The naming conventions are usually specified bythe Certification Authority (CA) where you obtain the certificate, however, the type of PSE alsohas some restrictions, for example, for the SSL server PSE, the CN part of the Distinguished Namemust be the host name used to access the server. For the system PSE, we recommend using theSID as the CN part.Therefore, make sure that the Distinguished Name used for the PSE conforms with the namingconvention that applies.

June 01, 2006 PUBLIC 93

Page 100: SAP Netweaver 7.0 - System Copy Procedures - ABAP

This page is intentionally left blank.

Page 101: SAP Netweaver 7.0 - System Copy Procedures - ABAP

6 Additional Information

6 Additional Information

6.1 R3load Procedures Using the Migration Monitor

Purpose

The Migration Monitor is a tool that helps you to perform and control the unload and load process during thesystem copy procedure. As of NetWeaver '04 SR1 the Migration Monitor is integrated into the SAPinst systemcopy tool, but you can also use the monitor for copying older releases by starting it manually.The Migration Monitor will

n create R3load command files

n create R3load task files if requiredn start the R3load processes to unload the datan transfer packages from the source to the target host if requiredn start the R3load processes to load the data as soon as a package is availablen 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 targetdatabase host (Import Monitor).

.Caution

You can use the Socket option for System Copy as of SAP NetWeaver '04 SR1 and for non-Unicode systemsonly.

Prerequisites

n JRE version 1.4.1 or highern The JAVA_HOME environment variable must point to the JRE directory.n The correct directory structure for R3load dump files must exist on both the source and target hosts.

6.1.1 Configuration

Help

The tool will display the available parameters, if you call it with one of the following options:

n -help

n -?

Version

The tool will display the version information (release branch and build date), if you call it with the followingoption:

June 01, 2006 PUBLIC 95

Page 102: SAP Netweaver 7.0 - System Copy Procedures - ABAP

6 Additional Information

6.1 R3load Procedures Using the Migration Monitor

n -version

General Options

Name Description Comments

monitorTimeout Monitor timeout in seconds During a timeout, the monitor threadsleeps and does not analyze any filesor analyze its processing state. Thedefault timeout value is 30 seconds.

E-Mail Options

Name Description Comments

mailServer SMTP server Server name or IP address of thecompany SMTP server

mailFrom “From” e-mail address

mailTo “To” e-mail address Can contain an address list separatedby ‘;’ or blanks.

Trace Option

Name Description Comments

trace Trace level Possible values:all, off,

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

Export Options

Option Description Comments

installDir Installation directory Directory where the installation tool(SAPinst, R3SETUP) is started; if yourun the Migration Monitor withoutusing the installation tools, then theinstallation directory is the directory,where the R3load TSK and log files willbe written.

exportDirs List of export directories Separator on Windows: ‘;’ Separator onUNIX: ‘:’ The ‘exportDirs’ parameterpoints to the directory where the R3loaddump files will be written to. In the‘exportDirs’ directory, the subdirectoriesDATA, DB and DB/<TARGET_DBTYPE>(e.g.DB/ORA) have to exist.

96 PUBLIC June 01, 2006

Page 103: SAP Netweaver 7.0 - System Copy Procedures - ABAP

6 Additional Information

6.1 R3load Procedures Using the Migration Monitor

Option Description Comments

client Client operating mode Running in client mode means, theMonitor will run parallel with standardSAPinst export process and transfer theexported dump files onto the importserver.

server Server operating mode Running in server mode means, theMonitor will create R3load TSK files (ifnecessary). R3load cmd files and startthe R3load processes.

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 servermode, specify the parameter ‘server’ in the Export Monitors properties file.

orderBy Package order Can be the ‘name’ or path of the file thatcontains package names. If the optionvalue is omitted then package order isnot determined.

r3loadExe Path of the R3load executable Optional; the default is R3load. If onlythe name of the R3load executable isavailable, then JVM looks for the R3loadexecutable using OS-specific processsearch 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 theR3load task files ‘*.TSK’ already existthen the monitor will not overwritethem.

dataCodepage Code page for data files See SAP Note 552464. Possible values:4102, 4103, 1100

taskArgs Additional R3load arguments for theTASK phase

Appended to the R3load command line.Options already set by the monitor:-ctf; -l; -o (if the omit argument isspecified).

loadArgs Additional R3load arguments for theLOAD phase

Appended to the R3load command line.Options already set by the monitor: -e;-datacodepage; -l; -p; -r; -socket

(if the socket option is specified); -o (ifthe omit argument is specified and taskfiles are not used, that is, the value of the‘tskFiles’ option is ‘no’).

expJobNum Number of parallel export jobs, thedefault is 1.

Any positive number; 0 for an unlimitednumber of jobs.

June 01, 2006 PUBLIC 97

Page 104: SAP Netweaver 7.0 - System Copy Procedures - ABAP

6 Additional Information

6.1 R3load Procedures Using the Migration Monitor

Network Exchange Options

Option Description Comments

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

netExchangeDir Network exchange directory Used for communication betweenthe export and Import Monitors.Must be writable for Export Monitorand readable for Import Monitor.The Export Monitor will write afile <package>.SGN to the networkexchange directory as a signal for theImport Monitor, that the package isexported successfully and the importcould be started.

FTP Exchange Options

Option Description Comments

ftp FTP operating mode Exported dump files will be transferredautomatically from the source host(directory ‘exportDirs’) to the targethost (directory ‘importDirs’) usingFTP.

ftpHost Remote FTP host Name or IP address of the importserver.

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

ftpPassword Password of the remote FTP user CAUTION: Security risk

ftpExportDirs List of remote FTP directories forexport dump

Both ‘;’ or ‘:’ separators are valid. Thisis the directory on the target host towhich the dump will be transferred.The value will be the same as for‘importDirs’ in the Import Monitorsproperty file.

98 PUBLIC June 01, 2006

Page 105: SAP Netweaver 7.0 - System Copy Procedures - ABAP

6 Additional Information

6.1 R3load Procedures Using the Migration Monitor

Option Description Comments

ftpExchangeDir Remote FTP exchange directory Used for communication between theexport and Import Monitors. Mustbe writable for the Export Monitorand readable for the Import Monitor.The Export Monitor will write a file<package>.SGN to the FTP exchangedirectory as a signal for the ImportMonitor, that the package is exportedsuccessfully and the import could bestarted.

ftpJobNum Number of parallel FTP jobs; thedefault is 1.

Any positive number; 0 for anunlimited number of jobs.

Export Socket Host

Option Description Comment

socket Socket operating mode R3load will not write dump files to thefile system but the export and importwork 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 numberon the import host. Any free port onthe import host from 1024 to 65535.

FTP Copy Options

Option Description Command

ftpCopy FTP copy operating mode Used as a separate program call formigration with sockets. All filesproduced by R3lctl and R3szchk willbe transferred from the source to thetarget host using FTP.

exportDirs List of export directories Separator on Windows: ‘;’ Separatoron UNIX: ‘:’ In the ‘exportDirs’directory, the subdirectories DATA, DB

and DB/<TARGET_DBTYPE> (e.g. DB/ORA)have to exist. The R3load STR fileshave to exist in the subdirectoryDATA, the DDL*.TPL files in thesubdirectory DB, and the R3load EXTfiles (if required) in the subdirectoryDB/<TARGET_DBTYPE>.

ftpHost Remote FTP host Name or IP address of the importserver.

June 01, 2006 PUBLIC 99

Page 106: SAP Netweaver 7.0 - System Copy Procedures - ABAP

6 Additional Information

6.1 R3load Procedures Using the Migration Monitor

Option Description Command

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

ftpPassword Password of the remote FTP user CAUTION: Security risk

ftpExportDirs List of remote FTP directories forexport dump

Both ‘;’ or ‘:’ separators are valid. Thisis the directory on the target host towhich the dump will be transferred.The value will be the same as for‘importDirs’ in the Import Monitorsproperty file.

Any other option is ignored by Import Monitor.

Mandatory Options for Export Monitor

n Client mode:installDir, exportDirs,

one of the options ftp, net (and their related parameters)n Server mode:

installDir, exportDirs, tskFiles,

one of the options ftp, net, socket (and their related parameters)n FTP copy:

exportDirs, ftpHost, ftpUser, ftpExportDirs, ftpExchangeDir

.Note

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

Import Options

Option Description Comment

installDir Installation directory Directory where the installation tool (SAPinst, R3SETUP)is started; if you run theMigrationMonitor without usingthe installation tools, then the installation directory isthe directory, where the R3load TSK and log files will bewritten.

importDirs List of import directories Separator on Windows: ‘;’ Separator on UNIX: ‘:’The ‘importDirs’ parameter points to the directorywhere the R3load dump files will be written to. In the‘importDirs’ directory, the subdirectories DATA, DB andDB/<TARGET_DBTYPE> (e.g. DB/ORA) have to exist.

100 PUBLIC June 01, 2006

Page 107: SAP Netweaver 7.0 - System Copy Procedures - ABAP

6 Additional Information

6.1 R3load Procedures Using the Migration Monitor

Option Description Comment

orderBy Package order This option is used only if the Import Monitor workswithout the Export Monitor in stand-alone mode, thatis, all export dump files are available on the import hostbefore the Import Monitor is started. Values can be:name: load packages in alphabetical order,size: load packages starting with the largest one, or apath of the file that contains package names.If the option is omitted then package order is not defined.

r3loadExe Path of the R3loadexecutable

Optional; the default is R3load. If only the name of theR3load executable is available then JVM looks for theR3load 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 fromversion 4.7 ‘yes’. If the R3load task files ‘*.TSK’ alreadyexist then the monitor will 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 befound in DB/<TARGET_DBTYPE> import dump subdirectorythe package processing is aborted.

dbCodepage Database code page for thetarget database

See SAP Note 552464. Possible values: 4102, 4103, 1100

migrationKey Migration key

omit R3load omit value Can contain only 'DTPIV' letters.-o D : omit data; do not load data-o T: omit tables; do not create tables-o P: omit primary keys; do not create primary keys-o I: omit indexes; do not create indexes-o V: omit views; do not create views If you want tocombine several omit options, list these options withoutblank (e.g. ‘-o TV’).

taskArgs Additional R3loadarguments for the TASKphase

Appended to the R3load command line.Options already set by the monitor:-ctf; -l; -o (if the omit argument is specified).

loadArgs Additional R3loadarguments for the LOADphase

Appended to the R3load command line.Options already used by the monitor:-i; -dbcodepage; -l; -p; -k; -r; -socket (if thesocket option is specified); -o (if the omit argument isspecified and task files are not used, that is, the value of‘tskFiles’ option is ‘no’).

impJobNum Number of parallel importjobs; the default is 1.

Any positive number; 0 for an unlimited number of jobs

June 01, 2006 PUBLIC 101

Page 108: SAP Netweaver 7.0 - System Copy Procedures - ABAP

6 Additional Information

6.1 R3load Procedures Using the Migration Monitor

Import Exchange Options

Option Description Comment

exchangeDir Exchange directory If this option is not set, then themonitor runs in stand-alone mode,that is without the Export Monitor.All the export dump files or the SAPexport CDs from the installationkit must be available on the importhost and be specified with theparameter ‘importDirs’ (e.g. in theproperties file). If there is an old fileexport_statistics.properties (e.g.from a previous export run), removethis file.

Import Socket Options

Option Description Command

socket Socket operating mode

port Server port number Any free port from 1024 to 65535.

Any other option is ignored by Import Monitor.

Mandatory Options for Import Monitor

n Server mode (default):installDir, importDirs, tskFiles, extFiles,

one of the options exchangeDir or socket (and their related parameters)n Stand-alone mode:

installDir, importDirs, tskFiles, extFiles

.Note

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

6.1.2 Starting the Migration Monitor

The tool can be started using one of the following:

n

Only valid for: UNIX

The UNIX shell scriptsexport_monitor.sh / import_monitor.sh /

export_monitor_secure.sh

End of: UNIX

102 PUBLIC June 01, 2006

Page 109: SAP Netweaver 7.0 - System Copy Procedures - ABAP

6 Additional Information

6.1 R3load Procedures Using the Migration Monitor

n

Only valid for: Windows

The Windows batch filesexport_monitor.bat / import_monitor.bat /

export_monitor_secure.bat

End of: Windows

n As part of the SAPinst export / import procedure

The application allows you to specify options in the command line and/or in the application property file.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’sworking directory.Any 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. Tospecify an option:

n in the command line,enter ‘-optionName optionValue’

n in the application property file,insert the new line ‘optionName=optionValue’

Only valid for: UNIX

Example of a command line for a UNIX terminal:End of: UNIX

Only valid for: UNIX

./export_monitor.sh –ftp

End of: UNIX

Only valid for: UNIX

./export_monitor.sh –ftpCopy

End of: UNIX

Only valid for: UNIX

./export_monitor.sh –socket –host <import server> –port 5000

End of: UNIX

Only valid for: Windows

Example of a command line for Windows cmd.exe:End of: Windows

Only valid for: Windows

export_monitor.bat –net

End of: Windows

Only valid for: Windows

export_monitor.bat –socket

End of: Windows

June 01, 2006 PUBLIC 103

Page 110: SAP Netweaver 7.0 - System Copy Procedures - ABAP

6 Additional Information

6.1 R3load Procedures Using the Migration Monitor

If FTP access is used and security is required, start the monitor using the secure version of the shellscript/batch file to prevent seeing FTP password in the command line parameter string / property file.

Only valid for: UNIX

Example of a command line for a UNIX terminal:End of: UNIX

Only valid for: UNIX

./export_monitor_secure.sh –ftpPassword <password>

End of: UNIX

1. Start the monitor and close the shell window / command processor. The monitor process will run inbackground.

2. Use monitor *.log and *.console.log files to check monitor processing state.

Example of an export_monitor_cmd.properties file with export options:# Export Monitor options

# Operating mode: ftp | net

#net

ftp

#

# Common options

#

# List of export directories, separator on Windows ; on UNIX :

exportDirs=C:\TEMP\export_dump

# SAPinst start directory

installDir=C:\install\start

# Monitor timeout in seconds

monitorTimeout=30

#

# FTP options

#

# Remote FTP host

ftpHost=server

104 PUBLIC June 01, 2006

Page 111: SAP Netweaver 7.0 - System Copy Procedures - ABAP

6 Additional Information

6.1 R3load Procedures Using the Migration Monitor

# Name of remote FTP user

ftpUser=sysadm

# Password of remote FTP user

ftpPassword=password

# List of remote FTP directories for export dump, separator : or ;

ftpExportDirs=/install_dir/export_dump

# Remote FTP exchange directory

ftpExchangeDir=/install_dir/exchange

# Number of parallel FTP jobs

ftpJobNum=3

#

# E-mail options

#

# SMTP server

mailServer=sap-ag.de

# "From" email address

[email protected]

# "To" email address

[email protected] [email protected]

Example of an import_monitor_cmd.properties file with import options:

# Import Monitor options

#

# Common options

#

# List of import directories, separator on Windows ; on UNIX :

importDirs=/install_dir/export_dump

# SAPinst start directory

June 01, 2006 PUBLIC 105

Page 112: SAP Netweaver 7.0 - System Copy Procedures - ABAP

6 Additional Information

6.1 R3load Procedures Using the Migration Monitor

installDir=/install_dir/start

# Exchange directory

exchangeDir=/install_dir/exchange

# Generation of task files: yes | no

tskFiles=yes

# Inclusion of extent files: yes | no

extFiles=yes

# Monitor timeout in seconds

monitorTimeout=30

#

# R3load options

#

# DB code page for the target database

dbCodepage=1100

# Migration key

migrationKey=

# Additional R3load arguments for TASK phase

taskArgs=

# Additional R3load arguments for LOAD phase

loadArgs=

# Number of parallel import jobs

impJobNum=3

#

# E-mail options

#

# SMTP server

mailServer=sap-ag.de

# "From" email address

[email protected]

106 PUBLIC June 01, 2006

Page 113: SAP Netweaver 7.0 - System Copy Procedures - ABAP

6 Additional Information

6.1 R3load Procedures Using the Migration Monitor

# "To" email address

[email protected] [email protected]

What happens during export / import with the above listed property files duringa system copy with source and target database Oracle:

n On the export host, the following directories have to exist (see parameter exportDirs):

l c:\temp\export_dump\DATA

l c:\temp\export_dump\DB

l c:\temp\export_dump\DB\ORA

The directory c:\temp\export_dump\DATA has to contain the STR files generated by R3ldctl, thedirectory c:\temp\export_dump\DB the files DDL<DBTYPE>.TPL generated by R3ldctl as well, the directoryc:\temp\export_dump\DB\ORA the EXT files generated by R3szchk.

n The Export Monitor will write the R3load dump files and the TOC files to the directoryc:\temp\export_dump\DATA.

n The R3load log files, cmd files and TSK files (if required) are located in the directory c:\install\start(parameter: installDir). The export itself is not done by the Export Monitor, as the monitor is started inclient mode (parameter ‘server’ is not set).

n As soon as a package has been exported successfully, the Export Monitor will transfer all files belongingto that package (TOC, STR, EXT, 001, ...) to the target host (parameter: ftpHost) into the correspondingsubdirectories of the directory /install_dir/export_dump (parameter: ftpExportDirs) as user<sapsid>adm (parameter: ftpUser) identified by password (parameter: ftpPassword) to logon.

n If the package files have been transferred completely to the server, the Export Monitor will write a signalfile <package>.SGN to the directory /install_dir/exchange (parameter: ftpExchangeDir) to notify theImport Monitor, that it could start the import of this package.

n On the import host, the following directories have to exist (see parameter importDirs):

l /install_dir/export_dump/DATA

l /install_dir/export_dump/DB

l /install_dir/export_dump/DB/ORA

The directory /install_dir/export_dump/DATA has to contain the STR files generated by R3ldctl, thedirectory /install_dir/export_dump/DB the files DDL<DBTYPE>.TPL generated by R3ldctl, too, thedirectory /install_dir/export_dump/DB/ORA the EXT files generated by R3szchk.

n The import monitor will start to import a package as soon as the file <package>.SGN is found in thedirectory /install_dir/exchange (parameter: exchangeDir).

n The R3load log files, cmd files and TSK files (if required) will be located in the directory /install_dir/start(parameter: installDir).

n The file DDLORA.TPL has to be copied to the directory /install_dir/start (parameter: installDir)before you can start the Import Monitor.

June 01, 2006 PUBLIC 107

Page 114: SAP Netweaver 7.0 - System Copy Procedures - ABAP

6 Additional Information

6.2 Using SAPinst GUI

6.1.3 Output Files

Export

n export_monitor.log

n export_state.properties

n ExportMonitor.console.log

Import

n import_monitor.log

n import_state.properties

n ImportMonitor.console.log

Both the export and import state files contain package state lines such as the following: SAPUSER=+Format of lines is <PACKAGE>=<STATE>. Possible values for state are:

0 Package export/import not yet started.

? Package export/import in progress.

- Package export/import finished with errors.

+ Package export/import 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=++Format of lines is <PACKAGE>=<STATE>. Possible values for state are:

0 Package export not yet started.

? Package export in progress.

- Package export finished with errors.

+0 Package export finished successfully; package transfer notyet started.

+? Package transfer in progress.

+- Package transfer finished with errors.

++ Package transfer finished successfully.

6.2 Using SAPinst GUI

The following table shows the most important functions that are available in SAPinst GUI:

108 PUBLIC June 01, 2006

Page 115: SAP Netweaver 7.0 - System Copy Procedures - ABAP

6 Additional Information

6.3 Interrupted Installation with SAPinst

SAPinst GUI Functions

Button / Function Key / Menu Entries Description

F1 Displays detailed information about each input parameter.

Exit Cancels the installation with the following options:n Stop

Stops the installation without further changing theinstallation files. You can restart SAPinst to continue theinstallation later from this point.

n ContinueContinues the installation.

Log off Stops the SAPinst GUI, but SAPinst and the GUI servercontinue running.

.NoteIf for some reason you need to log off during theinstallation from the host where you control theinstallation with SAPinst GUI, the installation continueswhile you are logged off. You can later reconnect tothe same SAPinst installation from the same or anotherhost. For more information, see Starting SAPinst GUISeparately [page 114].

Retry Performs the installation step again (if an error has occurred).

Stop Stops the installation without further changing theinstallation files. You can continue the installation later fromthis point.

Continue Continues with the option you have chosen before.

6.3 Interrupted Installation with SAPinst

The SAP system installation might be interrupted for one of the following reasons:

n An error occurred during the dialog or processing phase:SAPinst does not abort the installation in error situations. If an error occurs, the installation pauses and adialog box appears. The dialog box contains a short description about the choices listed in the table below aswell as a path to a log file that contains detailed information about the error.

n You interrupted the installation by choosing Exit in the SAPinst menu.

The following table describes the options in the dialog box:

June 01, 2006 PUBLIC 109

Page 116: SAP Netweaver 7.0 - System Copy Procedures - ABAP

6 Additional Information

6.3 Interrupted Installation with SAPinst

Option Definition

Retry SAPinst retries the installation from the point of failure without repeating any ofthe previous steps.This is possible because SAPinst records the installation progress in the keydb.xmlfile.We recommend that you view the entries in the log files, try to solve the problemand then choose Retry.If the same or a different error occurs again, SAPinst displays the same dialog boxagain.

Stop SAPinst stops the installation, closing the dialog box, the SAPinst GUI, and theGUI server.SAPinst records the installation progress in the keydb.xml file. Therefore, you cancontinue the installation from the point of failure without repeating any of theprevious steps. See the procedure below.

Continue SAPinst continues the installation from the current point.

Only valid for: UNIX

.Note

You can also terminate SAPinst by choosing Ctrl+C . However, we do not recommend that you useCtrl+C , because this kills the process immediately .

End of: UNIX

ProcedureThis procedure describes the steps to restart an installation, which you stopped by choosing Stop, or to continuean interrupted installation after an error situation.

1.

Only valid for: Windows

Log on to your remote host as a user who is a member of the local administrators group.End of: Windows

2.

Only valid for: UNIX

Log on to your local UNIX host as user root.

.Caution

Make sure that the root user has not set any environment variables for a different SAP system ordatabase.

End of: UNIX

3.

Only valid for: Windows

Insert the Installation Master DVD in your DVD drive.End of: Windows

4.

Only valid for: Unix

Mount your Installation Master DVD.

110 PUBLIC June 01, 2006

Page 117: SAP Netweaver 7.0 - System Copy Procedures - ABAP

6 Additional Information

6.3 Interrupted Installation with SAPinst

.Note

Mount the DVD locally. We do not recommend using Network File System (NFS).

End of: Unix

5.

Only valid for: Windows

Enter the following commands at the Windows command prompt:cd <DVD drive>:\IM_WINDOWS<platform>

sapinst.exe

End of: Windows

6.

Only valid for: Unix

Enter the following commands:cd <Installation_Master_DVD>/IM_<OS>

./sapinst

End of: Unix

7.

Only valid for: iSeries

Check if a SAPinst GUI Java process is still running.If a process is still running, look for javaw.exe under Processes in your Task Manager and kill it.n If you used the default installation directory (recommended):

cd <Mapped_Drive>:\<Copied Installation Master DVD>\IM_OS400_PPC64

sapinst.exe

n If you used an alternative installation directory:cd <Mapped_Drive>:\<your installation directory>

<Mapped_Drive>:\<Copied Installation Master DVD>\IM_OS400_PPC64\sapinst.exe

End of: iSeries

8. From the tree structure in theWelcome screen, select the installation service that you want to continueand choose Next.

.Note

If there is only one component to install, theWelcome screen does not appear.

TheWhat do you want to do? screen appears.9. In theWhat do you want to do? screen, decide between the following alternatives and confirm with OK.

Alternative Behavior

Run a new Installation SAPinst does not continue the interrupted installation. Instead, it moves thecontent of the old installation directory and all installation-specific files to thebackup directory. Afterwards, you can no longer continue the old installation.For the backup directory, the following naming convention is used:<log_day_month_year_hours_minutes_seconds> (for example,log_01_Oct_2003_13_47_56).

Continue old installation SAPinst continues the interrupted installation from the point of failure.

June 01, 2006 PUBLIC 111

Page 118: SAP Netweaver 7.0 - System Copy Procedures - ABAP

6 Additional Information

6.4 Performing a Remote Export Using SAPinst

6.4 Performing a Remote Export Using SAPinst

Purpose

You can run the SAPinst GUI in standalone mode to perform a remote export.This enables you to perform the export on another host (the remote host) while monitoring the export

with the SAPinst GUI on your local Windows or UNIX computer (the local host).

Prerequisites

n Make sure that you have performed the preparation activities for your local host (SAPinst GUI host) andyour remote host as described in Prerequisites in Exporting the Source System Using SAPinst [page 71].

n Both computers are in the same network and can ping each other.To test this:l Log on to your remote host and enter the command ping <local host>.l Log on to the local host and enter the command ping <remote host>.

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:

n Starting SAPinst on the Remote Host [page 112]n Starting SAPinst GUI Separately [page 114]

6.4.1 Starting SAPinst on the Remote Host (Optional)

You use this procedure to install your SAP system on a remote host. In this case, SAPinst and the GUI serverrun on the remote host, and SAPinst GUI runs on the local host. The local host is the host from which youcontrol the installation with SAPinst GUI.

Only valid for: iSeries OS/400 DB2 UDB for iSeries

.Caution

If you install SAP instances on IBM eServer iSeries, “local host” in this section means the Windowsinstallation host, not the iSeries.

End of: iSeries OS/400 DB2 UDB for iSeries

Prerequisites

n You have installed the Java Runtime Environment [page 13].n Both computers are in the same network and can “ping” each other.

To test this:l Log on to your remote host and enter the command ping <local host>.l Log on to the local host and enter the command ping <remote host>.

112 PUBLIC June 01, 2006

Page 119: SAP Netweaver 7.0 - System Copy Procedures - ABAP

6 Additional Information

6.4 Performing a Remote Export Using SAPinst

Procedure

Only valid for: Windows

1. Log on to your remote host as a user who is a member of the local administrators group.2. Insert the Installation Master DVD in the DVD drive on your remote host.3. Enter the following commands:

Only valid for: DB2 UDB for z/OS;DB2 UDB for UNIX and Windows;MaxDB;MS SQL Server;Oracle

cd <DVD drive>:\IM_WINDOWS_<platform>

End of: DB2 UDB for z/OS;DB2 UDB for UNIX and Windows;MaxDB;MS SQL Server;Oracle

Only valid for: DB2 UDB for iSeries

cd <mapped drives>:\IM_OS400_PPC64

End of: DB2 UDB for iSeries

sapinst.exe -nogui

For more information, see Running SAPinst on Windows to Perform the Export [page 76].SAPinst now starts and waits for the connection to the SAPinst GUI. You see the following at the commandprompt:guiengine: no GUI connected; waiting for a connection on host <host_name>, port

<port_number> to continue with the installation

4. Start SAPinst GUI on your local host, as described in Starting SAPinst GUI Separately [page 114].

End of: Windows

Only valid for: UNIX

1. Log on to your remote host as user root.

.Caution

Make sure that the root user has not set any environment variables for a different SAP system ordatabase.

2. Mount the Installation Master DVD.3. Enter the following commands:

cd <Installation_Master_DVD>/IM_<OS>

./sapinst -nogui

For more information, see Running SAPinst on UNIX to Perform the Export [page 71].SAPinst now starts and waits for the connection to the SAPinst GUI. You see the following at the commandprompt:guiengine: no GUI connected; waiting for a connection on host <host_name>, port

<port_number> to continue with the installation.

4. Start SAPinst GUI on your local host, as described in Starting SAPinst GUI Separately [page 114].

End of: UNIX

June 01, 2006 PUBLIC 113

Page 120: SAP Netweaver 7.0 - System Copy Procedures - ABAP

6 Additional Information

6.4 Performing a Remote Export Using SAPinst

Only valid for: UNIX;Windows;iSeries

6.4.2 Starting SAPinst GUI Separately (Optional)

You use this procedure to start SAPinst GUI separately. You might need to start SAPinst GUI separately inthe following cases:

n You have logged off from SAPinst.If you logged off during the installation and you later want to reconnect to the installation while it isstill running, you can start SAPinst GUI separately.

n You want to perform a remote installation [page 112].If SAPinst GUI runs on a different host from SAPinst and the GUI server, you have to start SAPinst GUIseparately.

Only valid for: iSeries OS/400 DB2 UDB for iSeries

.Caution

If you install SAP instances on IBM eServer iSeries, “local host” in this section means the Windowsinstallation host, not the iSeries host.

End of: iSeries OS/400 DB2 UDB for iSeries

PrerequisitesYou have installed the Java Runtime Environment [page 13] on the host on which you want to start SAPinst withoutSAPinst GUI.

Starting SAPinst GUI on a Windows Platform

1. Log on as a member of the local administrators group.2. Insert the SAP Installation Master DVD into your DVD drive.3. To change to the relevant directory enter the following command:

Only valid for: DB2 UDB for z/OS;DB2 UDB for UNIX and Windows;MaxDB;MS SQL Server;Oracle

cd <DVD drive>:\IM_WINDOWS<platform>

End of: DB2 UDB for z/OS;DB2 UDB for UNIX and Windows;MaxDB;MS SQL Server;Oracle

Only valid for: DB2 UDB for iSeries

cd <mapped drives>:\IM_OS400_PPC64

End of: DB2 UDB for iSeries

4. Start SAPinst GUI in one of the following ways:n If SAPinst GUI runs on the same host as SAPinst and the GUI server, enter the following command:

startinstgui.bat

SAPinst GUI uses the local host as default.n If SAPinst and the GUI server runs on a different host from SAPinst GUI (remote installation), enter the

following command:startinstgui.bat -host <host_name>

114 PUBLIC June 01, 2006

Page 121: SAP Netweaver 7.0 - System Copy Procedures - ABAP

6 Additional Information

6.4 Performing a Remote Export Using SAPinst

<host_name> is the host name of the installation host.

.Note

l If you enter the command without additional parameters, SAPinst GUI uses the local host asdefault. SAPinst GUI starts and tries to connect to the GUI server and SAPinst. As SAPinstand the GUI server are running on another host, SAPinst GUI cannot connect and the SAPInstallation GUI Connection dialog appears.In this case, enter the name of the host on which SAPinst is running and choose Log on.The first dialog of the installation appears and you can perform the remote installation fromyour local host.

l For a list of options to start SAPinst GUI, change to the same directory as your SAPinstexecutable and enter the command startinstgui.bat -h.

Starting SAPinst GUI on a UNIX Platform

1. Log on as user root.

.Caution

Make sure that the root user has not set any environment variables for a different SAP system ordatabase.

2. Mount your installation DVD.

.Note

Mount the DVD locally. We do not recommend that you use Network File System (NFS).

3. To change to the mount directory enter the following command:cd <Installation_Master_DVD>/IM_<OS>

4. Start the SAPinst GUI in one of the following ways:n If SAPinst GUI runs on the same host as SAPinst and the GUI server, enter the following command

without additional parameters:./startInstGui.sh

SAPinst GUI uses as default the local host.n If SAPinst and the GUI server run on a different host from SAPinst GUI (remote installation), enter the

following command with additional parameters:./startInstGui.sh -host <host_name>

<host_name> is the host name of the installation host

June 01, 2006 PUBLIC 115

Page 122: SAP Netweaver 7.0 - System Copy Procedures - ABAP

6 Additional Information

6.4 Performing a Remote Export Using SAPinst

.Note

l If you enter the command without additional parameters, SAPinst GUI uses the local host asdefault. SAPinst GUI starts and tries to connect to the GUI server and SAPinst. As SAPinst andGUI server are running on another host, SAPinst GUI cannot connect and the SAP InstallationGUI Connection dialog appears.In this case, enter the name of host on which SAPinst is running and choose Log on.The first dialog of the installation appears and you can perform the remote installation fromyour local host.

l For a list of options to start SAPinst GUI, change to the same directory as your SAPinstexecutable and enter the command ./startInstGui.sh -h.

End of: UNIX;Windows;iSeries

116 PUBLIC June 01, 2006

Page 123: SAP Netweaver 7.0 - System Copy Procedures - ABAP

This page is intentionally left blank.

Page 124: SAP Netweaver 7.0 - System Copy Procedures - ABAP

SAP AGDietmar-Hopp-Allee 1669190 WalldorfGermanyT +49/18 05/34 34 34F +49/18 05/34 34 20www.sap.com

© Copyright 2006 SAP AG. All rights reserved.No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may bechanged without prior notice.