Friday, November 18, 2016

Useful information for OS/DB Migration -5


SAPInst and R3SETUP:

The SAP installation tools SAPInst and R3SETUP are used to install SAP
systems or to unload or load systems during a system copy procedure. They
invoke other tools (for example, R3ldctl, R3szchk, and R3load) and control the
entire installation and migration process. Some of the tasks that the tools perform
include:


  1. Creating users or groups on the operating system level
  2. Adapting file system rights
  3. Installing SAP binaries (Kernel)
  4. Triggering the database unload and load processes.
  5. riggering post processing such as collecting database statistics



NOTE:SAPInst is used as of SAP basis Release 6.10, whereas R3SETUP supports

basis Releases 3.1I up to 4.6D



To simplify the migration process, the SAP installation tool SAPInst provides
software life-cycle options.


  1. Export preparation
  2. Table splitting preparation
  3. Database Instance export



R3load:  R3load is the core migration tool. It exports SAP ABAP table data from the
source database and imports it into the target database.

                                     

R3ldctl: R3ldctl unloads SAP ABAP data dictionary structures from the source system. It
generates structure files (*.STR files) that describe the definition of tables,
indexes, and views. In addition, it generates database-specific template files
(*.TPL files) with definitions of DDL statements, for example, statements to
create a table, to drop a table, and so on.


R3szchk:  R3szchk computes the size of tables and indexes for the target database.


You may run the R3szchk while the system is still up and running and used for
production

Note: R3szchk requires that the STR files created by R3ldctl calculate the
target size. If running R3szchk and R3ldctl while the system is up and
running, no change of the data definition is allowed afterwards (for
example, by new transports). These changes will not be reflected in the
STR files, so the export will not be consistent or will fail.


Another option for reducing the runtime is to use the option –r together with
an input file to avoid the expensive statements. This file contains the name of
the table and the number of records for this table. Running R3szchk with the
option –r and the file containing the number of records will reduce the runtime
by factors


Migration monitor: MigMon:

The main aspects and attributes of the MigMon are:

  • Allow advanced control of R3load export and import.
  • Automate dump shipping between source and target system.
  • Support parallel unload and load processing.
  • MigMon is controlled by properties files.


Properties files are constantly reread after a defined time period, so some
attributes, such as the number of parallel R3load processes, can be adjusted
dynamically.


For every package you get the following information:

Package: The name of the package that was exported (may also be only one
 table, if split out).
Time: The runtime needed to export the package.
Start date: Date and time when the export of the package starts.
End date: Date and time when the export of the package ends.
Size MB: Size of the exported package in MB (for example, on disk).
MB/min: Export rate in MB per minute (related to the export file size).


At the end of the output you have information  about the following items:

Sum of the export times
Start time of the export process
End time of the export process
Size of the export (sum of all export files)



SAP provides several tools for splitting packages or tables:

Package Splitter:

This splits tables from existing structure files. You can explicitly specify the
tables that should be split into separate structure files. You can also split
tables into separate packages if their size exceeds a configurable threshold.
Other split options are also available.

R3ta:

This tool can generate multiple WHERE conditions for a table, which can then
be used to export the data of this table with multiple R3load processes in
parallel. Each R3load process requires a WHERE condition to select only a
subset of the data in the table.

SAPInst:

This tool can be used for the table splitting preparation. It invokes R3ta and
the Package Splitter, and also automates some of the tasks that would
otherwise need to be performed manually.


SAP system stores table definitions in the data dictionary table DD02L

                                           

Note: If a code page conversion is performed, table clusters must be unloaded
sorted. 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 ensures that table clusters are exported in sorted order during a
code page conversion


When using the MigMon, you may use the ddlMap option in the export properties
file, which names a file that contains the mapping between the package names
and the DDL template files.


Package splitting:

Image:

All tables in an SAP system are assigned to a data class (TABART).
The relationship between a table and the data class is maintained in table DD09L.

                                           
                               
During the export preparation, R3ldctl generates one structure file (STR file) for
each data class. Each structure file is processed by a single R3load process.

You can specify a size limit for the data packages that are generated by the R3load
process in the corresponding cmd file, but all data packages of the structure file
are created sequentially by one R3load process.

Therefore, depending on the amount and size of tables defined in the structure file, the export can take a long time.

Usually, there are a lot of tables in the APPL data classes and some very large
tables in data class APPL1.

When exporting such a system without splitting the structure files, the processing
of packages that contain several large tables may dominate the total runtime of
the export.

One solution is to split a single structure file into multiple files with the package
splitting tool. There are two different versions available:

Perl based
Java™ based

Since only the Java tool is to be maintained in the future, this is the tool of choice.


The Java STR splitting tool provides the following features:



  •  Split out the largest <n> tables into separate structure files. Each file contains  a single table.
  • Split tables that exceed a defined size limit into separate structure files. Each file contains a single table.
  • Split structure files for which the tables exceed a defined size limit. Each file may contain one or more tables.
  • Split tables into separate structure files by specifying their names in an input file. Each line of this input file contains a single table name.
  •  You can invoke the package splitter manually or by using SAPInst.
  •  The parameters that are required to control the program flow can be supplied on the command line or by defining them in a file named
  •  package_splitter_cmd.properties.

                                             























1 comment: