
Source System Details. Target System Details.
DB SID HXP. DB SID is HXD.
Prerequisites--- 1. root key password require. 2. HANA Studio require.
We are restoring HXP backup in HXD system, but we don’t have root key then how to restore backup in Target (HXD) HANA DB.
Facing the error message below in HANA Studio while restoring backup in HANA HXD.
Backup rootkey 3ef7cae23ce897c7748807d98689abc1bfd3d265654140b244b4ae8918c6e096 is required for decryption of backup files, but not found in key store. Please make sure you have provided the necessary keys before
recovery.,
No root key matching hash=3ef7cae23ce897c7748807d98689abc1bfd3d265654140b244b4ae8919c6e096
Reason is During the HANA DB installation below option selected Yes and HXP backup was taken with encryption key.
While restore HANA DB backup in Target system you have to provide root key password other wise backup will not restore and throw the error.
Source System Step (HXP)
Solution
Step 1.
Login to the source system (HXP) at os level and go below path.
Take the backup of the ssfs keys.
We have taken backup with ssfs_backup
Step 2.
Login in Source DB HXP and run below query in HANA Studio.
From SYSTEM DB we need to run below query.
We need to set ENCRYPTION root key password.
ALTER SYSTEM SET ENCRYPTION ROOT KEYS BACKUP PASSWORD (password)
Step 3.
Now Validate the password from below query in HANA Studio.
ALTER SYSTEM VALIDATE ENCRYPTION ROOT KEYS BACKUP PASSWORD (password)
Step 4.
Now run this query for checking DB ID in tenant DB.
SELECT DATABASE_NAME,
CASE WHEN (DBID = '' AND
DATABASE_NAME = 'SYSTEMDB')
THEN 1
WHEN (DBID = '' AND
DATABASE_NAME <> 'SYSTEMDB')
THEN 3
ELSE TO_INT(DBID)
END DATABASE_ID
FROM (SELECT DISTINCT DATABASE_NAME, SUBSTR_AFTER (SUBPATH,'.') AS DBID FROM SYS_DATABASES.M_VOLUMES);
HXP DB ID is 3.
Step 5.
Login in source system HXP at os level and take the Backup of root keys.
hdbnsutil -backupRootKeys /backup/backup/rootkey/rootkey_HXP.rkb --dbid=3 --type='BACKUP'
We used here dbid 3 which we checked in Tenant DB earlier screen shot.
Step 6.
Login to source system os level validate root keys.
This is rootkey location and root key copy from HXP to HXD.
/backup/backup/rootkey
Note: Copy the rootkey_HXP.rkb file from HXP (Source ) to HXD (Target)
Target System Step (HXD)
Step 7. (HXD Target DB)
Check the encryption status
Login in Target system in SYSTEM DB and run below query in HANA Studio.
SELECT * FROM SYS_DATABASES.M_ENCRYPTION_OVERVIEW
Encryption Status TRUE Coming. It means now Encryption is ok and we can restore backup easlily.
Step 8.
Login to target system (HXD) SYSTEMDB and Check the DBID with below query in HANA Studio.
SELECT DATABASE_NAME,
CASE WHEN (DBID = '' AND
DATABASE_NAME = 'SYSTEMDB')
THEN 1
WHEN (DBID = '' AND
DATABASE_NAME <> 'SYSTEMDB')
THEN 3
ELSE TO_INT(DBID)
END DATABASE_ID
FROM (SELECT DISTINCT DATABASE_NAME, SUBSTR_AFTER (SUBPATH,'.') AS DBID FROM SYS_DATABASES.M_VOLUMES);
We can see DB ID 3 same coming which was coming in HXP (Source DB )
DB ID is 3.
Step 9.
Login to target system HXD os level and take the backup of ssfs keys.
We have taken backup with ssfs_backup.
Step 10.
Login to target system (HXD) SYSTEMDB and Stop tenant DB.
Step 11.
Login to target system (HXD) OS level and Import the root keys which we export from HXP system.
Go to same location /backup/backup/rootkey and run below command for import
/backup/backup/rootkey
hdbnsutil -recoverRootKeys rootkey_HXP.rkb --dbid=3 --password="password" --type='BACKUP'
Step 12.
Now you can start Restore again it will work.
Thanks for watching it. 😊
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
10 | |
5 | |
4 | |
4 | |
4 | |
3 | |
3 | |
3 | |
3 | |
2 |