Skip to Content
0
Jan 29, 2021 at 10:39 AM

Manage or clean-up the HANA catalog for a database with Azure Backup enabled

1492 Views

Dear All,

I have recently installed a SAP Hana Database Server in MS Azure Cloud and noticed that the Hanacleaner was not able to clean-up the backup catalog. It ends with the following error:

* 2: general error: Backup error: Error writing backup to 'BACKINT' '/usr/sap/VSD/SYS/global/hdb/backint/SYSTEMDB/log_backup_0_0_0_0' SQLSTATE: HY000
ERROR: Could not execute
BACKUP CATALOG DELETE ALL BEFORE BACKUP_ID 1610038812880

ERROR: The user represented by the key HANACLEANERSYSDB could not clean backup catalog.
One possible reason for this is insufficient privilege,
e.g. lack of the system privilege BACKUP ADMIN.
If there is another error (i.e. not insufficient privilege) then please try to execute
BACKUP CATALOG DELETE ALL BEFORE BACKUP_ID 1610038812880
in e.g. the SQL editor in SAP HANA Studio. If you get the same error then this has nothing to do with hanacleaner.

The user which is responsible for the cleanup is not the issue, this user has enough permissions to execute the catalog clean-up.

The guide at Azure: Manage and monitor backed up SAP HANA databases, says to manually cleanup the catalog:

If you want to edit or clean-up the backup catalog, do the following:

  1. Wait for any full or log backups for the database to finish. Check the status in SAP HANA Studio/ Cockpit.
  2. for the relevant DB
    1. Unset the backint parameters. To do this, double-click systemdb > Configuration > Select Database > Filter (Log).
      • enable_auto_log_backup: No
      • log_backup_using_backint: False
      • catalog_backup_using_backint:False
  3. Edit the catalog and remove the older entries
  4. Then reverse the steps. For the same relevant DB mentioned above,
    1. re-enable the backint parameters
      1. catalog_backup_using_backint:True
      2. log_backup_using_backint: True

      enable_auto_log_backup: Yes

This is for us not a preferred way to clean-up the catalog, does anyone faced the same issue and figured out a solution how to fix this with the Hanacleaner script, or found another solution to automate this?

Thanks in advance!

Regards, Jeffrey Schouten