EDUCAÇÃO E TECNOLOGIA

Redirected restores PROD>QAS for SAP HANA tenant. Step-by-Step guide


Overview.

Consider a common problem in S/4HANA. By mistake users or functional consultants clear a portion of data in a production system. Bussines continue works in the ERP-system and a lot of new transactional data was generated (for example new sales orders, etc). So you can’t restore a production system from a backup.

This step-by-step guide can help you resolve this typical situation.

Prerequisites.

As a typical Basis-consultant, you are not lucky for any experiments in the production Landscape. So we will work in QAS Landscape. In our scenario, we use backint interface for backups. Redirected restores from PROD to QAS for 3rd party tools have a lot of not obvious points. The main goal of this blog-post highlights them. Let’s go.

Resolution.

Step 1. New S/4HANA

Install new S/4HANA system from scratch through SWPM on a new host in QAS Landscape

Step 2. Refresh or Move Database Instance

Run SWPM on a new host and choose an option:

SAP S/4HANA XXXX – SAP S/4HANA Server – SAP HANA Database  – System Copy – Target System – Distributed System –

Based on AS ABAP –  Refresh or Move Database Instance

Homogeneous System Copy (SAP HANA-specific Backup / Recovery)

Start Migration / Restore Manually

Next. Some obvious steps in SWPM …

And finally, continue with the software provisioning manager by choosing OK when the restore of the database has been finished.

Resolution from 3rd party backup tool

In our scenario, 3rd party backup tool is a Veritas NetBackup. So we must configure this tool for the Recovery procedure

Step 3. Setup backint interface for a new tenant.

Look at my

Veritas NetBackup overview here: https://blogs.sap.com/2019/12/20/sap-hana-backup-via-backint-interface.-step-by-step-guide-for-veritas-netbackup./

and create settings for a new tenant.

Step 4. Copy catalog backup from PROD to QAS server

Find a path to catalogbackup

It’s here in HANA Studio.

global.ini – persistence – basepath_catalogbackup

Default Value + DB_<SID>

Step 5.  Additional Settings for NetBackup Master Server

Place an empty No.Restrictions file on the NetBackup master server where the policy that backed up the other clients resides.

Create an altnames directory in the following location, then place the empty file inside of the directory:

Install_path\NetBackup\db\altnames\No.Restrictions

That is allow Veritas NetBackup clients to perform redirected restores.

Step 6. Database recovery via SQL

From the QAS SystemDB level execute the next SQL statement in HANA Studio

ALTER SYSTEM STOP DATABASE XYZ;

and

RECOVER DATA FOR XYZ

USING SOURCE ‘YYY@XXX’

USING BACKUP_ID 000000001

USING CATALOG PATH (‘/catalogbackup/catalogbackup/XYZ/’)

USING DATA PATH (‘/usr/sap/ZZZ/SYS/global/hdb/backint/DB_XYZ/’)

CLEAR LOG

Where:

XYZ – A new tenant

‘YYY@XXX – <sid of production S/4>@<sid of production HANA DB>

000000001 – Backup ID

It’s here in HANA Studio:

The result of SQL statement execution must be:

Link:

RECOVER DATA Statement (Backup and Recovery)

Resolution (continuation)

Come back to SWPM

Click OK and finish refreshing the procedure

Small Tip:

If you are lost a password from a DDIC user from DB in the backup.

Resolution:

Log on in HANA Studio with schema owner (basically SAPABAP1) to the tenant (after recovery procedure)

and execute the next SQL statement

UPDATE “SAPABAP1”.”USR02″

SET PWDSALTEDHASH =’XXX’

WHERE MANDT=000 and BNAME=’DDIC’

Where XXX copy of PWDSALTEDHASH from a user with a known password

Conclusion.

SAP BASIS Routine task with examples from real life was provided