#### 1. heruntergeladene Softwarepakete entpacken ###################################################################
####
shu:/tmp # cd /software/HANA/hanapatches/
shu:/software/HANA/hanapatches # ll
total 11961576
-rw-r--r-- 1 root root  204135189 Feb 20 20:11 IMDB_CLIENT20_011_20-80002082.SAR
-rw-r--r-- 1 root root 3809047759 Mar  9 21:20 IMDB_SERVER20_059_1-80002031.SAR
-rw-r--r-- 1 root root  114649500 Mar  9 21:11 VCH202100_2059P_100-70006349.SAR
shu:/software/HANA/hanapatches # /usr/sap/hostctrl/exe/SAPCAR -xvf VCH202100_2059P_100-70006349.SAR -R /tmp/hana2059_1
SAPCAR: processing archive VCH202100_2059P_100-70006349.SAR (version 2.01)
x VCH_AFL_2021
x VCH_AFL_2021/instruntime
[...]
x VCH_AFL_2021/hdbinst
SAPCAR: 55 file(s) extracted
shu:/software/HANA/hanapatches # /usr/sap/hostctrl/exe/SAPCAR -xvf IMDB_CLIENT20_011_20-80002082.SAR -R /tmp/hana2059_1
SAPCAR: processing archive IMDB_CLIENT20_011_20-80002082.SAR (version 2.01)
x SAP_HANA_CLIENT
x SAP_HANA_CLIENT/client
[...]
x SAP_HANA_CLIENT/filelist.clientinst
SAPCAR: 99 file(s) extracted
shu:/software/HANA/hanapatches # /usr/sap/hostctrl/exe/SAPCAR -manifest SIGNATURE.SMF -xvf IMDB_SERVER20_059_1-80002031.SAR -R /tmp/hana2059_1
SAPCAR: processing archive IMDB_SERVER20_059_1-80002031.SAR (version 2.01)
x SAP_HANA_DATABASE
x SAP_HANA_DATABASE/server
[...]
x SAP_HANA_DATABASE/resources/resident/slp-client/ProcessManager.js
x SAP_HANA_DATABASE/hdblcmweb
x SIGNATURE.SMF
SAPCAR: 355 file(s) extracted
####
#### 2. HANA Update vorbereiten (mit Option --prepare_update) ##########################################################
####
shu:/software/HANA/hanapatches # cd /tmp/hana2059_1/
shu:/tmp/hana2059_1 # ll
total 52
drwxr-xr-x 5 root root   186 Feb  7 16:54 SAP_HANA_CLIENT
drwxr-xr-x 8 root root  4096 Jan 20 10:21 SAP_HANA_DATABASE
-rw------- 1 root root 45818 Jan 20 14:19 SIGNATURE.SMF
drwxr-xr-x 4 root root    56 Jan 20 11:09 VCH_AFL_2021
shu:/tmp/hana2059_1 # cd SAP_HANA_DATABASE/
shu:/tmp/hana2059_1/SAP_HANA_DATABASE # ./hdblcm --action=update --prepare_update


SAP HANA Lifecycle Management - SAP HANA Database 2.00.059.01.1642499117
************************************************************************


Scanning software locations...
Detected components:
    SAP HANA Database (2.00.059.01.1642499117) in /tmp/hana2059_1/SAP_HANA_DATABASE/server
    SAP HANA Database Client (2.11.20.1644165757) in /tmp/hana2059_1/SAP_HANA_CLIENT/client
    SAP VCH AFL 2021 (2021.059.0100.1642523075) in /tmp/hana2059_1/VCH_AFL_2021/packages


Do you want to specify additional components location? (y/n) [n]:

Choose system to update

  Index | Action            | System Properties
  -----------------------------------------------------------------------------------
  1     | H4H (update)      | Update SAP HANA Database version 2.00.059.00.1636704142
        |                   | shu (Database Worker (worker))
        |                   | plugins: vch2021
  2     | Exit (do nothing) |

Enter selected action index [2]: 1


Choose components to be installed or updated:

  Index | Components | Description
  ----------------------------------------------------------------------------------------------------------------------
  1     | all        | All components
  2     | server     | Update SAP HANA Database from version 2.00.059.00.1636704142 to version 2.00.059.01.1642499117
  3     | client     | Update SAP HANA Database Client from version 2.10.20.1636580948 to version 2.11.20.1644165757
  4     | vch2021    | Update SAP VCH AFL 2021 from version 2021.059.0000.1636724919 to version 2021.059.0100.1642523075

Enter comma-separated list of the selected indices [1]:
Enter System Database User Name [SYSTEM]:
Enter System Database User (SYSTEM) Password:
Apply System Size Dependent Resource Limits? (SAP Note 3014176) [y]:
Has all customer specific tooling been migrated to Python 3? (y/n): y

Summary before execution:
=========================

SAP HANA Database
   Update Parameters
      Stop update before software version switch, resumable: Yes
      SAP HANA System ID: H4H
      Remote Execution: ssh
      Configure Python version: python3
      Update Execution Mode: standard
      System Database User Name: SYSTEM
   Software Components
      SAP VCH AFL 2021
         Update from version 2021.059.0000.1636724919 to 2021.059.0100.1642523075
         Location: /tmp/hana2059_1/VCH_AFL_2021/packages
      SAP HANA Database
         Update from version 2.00.059.00.1636704142 to 2.00.059.01.1642499117
         Location: /tmp/hana2059_1/SAP_HANA_DATABASE/server
      SAP HANA Database Client
         Update from version 2.10.20.1636580948 to 2.11.20.1644165757
         Location: /tmp/hana2059_1/SAP_HANA_CLIENT/client
   Log File Locations
      Log directory: /var/tmp/hdb_H4H_hdblcm_update_2022-03-09_21.53.13
      Trace location: /var/tmp/hdblcm_2022-03-09_21.53.13_85425.trc

Do you want to continue? (y/n): y

Preparing update of components...
Preparing update of SAP HANA Database...
  Preparing package 'Saphostagent Setup'...
  Preparing package 'Python3 Runtime'...
  Preparing package 'Python Support'...
  Preparing package 'Python Runtime'...
  Preparing package 'Product Manifest'...
  Preparing package 'Binaries'...
  Preparing package 'Data Quality'...
  Preparing package 'Krb5 Runtime'...
  Preparing package 'Installer'...
  Preparing package 'Ini Files'...
  Preparing package 'HWCCT'...
  Preparing package 'Documentation'...
  Preparing package 'Delivery Units'...
  Preparing package 'Offline Cockpit'...
  Preparing package 'DAT Languages (EN, DE)'...
  Preparing package 'DAT Languages (other)'...
  Preparing package 'DAT Configfiles (EN, DE)'...
  Preparing package 'DAT Configfiles (other)'...
  Extracting software...
  Extracting package 'Saphostagent Setup'...
  Extracting package 'Python3 Runtime'...
  Extracting package 'Python Support'...
  Extracting package 'Python Runtime'...
  Extracting package 'Product Manifest'...
  Extracting package 'Binaries'...
  Extracting package 'Data Quality'...
  Extracting package 'Krb5 Runtime'...
  Extracting package 'Installer'...
  Extracting package 'Ini Files'...
  Extracting package 'HWCCT'...
  Extracting package 'Documentation'...
  Extracting package 'Delivery Units'...
  Extracting package 'Offline Cockpit'...
  Extracting package 'DAT Languages (EN, DE)'...
  Extracting package 'DAT Languages (other)'...
  Extracting package 'DAT Configfiles (EN, DE)'...
  Extracting package 'DAT Configfiles (other)'...
Update of SAP HANA Database components prepared
Log file written to '/var/tmp/hdb_H4H_hdblcm_update_2022-03-09_21.53.13/hdblcm.log' on host 'shu'.
####
#### 3. SAP System herunterfahren #################################################################
####
shu:/tmp/hana2059_1/SAP_HANA_DATABASE # su - shuadm
shu:shuadm 52> sapcontrol -nr 01 -function StopSystem

09.03.2022 21:58:52
StopSystem
OK
shu:shuadm 54> sapcontrol -nr 01 -function GetSystemInstanceList

09.03.2022 22:01:32
GetSystemInstanceList
OK
hostname, instanceNr, httpPort, httpsPort, startPriority, features, dispstatus
shu, 2, 50213, 50214, 1, MESSAGESERVER|ENQUE|WEBDISP, GRAY
shu, 1, 50113, 50114, 3, ABAP|GATEWAY|ICMAN|IGS, GRAY
shu:shuadm 54> exit
logout
####
#### 4. Update der Datenbank fortsetzen ############################################################
####
shu:/tmp/hana2059_1/SAP_HANA_DATABASE # ./hdblcm --action=update


SAP HANA Lifecycle Management - SAP HANA Database 2.00.059.01.1642499117
************************************************************************


Scanning software locations...
Detected components:
    SAP HANA Database (2.00.059.01.1642499117) in /tmp/hana2059_1/SAP_HANA_DATABASE/server
    SAP HANA Database Client (2.11.20.1644165757) in /tmp/hana2059_1/SAP_HANA_CLIENT/client
    SAP VCH AFL 2021 (2021.059.0100.1642523075) in /tmp/hana2059_1/VCH_AFL_2021/packages


Do you want to specify additional components location? (y/n) [n]:

Choose system to update

  Index | Action            | System Properties
  --------------------------------------------------------------------------------------------------
  1     | H4H (update)      | Update SAP HANA Database version 2.00.059.00.1636704142
        |                   | shu (Database Worker (worker))
        |                   | plugins: vch2021
        |                   | Update is pending
        |                   | (prepared at 2022-03-09T21:56:02+0100)
        |                   | SAP HANA Database: Update to version 2.00.059.01.1642499117 is pending
        |                   | (prepared at 2022-03-09T21:56:02+0100)
        |                   |
  2     | Exit (do nothing) |

Enter selected action index [2]: 1

Processing software locations from pending update...

Pending update information:
===========================

SAP HANA Database
   Update Parameters
      SAP HANA System ID: H4H
      Remote Execution: ssh
      Configure Python version: python3
      Update Execution Mode: standard
      System Database User Name: SYSTEM
   Software Components
      SAP VCH AFL 2021
         Update from version 2021.059.0000.1636724919 to 2021.059.0100.1642523075
         Location: /tmp/hana2059_1/VCH_AFL_2021/packages
      SAP HANA Database
         Resume pending update from version 2.00.059.00.1636704142 to 2.00.059.01.1642499117
         Location: /tmp/hana2059_1/SAP_HANA_DATABASE/server
      SAP HANA Database Client
         Update from version 2.10.20.1636580948 to 2.11.20.1644165757
         Location: /tmp/hana2059_1/SAP_HANA_CLIENT/client
   Log File Locations
      Log directory: /var/tmp/hdb_H4H_hdblcm_update_2022-03-09_22.02.50
      Trace location: /var/tmp/hdblcm_2022-03-09_22.02.50_87908.trc

Do you want to continue using these parameters? If you choose not to continue, you will be asked for all update parameters again. (y/n) [y]:
Enter System Database User (SYSTEM) Password:

Summary before execution:
=========================

SAP HANA Database
   Update Parameters
      SAP HANA System ID: H4H
      Remote Execution: ssh
      Configure Python version: python3
      Update Execution Mode: standard
      System Database User Name: SYSTEM
   Software Components
      SAP VCH AFL 2021
         Update from version 2021.059.0000.1636724919 to 2021.059.0100.1642523075
         Location: /tmp/hana2059_1/VCH_AFL_2021/packages
      SAP HANA Database
         Resume pending update from version 2.00.059.00.1636704142 to 2.00.059.01.1642499117
         Location: /tmp/hana2059_1/SAP_HANA_DATABASE/server
      SAP HANA Database Client
         Update from version 2.10.20.1636580948 to 2.11.20.1644165757
         Location: /tmp/hana2059_1/SAP_HANA_CLIENT/client
   Log File Locations
      Log directory: /var/tmp/hdb_H4H_hdblcm_update_2022-03-09_22.02.50
      Trace location: /var/tmp/hdblcm_2022-03-09_22.02.50_87908.trc

Info: Execute prepared SAP HANA System update

Do you want to continue? (y/n): y

Resuming update of components...
Updating SAP VCH AFL 2021...
  Preparing package 'VCH2021'...
  Installing SAP VCH AFL 2021 FOR SAP HANA to /hana/shared/H4H/exe/linuxx86_64/plugins/vch2021_2021.059.0100.1642523075_a88191ca58c6f456fa0ed1214f0ef57ab21a28ea...
  Installing package 'VCH2021'...
Updating SAP HANA Database...
  Resuming upgrade with software version switch(prepared at 2022-03-09T21:56:02+0100).
  Stopping system...
    Stopping 11 processes on host 'shu' (worker):
      Stopping on 'shu' (worker): hdbdaemon, hdbcompileserver, hdbdiserver (SHU), hdbdocstore (SHU), hdbdpserver (SHU), hdbindexserver (SHU), hdbnameserver, hdbpreprocessor, hdbscriptserver (SHU), hdbwebdispatcher, hdbxsengine (SHU)
    All server processes stopped on host 'shu' (worker).
  Starting service (sapstartsrv)...
  Starting system...
    Starting 11 processes on host 'shu' (worker):
      Starting on 'shu' (worker): hdbdaemon, hdbcompileserver, hdbdiserver (SHU), hdbdocstore (SHU), hdbdpserver (SHU), hdbindexserver (SHU), hdbnameserver, hdbpreprocessor, hdbscriptserver (SHU), hdbwebdispatcher, hdbxsengine (SHU)
      Starting on 'shu' (worker): hdbdaemon, hdbdiserver (SHU), hdbdocstore (SHU), hdbdpserver (SHU), hdbindexserver (SHU), hdbscriptserver (SHU), hdbwebdispatcher, hdbxsengine (SHU)
      Starting on 'shu' (worker): hdbdaemon, hdbdiserver (SHU), hdbdocstore (SHU), hdbdpserver (SHU), hdbscriptserver (SHU), hdbwebdispatcher, hdbxsengine (SHU)
      Starting on 'shu' (worker): hdbdaemon, hdbdiserver (SHU), hdbdocstore (SHU), hdbdpserver (SHU), hdbwebdispatcher, hdbxsengine (SHU)
      Starting on 'shu' (worker): hdbdaemon, hdbdiserver (SHU), hdbdocstore (SHU), hdbwebdispatcher
      Starting on 'shu' (worker): hdbdaemon, hdbdiserver (SHU), hdbwebdispatcher
    All server processes started on host 'shu' (worker).
  Importing delivery units...
  Importing delivery unit HANA_IDE_CORE
Updating Resident hdblcm...
  Cleaning up old installation of Resident hdblcm...
Updating SAP HANA Database Client...
  Preparing package 'Product Manifest'...
  Preparing package 'SQLDBC'...
  Preparing package 'REPOTOOLS'...
  Preparing package 'Python DB API'...
  Preparing package 'Python Machine Learning Client'...
  Preparing package 'ODBC'...
  Preparing package 'R Machine Learning Client'...
  Preparing package 'JDBC'...
  Preparing package 'HALM Client'...
  Preparing package 'DBCAPI'...
  Preparing package 'node.js Client'...
  Preparing package 'golang Client'...
  Preparing package 'Ruby Client'...
  Preparing package 'CommonCryptoLib'...
  Preparing package 'Code Examples'...
  Preparing package '.NET Core'...
  Preparing package 'Environment Script'...
  Preparing package 'Client Installer'...
  Preparing package 'Calculation View API'...
  Installing SAP HANA Database Client to /hana/shared/H4H/hdbclient...
  Updating package 'Product Manifest'...
  Updating package 'SQLDBC'...
  Updating package 'REPOTOOLS'...
  Updating package 'Python DB API'...
  Updating package 'Python Machine Learning Client'...
  Updating package 'ODBC'...
  Updating package 'R Machine Learning Client'...
  Updating package 'JDBC'...
  Updating package 'HALM Client'...
  Updating package 'DBCAPI'...
  Updating package 'node.js Client'...
  Updating package 'golang Client'...
  Updating package 'Ruby Client'...
  Updating package 'CommonCryptoLib'...
  Updating package 'Code Examples'...
  Updating package '.NET Core'...
  Updating package 'Environment Script'...
  Updating package 'Client Installer'...
  Updating package 'Calculation View API'...
Updating SAP HANA Database Instance Integration on Local Host...
  Deploying SAP Host Agent configurations...
Updating Component List...
SAP HANA Database components updated
Log file written to '/var/tmp/hdb_H4H_hdblcm_update_2022-03-09_22.02.50/hdblcm.log' on host 'shu'.
####
#### 5. Kurzer Test ob HANA läuft mit neuer Version (auch im HANA Cockpit prüfen) ####################
####
shu:/tmp/hana2059_1/SAP_HANA_DATABASE # su - h4hadm
h4hadm@shu:/usr/sap/H4H/HDB00> HDB version
HDB version info:
  version:             2.00.059.01.1642499117
  branch:              fa/hana2sp05
  machine config:      linuxx86_64
  git hash:            1690b307accb5cdf237f5fa86b58df6fcb32b0f3
  git merge time:      2022-01-18 10:45:17
  weekstone:           0000.00.0
  cloud edition:       0000.00.00
  compile date:        2022-01-19 16:40:26
  compile host:        ld5146
  compile type:        rel

shuadm@shu:/usr/sap/H4H/HDB00> HDB info
USER          PID     PPID  %CPU        VSZ        RSS COMMAND
h4hadm      91273    91272   0.2      17632       7536 -sh
h4hadm      91426    91273  16.6      13988       3880  \_ /bin/sh /usr/sap/H4H/
h4hadm      91461    91426   0.0      34612       3656      \_ ps fx -U h4hadm -
h4hadm      88959        1   0.0      23132       3132 sapstart pf=/hana/shared/
h4hadm      88967    88959   0.3     479940      95092  \_ /usr/sap/H4H/HDB00/h4
h4hadm      88991    88967  64.7    9875632    4088052      \_ hdbnameserver
h4hadm      89223    88967   0.7    2538556     148736      \_ hdbcompileserver
h4hadm      89226    88967   225    5512712    3967304      \_ hdbpreprocessor
h4hadm      89274    88967   9.7    6597072    2495300      \_ hdbdocstore -port
h4hadm      89277    88967   5.4    5558528    1318580      \_ hdbdpserver -port
h4hadm      89280    88967   258   40484608   35246136      \_ hdbindexserver -p
h4hadm      89283    88967   4.6    5295304    1198500      \_ hdbscriptserver -
h4hadm      89286    88967   5.7    5665964    1305188      \_ hdbxsengine -port
h4hadm      90753    88967   2.2    4090932     384600      \_ hdbdiserver -port
h4hadm      90756    88967   3.7    4498900     454120      \_ hdbwebdispatcher
h4hadm      88536        1   0.4     503436      30564 /usr/sap/H4H/HDB00/exe/sa
h4hadm      20955        1   0.0    3861996      54664 hdbrsutil  --start --port
h4hadm      20218        1   0.0     781448      52340 hdbrsutil  --start --port
h4hadm      13527        1   0.0      72092       7960 /usr/lib/systemd/systemd
h4hadm      13544    13527   0.0     119412       2932  \_ (sd-pam)
h4hadm@shu:/usr/sap/H4H/HDB00> exit
logout
####
#### 6. HANA Client auf Applikationsserver(n) aktualisieren #################################
####
shu:/tmp/hana2059_1/SAP_HANA_DATABASE # cd /tmp/hana2059_1/SAP_HANA_CLIENT
shu:/tmp/hana2059_1/SAP_HANA_CLIENT # ./hdbinst
SAP HANA Database Client installation kit detected.


SAP HANA Lifecycle Management - Client Installation 2.11.20.1644165757
**********************************************************************


Select a SAP HANA Database Client installation:

No  | Installation Path                    | Version            | Mode
-----------------------------------------------------------------------
[1] | /hana/shared/H4H/hdbclient           | 2.11.20.1644165757 | 64bit
 2  | /usr/sap/SHU/hdbclient               | 2.10.20.1636580948 | 64bit
    |                                      |                    |
 3  | Install new SAP HANA Database Client | 2.11.20.1644165757 | 64bit

Enter number [1]: 2

Checking installation...
Preparing package 'Product Manifest'...
Preparing package 'SQLDBC'...
Preparing package 'REPOTOOLS'...
Preparing package 'Python DB API'...
Preparing package 'Python Machine Learning Client'...
Preparing package 'ODBC'...
Preparing package 'R Machine Learning Client'...
Preparing package 'JDBC'...
Preparing package 'HALM Client'...
Preparing package 'DBCAPI'...
Preparing package 'node.js Client'...
Preparing package 'golang Client'...
Preparing package 'Ruby Client'...
Preparing package 'CommonCryptoLib'...
Preparing package 'Code Examples'...
Preparing package '.NET Core'...
Preparing package 'Environment Script'...
Preparing package 'Client Installer'...
Preparing package 'Calculation View API'...
Installing SAP HANA Database Client to /usr/sap/SHU/hdbclient...
Updating package 'Product Manifest'...
Updating package 'SQLDBC'...
Updating package 'REPOTOOLS'...
Updating package 'Python DB API'...
Updating package 'Python Machine Learning Client'...
Updating package 'ODBC'...
Updating package 'R Machine Learning Client'...
Updating package 'JDBC'...
Updating package 'HALM Client'...
Updating package 'DBCAPI'...
Updating package 'node.js Client'...
Updating package 'golang Client'...
Updating package 'Ruby Client'...
Updating package 'CommonCryptoLib'...
Updating package 'Code Examples'...
Updating package '.NET Core'...
Updating package 'Environment Script'...
Updating package 'Client Installer'...
Updating package 'Calculation View API'...
Installation done
Log file written to '/var/tmp/hdb_client_2022-03-09_22.15.37_94437/hdbinst_client.log' on host 'shu'.
####
#### 7. SAP System starten ##################################################################
####
shu:/tmp/hana2059_1/SAP_HANA_DATABASE # su - shuadm
shu:shuadm 52> sapcontrol -nr 01 -function StartSystem

09.03.2022 22:08:09
StartSystem
OK
shu:shuadm 54> sapcontrol -nr 01 -function GetSystemInstanceList

09.03.2022 22:10:54
GetSystemInstanceList
OK
hostname, instanceNr, httpPort, httpsPort, startPriority, features, dispstatus
shu, 2, 50213, 50214, 1, MESSAGESERVER|ENQUE|WEBDISP, GREEN
shu, 1, 50113, 50114, 3, ABAP|GATEWAY|ICMAN|IGS, GREEN
shu:shuadm 54> exit
logout
