You are on page 1of 6

SYSTEM COPY & MIGRATION

OPTIMIZATION

This document lists several methods that can be used to optimize the standard system copy procedure. Database Tuning Sorted vs. Unsorted Unload Package Splitting Table Splitting R3load Options Migration Monitor Defining Unload/Load Order

DATABASE TUNING
This is just a list of database parameters which could help you to tune the database. This list is not meant to give you detailed recommendations about the parameter settings!

DATABASE TUNING MEASURES - DB2/OS390:


Create indexes deferred

DATABASE TUNING MEASURES - DB2 UDB FOR UNIX, WINDOWS


SAP Note 454173 (R3load migration accelerated through CLI LOAD API)

DATABASE TUNING MEASURES - INFORMIX:


Usage of PDQPRIORITY

DATABASE TUNING MEASURES - ORACLE:


Links to information about tuning measures on external pages: o Oracle Tips on Quest Pipelines Homepage o Oracle Tips on Database Specialists Homepage o Oracle Newsletter on Quest Pipelines Homepage SAP Note 936441 (Oracle settings for R3load based system copy) Enlarge number and size of redo logs experiences from other pilot projects: add 4 additional redo logs of 100 MB each Enlarge number of db writers Enlarge temporary tablespace PSAPTEMP (~20-30 GB) Increase sort_area_size or use pga_* parameters Increase PSAPROLL (~20 GB)

DATABASE TUNING MEASURES - SAP DB / MAXDB


General documentation about tuning measures of MaxDB version 7.5: MaxDB Performance

Increase the parameter CACHE_SIZE to the maximum available size of main memory. Add the unused main memory of non-running Application Server components to the database cache. Increase the parameter MAXCPU to the maximum available number of processors to which the database system can distribute user tasks.

UNSORTED UNLOAD
During a system copy, the data export can be done sorted or unsorted. The default setting is sorted. If the export can be done without sorting the table data before exporting them depends on a lot of factors:

DEPENDENCIES:
Target database: If the target database does not need sorted data, many but not all tables can be exported unsorted (see below). Up to now, it is not recommended to export data in unsorted order if the target database is MSSQL or MaxDB.

Tables: Kernel or R3load < 6.40: Tables of type report (R), nametab (N) and dynpro (D) always have to be exported in sorted order! The table type is part of the STR file. It is the fifth column of the att: line of the corresponding table. At the moment, the following tables must always be exported in sorted order: o D010* o D02* o DDNTF* Kernel or R3load 6.40: Tables of type nametab (N) always have to be exported in sorted order! At the moment, the following tables must always be exported in sorted order: o DDNTF* As of R3load 6.40 patch level 55 (compile date February 10, 2006) and R3load 7.00 patch level 10 (compile date February 10, 2006), R3load automatically exports these tables in sorted order.

Code page conversion: If a code page conversion is performed, the cluster tables must not be exported unsorted. As of R3load 6.40 patch level 55 (compile date February 10, 2006) and R3load 7.00 patch level 10 (compile date February 10, 2006), R3loads automatically ensures that cluster tables are exported in sorted order during a code page conversion. Customer requirements: If the customer want to reorganize his table data during the system copy, the export should be done sorted. Export is faster No necessity to extremly enlarge tablespace for sorting (for example, PSAPTEMP)

ADVANTAGES:

DISADVANTAGES:
Import (index creation) is slower Data is created more distributed/less reorganized in the database STR files have to be splitted in a certain way (special STR files for unsorted unload/load) No improvements for database performance May influence the behaviour of (badly written) customer programs

RECOMMENDATION:
Although there is one big advantage when you export the data unsorted if possible you have to consider the disadvantages as well. Therefore we prefer to offer the unsorted export option only to experienced consultants. The consultant should discuss the pros and cons together with the customer and should only unload unsorted if the runtime of a sorted unload exceeds the downtime limits of the project. In general, unload as few tables as possible unsorted. For more information, see SAP Note 954268. If the unsorted unload is used in a way different from this description, then the consultant takes over the responsibility for supporting the resulting problems.

PACKAGE SPLITTING
The package splitting option is available and integrated into the system copy tools R3SETUP and SAPinst since SAP R/3 4.0B SR1. The splitting was done by a Perl script called SPLITSTR.PL. As of SAP NetWeaver 2004 SR1, this script is replaced by a Java-based, much more powerful tool. The Java-based tool can be used with the older releases as well, splitting the files manually. For more information, see the Package Splitter - User's Guide which is part of the tool archive. The archive SPLIT.SAR can be downloaded from SAP Service Marketplace at http://service.sap.com/swdc Download Support Packages and Patches Entry by Application Group Additional Components SYSTEM COPY TOOLS SYSTEM COPY TOOLS <release> SYSTEM COPY TOOLS <release> #OS independent SPLIT_<ID>.SAR.

TABLE SPLITTING
For copying large tables, the tool R3ta has been developed to automatically generate WHERE conditions, with which a subset of table data can be accessed. These WHERE conditions are integrated into the R3load TSK files. Using WHERE conditions may not be optimal for every database management system and therefore has to be considered carefully.

AVAILABILITY:
Table splitting can be used for ABAP systems with SAP kernel 6.40 or above.

ADVANTAGES:
Large tables are processed in many small packages. If the export or import of a table aborts with an error, only the processing of the package with the error has to be repeated instead of (un)loading the complete table once again.

The export and import of one table can be performed in parallel by starting several R3load processes to work on some packages in parallel.

DISADVANTAGES:
If the parallel processing is not optimal or if the single packages are processed serial, the complete processing time for one table may increase when using WHERE conditions. The creation and evaluation of WHERE conditions is an iterating process which requires some experience and some detailed database knowledge. Many manual steps have to be performed. Under certain conditions it is recommended to create additional temporary indexes on the column used in the WHERE condition. Depending on the database, this may not be feasible during productive operation (time consuming, table locking, ...)

KNOWN PROBLEMS:
The sorting order may be different on non-Unicode source system and Unicode target system. This may lead to problems when deleting parts of table data during restart. If the import of one package aborted with an error, you therefore have to delete all data from this table and reload them all again! It may happen that the R3ta cores when processing a table. The reason is still under investigation and there is no solution yet. As the usage of WHERE conditions requires a lot of experience and many manual steps and because there are still some problems not yet solved, we cannot release this feature generally. You may use the feature WHERE conditions and the tool R3ta and in many cases it will work without problems, but if you run into problems, you cannot claim for support or an immediate fix of the problem. Nevertheless, we welcome any feedback which helps us to improve the tools. The generated WHERE conditions should not cover more than one column. If R3ta calculated conditions with more columns, run the tool again with different row-count parameters. If you decide to create WHERE conditions manually (without the R3ta tool), you must be aware of the fact, that a badly chosen WHERE condition can increase the total table processing time a lot. In addition, the consultant takes over the responsibility for the completeness of the data! You can often reduce the export time of a table which is processed with WHERE conditions if you create a (temporary) additional index on the column used within the WHERE condition. CAUTION: This may not be possible on databases that need exclusive access on the table when creating an index (for example, Informix).

ATTENTION:

If the WHERE conditions are used in a way different from this description, then the consultant takes over the responsibility for supporting the resulting problems.

R3LOAD OPTIONS
R3load option '-fast' (<= 4.6D) or '-loadprocedure fast': These options are available from SAP kernel release 4.0B for - DB2/UDB - MSSQL from SAP kernel release 6.40 for - DB2/UDB - MSSQL - Oracle (see SAP Note 1045847 - Oracle Direct Path Load Support in R3load) R3load socket option: The socket option is available starting with SAP kernel release 6.20. It must not be used when performing a Unicode conversion!

MIGRATION MONITOR
The Migration Monitor is a tool which helps you to perform and control the unload and load process during the system copy procedure. As of SAP NetWeaver 2004 SR1, the Migration Monitor is integrated into the SAPinst system copy tool, but it is also possible to use the monitor for copying older releases by starting it manually. The Migration Monitor will: Create R3load command files Create R3load task files if required Start the R3load processes to unload the data Transfer packages from the source to the target host if required Start the R3load processes to load the data as soon as a package is available Inform the person performing the system copy in case of errors For more information, see SAP Note 784118 (System Copy Java Tools) and the Migration Monitor User's Guide which is part of the tool archive. The archive MIGMON.SAR can be downloaded from SAP Service Marketplace at http://service.sap.com/swdc Download Support Packages and Patches Entry by Application Group Additional Components SYSTEM COPY TOOLS SYSTEM COPY TOOLS <release> SYSTEM COPY TOOLS <release> #OS independent MIGMON_<ID>.SAR.

DEFINING UNLOAD/LOAD ORDER


R3SETUP will process the packages according to the modification date of the STR files. If you have certain requirements regarding the export and/or import, then move the STR files from the <export dump>/DATA directory to a different one and copy them back to the DATA directory in the order they should be processed. SAPinst presents a dialog on which you can choose how to process the packages: In alphabetical order, In custom order, According to their size (largest first; only for import). The Migration Monitor has a property orderBy to specify the order of processing packages.

Copyright
Copyright 2007 SAP AG. All rights reserved. No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice. Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors. Microsoft, Windows, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation. IBM, DB2, DB2 Universal Database, OS/2, Parallel Sysplex, MVS/ESA, AIX, S/390, AS/400, OS/390, OS/400, iSeries, pSeries, xSeries, zSeries, System i, System i5, System p, System p5, System x, System z, System z9, z/OS, AFP, Intelligent Miner, WebSphere, Netfinity, Tivoli, Informix, i5/OS, POWER, POWER5, POWER5+, OpenPower and PowerPC are trademarks or registered trademarks of IBM Corporation. Adobe, the Adobe logo, Acrobat, PostScript, and Reader are either trademarks or registered trademarks of Adobe Systems Incorporated in the United States and/or other countries. Oracle is a registered trademark of Oracle Corporation. UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group. Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registered trademarks of Citrix Systems, Inc. HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C, World Wide Web Consortium, Massachusetts Institute of Technology. Java is a registered trademark of Sun Microsystems, Inc. JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented by Netscape. MaxDB is a trademark of MySQL AB, Sweden. SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary. These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty. These materials are provided as is without a warranty of any kind, either express or implied, including but not limited to, the implied warranties of merchantability, fitness for a particular purpose, or non-infringement. SAP shall not be liable for damages of any kind including without limitation direct, special, indirect, or consequential damages that may result from the use of these materials. SAP does not warrant the accuracy or completeness of the information, text, graphics, links or other items contained within these materials. SAP has no control over the information that you may access through the use of hot links contained in these materials and does not endorse your use of third party web pages nor provide any warranty whatsoever relating to third party web pages. Any software coding and/or code lines/strings (Code) included in this documentation are only examples and are not intended to be used in a productive system environment. The Code is only intended better explain and visualize the syntax and phrasing rules of certain coding. SAP does not warrant the correctness and completeness of the Code given herein, and SAP shall not be liable for errors or damages caused by the usage of the Code, except if such damages were caused by SAP intentionally or grossly negligent.

You might also like