Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
Showing results for 
Search instead for 
Did you mean: 
In this post, I am sharing my experience on migration of HANA DB artifacts on HANA as a Service (HaaS) on SAP Cloud Platform Neo to Cloud Foundry environment. The basic difference between both the environment for HaaS is that Cloud Foundry only supports HANA 2.0 (XS Advance) whereas Neo works with HANA 1.0 (XS Classic). So in general, this blog is applicable for HANA DB upgrade / migration from XSC to XSA.



The high-level steps for the migration are:

    1. Prepare for Migration

    2. Configure SAP Cloud Connector

    3. Run XS Migration Assistant Tool

    4. Post-Migration Activities

XS Migration Assistant is a tool that exports, analyses and migrates the objects from the provided delivery unit (XSC) and writes into an XS Advanced folder structure. There are some pre & post-migration steps that needs to be carried out for successful migration, which will be explained in detail.


Prepare for Migration

As the first step for migrating to XS Advance environment, you would have to manually convert the XS classic objects, that XS Migration Assistant cannot migrate automatically. These are your:

    • Scripted (text-based) calculation views (*.calculationview)

    • Attribute views (*.attributeview)

    • Analytic views (*.analyticview)

    • Application Function Library (AFL) models (*.aflpmml)

    • Decision tables (*.hdbruldec)

    • XML-based analytic privileges (*.analyticprivilege)

Note: If you do not have any of the above XS Classic artifacts, you can skip this step and prepare Delivery Unit (DU).

In SAP HANA Studio / Eclipse:

SAP HANA Modeler prospective > Migrate     (also available in quick view)

Follow the wizard to complete the conversion:

Select system > Choose migration type > Select objects > Impacted objects > Finish

Once you have manually converted the deprecated artifacts, you can prepare the DU in HANA Studio / Eclipse:

SAP HANA Modeler prospective > Delivery Unit     (also available in quick view)

Add the objects you want to migrate to XS Advance environment into a Delivery Unit. Follow the wizard to complete setting up the DU:

Select system > Assign packages in delivery units > Finish


Configure SAP Cloud Connector

If your HANA DB is a service on SAP Cloud Platform (Neo), then you will need to install & configure SAP Cloud Connector (SCC) to be able to run the migration. Follow the steps in my other blog: Connecting XS Migration Assistant tool to HANA service on SCP (Neo), to establish a service channel to your HANA service.

If your source system for migration is on-premise, then you can directly connect XS Migration Assistant tool to your HANA DB using the Host Name and Port Number. You can skip this step.


Run XS Migration Assistant Tool


Step 1: Download and extract XS Migration Assistant from SAP Software Download Center. Search for the component “XSAC MIGRATION 1” in Downloads.

Note: The tool does not need an installation, but we can run the extracted files via command prompt.

Step 2: Run the below commands in command prompt to connect to your XS Classic system via XS Migration Assistant:
CD <location of extracted xs migration assistant tool>
set HANA_HOST = localhost
set HANA_SQL_PORT = <port configured in SCC>
set HANA_USER = <hana db user>
set HANA_PASSWD = <password>

Sample Code:

CD C:\SAP\XS_MIGRATION_00_22-70002351\xs-migration

set HANA_HOST = localhost

set HANA_SQL_PORT = 39915


Note: Use an administrator user or system user to avoid privilege issues.


Step 3: Run the below code to start the migration process of the Delivery Unit
xs-migration --zip --target-dir <target directory> <DU name>

sample code: xs-migration --zip --target-dir C:\SAP\xs-migration\migrated_to_xsa APP_1

Note: you will have to enter a target directory that doesn’t exists. The tool will create a folder with the name specified and write the migrated filed in it.

The optional parameter “--zip” creates a zip file of the migrated content.


Post-Migration Activities

  • Evaluate Migration Report The generated migration report lists all the items migrated from the specified delivery unit and additional steps required are mentioned as identified by the tool. Evaluate the migration report in the target directory and re-run the migration, if required.

  • It is recommended to import the zip file to a dummy project in your workspace and then copy the required files to your main project.

  • Note that NOT all the folder & files in the imported archive is required for a successful build. HANA DB migrated atifacts will be under the folder “db > src”. XS objects (ex: .xsjob, .xsjs, .xsodata) will be written in a separate module “xsjs” of type “nodejs”.

  • You will have to verify and make changes to the mta.yaml file generated by the tool to include the additional parameters you need for your project.

  • Namespace for all the artifacts have to be maintained properly and references adjusted before building.

  • For calculation views, data sources have to be replaced with the run-time objects built in XSA and column mapping must be re-established.

Please note that these are just some common post-migration activities required for successful build & deploy of migrated HANA DB artifacts, but you might require additional steps based on the type of objects you have migrated from XSC. Here is a list of all the XSA database objects and the actions performed by the tool for each of them.

Reference - SAP HANA XS Advanced Migration Guide


With the growing number of customer moving from Neo to Cloud Foundry, I hope this information was useful in migrating your existing application on Neo to Cloud Foundry space.

Knowledge shared is knowledge squared!  #KeepSharing 

Labels in this area