cancel
Showing results for 
Search instead for 
Did you mean: 

System Replicaiton - a prerequisite of the secondary system and initial replication

Former Member
0 Kudos

Hi everyone,

I'm designing system replication, especially prerequisites of the secondary system and initial replication.

My questions are the following;

- When setting up system replication, the data of secondary system have to be empty?

- If no, when starting system replication,

    HANA check if the data of 2 systems are equal or not?

    and the initial replicaion is not full replication but delta replication?

In guides, any prerequisite of the secondary system is not written.

(e.g. the data of secondary system have to be empty, or the data of secondary system have to be equal.)

If HANA will perform the above, can I setup system replication with the following steps?

1. Perform a full data backup on the primary system.

2. Setup the secondary system with full data backup of the primary

system.

3. Setup system replication

4. Start system replication

-> Then, an initial replicaiontion is not full replication but delta replication.

Regards,

Noriko

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Sunil and Amerjit,

First replication is ALWAYS full replication?

It does not depend on the data of the secondary system?

However, when I setup system replication, I can select the option of Initiate full data shipping.

If I don't select this, the first replication is not full replication?

Rgards,

Noriko Shibuya

former_member182967
Active Contributor
0 Kudos

Hello Noriko,

As you know that, registering the secondary can be done with the command line tool hdbnsutil ---sr_register. we can see the following from the help of hdbnsutil.

-sr_register --remoteHost=<primary master host>    - registers a site to a source site
--remoteInstance=<primary instance id>
--mode=sync|syncmem|async
--name=<unique site name>
[--force_full_replica]                  * if parameter is given, a full data shipping is initiated. Otherwise a delta data shipping is attempted

Option --force_full_replica should be Initiate full data shipping, a delta data shipping (pages that have been modified since the last snapshot) can be attempted.

Digressions: As you can see from How to Perform System Replication for SAP HANA, the author did not select 'Initiate full data shipping' as well. (for me, I also skip this. The system replication of HANA can work fine )

Regards,

Ning Tong

Former Member
0 Kudos

Hi Noriko,

Here is the sequence for your better understanding:

1. After the Primary and Secondary HANA instances are ready for system replciation start with a hdbnsutil -sr_register and this will by default initiate a FULL Replica as it is the first time conifguration(irrespective of any data that you may have restored on secondary before you initiate replication)

2. This System replication setup will have 2 sub actions:

a. Full Replica Sync: Complete data is synchronized from Primary to secondary

b. Delta Replica Sync: any changes after step a. are sent as Delta replica

3. If you ever come across a situation you need to initiate a FULL Replica(if secondary goes down due to any issue) or you broke the system replication for any reason then we have options to force a Full system replication using Ning Tong advice above

Other wise System replication keeps working on its own and you will need to have monitoring in place to check for any errors

Hope this helps

Former Member
0 Kudos

Hi Ning and Sunil,

Thanks.

I think my question becomes clearer.

It may depend on how to initialize the secondary system and it's better to creat a new thread.

I would be happy if you could look at a new thread;

http://scn.sap.com/thread/3709291

Regards,

Noriko Shibuya

Former Member
0 Kudos

Based on our experience it does not matter if you have a system copy on secondary or not

The System replication does  a full replica as the first step..............

I let you have more feedback from the rest of SCN group but I am sure it is not straight forward to control the System Replication as HANA takes this call based on the logic internally

Former Member
0 Kudos

Hello Noriko,

I think we really need to keep it simple here.

When you setup replication following the well documented process your initial replication will be a FULL  REPLICA.

As you can see from my screen shot below, as soon as I started the takeover system after the config setup the FULL REPLICATION started automatically (HANA is clever enough).

For my cross site replication I achieved ~109MB/s which worked out at around 1h 50m for a FULL REPLICATION.

So I ask myself, what is there to gain by taking a backup (primary), restoring backup (secondary) and then setting up and starting replication given that the sum of the steps above would be greater than just doing simple, straight out of the box (no reinventing the wheel) replication.

I really do hope this reply allays any fears or misunderstandings that may have crept into things.

Kindest Regards,

Amerjit

Former Member
0 Kudos

Hello Sunil and

After a new registration of the secondary site, delta data shipping is always attempted. To do this, it has to be ensured, that the persistence of the primary and secondary system are compatible. Compatibility is checked for current persistence as well as replication snapshots. They are checked for compatibility in the order listed below:

1. Current savepoint (last written savepoint):

  - This is available for every persistence

  - Can be used if the secondary has just been shutdown for a while

2. The active replication snapshot:

  - This is written on the system replication primary sites after successful data shippings.○

  - Can be used if an old primary was used to prepare a failback.

3. The most recent replication snapshot:

  - This is written on the system replication primary and secondary sites for data shipping

  - It can be used, for example, when a secondary site has been taken over and is being re-registered again afterward.

The first savepoint or snapshot that is compatible with the primary site will be used for delta data shipping. If none of the three savepoints or snapshots are compatible, then a full data shipping will automatically be carried out.

-----------------------------------------------------------------------------------------------------------------------

Former Member
0 Kudos

Hey Noriko,

No need to apologise.

If your secondary site has never been setup for replication and there is NO copy of the primary instance there (irrespective of the method) then a FULL REPLICATION will occur as I demonstrated to you with my screen shot from when I setup replication.

Imagine that you do have a old copy of an instance on your secondary (let's say a few days old). Let also assume that your system is a busy system (lots of updates per day). Then in that case, HANA will check primary/secondary and most likely come to the conclusion that a FULL REPLICATION is required and do one.

Now further imagine that you have setup your replication, all is working fine (you love it, it loves you). you want to perform maintenance on your secondary (maybe a linux patch or a SP) and the time window for that intervention is 45 minutes. Now in this case there is a strong possibility that when you re-enable replicate that a DELTA will be performed (caveat = how busy you system is).

Now all in all without getting into the guts of it, what would I say..... Just setup replication as per the good documentation/guides and you'll see it will do a FULL. The time needed for a FULL of course will depend on your network speed between your two data centres.

Good luck with your setup/testing and ENJOY.

If you feel we have collectively answered your question(s), please mark the thread as answered.

Kindest Regards,

Amerjit

Former Member
0 Kudos

Hello

Former Member
0 Kudos

Hello Noriko,

I think the best way for you to get your head around it conceptually would be quite simply to do it.

Setting up replication and then removing replication is not too complicated.

I'm of that school where I integrate things better if I have executed them rather than reading all about it and then never executing it.

Hopefully we can maybe close this thread ?

Kindest Regards,

Amerjit

Former Member
0 Kudos

Hello Noriko,

As Sunil has replied, you don't need to go through complicated steps such as recovering the primary backup on the secondary. To be honest, replication setup is pretty straight forward.

HANA will determine itself what replication has to be done once you have setup your replication. First replication will be FULL with subsequent delta updates.

Please have a look at this guide which will cover practically everything you may wish to know.

How To System Replication for SAP HANA

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/9049e009-b717-3110-ccbd-e14c277d8...

Kindest Regards,

Amerjit

Former Member
0 Kudos

Hi Noriko,

It is not mandatory to have a copy of Data recovered on secondary from Primary as a pre requisite before setting up System Replication

As long as you have the same version(or even higher version on secondary) and architecture(standalone, distributed with same set of HANA services on secondary) the System Replication can be started and HANA will do a FULL REPLICA first to make sure all the data is first replicated and then do a DELTA REPLICA for any changes that were made while the Full Replica was being synchronized

So please do not loose time recovering a copy of source system on destination system