Вы находитесь на странице: 1из 30

Migration Monitor

Users’ Guide

The Migration Monitor is a tool which helps you to perform and control the unload and
load process during the system copy procedure. From NetWeaver 04 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
The Migration Monitor has to be started on the source database host (=> Export Monitor)
and on the target database host (=> Import Monitor).

Attention:
Socket option can’t be used for System Copy: Source System non-Unicode version
NW04 – Target System Unicode NW04
For all NW 7.00 and higher it is applicable.

1. Prerequisites

 JRE version 1.4.1 or higher


 JAVA_HOME environment variable must point to the JRE directory.
 The correct directory structure for R3load dump files must exist on both the
source and target hosts

1
2. Tool
The tool is located in the MIGMON.SAR SAPCAR archive.

Content of the archive file:


 migmon.jar; rescheck.jar; activation.jar; mail.jar
 export_monitor.sh / export_monitor.bat
 import_monitor.sh / import_monitor.bat
 res_check.sh / res_check.bat
 export_monitor_cmd.properties
 import_monitor_cmd.properties
 import_dirs.sh / import_dirs.bat
 MigrationMonitor.pdf

2
3. Configuration

Help
The tool will display the available parameters, if you call it with one of the following
command line options:
 -help
 -?

Version
The tool will display the version information (release branch and build date), if you call it
with the following command line option:
 -version

Java Version
The tool will display the used java version information, if you call it with the following
command line option:
 -javaversion

General Options
Name Description Comments
monitorTimeout Monitor timeout in During a timeout, the monitor thread
seconds sleeps and does not analyze any files
or analyze its processing state.
The default timeout value is 30
seconds.

E-Mail Options
Name Description Comments
mailServer SMTP server Server name or IP address of the
company SMTP server
mailFrom "From" e-mail
address
mailTo "To" e-mail address Can contain an address list separated
by „;‟ or blanks.

3
Additional Options
Name Description Comments
Bg Enables background Take effect only as command line
mode option.
If the tool is running in the
background mode, the UNIX shell
window or Windows command
prompt can be closed after startup.
secure Enables secure mode Take effect only as command line
option.
If the tool is running in the secure
mode, command line parameters (e.g.
passwords) will be hidden for java
process. The secure mode implicitly
enables background mode.
trace Trace level Possible values:
all, off,
1 (error), 2 (warning), 3 (info),
4 (config, default), 5, 6, 7 (trace)

4
Export Options
Option Description Comments
installDir Installation directory Directory where the installation tool
(SAPinst, R3SETUP) is started; if
you run the Migration Monitor
without using the installation tools,
then the installation directory is the
directory, where the R3load TSK
and log files will be written.
exportDirs List of export Separator on Windows: „;‟
directories Separator on UNIX: „:‟
The „exportDirs‟ parameter points
to the directory where the R3load
dump files will be written to. In the
„exportDirs‟ directory, the
subdirectories DATA, DB and
DB/<TARGET_DBTYPE>
(e.g. DB/ORA) have to exist.
client Client operating Running in client mode means, the
mode Monitor will run parallel with
standard SAPinst export process and
transfer the exported dump files onto
the import server.
server Server operating Running in server mode means, the
mode Monitor will create R3load TSK files
(if necessary). R3load cmd files and
start the 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 server mode, specify the
parameter ‘server’ in the Export Monitors properties file.
orderBy Package order Can be the „name‟ or path of the file
that contains package names.
If the option value is omitted then
package order is not determined.
ddlFile DDL control file Path or filename of DDL control file.
The default is DDL<DBTYPE>.TPL.
If the filename is used without path,
then the DDL control file from the
export DB subdirectory is used.
ddlMap DDL mapping file File with mapping between DDL
files and package names.
r3loadExe Path of the R3load Optional; the default is R3load.
executable If only the name of the R3load
executable is available, then JVM
looks for the R3load executable
using OS-specific process search

5
rules.
tskFiles „yes‟ to create task Before version 4.6 must be set to
files; „no‟ to skip „no‟; starting from version 4.7
„yes‟.
If the R3load task files „*.TSK‟
already exist then the monitor will
not overwrite them.
dataCodepage Code page for data See SAP Note 552464.
files Possible values: 4102, 4103, 1100
taskArgs Additional R3load Appended to the R3load command
arguments for the line.
TASK phase Options already set by the monitor:
-ctf; -l; -o (if the omit argument
is specified).
loadArgs Additional R3load Appended to the R3load command
arguments for the line.
LOAD phase Options already set by the monitor:
-e; -datacodepage; -l; -p; -r;
-socket (if the socket option is
specified); -o (if the omit argument
is specified and task files are not
used, that is, the value of the
„tskFiles‟ option is „no‟).
jobNum Number of parallel Any positive number; 0 for an
export jobs; the unlimited number of jobs. The value
default is 1. can be changed dynamically during
runtime.
decluster Default values is Possible values : true or false
(use this option false If this option is true – migmon calls
only for target R3laod with option –decluster.
dbType = HDB)
firstExportSAPNTAB Default values is Possible values : true or false
false If this option is true – migmon first
will export SAPNTAB package in
single thread mode.

6
Network Exchange Options
Option Description Comments
net Network operating Exported dump files must be visible
mode on the import host to use this mode.
netExchangeDir Network exchange Used for communication between the
directory export and Import Monitors.
Must be writable for Export Monitor
and readable for Import Monitor.
The Export Monitor will write a file
<package>.SGN to the network
exchange directory as a signal for the
Import Monitor, that the package is
exported successfully and the import
could be started.

FTP Exchange Options


Option Description Comments
ftp FTP operating mode Exported dump files will be
transferred automatically from the
source host (directory „exportDirs‟)
to the target host (directory
„importDirs‟) using FTP.
ftpHost Remote FTP host Name or IP address of the import
server.
ftpUser Name of the remote The FTP user specified here should be
FTP user the <sapsid>adm to make sure, that
the package files can be read by
during the import (which is started as
<sapsid>adm).
ftpPassword Password of the CAUTION: Security risk
remote FTP user
ftpExportDirs List of remote FTP Both „;‟ or „:‟ separators are valid.
directories for export This is the directory on the target host
dump to which the dump will be transferred.
The value will be the same as for
„importDirs‟ in the Import Monitors
property file.
ftpExchangeDir Remote FTP Used for communication between the
exchange directory export and Import Monitors.
Must be writable for the Export
Monitor and readable for the Import
Monitor. The Export Monitor will
write a file <package>.SGN to the
FTP exchange directory as a signal for

7
the Import Monitor, that the package
is exported successfully and the
import could be started.
ftpJobNum Number of parallel Any positive number; 0 for an
FTP jobs; the default unlimited number of jobs. The value
is 1. can be changed dynamically during
runtime.

Export Socket Options


Option Description Comments
socket Socket operating R3load will not write dump files to the
mode file system but the export and import
work through the socket connection.
host Remote import host Name or IP address of the import host.
port Host port number Must be the same as the port number
on the import host.
Any free port on the import host from
1024 to 65535.

FTP Copy Options


Option Description Comments
ftpCopy FTP copy operating Used as a separate program call for
mode migration with sockets. All files
produced by R3lctl and R3szchk will
be transferred from the source to the
target host using FTP.
exportDirs List of export Separator on Windows: „;‟
directories Separator on UNIX: „:‟
In the „exportDirs‟ directory, the
subdirectories DATA, DB and
DB/<TARGET_DBTYPE>
(e.g. DB/ORA) have to exist. The
R3load STR files have to exist in the
subdirectory DATA, the DDL*.TPL
files in the subdirectory DB, and the
R3load EXT files (if required) in the
subdirectory DB/<TARGET_DBTYPE>.
ftpHost Remote FTP host Name or IP address of the import
server.
ftpUser Name of the remote The FTP user specified here should be
FTP user the <sapsid>adm to make sure, that
the package files can be read by
during the import (which is started as

8
<sapsid>adm).
ftpPassword Password of the CAUTION: Security risk
remote FTP user
ftpExportDirs List of remote FTP Both „;‟ or „:‟ separators are valid.
directories for export This is the directory on the target host
dump to which the dump will be transferred.
The value will be the same as for
„importDirs‟ in the Import Monitors
property file.

Any other option is ignored by Export Monitor.

Mandatory Options for Export Monitor


Client mode: installDir, exportDirs,
one of the options ftp, net (and their related parameters)
Server mode: installDir, exportDirs, tskFiles,
one of the options ftp, net, socket (and their related parameters)
FTP copy: exportDirs, ftpHost, ftpUser, ftpExportDirs,
ftpExchangeDir

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

9
Import Options
Option Description Comments
installDir Installation directory Directory where the installation tool
(SAPinst, R3SETUP) is started; if you
run the Migration Monitor without
using the installation tools, then the
installation directory is the directory,
where the R3load TSK and log files
will be written.
importDirs List of import Separator on Windows: „;‟
directories Separator on UNIX: „:‟
The „importDirs‟ parameter points
to the directory where the R3load
dump files will be written to. In the
„importDirs‟ directory, the
subdirectories DATA, DB and
DB/<TARGET_DBTYPE>
(e.g. DB/ORA) have to exist.
orderBy Package order This option is used only if the Import
Monitor works without the Export
Monitor in stand-alone mode, that is,
all export dump files are available on
the import host before the Import
Monitor is started. Values can be:
name: load packages in alphabetical
order,
size: load packages starting with the
largest one,
or a path of the file that contains
package names.
If the option is omitted then package
order is not defined.
ddlFile DDL control file Path or filename of DDL control file.
The default is DDL<DBTYPE>.TPL.
If the filename is used without path,
then the DDL control file from the
export DB subdirectory is used.
ddlMap DDL mapping file File with mapping between DDL files
and package names.
r3loadExe Path of the R3load Optional; the default is R3load.
executable If only the name of the R3load
executable is available then JVM
looks for the R3load executable using
OS-specific process search rules.
tskFiles „yes‟ to create task Before version 4.6 must be set to „no‟;

10
files; „no‟ to skip starting from version 4.7 „yes‟.
If the R3load task files „*.TSK‟
already exist then the monitor will not
overwrite them.
extFiles „yes‟ to include EXT Add EXT file entries to cmd files;
files; „no‟ to skip If the EXT files cannot be found in
them DB/<TARGET_DBTYPE> import dump
subdirectory the package processing is
aborted.
dbCodepage Database code page See SAP Note 552464.
for the target Possible values: 4102, 4103, 1100
database
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
Only in case of HANA database:
-o M: omit merge; do not merge
-o U: omit unload; do not unload
table;

If you want to combine several omit


options, list these options without
blank (e.g. „-o TV‟).
taskArgs Additional R3load Appended to the R3load command
arguments for the line.
TASK phase Options already set by the monitor:
-ctf; -l; -o (if the omit argument is
specified).
loadArgs Additional R3load Appended to the R3load command
arguments for the line.
LOAD phase Options already used by the monitor:
-i; -dbcodepage; -l; -p; -k; -r;
-socket (if the socket option is
specified); -o (if the omit argument is
specified and task files are not used,
that is, the value of „tskFiles‟
option is „no‟).
jobNum Number of parallel Any positive number; 0 for an
import jobs; the unlimited number of jobs. The value

11
default is 1. can be changed dynamically during
runtime.
decluster false Possible values : true or false
(use this option If this option is true – migmon calls
only for target R3laod with option –decluster.
dbType = HDB)
ignorePackageSiz Default is false Possible values : true or false
eCalculation Use this option if you see performance
issue in the time before start the first
import jobs. The first task of Migmon
is to collect all packages that are
mention in importDirs parameter. In
this first step, called
“CollectPackages”, Migmon also
calculate the package size. If the
packages are spread on many mounted
locations this can consume a time. To
improve the performance of this first
step “CollectPackages” set this option
to “true”. Later the packages will be
imported without following “size
ordering” of packages. Use this option
only if there is a big delay for starting
the first import jobs.
collectLogicalPa Default is false Possible values : true or false
ckages Import Migration Monitor is extended
with this option for processing
“logical” packages. For one standard
package corresponds either one STR
or one WHR file (e.g.
SAPAPPL1.STR REPOSRC-1.WHR).
For one “logical” package corresponds
either one STR.logical or one
WHR.logical file (e.g.
SAPCLU4.STR.logical, SAPCDCLS-
1.WHR.logical).
The logical packages are located in the
same directory where the standard
packages are located for example
importDirs/ABAP/DATA.
Set this option to true if import is
running on HANA DB (HDB) and
export was run with decluster=true
option.

12
Import Exchange Options
Option Description Comments
exchangeDir Exchange directory If this option is not set, then the
monitor runs in stand-alone mode, that
is without the Export Monitor.
All the export dump files or the SAP
export CDs from the installation kit
must be available on the import host
and be specified with the parameter
„importDirs‟ (e.g. in the properties
file). If there is an old file
export_statistics.properties
(e.g. from a previous export run),
remove this file.

Import Socket Options


Option Description Comments
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


Server mode (default):installDir, importDirs, tskFiles, extFiles,
one of the options exchangeDir or socket (and their related
parameters)
Stand-alone mode: installDir, importDirs, tskFiles, extFiles

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

13
Dynamic Control of Import Monitor for SAP HANA database

To dynamically adjust the load of the SAP HANA database during import the
MigmonCtrl ( migmonctrl.jar) was created. It measures the load of the database in short
intervals and makes adjustments to the order_by.txt. Migmon uses the orderBy option in
this scenario and starts new R3load jobs accordingly.

Options for MigmonCtrl

Option Description Comments


username Username of Username of database user.
database user
password Password of Password of database user.
database user.
host Database host. Database host.
instanceNumber Instance number Instance number in two digit format,
in two digit e.g. '02'.
format.
importDirs Directories where Directories where export data to be
export data to be imported are located, e.g.
imported are '/sapcd3/DATA_UNITS/EXP3'
located.
order_by Package Order. This option is used only if the Import
Path to the Monitor works without the Export
order_by file Monitor in stand-alone mode, that is,
inlcuding the all export dump files are available on
name of the file. the import host before the Import
Monitor is started. Values can be:
name: load packages in alphabetical
order,
size: load packages starting with the
largest one,
or a path of the file that contains
package names.
If the option is omitted then package
order is not defined.
killOnFile Path to the kill Path to the kill signal file inlcuding the
signal file. name of the file.
import_state Property files Path to the import_state.properties file
inlcuding the name of the file. Default
file name is import_state.properties.
pollInterval Interval in The interval through which a new poll
milliseconds request is sent in milliseconds, default
is 5000.
test Connection test Ends after the test is done.

14
exchangeDir Same path as exchangeDir contains the SGN files
used for Migmon Migmon produces for each package
in case of parallel after it was successfully exported.
export / import
createTablesOnly Special modus in This option is used for the first step in
case of the Landscape Reorg scenario when
Landscape Reorg Migmon creates all tables without
Scenario importing any data.

Options for file migmonctrl_cmd.properties


MigmonCtrl creates file migmonctrl_cmd.properties during startup if it doesn‟t exist. It
reads through the file during every pollInterval. Parameters can be changed during the
run to manual do adjustments to the configuration.

Option Description Comments


loadRowstoreSeparate Load Rowstore Default is set to false.
tables after the This parameter is only read
Columnstore tables. once during startup!

memoryFactor Factor to multiply Default is set to 2.


the size of running
R3load jobs to have
a memory cushion in
the database for
Merge operations.
initialLargeJobNum Initial and minimum Default is set to 5.
number of R3load
jobs for group Large.
initialSmallJobNum Initial and minimum Default is set to 5.
number of R3load
jobs for group Small.
smallJobWeight Factor to calculate Default is set to 6.
the ratio between This means when the number
number of Jobs in of jobs in group Large is
group Large and increased by 1, 6 jobs must be
Small. added to group Small before
the number of jobs in group
Large will be increased again.

coreMultiplicator Factor to calculate Default is set to 4.


the maximum Deprecated.
number of R3load
jobs.
maximumJobNum Maximum number Default is set to 100.
of jobs in total. Only jobs from group Large,

15
Small and Rowstore are taken
into account.
The number of jobs Migmon
starts in total might be slightly
higher than this value as Post
jobs for splitted tables are not
taken into account.
jobNumRowstore Amount of R3load Default is set to 33
jobs set for group
Rowstore in case
the Columnstore
tables are loaded.
pause Sets Migmonctrl into Default is set to false.
pause mode where
no changes will be
done to file
order_by.txt
customGroupLarge Separate groups for Comma separated line.
customGroupMedium packages. Example:
customGroupSmall In case you want to customGroupLarge=REPOS
load a single RC,SAPSDIC
package right from
the start or with a Order_by.txt
[REPOSRC]
defined number of jobNum=…
jobs you can add it REPOSRC-1
to one of these REPOSRC-…
groups.
[SAPSDIC]
jobNum…
SAPSDIC

customGroupLargeJobNum Fixed number of


customGroupMediumJobNum R3load jobs for the
customGroupSmallJobNum groups.
jobDependencies Packages which Example:
need to be loaded jobDependencies=REPOSR
after each other can C,SAPSDIC
be defined here. SAPSDIC will be
Packages defined started after REPOSRC
has finished.
here must be also
defined as
customGroup

16
Mandatory Options for Dynamically Control of Import Monitor
Server mode (default): username, password, host, instanceNumber, importDirs,
order_by, killOnFile

Stand-alone mode: username, password, host, instanceNumber,importDirs,


order_by, killOnFile

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

After you have started migmonctrl you have to wait until the file order_by.txt is created
by migmonctrl before you start migmon. Migmon must be started with the orderBy
option.

4. Assigning DDL Files to Packages


It is possible to use several different DDL*.TPL templates during the export respectively
during the import. The assignment of a specific DDL file to a single package is done
within a simple text file, which then has to be specified via the ddlMap option within the
migration monitor‟s properties file. Packages no listed in the DDL mapping file will use
the default DDL control file.

17
Example of a DDL mapping file:
# DDL mapping file ddl_mapping.txt

# !!! line with [GROUP_NAME] can be skipped


# used for documentation purposes only

[ SORTED UNLOAD ]
# DDL file for sorted unload
ddlFile = /export_dump/ABAP/DB/ORA/DDLORA.TPL

# package names
SAPAPPL0
SAPAPPL1
SAPSDIC

[ UNSORTED UNLOAD ]
# DDL file for unsorted unload
ddlFile = ./DDLORA_LRG.TPL

# table names
TABLE_A
TABLE_B
TABLE_C

5. Defining Groups of Packages


The „package group‟ feature is an enhancement of defining a package order. By defining
groups you can e.g. prevent parallel execution of certain packages and you can define
how many large tables are exported or imported at the same time. In addition you can
specify different values for the parameter jobNum and taskArgs / loadArgs per
package. Package groups can be defined in the same text file in which the package order
can be defined as well (see parameter „orderBy‟). The old package order format is also
fully supported.
If package groups are defined, the maximal number of parallel R3load jobs is the sum of
jobNum of all packages. All packages without package group will be assigned to a
„default group‟ with the number of jobs which was defined in the migration monitor‟s
properties file.

Attention:
SAPVIEW and SAP0000 packages being ignored from ‘order By’ groups

18
Example of package order file with group:
# custom package order

# package names
SAPAPPL0
SAPAPPL1
SAPAPPL2

# package group
[ SEQUENTIAL GROUP ]
jobNum = 1

# table names
TABLE_A
TABLE_B
TABLE_C

6. Processing Split Tables


If tables have been split during the export, it has to be ensured for the import, that the
table is created (only once!) before any process tries to import data and that the primary
key and the indexes are created (only once!) before/after (as defined in the DDL
template) the table data have been imported (if the index should be created after loading
data). These single tasks will be synchronized by the migration monitor automatically.
WHR files are part of the package and have to be copied to DATA export subdirectory to
make sure, that the same WHR file is used for the export as well as for the import of the
corresponding package.

19
7. Starting the Migration Monitor
The tool can be started using one of the following:
 The UNIX shell scripts
export_monitor.sh / import_monitor.sh
 The Windows batch files
export_monitor.bat / import_monitor.bat
 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‟s working 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. To specify an option:
 in the command line,
enter „-optionName optionValue‟
 in the application property file,
insert the new line „optionName=optionValue‟

Example of a command line for a UNIX terminal:


./export_monitor.sh –ftp
./export_monitor.sh –ftpCopy
./export_monitor.sh –socket –host <import server> –port 5000

Example of a command line for Windows cmd.exe:


export_monitor.bat –net
export_monitor.bat –socket

If FTP access is used and security is required, start the monitor in the secure mode to
prevent seeing FTP password in the command line parameter string / property file.

Example of a command line for a UNIX terminal:


./export_monitor.sh –secure –ftpPassword <password>

Start the monitor and close the shell window / command processor. The monitor process
will run in background. Use monitor *.log and *.console.log files to check monitor
processing state.

20
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

# 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


mailFrom=mail@sap.com

# "To" email address


mailTo=mail@sap.com mail@yahoo.com

21
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


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


jobNum=3

#
# E-mail options
#

# SMTP server
mailServer=sap-ag.de

# "From" email address


mailFrom=mail@sap.com

# "To" email address


mailTo=mail@sap.com mail@yahoo.com

22
What happens during export / import with the above listed property files during a
system copy with source and target database Oracle:

 On the export host, the directories (see parameter exportDirs)


o c:\temp\export_dump\DATA
o c:\temp\export_dump\DB
o c:\temp\export_dump\DB\ORA
have to exist. The directory c:\temp\export_dump\DATA has to contain the
STR files generated by R3ldctl, the directory c:\temp\export_dump\DB the
files DDL<DBTYPE>.TPL generated by R3ldctl as well, the directory
c:\temp\export_dump\DB\ORA the EXT files generated by R3szchk.
 The Export Monitor will write the R3load dump files and the TOC files to the
directory c:\temp\export_dump\DATA.
 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 in client mode
(parameter „server‟ is not set).
 As soon as a package has been exported successfully, the Export Monitor will
transfer all files belonging to that package (TOC, STR, EXT, 001, ...) to the target
host (parameter: ftpHost) into the corresponding subdirectories of the directory
/install_dir/export_dump (parameter: ftpExportDirs) as user
<sapsid>adm (parameter: ftpUser) identified by password (parameter:
ftpPassword) to logon.
 If the package files have been transferred completely to the server, the Export
Monitor will write a signal file <package>.SGN to the directory
/install_dir/exchange (parameter: ftpExchangeDir) to notify the Import
Monitor, that it could start the import of this package.

 On the import host, the directories (see parameter importDirs)


o /install_dir/export_dump/DATA
o /install_dir/export_dump/DB
o /install_dir/export_dump/DB/ORA
have to exist. The directory /install_dir/export_dump/DATA has to contain
the STR files generated by R3ldctl, the directory
/install_dir/export_dump/DB the files DDL<DBTYPE>.TPL generated by
R3ldctl as well, the directory /install_dir/export_dump/DB/ORA the EXT
files generated by R3szchk.
 The import monitor will start to import a package as soon as the file
<package>.SGN is found in the directory /install_dir/exchange
(parameter: exchangeDir).
 The R3load log files, cmd files and TSK files (if required) will be located in the
directory /install_dir/start (parameter: installDir).
 The file DDLORA.TPL has to be copied to the directory /install_dir/start
(parameter: installDir) before starting the Import Monitor.

23
8. Starting the Dynamic Controller of the
Import Migration Monitor

Attention:
Dynamic Controller can be used only for target Hana DB.
The file import_monitor_cmd.properties should have this entry: dbType=HDB

The tool can be started using one of the following:


 The UNIX shell scripts
dyn_control_import_monitor.sh
 The Windows batch files
dyn_control_import_monitor.bat
 As part of the SAPinst export / import procedure

The application allows you to specify options in the command line.

Options are case-sensitive; any options that are not recognized are ignored. To specify an
option:
 in the command line,
enter „-optionName optionValue‟

Example of a command line for a UNIX terminal:


./dyn_control_import_monitor.sh -username myname -password mypass
-host myhost -instanceNumber 02
-importDirs/usr/exp/ABAP/ -order_by /home/myname/order_by.txt
-killOnFile /home/myname/MigMonCtrl.stop

The application allows you to specify options in the application property file. The name
of the property file is migmonctrl_cmd.properties
Templates for these files are included in the application archive and must be located in
the current user‟s working directory.

24
Example of a migmonctrl_cmd.properties file:

weightCounter=1
memoryFactor=12
initialLargeJobNum=5
initialSmallJobNum=12
coreMultiplicator=4
customGroupLarge=REPOSRC,SAPSSEXC
customGroupLargeJobNum=5
#customGroupMedium=
#customGroupMediumJobNum=
#customGroupSmall=
#customGroupSmallJobNum=
pause=false

Option Description Comments


weightCounter Default is 1
memoryFactor Necessary amount of memory is It directly affects the
multiplied by this parameter. number of R3load jobs.

initialLargeJobNum Minimum number of R3load Default is 12.


jobs for group large.
initialSmallJobNum Minimum number of R3load Default is 5.
jobs for group small
coreMultiplicator Used mainly to calculate the Default is 4.
maximum number of R3load
jobs.
customGroupLarge, You can specify tables or Not used by default.
-Medium, packages to be load in a
-Small separate group.
customGroupLargeJob Specifies the number of R3load Not used by default.
Num, jobs in the groups above.
-MediumJobNum,
-SmallJobNum
pause If set to true, it skips the Default is false.
calculation.

25
9. Output Files
Export
 export_monitor.log
 export_state.properties
 ExportMonitor.console.log

Import
 import_monitor.log
 import_state.properties
 ImportMonitor.console.log

Dynamic controller
 migmonctrl.log
 MigmonJobber.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 not yet started.
+? Package transfer in progress.
+- Package transfer finished with errors.
++ Package transfer finished successfully.

26
10. Restarting R3load Processes
The state file allows package states to be manually updated to restart failed R3load
processes.
For example, if package processing failed and the package state has the value –, the state
can be set to 0 and processing of the package will be started again.

To restart package processing, set the package state from - to 0.


To skip package processing, set the package state from 0 or - to +.
(This is not recommended because it can cause inconsistent data files or database
content.)
If the package is currently being processed (the package state is ?) then any manual
modifications of the package state are ignored.

27
11. Integration into the SAPinst Copy Procedure

NW2004s
The tool is fully integrated into SAPinst system copy procedure, for details see the
standard system copy guide.

NW04 SR1
The integration will be part of the standard system copy guide.

Note: Using the Export Monitor in Parallel with SAPinst


The Export Monitor can be started as an additional tool for the SAPinst standard export
process. In this case, the monitor transfers any completed export packages to the target
host.
The Export Monitor can be started in parallel with SAPinst, but only after the dump
directories are created on both the export and import server.

NW 04 / WebAS 6.40
The integration is described in the following guide:
“Homogeneous and Heterogeneous System Copy for SAP Systems Based on SAP® Web
Application Server 6.40”

Versions before WebAS 6.40 (R3E 4.7 SR1 and Previous)

Export Monitor
1. If FTP access is used, verify that the required directories exist on the import
server before the monitor is started. The import_dirs.sh shell script or the
import_dirs.bat batch file can be used to create the correct directory
structure.
2. Create or edit the export_monitor_cmd.properties file to specify the
correct monitor options.
3. Start the Export Monitor as the <sapsid>adm user.
4. If any export errors occur, restart the monitor after the problem has been fixed.

CAUTION: If you do not use the system copy tools R3SETUP/SAPinst to perform the
export, then make sure, that the STR files are located in the DATA subdirectory and the
EXT files in the DB/<TARGET_DBTYPE> subdirectory of the „exportDirs‟ parameter.

28
Import Monitor
1. Install the Central Instance.
2. Run the installation of the Database Instance.
Attention: If you want to start the installation of the target system before the
export of the source system has been started, make sure that at least the files
<importDir>/LABEL.ASC
<importDir>/DB/<your database>/DBSIZE.{TPL|XML}
<importDir>/DB/DDL<your database>.TPL
exist and contain the correct data.
3. Interrupt the installation after all files are copied to the installation directory.
4. Modify the file control.xml / *.R3S.
R3SETUP
a) Add an exit step to the EXE section right before the section
DBR3LOADEXECDUMMY*.
b) Remove the sections DBR3LOADEXECDUMMY* and
DB3LOADEXEC_* from the EXE section.
SAPinst
a) Add an exit step as a follow-on step to the component that is
processed immediately before the database load.
a) Remove the subcomponent call of DatabaseLoad from the
CSAPComponent.
5. Restart the installation from the installation directory.
6. Create or edit the import_monitor_cmd.properties file to specify the
correct monitor options.
7. After the exit step, start Import Monitor as the <sapsid>adm user.
8. If there are any import errors, restart the monitor after the problems have been
fixed.
9. After all packages have been loaded successfully, restart the installation tool and
finish the installation.

CAUTION: If you do not use the system copy tools R3SETUP/SAPinst to perform the
import, then make sure, that the DDL<TARGET_DBTYPE>.TPL files are located in the
„installDir‟ directory.

29
12. Release Notes

New Features in NW2004s SR2

 Maximum Java heap size is increased to 1GB (via -Xmx1024m java option).
 Fix: unnamed groups (without [GROUP_NAME] header) are supported in DDL
mapping file.
 Tables split into separate packages but which should be copied empty (like DDLOG)
are processed correctly during the import.

New Features in NW2004s SR1

 The number of R3load jobs and the number of parallel FTP jobs can be changed
during runtime.
 Only one instance of the Migration Monitor can be started simultaneously in the same
working directory (file locking is used).
 Background and secure execution via -bg and –secure command line options.
 Automatic synchronization of tasks for splitted tables.
 New option ddlFile will allow using non default DDL control file.
 If R3load generates for package empty TSK file the processing of such package is
skipped.
 Export statistics file export_statistics.properties in exchange directory is
removed by restart of Export Monitor.
 Package load / unload order is predefined if –orderBy option is not used.
Default package unload order by export is by name, by import by size.
In socket mode only package export order plays role, package order specified by
import is ignored.
 Package order file with package names can contain comment lines like
# some text …

30

Вам также может понравиться