Preparing to Use the Self-Service Migration Tool

Objectives

After completing this lesson, you will be able to:

  • Perform the preparation steps before using the self-service migration tool

Overview of the Preparation Steps

Before starting the self-service migration tool, some preparation steps should be performed.

Administrator Access to Subaccount

To deploy an SAP HANA Cloud database instance, you require access to a subaccount of your company's SAP BTP global account. Your subaccount user must have the Subaccount Administrator role collection. If your user account is missing this role collection, please contact your companies SAP BTP global account administrator and make sure this role collection is assigned to your user account.

Access to SAP HANA Cloud Administration Tools

To create and administer SAP HANA Cloud database instances, you require SAP HANA Cloud - tools plan in your subaccount. This service plan grants you access to the new multi-environment SAP HANA Cloud tools for database administration. The SAP HANA Cloud tools, include SAP HANA Cloud Central, SAP HANA cockpit, and SAP HANA database explorer.

To activate the new multi-environment SAP HANA Cloud tools, follow the instructions in the blog – SAP HANA Cloud goes "multi-environment": Part 2- getting started. In this blog, Tom Slee explains the steps how to activate and configure the multi-environment SAP HANA Cloud tools.

If you're interested in the benefits and features of the multi-environment SAP HANA Cloud tools, then please read Tom's the blog – SAP HANA Cloud goes "multi-environment": Part 1- feature overview. It's a good place to start.

Currently the original SAP HANA Cloud tools in Cloud Foundry are still available, but the Cloud Foundry edition of SAP HANA Cloud Central is deprecated. SAP recommends to switch to the new multi-environment SAP HANA Cloud tools as development will focus on the new tools.

Where to Find the SAP HANA Cloud Central

In SAP BTP Cockpit, navigate to the SAP HANA Cloud Central using the following path:

  1. In the subaccount navigation area, choose Instances and Subscription.
  2. In the Applications table, select SAP HANA Cloud.
  3. In the navigation area, choose Instances. Here you can create and manage your SAP HANA Cloud database instances.
The image shows how to navigate from the SAP BTP Cockpit entry screen to the SAP HANA Cloud Central.

Access to the Self-Service Migration for SAP HANA Cloud Tool

The Self-Service Migration for SAP HANA Cloud tool is part of the SAP HANA Cloud Central without any extra configuration steps for the two SAP HANA Service scenarios (Neo and Cloud Foundry). For the SAP HANA on-premises scenario, you require the connectivity_proxy service plan to be added to the connectivity service. If this service plan isn't available in the connectivity service, contact the SAP BTP global account administrator to get this service plan added as it required for the self-service migration for SAP HANA Cloud.

Where to Find the Self-Service Migration Tool

In SAP BTP Cockpit, navigate to the Self-Service Migration tool using the following path:

  1. In the subaccount navigation area, choose Instances and Subscription.
  2. In the Applications table, select SAP HANA Cloud.
  3. In the navigation area, choose Migrations. Here you can create and manage your migrations to SAP HANA Cloud.

Deploy an SAP HANA Cloud Database Instance

Before you deploy an SAP HANA Cloud database instance, you need to consider the database memory and storage size, the hyperscaler, and region you want to use. Information on SAP HANA Cloud database sizes and performance classes can be found here and here.

How to provision an SAP HANA Cloud database instance is explained in the SAP Learning Journey Provisioning and Administering Databases in SAP HANA Cloud in the unit Provisioning Databases in SAP HANA Cloud. Follow the instructions provided to create the migration target database.

Create a Migration User in the Source Database

Migrating from an SAP HANA database to SAP HANA Cloud requires a dedicated user in your SAP HANA source database. The Self-Service Migration tool will check whether the provided user has all needed privileges to perform the migration. Any missing privileges and the objects on which they must be granted will be displayed in the user interface. To proceed with the migration, grant the missing privileges and restart the migration.

Execute the following steps to create the dedicated migration user account in the source database:

  1. On the source database, open a SQL Console in the Database Explorer.
  2. Create a migration user by executing the following statement in the Database Explorer - SQL Console:
    Code snippet
    CREATE USER <username> PASSWORD <password> NO FORCE_FIRST_PASSWORD_CHANGE;
    Expand
  3. Grant the necessary privileges to the migration user by running the following script in the Database Explorer - SQL console:
    Code snippet
    GRANT SELECT ON _SYS_REPO.DELIVERY_UNITS TO <username>;
    GRANT SELECT ON _SYS_REPO.ACTIVE_OBJECT TO <username>; 
    GRANT CATALOG READ TO <username>;
    GRANT INIFILE ADMIN TO <username>;
    GRANT TRUST ADMIN TO <username>;
    GRANT CERTIFICATE ADMIN TO <username>;
    GRANT CREATE REMOTE SOURCE TO <username>;
    GRANT EXPORT TO <username>;
    GRANT EXECUTE ON SYS.EXPORT_CATALOG_FOR_MIGRATION_DEV TO <username>;
    DO BEGIN 
    SELECT * FROM PUBLIC.M_SERVICES WHERE SERVICE_NAME = 'diserver';
    IF ::ROWCOUNT != 0 
    THEN 
    EXEC 'CREATE LOCAL TEMPORARY TABLE #PRIVILEGES LIKE _SYS_DI.TT_API_PRIVILEGES'; 
    EXEC 'INSERT INTO #PRIVILEGES (PRINCIPAL_NAME, PRIVILEGE_NAME, OBJECT_NAME) SELECT ''<username>'', PRIVILEGE_NAME, OBJECT_NAME FROM _SYS_DI.T_DEFAULT_DI_ADMIN_PRIVILEGES';
    EXEC 'CALL _SYS_DI.GRANT_CONTAINER_GROUP_API_PRIVILEGES_WITH_GRANT_OPTION(''_SYS_DI'', #PRIVILEGES, _SYS_DI.T_NO_PARAMETERS, ?, ?, ?)'; 
    EXEC 'DROP TABLE #PRIVILEGES'; 
    EXEC 'GRANT SELECT ON _SYS_DI.TT_API_PRIVILEGES to <username>'; 
    EXEC 'GRANT SELECT ON _SYS_DI.T_DEFAULT_CONTAINER_GROUP_ADMIN_PRIVILEGES to <username>'; 
    EXEC 'GRANT SELECT ON _SYS_DI.T_NO_PARAMETERS to <username>'; 
    END IF; 
    END; 
    GRANT SELECT ON SCHEMA _SYS_STATISTICS TO <username>;
    GRANT SELECT ON SCHEMA _SYS_BI TO <username>;
    -- Only required when migrating SAP HANA databases in the Neo environment
    -- GRANT SAP_INTERNAL_HANA_SUPPORT TO <username>; 
    Expand
  4. For each schema that you want to migrate, excluding the schemas created by SAP HANA Schemas and HDI Containers service instances, execute the following statement:
    Code snippet
    GRANT SELECT ON SCHEMA "<SCHEMA_NAME>" TO <username>;
    Expand
    Note
    The SQL statement must be executed by the owner of the schema or any user who has the permissions to grant the required privileges.

[Optional] Install and Configure the Cloud Connector

The Cloud Connector allows you to set up a secure connection between the source SAP HANA on-premise database and the target SAP HANA Cloud database instance on SAP BTP.

You need to Install and configure the Cloud Connector on the source database system. Use the Installation on Linux OS guide to install the Cloud Connector. The Cloud Connector initial configuration tasks are explained in the Cloud Connector Initial Configuration guide.

You can use the Cloud Connectors web interface to administer the locally installed application.

Use the Connect to an SAP HANA Platform On-Premise Database guide to connect the SAP BTP to the on-premises SAP HANA database. In the SAP BTP Cockpit, use the this path ConnectivityCloud Connectors to open the Cloud Connector application. Use this application to see if your locally installed Cloud Connector has successfully connected to your subaccount.

The image show the Cloud Connectors local and the SAP BTP web interface.

The cloud connector creates a virtual host name and port for the on-premises source system, and only exposes the virtual host name and port to the SAP BTP.

Summary

You have learned which preparation steps are required to be performed before you can use the Self-Service Migration for SAP HANA Cloud tool. The mandatory steps include administrator access to an SAP BTP subaccount with an SAP HANA Cloud database instance deployed, access to the SAP HANA Cloud administration tools and the Self-Service Migration tool, a dedicated migration user in the source database, and in the scenario on-premises, a Cloud Connector is required.

Further Reading

Log in to track your progress & complete quizzes