SAP HANA DB Migration/Restore from Multi-Node to Single-Node
As HANA DB is growing, there are many DB Migrations/Conversions coming up in the SAP world. I always had a question how to perform DB Refresh/Restore Multi Node(PRD) to single Node(QAS). This post mainly outlines/answers the below questions
- How to Migrate HANA DB from Multi-Node to Single-Node (M:1)?
- How to Restore/Refresh HANA DB from Multi-Node to Single-Node?
- How to Convert HANA DB from Multi-Node to Single-Node?
Install the target system, the target SAP HANA Database can be of same or higher revision compared to the source.
If target system is new server, please add script server using HANA Studio
- scriptserver (demon.ini -> [scriptserver] -> instance = 1 )
Make sure that the statistics server on the target is same as that of the source either stand-alone or embedded.
In case the source already has embedded statistics server and the target has stand-alone then enable embedded statistics also on the target by setting the parameter.
- daemon.ini -> [statisticsserver] -> active = true
In case Target is Old systems like QAS, make sure both PRD and QAS DB are same revision and patch level.
- Install target DB system with same version of Source Data Base.
- Check and Enable Script Server in target DB system.
- Perform backup of source SAP HANA Data Base (Multi-Node).
- Compare both source DB(Old/PRD) and target DB(New/QAS) systems for active services and add missed services to target DB(New/QAS) using SQL.
Add missing Active services to New DB or QAS System by using below commands
- ALTER SYSTEM ALTER CONFIGURATION (‘daemon.ini’, ‘host’, ‘<hostname>’) SET (‘indexserver.c’,’instanceids’) = ’40, 50, 60′ WITH RECONFIGURE;
- ALTER SYSTEM ALTER CONFIGURATION (‘daemon.ini’, ‘host’, ‘<hostname>’) SET (‘scriptserver.c’,’instanceids’) = ’42, 52, 62′ WITH RECONFIGURE;
- Compare both systems for actives services, if both Systems are having same active services, please copy the backup from Old/PRD to New/QAS DB system and proceed with Restore target DB with source backup.
- REORG all the data and Remove extra added services from target system.
Please follow below procedure to REORG and remove
- Set for Remove
- Plan for Reorg
- Execute Reorg
Perform above steps for all extra added services on new DB
- call SYS.UPDATE_LANDSCAPE_CONFIGURATION (‘SET REMOVE’,'<hostname>:<port>’);
- call REORG_GENERATE (2,”);
- call REORG_EXECUTE(?);
Once All data is migrated to other instance/service, right click and delete the service.
Before removing, Check is there any data existed in that service, if count is 0, Please remove the service
SELECT COUNT(*) FROM sys.M_TABLE_PERSISTENCE_LOCATIONS_ where (host = ‘<hostname>’ and port = ‘<port>’);
- Repeat the step 6 for all extra added service in New /QAS DB.
- Restart the HANA DB and check the services. We will have only single host services.
- Start Sap and Validate the system and release for normal operations.
By using the above steps, you can easily convert Multi node to Single node(M:1).