Skip to Content
author's profile photo Former Member
Former Member

Trigger Manual Delta Merge on all tables

Hello,

I am looking for a way to trigger a manual delta merge for all tables in a system or schema. Does such a statement exist?

So far the statements I have found are used to update one specific table: merge delta of 'TABLE';

The reason I ask is SAP note 2105764 which deals with a possible data corruption after upgrading to HANA SPS9 and recommends to clear out the delta store before upgrading.

Sander

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Dec 12, 2014 at 04:03 AM

    Hi Sander Bleijenbergh,

    Currently there is no dircet option to merge all tables at a schema Level.

    I hvae writtent a small procedure to do this this will work.

    In my example Below the DINESH"."MM_TABLE has the list of tables that has to be merged,replace that table with your own table and run this Procedure.

    Note: Merge is a costly operation, please be carefull and keep your system admin informed about your action.

    create procedure DB_OPERATIONS2
    as
    begin
    declare v_count integer;
    declare v_index integer;
    declare v_table char(40);
    declare clm_name varchar (50);
    declare vc_sql_merge varchar(4096);
    declare vc_sql_part varchar(4096);
    declare vc_sql_load varchar(4096);
    declare vc_merge_part varchar(4096);
    --MM_TABLE is the table which has all the tables belongs to MM module

    DECLARE CURSOR c_cursor1 for select table_name from "DINESH"."MM_TABLE";

    --Opening the cursor to acess each table
    for cur_row as c_cursor1 DO
    v_table := cur_row.TABLE_NAME;

    vc_merge_part := ('alter table ' ||:v_table || ' merge PARTITIONS');
    exec(:vc_merge_part);

    --loading the table from memory

    end for;
    end;

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.