Online Tutorials & Training Materials |
Register Login

Old System Replication Snapshots Exist

09 Apr 2015 6:13 pm || 0

System replication takes advantage of SAP HANA database snapshots. The retention time of these snapshots is defined with the following parameter:

Parameter Default Unit Details
global.ini -> [system_replication] -> datashipping_snapshot_max_retention_time 120 (SAP HANA 1.0)
300 (SAP HANA >= 2.00)
minutes This parameter defines how many minutes a system replication related database snapshot is preserved, that has been completely shipped to the secondary system. Shipped snapshots older than datashipping_snapshot_max_retention_time will be dropped automatically.

Snapshots currently used in data shipping are not affected and are not droppedif data shipping takes longer than datashipping_snapshot_max_retention_time. They can be dropped if data shipping has been finished. If the parameter is set to 0, snapshots are immediately dropped after data replication has been finished.

Its default value corresponds to 2 hours. There is normally no need to change this parameter (exception: See "How can RECLAIM DATAVOLUME be executed when system replication is active?").

In rare cases it can happen that a system replication related database snapshot is not deleted and its age significantly exceeds the configured retention time. You can identify old snapshots (in this example: older than 5 hours) by running SQL: "HANA_IO_Snapshots" (SNAPSHOT_repli = 'REPLICATION', MIN_SNAPSHOT_AGE_H = 5) available via SAP doc 1969700.


Now you can check the current replication status using SQL. If the STATUS_DETAILS are empty for the services, you can proceed. Otherwise you should check if the replication of the service permanently remains in the status and analyze what is going on.

You can clean up no longer needed system replication related database snapshots using the hdbcons command line tool. At first you have to identify the related snapshot ID for the impacted service:

hdbcons -e hdb 'snapshot l'

It will return an information like the following including the snapshot ID:

SnapshotID: 290360 / ForBackup: 0 / ForReplication: 1 / RestartPage: 0x700000020004P [0x20004,16k,0] / TimeStamp: ...

Using the snapshot ID the space allocated by a database snapshot can be checked via:

hdbcons -e hdb 'snapshot a '

If you have confirmed that the database snapshot is no longer required, the snapshot ID can be dropped with the following hdbcons command:

hdbcons -e hdb 'snapshot d '