You are on page 1of 16

PUBLIC

SAP HANA Platform 2.0 SPS 01


Document Version: 1.0 2016-11-30

SAP HANA System Migration


Big-Endian to Little-Endian on POWER Architectures
Content

1 SAP HANA System Migration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

2 Preliminary Remark. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

3 Prerequisites. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

4 System Setup. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6

5 Migration Process. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

6 Manual Post-processing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

7 Handling Issues. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

SAP HANA System Migration


2 PUBLIC Content
1 SAP HANA System Migration

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.

SAP HANA System Migration


SAP HANA System Migration PUBLIC 3
2 Preliminary Remark

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:

1. Open Installation & Upgrade Guides on SAP Service Marketplace.


2. Select SAP NetWeaver.
3. Select the appropriate SAP NetWeaver release.
4. Select Installation.
5. Select System Copy.
6. Select SAP HANA Database as Database of the target system.
7. Select Operating System: UNIX and Technical Stack: ABAP from the matrix.

Related Information

Installation & Upgrade Guides

SAP HANA System Migration


4 PUBLIC Preliminary Remark
3 Prerequisites

Supported Product Versions

The following product versions are the minimum supported versions:

Table 1:

Component Version

Source Database SAP HANA Platform 1.0 SP12, starting with Revision 122.04

Target Database SAP HANA Platform 2.0

Data Provisioning Agent Must be compatible with SAP HANA Platform 2.0

Multitenant Database Containers

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.

SAP HANA Dynamic Tiering

Currently, this tool does not support the migration of systems using SAP HANA Dynamic Tiering.

SAP HANA System Migration


Prerequisites PUBLIC 5
4 System Setup

Target System Installation

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

Install the DPAgent as described in the SDI installation guide.

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.

Extract the Migration Tool

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

A directory DBMigrationTool will be provided which contains the tool.

SAP HANA System Migration


6 PUBLIC System Setup
Verify Source System Compatibility

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:

SELECT 'TRUE' FROM SYS.P_PROCEDURES_ WHERE NAME =


'SYSTEM_COPY_EXPORT_CATALOG_DEV'

It returns a row ('TRUE') if the required procedure is present and an empty result set if the required procedure
is not present.

Create a User in the Source System

For security and traceability reasons, the system migration tool must use a designated user. This has the
following benefits:

The user can be specifically audited in the source system.


The set of privileges needed for the migration can be separated from privileges "normally" granted to a
user.
After the migration is complete, the user can be dropped, and all privileges granted to the user are
removed, as well as additionally created objects that were used only during the course of the system
migration.

In the following sections we will call this user the SYSTEMMIGRATION user, but it can have any name.

Grant Privileges to SYSTEMMIGRATION User

The following privileges need to be granted to the SYSTEMMIGRATION user:

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:

SELECT SCHEMA_NAME FROM PUBLIC.SCHEMAS WHERE SCHEMA_OWNER = '_SYS_REPO'

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>

SAP HANA System Migration


System Setup PUBLIC 7
catalog schema "_SYS_STATISTICS": SELECT;
system privilege: ADAPTER ADMIN, AGENT ADMIN, CATALOG READ, CREATE REMOTE
SOURCE, DATA ADMIN, INIFILE ADMIN, IMPORT, EXPORT;
}

Activate the role and grant it to the SYSTEMMIGRATION user.

Note
SAP HANA Deployment Infrastructure (HDI)

In case you are using SAP HANA Deployment Infrastructure, you can grant the privileges via a stored
procedure:

CALL _SYS_DI.GRANT_CONTAINER_SUPPORT_PRIVILEGE('<your container>', 'SELECT',


'SYSTEMMIGRATION', _SYS_DI.T_NO_PARAMETERS, ?, ?, ?);
CALL _SYS_DI.GRANT_CONTAINER_SUPPORT_PRIVILEGE('<your container>', 'INSERT',
'SYSTEMMIGRATION', _SYS_DI.T_NO_PARAMETERS, ?, ?, ?);
CALL _SYS_DI.GRANT_CONTAINER_SUPPORT_PRIVILEGE('<your container>', 'UPDATE',
'SYSTEMMIGRATION', _SYS_DI.T_NO_PARAMETERS, ?, ?, ?);
CALL _SYS_DI.GRANT_CONTAINER_SUPPORT_PRIVILEGE('<your container>', 'DELETE',
'SYSTEMMIGRATION', _SYS_DI.T_NO_PARAMETERS, ?, ?, ?);

Example

Create the user and grant essential privileges as SYSTEM user in source system:

SYSTEM user in source system


DROP USER SYSTEMMIGRATION CASCADE;
CREATE USER SYSTEMMIGRATION PASSWORD Password1234 [NO
FORCE_FIRST_PASSWORD_CHANGE];
GRANT EXECUTE ON SYS.SYSTEM_COPY_EXPORT_CATALOG_DEV TO SYSTEMMIGRATION;

Then, assign the design time role 'systemmigration.utils:migration' to the user.

For each schema to be migrated, grant the necessary privileges:

Schema owner in source system


CONNECT <schema_owner> PASSWORD <password>;
GRANT SELECT, INSERT, UPDATE, CREATE ANY, DELETE ON SCHEMA <schema> TO
SYSTEMMIGRATION;

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:

Section Parameter Description Default Value

source Configuration of source system properties

host Source system host name

SAP HANA System Migration


8 PUBLIC System Setup
Section Parameter Description Default Value

port Source system SQL port

user Source system SQL user

target Configuration of target system properties

host Target system host name

port Target system SQL port

tables Configuration options of the migration of tables

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.

loadOrder Possible options: largestFirst, smallestFirst, random random

schemas Configuration options of database schemas

exceptionlist A comma separated list of schemas that are excluded from


the migration.

agent Configuration of the Data Provisioning Agent

host Host name of data provisioning agent installation.

port Port of data provisioning agent 5050

main General Properties

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.

splitting Configuration of table splitting optimizations of initial


load

SAP HANA System Migration


System Setup PUBLIC 9
Section Parameter Description Default Value

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.

nativeCopy Configuration of table copy via client program

sizeThreshold Threshold on binary table size, tables larger than the thresh
old will be copied using client

rowThreshold Threshold on row numbers, tables with more rows will be


copied using client

chunkSize Number of rows that is processed in one transaction

SAP HANA System Migration


10 PUBLIC System Setup
5 Migration Process

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:

targetserver:$> export PYTHONPATH=$DIR_SYSEXE/global/hdb/:$PYTHONPATH


targetserver:$> python migrateSystem.py --configFile=~/migration.properties [--
sourcePassword xxx] [--targetPassword xxx] [--log LOGLEVEL] [--
ignoreUnsupportedScenarios]

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.

SAP HANA System Migration


Migration Process PUBLIC 11
Check migration status

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:

SELECT * FROM CATALOGMIGRATION_RESULTS;


SELECT * FROM CATALOGMIGRATION_RUNS;
SELECT status, count(*) FROM SYSTEM_MIGRATION_TASKS group by status;

Troubleshooting

Table 3:

Issue Cause Solution

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.

SAP HANA System Migration


12 PUBLIC Migration Process
6 Manual Post-processing

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

SAP HANA System Migration


Manual Post-processing PUBLIC 13
7 Handling Issues

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.

SAP HANA System Migration


14 PUBLIC Handling Issues
Important Disclaimers and Legal Information

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

SAP HANA System Migration


Important Disclaimers and Legal Information PUBLIC 15
go.sap.com/registration/
contact.html

2016 SAP SE or an SAP affiliate company. 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 SE
or an SAP affiliate company. The information contained herein may
be changed without prior notice.
Some software products marketed by SAP SE and its distributors
contain proprietary software components of other software
vendors. National product specifications may vary.
These materials are provided by SAP SE or an SAP affiliate company
for informational purposes only, without representation or warranty
of any kind, and SAP or its affiliated companies shall not be liable for
errors or omissions with respect to the materials. The only
warranties for SAP or SAP affiliate company 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.
SAP and other SAP products and services mentioned herein as well
as their respective logos are trademarks or registered trademarks
of SAP SE (or an SAP affiliate company) in Germany and other
countries. All other product and service names mentioned are the
trademarks of their respective companies.
Please see http://www.sap.com/corporate-en/legal/copyright/
index.epx for additional trademark information and notices.

You might also like