Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
tobias_koebler
Advisor
Advisor
9,983

Hi,

Due to several reasons you want to use an action which is not available in HANA Studio or you want to start data provisioning for a table which is not displayed in the data provisioning UI due to any problem. Especially in the N:1 use case, only the DDIC (DD* tables) information for the latest connected target are available at the Data Provisioning UI. Also when you replicate from a non-SAP source system - the Metadata information about available tables will not updated (only one time loaded to HANA). If a new table will be created on the source, you can start the replication for this tables by following this How To.

General Process:

Start data provisioning via SQL in HANA Studio

The communication between the HANA Studio and the SAP LT Replication Server is handled via table RS_ORDER. This table is cerated by the SAP LT Replication Server in the corresponding schema, when a new configuration is defined in the SLT configuration and monitoring dashboard. All data provisioning requests for a certain schema will be added to table RS_ORDER. The master job of the respective configuration permanently checks table RS_ORDER for new entries. In case of new entries, the requested action will be processed and the record will be deleted from RS_ORDER. Therefore RS_ORDER contains only those data provisioning requests, which are not yet handeld by the SAP LT Replication Server.

To start a data provisioning via SQL in HANA studio the following record has to be inserted into table RS_ORDER in the respective schema. Depending on the
version of LT Replication Server, the structure of table RS_ORDER looks different in the target schema.

Version DMIS 2011 SP4 / DMIS 2010 SP9 (or higher)

Table strucuture of RS_ORDER

Name Key SQL Data Type Dim Description
SIDXNVARCHAR3Source System ID
CI_HOSTXNVARCHAR256Hostname of Source System
TABLENAMEXNVARCHAR128Table name
ORDERIDINTEGERData provisioning order ID (not yet used)
ACTIONNVARCHAR1Requested data provisioning action
TABLE_TYPENVARCHAR64Table Type (space = COLUMN, ROW, HISTORY_COLUMN)
REFRESH_BEHAVIORNVARCHAR1

SLT behaviour for target table in case of reload

(space/D = Drop Table, T = Truncate Table, N = Keep Table

LANGUAGENVARCHAR1Language for column description

Source System ID (SID) can be derived from table "SYS_REPL"."RS_REPLICATION_COMPONENTS" field SID.

Hostname of the Source System (CI_HOST) can be derived from table "SYS_REPL"."RS_REPLICATION_COMPONENTS" field CI_HOST.

SQL Statement:

     insert into "SCHEMA"."RS_ORDER" values('SID','hostname','tablename',0,'R','','','')

Example:    

     insert into "REPLICATION_TARGET"."RS_ORDER" values('BZ4','ldcibz4_BZ4_70','DD02L',0,'R','COLUMN','D','E')

Version DMIS 2011 SP2-3 / DMIS 2010 SP7-8

Table strucuture of RS_ORDER

Name Key SQL Data Type Dim Description
SIDXNVARCHAR3Source System ID
CI_HOSTXNVARCHAR256Hostname of Source System
TABLENAMEXNVARCHAR128Table name
ORDERIDINTEGERData provisioning order ID (not yet used)
ACTIONNVARCHAR1Requested data provisioning action

Source System ID (SID) can be derived from table "SYS_REPL"."RS_REPLICATION_COMPONENTS" field SID. Hostname of the Source System (CI_HOST) can be derived from table "SYS_REPL"."RS_REPLICATION_COMPONENTS" field CI_HOST.

SQL Statement:

     insert into "SCHEMA"."RS_ORDER" values('SID','hostname','tablename',0,'R')

Example:

     insert into "REPLICATION_TARGET"."RS_ORDER" values('BZ4','ldcibz4_BZ4_70','DD02L',0,'R')

Version DMIS 2010 SP4-6

Table strucuture of RS_ORDER

Name KeySQL Data Type Dim Description
TABLENAMEXNVARCHAR128Table name
ORDERIDINTEGERData provisioning order ID (not yet used)
ACTIONNVARCHAR1Requested data provisioning action

SQL Statement:

     insert into "SCHEMA"."RS_ORDER" values('TABLENAME',0,'R')

Example:

     insert into "REPLICATION_TARGET"."RS_ORDER" values('DD02L',0,'R')

The following data provisioning actions are available:

Action Code Description
TCreate table without loading any data
LLoad (w/o Replication)
RStart Replication (includes the initial load)
CStop Load or Replication (also if status still on scheduled)
SSuspend/Pause Replication (only possible for tables with replication in process)
WResume/Continue Replication (only possible for tables suspended before)
MActivate Delta Recording (activate trigger without starting replication)
QStart Replicate Process (without initial load; prerequisite: delta recording has been activated before)

Action T - Create Table

Description
Creates the table in the HANA target schema based on the strucuture on the source system (including manual defined structural changes). If the table already exist, it will be dropped and recreated.Action is not available in the HANA data provisioning UI.

Next Actions
All actions possible

Action L - Load Table

Description
Creates the table in the HANA target schema based on the strucuture on the source system (including manual defined structural changes). If the table already exist, it will be dropped and recreated. Afterwards the current records of the table are loaded to the table on the HANA database.

Next Actions
All actions possible

Action R - Start Replication

Description
Creates the table in the HANA target schema based on the strucuture on the source system (including manual defined structural changes). If the table already exist, it will be dropped and recreated. As soon as the delta recording is active on the source system (logging tables and triggers are created) the initial load for the table starts while the delta recording logs all changes for that table in the source system. After the initial load is done, table will switch to replication mode and transfer the recorded changes.

Next Actions
Action C - Stop Replication
Action S - Suspend/Pause Replication

Action C - Stop Replication

Description
Stops the replication process and deactivates the delta recording on the source system. This action can only be executed for tables in status "Replication in Process"
If replication is started again afterwards, the initial load has to be repeated as delta recording was deactivated for a certain time

Next Actions
All actions possible

Action S - Suspend/Pause Replication

Description
Pause the replication process but keeps the delta recording active on the source system. This action can only be executed for tables in status "Replication in Process"

Next Actions
Action R - Resume/Continue Replication

Action W - Resume/Continue Replication

Description
Continues the replication process of a previously paused table. As delta recording was still active, replication can continue without the need of a new initial load. This action can only be executed for tables in status "Suspend Executed"

Next Actions
All actions possible

Action M - Activate Delta Recording

Description
Activates the delta recording on the source system (logging tables and triggers are created)
Action is not available in the HANA data provisioning UI.

Next Actions
Action T - Create Table
Action Q - Start Replicate Process

Action Q - Starts Delta Recording

Description
Starts the delta replication for a certain table without doing an initial load. Delta recording is not activated in this step and therefore must be started upfront using action M. Also the table on HANA side must exist before this action is started. The table can be created manually or via action T.
Action is not available in the HANA data provisioning UI.

Next Actions
Action C - Stop Replication
Action S - Suspend/Pause Replication

Please keep in mind that these are expert functions. This blog post should give you a deeper understanding of the technology behind. In the usual setup the Data Provisioning UI is sufficient to run a replication scenario.

Best,

Tobias

20 Comments