First part of this blog can be found here:
SAP HANA - Modeling Content Migration - part 1: Preparations, Security Requirements, Export
This second part is covering import procedure and required post migration activities.
Transfer the export files to the work directory of target HANA system.
Note: SAP probably does not support editing export files. Do that at your own risk.
To change the location of tables perform following steps:
hanapoc:/usr/sap/HD1/HDB07/work> grep -irl IDES
./index/IDES/ZC/ZCOPAACTUAL2/RuntimeData
./index/IDES/ZC/ZCOPAACTUAL2/create.sql
./index/IDES/ZC/ZCOPAFORECAST2/RuntimeData
./index/IDES/ZC/ZCOPAFORECAST2/create.sq
hanapoc:/usr/sap/HD1/HDB07/work> grep -irl TECHED2011
./index/TECHED2011/KN/KNA1/RuntimeData
./index/TECHED2011/KN/KNA1/create.sql
./index/TECHED2011/MA/MARA/RuntimeData
./index/TECHED2011/MA/MARA/create.sql
./index/TECHED2011/SC/SCAL1/RuntimeData
./index/TECHED2011/SC/SCAL1/create.sql
./index/TECHED2011/T0/T001W/RuntimeData
./index/TECHED2011/T0/T001W/create.sql
find . -name RuntimeData -exec sed -i 's/indexid: IDES:/indexid: DATA_SLT_IDD800:/g' {} ;
find . -name create.sql -exec sed -i 's/"IDES"[.]/"DATA_SLT_IDD800"./g' {} ;
find . -name RuntimeData -exec sed -i 's/indexid: TECHED2011:/indexid: DATA_MAN_TECHEDCOPA:/g' {} ;
find . -name create.sql -exec sed -i 's/"TECHED2011"[.]/"DATA_MAN_TECHEDCOPA"./g' {} ;
Note: Use with caution to avoid unwanted replacement.
mv index/IDES index/DATA_SLT_IDD800
mv index/TECHED2011 index/DATA_MAN_TECHEDCOPA
In Information Modeler perspective select option Import in section Content.
Select option Tables in SAP HANA Studio folder and click Next.
On next screen choose correct connection for target database.
Confirm location where export files are located.
Provide list of tables to import in format <schema>.<table name> separated by column character. Add them to the list and for each table select format we used during export (BINARY).
Note: Buttons Next and Finish will be inactive until you define format for every table in the list.
Click Finish. Wait for import to finish.
Alternatively you can use SQL command IMPORT with following syntax:
IMPORT "<schema1>"."<table1>"[,"<schema2>"."<table2>",...] AS BINARY FROM '<source directory>'
[WITH REPLACE | WITH (REPLACE) CATALOG ONLY | WITH (REPLACE) DATA ONLY]
In our case we will use this command:
IMPORT "DATA_MAN_TECHEDCOPA"."KNA1","DATA_MAN_TECHEDCOPA"."MARA",
"DATA_MAN_TECHEDCOPA"."SCAL1","DATA_MAN_TECHEDCOPA"."T001W",
"DATA_SLT_IDD800"."ZCOPAACTUAL2","DATA_SLT_IDD800"."ZCOPAFORECAST2"
AS BINARY FROM '/usr/sap/HD1/HDB07/work'
Schema mapping is used during execution of information models to automatically adjust location of tables from source (authoring) schema to target (physical) schema.
Note: Schema mapping is not physically correcting definition of information models. It is used only during execution to remap schema names. If you remove or adjust schema mapping then information models might stop working. In case that permanent adjustment is required you need to adjust export files (see below).
In case that you decided to use schema mapping go to Information Modeler perspective and switch connection to correct database using button Manage Connections. Then select option Schema Mapping in section Setup.
Click Add button and fill in the mapping relation. Repeat the procedure to each migrated schema. Confirm dialog.
You need to adjust all files to change names of schemas (in case schema mapping was not used) and name of package to the target ones.
To avoid a lot of manual work you can use for example **** utility:
http://sourceforge.net/projects/****-it/files
First check all occurrences using this command:
****.exe -rpC * "techedcopa\x2F"
****.exe -rpC * "IDES"
****.exe -rpC * "TECHED2011"
If you agree replace the package name and schema names:
****.exe -rC * "techedcopa\x2F" "prj-techedcopa\x2F"
****.exe -rC * "IDES" "DATA_SLT_IDD800"
****.exe -rC * "TECHED2011" "DATA_MAN_TECHEDCOPA"
As last step rename directory techedcopa to prj-techedcopa.
In Information Modeler perspective choose option Import in section Content.
Select option Information Models in Information Modeler folder and click Next.
On next screen choose correct connection.
Select file location using Browse button. Select all objects you want to import and add them to the list. Then click Finish.
Wait for all jobs to end successfully.
All imported information models will be inactive. Open package in Navigator window and start activation of objects.
Select all attribute views you wish to activate and in context menu choose option activate.
HANA system will check all dependencies to ensure that object can be safely activated.
Wait for all jobs to end successfully.
Repeat the procedure for analytic views and then for calculation views.
Note: You should activate information models from bottom to the top rather than all at once. In case that you will try to active dependent objects in one run you might encounter false activation errors. In such case select smaller subset of models and reactivate them.
Use data preview function on information models to ensure that migration was successful.
Adjust all applications (like BusinessObjects Data Services) to connect to new HANA database and to use objects from new schemas and new packages.
In case that some of objects were replicated from source system you should remove them and provision them using corresponding replication technique (SLT, BusinessObjects Data Services or Sybase replication).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
37 | |
10 | |
7 | |
5 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |