DB Refresh using HANA Studio DB Restore with SID Modification - NON SAPinst
The DB restoration option in HANA Studios, followed by hdbuserstore, makes the entire system transfer process a lot easier. The target schema would still be the source, which is the only restriction.
The purpose of this blog is to demonstrate how to perform a simple homogenous system copy of a HANA-based system using HANA Studio to restore the source backup on the destination HANA DB.
In this scenario, we'll look at transferring a Prod backup and refreshing it in an already operational quality system.
These are the salient steps involved in achieving this
Step 1 ) Take a complete DB backup of the source Database
Step 2) Move the database backup to the Target system
Step 3) Using HANA Studio recover the source db in the target HANA box
Step 4) Supply the license text so that the HANA Studio can automatically apply the license after install
Step 5) Modification of Schema access at the target DB
Step 6) Modify the default key using the hdbuserstore on the application servers and DB instance.
Step 7 ) Start sap
Step 8 ) Post activities.
Activities in the Source System :
Step 1 - Backup of the source DB .
Use the HANA studio backup studio to take a complete DB backup either at the disk level or using Backint.
image Courtesy : SAP HANA Backup/Recovery Overview by Andrea Kristen in SCN
Normally, this should suffice to do a DB Refresh, but if you're looking for a point-in-time recovery, you may want to add the backups from the log area as well.
Step 2 ) : Move the database backup to the Target system
Once the backup is complete, you'll need to move it to a target system directory. You should have four unique files with your backup prefix. The prefix in this example is “COMPLETE DATA BACKUP 20122015.”
Activities in the Target system
Step 3 ) Using HANA Studio recover the source db in the target HANA box
→ Shutdown SAP Application alone
→ Open HANA Studio and right click on the SID ( target) where you want to perform the recovery.
You will have to specify the destination location and the Backup Prefix for the HANA studio to recognize the backups .
You can use the option “Initialize Log Area” if you only have a complete data backup and do not intend to recover log segments... This is similar to how Oracle resets logs.
Step 4) Supply the license text so that the HANA Studio can automatically apply the license after install
Your existing HANA Licensing will be invalid after the recovery, thus this is a good time to provide the licence text so that it may be installed automatically. If not, this can be done later by hand.
Continue on with the recovery. Please keep in mind that the configuration of the target and source versions must be same. Is there any setting in the target system that needs to be done manually as part of the Post steps?
Following recovery, you should be able to see the Memory and Host Details in HANA Studio's Overview tab.
You could expect to see all of the schemas under Catalog, but it will fail as seen below. When you try to expand Content, the same thing happens.
The reason for this is that the new SID will most likely be looking for a schema named SAPSID and will be unable to identify one, necessitating a few adjustments in the target system.
Step 6) On the application servers and the DB instance, change the default key hdbuserstore.
- Go to /usr/sap/<SID>/hdbclient and execute the below
hdbuserstore set default <dbhost>:<dbport> <dbuser> <dbpassword>
Let's say our target host is host01, the source SID is PRD, the system number is 00, and the source schema is SAPPRD with the password sapprd#!
hdbuserstore set default host01:30015 SAPPRD sapprd#!
The above example is for the Unix system for Windows its a bit different (Refer SAP Note 1709838)
Execute a hdbuserstore list you should find the new Key set as below
KEY DEFAULT
ENV:host01:30015
User: SAPPRD
This confirms that the key is set .
This has to be done on the appservers , else R3trans -d would fail.
Return to HANA Studio, and the contents should be visible under Catalog and Contents. Under Catalog, you should also discover the source Schema.
Before we start the apps on the target system, there is one more thing that needs to be done.
Modify the /dbs/hdb/schema to SAPPRD ( or whatever your source schema is ) in the DEFAULT profiles.
You are now ready to begin using SAP.
From then, proceed with the regular Post Refresh operations.
A few things to keep in mind
- > Before starting SAP, you may want to disable the btc processes. - > Perform typical post actions like SE06/STMS/BDLS, as well as activities particular to your situation.
No comments:
Post a Comment