SAP Hana Upgrade Guide Popular Part 2

By kssaplearning

Published on:

Follow Us
S/4HANA Upgrade Key Points

SAP Hana Upgrade Guide

Hana1.0 to Hana2.0 database -SAP Hana Upgrade Guide details:

Hana2.0 database Upgrade Guide Part2:

In this blog is continuing for the Hana 1.0 to Hana2.0 database Upgrade for SAP Hana Upgrade Guide

Previous Blogs steps:

We have explained the below steps for part1.

• Hana1.0 to Hana2.0 database Upgrade steps for cutover plan details-SAP Hana Upgrade Guide
• Process details and Hana1.0 revision upgrade steps.

Please check Below blog for the Hana1.0 to Hana2.0 database Upgrade steps Part2:

  • SAP Hana Upgrade Guide
    • Hana mandatory steps for upgrade
    • Hana upgrade from Hana1.0 to Hana2.0 process steps.
    Please check another blog for Hana database consistency checks.

Part2:SAP Hana Upgrade Guide

Hana Mandatory steps for Hana1.0 to Hana2.0 database Upgrade:                                                                        We will follow the Above step2 Mandatory steps for pre-requisites:

1.orphaned persistence files

• We need to check the orphaned persistence files has existed or not in database.
• If exist the orphaned persistence files, then we need to clean up the files.
• If MDC then need to check the System and tenant database.
• Execute the below command in sql mode for check the files

select vf.host, vf.port, vf.schema_name, vf.table_name, vf.part_id, vf.is_history, vf.container_id, vf.namespace, vf.name, vf.physical_size, vf.page_count
from sys.m_table_virtual_files_ vf
left outer join M_TABLE_LOCATIONS tl on (vf.schema_name,vf.table_name,vf.part_id,vf.host,vf.port) = (tl.schema_name,tl.table_name,tl.part_id,tl.host,tl.port)
left outer join TABLES t on (vf.schema_name,vf.table_name) = (t.schema_name,t.table_name)
where (tl.schema_name is null or (vf.name like ‘attribute\_%’ escape ‘\’ and vf.COLUMN_NAME=”) or (t.SESSION_TYPE != ‘HISTORY’ and vf.IS_HISTORY = ‘TRUE’));

• If output getting zero rows mean no orphaned persistence files has exist. We can go for next task.
• If orphaned persistence files has exist then we need to clear the files. Please check sap note 2007021 for cleanup process.

2.Check for invalid object dependencies

• We need to check the invalid object dependencies files has existed or not in database.
• If exist the invalid object dependencies files, then we need to clean up the files.
• If MDC then need to check the System and tenant database.
• Execute the below command in sql mode for check the files
select * from SYS.P_OBJECTDEPENDENCY_ where baseoid = 0 or dependentoid = 0;
• If invalid object dependencies file has exist then please cleanup the files. Please check sap note 2949547.

3.Merge multi-container rowstore tables

• We need to check the Merge multi-container rowstore files has existed or not in database.
• If exist the Merge multi-container rowstore tables files, then we need to clean up the files.
• If MDC then need to check the System and tenant database.
• Execute the below command in sql mode for check the files

select schema_name, table_name, ‘ALTER TABLE “‘ || schema_name || ‘”.”‘ || table_name || ‘” reclaim data space;’ as merge_statement from m_rs_tables where container_count > 1;
• This process exclusive locks has happened on table, So need to perform the Non Business hours.
• If file has exist then please cleanup the files. Please check sap note 2884606.

4. Check Meta data space separation and column store format
• We need to check the space separation and column store format files has existed or not in database.
• If exist the space separation and column store format files, then we need to clean up the files.
• If MDC then need to check the System and tenant database.
Meta data space separation:
• Execute the below command in sql mode for check the files
select v.host, v.port, case when (count > 0) then ‘NO’ else ‘YES’ end IS_CATALOG_SEPARATED from m_volumes v left outer join (select host, port, count(*) count from sys.m_dev_memory_segment where dedicated_cont_id = 0 and state = 5 group by host, port) m on v.host = m.host and v.port = m.port where v.service_name in (‘indexserver’, ‘nameserver’);
• If file has exist then please cleanup the files. Please check sap notes: 2372809
column store tables
• As per note 2372809, need to download the sql script and execute the database
• If no files has exist then go for next process. If files has exist then perform the cleanup process. Sap notes: 2372809
5.Check for number of rowstore container info blocks

• We need to check the number of rowstore container info blocks files has existed or not in database.
• If exist the number of rowstore container info blocks files, then we need to clean up the files.
• If MDC then need to check the System and tenant database.
• Execute the below command in sql mode for check the files
select host, port, count(*) from sys.m_dev_rs_container_block where cont_type = ‘PERSISTENT_BLOCK’ group by host, port having count(*)>1;
• If no files has exist then go for next process. If files has exist then perform the cleanup process. Sap notes: 2372809

6. Check for unfinished garbage collection:

• We need to check the unfinished garbage collection files has existed or not in database.
• Execute the below command for check the unfinished garbage collection files.
Command:
select * from sys.garbage_data_containers_;
• If no files has exist then go for next process. If files has exist then perform the cleanup process. Sap notes: 2372809

7. Create a full backup:

• Before upgrade start, Please take the full backup for revert back situation.
• Once Full Backup has completed then go for upgrade.

We have completed the Hana1.0 to Hana2.0 upgrade mandatory steps and No error files has exist in Hana databases.
If no issue for mandatory steps, we will continue for Hana upgrade process. Please check below details for SAP Hana Upgrade Guide.

Hana1.0 to Hana2.0 Upgrade Guide:
SAP Hana Upgrade Guide:
Current version: Hana1.0 SP12 Rev35 –Single Database Container
Target Version: Hana1.0 SP05 –Multi Database Container
• Download the Hana1.0 SP5 version media in service market
• Uncar the files and apply the permission and owner ship.
• Command:
chmod 777 Filename
chown sidadm:sapsys Filename
• Take approval for SAP system downtime and inform to the users for unavailability
• Stop the SAP Application.
• Execute the below command.
./hdblcm –ignore=check_signature_file
• Select 1 option for update existing Database
• Enter selected action index: 1
• Chose the components which you want the update
• Enter list of the selected indices: 2 : Hana database server only
• Enter database user name(SYSTEM): SYSTEM
• Enter Yes for migrated to python2 to python3
• Has all customer specific migrated to python3(Y/N): Y
• Do you want continue update:Y
• Update is going on…
• Hana1.0 to Hana2.0 Upgrade has been completed successfully.
• Check current Hana Version:
• Command:
Su – sidadm
HDB version
• Hana database version has upgraded successfully.
We can perform the Hana database Post checks for Hana database checks and health checks.
We need to check the below details
1. Hana database consistency checks.
2. Hana db full backup and sap application health checks.

SAP Hana Upgrade Guide

Conclusion:

We have successfully completed the Steps for SAP Hana Upgrade Guide. 
Hana1.0 to Hana2.0 database Upgrade steps Part1
Hana1.0 to Hana2.0 database Upgrade steps Part2

SAP Hana Upgrade Guide

Other Blogs:
SAP ECC to S4 HANA conversion

Leave a Comment