Professional Documents
Culture Documents
2 Preliminary Remark. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
3 Prerequisites. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
4 System Setup. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6
5 Migration Process. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
6 Manual Post-processing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
7 Handling Issues. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
The system migration tool enables you to migrate an SAP HANA Platform 1.0 SPS 12 system from a IBM
Power system on Big Endian / SLES 11 to an SAP HANA Platform 2.0 system on another IBM Power system on
Little Endian / SLES 12.
Caution
The update scenarios described in section Perform an Update With the SAP HANA Database Lifecycle
Manager in the SAP HANA Master Guide are only valid for Intel-Based Hardware Platforms.
Before using the SAP HANA system migration tool, please consult the SAP HANA System Copy Guide in order
to check whether your scenario might be covered by one of the other available migration options.
The SAP HANA System Copy Guide can be accessed via the SAP Service Marketplace:
Related Information
Table 1:
Component Version
Source Database SAP HANA Platform 1.0 SP12, starting with Revision 122.04
Data Provisioning Agent Must be compatible with SAP HANA Platform 2.0
In case you are using multitenant database containers, each container has to be migrated separately. Cross-
database access has to be set up again after the migration of all containers has been completed.
Currently, this tool does not support the migration of systems using SAP HANA Dynamic Tiering.
The target system must be empty for the migration to proceed. This also means it must be installed without
loading the HANA content. Use the --hdbinst_server_import_content=OFF switch with hdblcm during
installation to fulfil this prerequisite.
DPAgent
Note
As described in chapter Agent JVM Out of Memory in the Administration Guide for SAP HANA EIM, consider
increasing the memory of the dpagent when running into out of memory issues on the dpagent.
DPServer
Connect to the target system and add a dpserver instance to it. For more information, see chapter Enable the
Data Provisioning Server in the Administration Guide for SAP HANA EIM.
The migration tool is delivered with SAP HANA Platform 2.0, but only in compressed form. You need to extract
it manually. Log in as <sid>adm and run the following commands:
Installation
cd $DIR_SYSEXE/global/hdb/
tar -xzf dbEndiannessMigration.tgz
To check whether the source system has been updated to a compatible service pack that enables the
migration, execute the following statement as user SYSTEM:
It returns a row ('TRUE') if the required procedure is present and an empty result set if the required procedure
is not present.
For security and traceability reasons, the system migration tool must use a designated user. This has the
following benefits:
In the following sections we will call this user the SYSTEMMIGRATION user, but it can have any name.
The system privileges ADAPTER ADMIN, AGENT ADMIN, CATALOG READ, CREATE REMOTE SOURCE,
DATA ADMIN, INIFILE ADMIN, IMPORT, EXPORT such that the migration user can see the catalog, and
create data structures needed during the course of the migration
SELECT, INSERT, UPDATE, DELETE privileges on all database schemas which are migrated
EXECUTE on SYS.SYSTEM_COPY_EXPORT_CATALOG_DEV (has to be granted by SYSTEM)
To grant access to schemas created by the SAP HANA Repository, a design time role needs to be created. To
get the schemas, which need to be privileged, execute:
Grant privileges using a design time role. An example role would look like this, but there may be more entries:
role systemmigration.utils::migration {
catalog schema "_SYS_REPO": SELECT, INSERT, UPDATE, DELETE;
catalog schema "_SYS_BI": SELECT, INSERT, UPDATE, DELETE;
catalog schema "_SYS_BIC": SELECT, INSERT, UPDATE, DELETE;
catalog schema "_SYS_RT": SELECT, INSERT, UPDATE, DELETE;
catalog schema "_SYS_XS": SELECT, INSERT, UPDATE, DELETE;
<additional schemas retrieved via above query added here>
Note
SAP HANA Deployment Infrastructure (HDI)
In case you are using SAP HANA Deployment Infrastructure, you can grant the privileges via a stored
procedure:
Example
Create the user and grant essential privileges as SYSTEM user in source system:
Configuration
The system migration tools are configured in a configuration file. A template, named 'migration.properties' is
stored in the DBMigrationTool directory. The following parameters can be specified in the file:
Table 2:
list In case you want to migrate only certain tables, you can
specify a file containing a list of entries in the form <sche
maname>.<tablename>, one entry per line, for this option
exceptionList Similar to the previous option, you can specify a list of tables
not to migrate in the same format here.
logLevel Log level to print. Possible values: debug, info, warning, er info
ror, critical
concurrency The number of tables to load in parallel. Only relevant for ini 3
tial load.
dataSourcePrefix The migration tool will create data sources in the target sys MIGRATE_DS
tem pointing to the source system. They will all be prefixed
with this name to separate them from any other objects.
agentName The migration tool will create a data provisioning agent with MIGRATE_AGENT
this name in the target system to use during migration.
splitThreshold The migration tool will split large partitioned tables. How 1000000
ever this is only relevant for large tables. This setting is the
minimum rowcount of tables before splitting them is consid
ered.
maxPartitions The migration tool will use heuristics to determine columns 1000
which can be used to split non-partitioned tables into parti
tions. This is the maximum number of distinct values for a
column to be considered for use in this case.
sizeThreshold Threshold on binary table size, tables larger than the thresh
old will be copied using client
Caution
Stop using the source system!
You must not use the source system at any time during the migration process. Any changes made in the
source system after having started the migration process might lead to inconsistencies in the target
system. In case there are DDL statements in the source system during the migration, you will not be able to
finalize the migration.
Initial Load
Ensure the directory DBMigrationTool is in the python path, then invoke the system migration tool. This is
an example of what this can look like:
The tool will start migrating the database catalog to the target system. Afterwards, all data is migrated.
For security purposes, we recommend not passing the password via command line. The tool will prompt for
the necessary passwords.
Passing the log level via command line takes precedence over the configuration file.
There are some unsupported scenarios in which case migration is not possible: History tables and a time
difference of more than 1 second between the two machines. In case such scenarios are found, the migration
lists the issues it found and exits. Either clear up the situation or pass the option to ignore them. In this case
the migration tool will do its best to ignore such objects and migrate the rest of the system. However there
may be cases where this does not properly work, depending on what scenarios are found.
While the system is being migrated, the tool must continue to run. If it ends for whatever reason, you may re-
start it. The tool will analyze the current status and continue where it left of. Each re-start may increase the
time needed to migrate the system since tables might be migrated again if their migration was interrupted.
The tool will stop automatically as soon as the migration of all tables has finished.
While the migration is running, you can check its current status with the following statements that can be
executed as the SYSTEMMIGRATION user in the respective schema:
Troubleshooting
Table 3:
Internal Error: Cannot exe The catalog import did not A detailed dump is written into the index server trace. It con
cute migration steps, re finish successfully. tains information which objects cannot be migrated, and
maining dependencies are what errors did happen. It may point to objects which are in
not met valid and cannot be recreated, and which may need to be re
moved from the source system.
Cannot connect after migra Password of SYSTEM user After migration has finished the SYSTEM user of the target
tion to target database with was also migrated system has same password as the SYSTEM user of the
SYSTEM user source SYSTEM.
Post Migration
As soon as the initial load has finished successfully, the tool can be restarted it with --postMigration as
additional argument. This will migrate changes that can only be applied at the very end of the migration and
clean up any objects used during migration (such as the used data sources).
Afterwards, restart your HANA instance. This is necessary to update the internal data structures of the HANA
1.0 repository.
Now, move all clients over to the new system, i.e. update the database connection details.
In order to upgrade the content to SAP HANA Platform 2.0 level, run the following as <sid>adm:
Install content
cdins
cd bin
./hdbupdrep
For security reasons, it is recommended to drop the user used for the migration after it has successfully
finished. You can use the script dropMigrationUser.py that is part of the migration tool for this purpose. Give it
the credentials to your system and it will drop the user and all related objects.
Some objects will not be migrated automatically. You have to take an appropriate action for each of them,
depending on your needs.
Customer-specific settings in the SAP HANA configuration files ("ini files") will not be migrated
automatically. They can be restored as described in the SAP HANA Administration Guide (section: Backing
Up Customer-Specific Configuration Settings).
The configuration and tasks related to SAP HANA Smart Data Integration will not be migrated
automatically. Consult the Master Guide for SAP HANA Smart Data Integration and SAP HANA Smart Data
Quality for details how to set up SAP HANA Smart Data Integration.
SAP HANA Smart Data Access objects like remote sources and all objects based on these (e.g. virtual
tables) will not be migrated automatically. Information on setting up SAP HANA smart data access can be
found in the SAP HANA Administration Guide (section: SAP HANA Smart Data Access).
The auditing configuration (e.g. audit policies) will not be migrated automatically. For details on how to
configure auditing, consult the SAP HANA Administration Guide or the SAP HANA Security Guide (section:
Auditing Activity in SAP HANA Systems).
Information about the last passwords of users used to prevent users from reusing their passwords will not
be migrated.
Information about invalid connection attempts used to lock users after a certain number of attempts will
not be migrated.
LiveCache data will not be migrated. See SAP Note 632357 for details on how to migrate it.
Cross-database access scenarios will not be migrated, as each tenant database is considered as
standalone and therefore migrated separately. Information on enabling and configuring cross-database
access can be found in the SAP HANA Administration Guide (section: Enable and Configure Cross-
Database Access).
Comments (e.g. on tables, views and their columns) will not be migrated. For details on how to create
comments in the target system, check the SAP HANA SQL and System Views Reference (section:
COMMENT ON Statement (Data Definition)).
Migrated XSC applications will only be available after restarting the SAP HANA database, and performing
the hdbupdrep command.
Related Information
SAP Note 632357 - Backup of data from liveCache for SCM 4.0 and higher SCM releases
In case of errors during the migration, it might be necessary to clean the target system. For this case it is
recommended to create a backup immediately after the installation before starting the migration. Then you
can recover this backup to start over.
Coding Samples
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 to 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, unless damages were caused by SAP
intentionally or by SAP's gross negligence.
Accessibility
The information contained in the SAP documentation represents SAP's current view of accessibility criteria as of the date of publication; it is in no way intended to be
a binding guideline on how to ensure accessibility of software products. SAP in particular disclaims any liability in relation to this document. This disclaimer, however,
does not apply in cases of willful misconduct or gross negligence of SAP. Furthermore, this document does not result in any direct or indirect contractual obligations
of SAP.
Gender-Neutral Language
As far as possible, SAP documentation is gender neutral. Depending on the context, the reader is addressed directly with "you", or a gender-neutral noun (such as
"sales person" or "working days") is used. If when referring to members of both sexes, however, the third-person singular cannot be avoided or a gender-neutral noun
does not exist, SAP reserves the right to use the masculine form of the noun and pronoun. This is to ensure that the documentation remains comprehensible.
Internet Hyperlinks
The SAP documentation may contain hyperlinks to the Internet. These hyperlinks are intended to serve as a hint about where to find related information. SAP does
not warrant the availability and correctness of this related information or the ability of this information to serve a particular purpose. SAP shall not be liable for any
damages caused by the use of related information unless damages have been caused by SAP's gross negligence or willful misconduct. All links are categorized for
transparency (see: http://help.sap.com/disclaimer).