Skip to Content
Author's profile photo Serge Muts

Nohup & hdblcm: how to update SAP HANA over an unreliable network

After Stephanie Lewellen introduced hdblcm and hdblcmgui in her blog last month, I decided to test one of my favorite linux tools “nohup” with hdblcm.  Nohup is a lesser known Linux utility that can make the daily life of a system administrator a lot easier.

I do like and use GUI’s, but I prefer using command line – and hdblcm has proven to be very useful! When I update any SAP HANA instance I am rarely closer than 1000 miles from the server, whether it is a customer, partner, cloud, or internal system. Sometimes the network is OK, sometimes it is horribly slow and I get disconnected a lot. This depends of course on lots of factors, but none that I have any influence on.  So why do I like hdblcm? First of all I like that it is simple to use, very much like hdbupd was in early versions of SAP HANA. And second, it makes is easier for me to use a linux tool like “nohup” and execute the SAP HANA update without being affected by network disconnects.

There are many ways to update SAP HANA, but below procedure is an option to consider for unreliable networks (e.g. geographic location, hotel room, airplane, some public clouds, multiple vpn’s) and/or longer running SAP HANA updates (e.g. large scale out with large row store, disk elasticity in public cloud). My goal is that after I start the actual update a network disconnection will not interrupt the SAP HANA update process. To achieve this I have to run hdblcm in a way that it needs no inputs during its execution (batch), which is documented in the latest SAP HANA Server Installation Guide on

Note: I use this method only if I do not trust the network to stay connected. If I can trust the network then I simply use hdblcm interactively as documented in the SAP HANA Server Installation Guide.

First let’s check the SAP HANA version for my instance P15:

(readability improves when you click on the image)


As documented in the official guide extract downloaded media in same base directory, in my case /hana/Rev70:

  • SAPCAR -xvf IMC_STUDIO100_70_0-10009662.SAR
  • SAPCAR -xvf IMDB_CLIENT100_70_0-10009663.SAR
  • SAPCAR -xvf IMDB_SERVER100_70_0-10009569.SAR


Now I run hdblcm from the SAP_HANA_DATABASE directory to look at the options. Note that it shows the component directories it is reading for the update:


To run hdblcm as a batch process I create a template file:


For this simple example I change some values in the template file and save it:

# Select the action to be either installation or update (Default: install)


# Index


# SAP HANA System ID


# System Administrator Password


# Database User (SYSTEM) Password

system_user_password= MySystem123

Note:  In the template file you can choose whether to update the saphostagent as part of the SAP HANA update (default = yes). The saphostagent gets updated with the version packaged in the extracted SAP_HANA_DATABASE directory.

Now, as root, I use nohup to execute the update and use & to send the process to the background:


For readability:

nohup ./hdblcm –action=update –batch –configfile=template.txt > nohup.log &

Once the process is started I can disconnect my putty session, but it is better to do some quick checks. To monitor the process I simply use “tail –f nohup.log”. I always do this right way after executing nohup to ensure there are no immediate errors that I need to fix before I choose to disconnect or forcefully get disconnected.


The result in nohup.log:


A quick check to verify the updated version:


Recommendation: For security either delete the template file, or at least remove the passwords from it.

Note that nohup can also be used for other processes. For example I have used it for scp copy and mass start/stops in cloud landscapes for training instances.

Example mass start executed as root:

root@host: /hana/Rev70/SAP_HANA_DATABASE # cat


nohup su – p10adm -c “HDB start” &

nohup su – p11adm -c “HDB start” &

nohup su – p12adm -c “HDB start” &

nohup su – p13adm -c “HDB start” &

nohup su – p14adm -c “HDB start” &

nohup su – p15adm -c “HDB start” &

I hope this was helpful, let me know if you have any comment/questions!

Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Gaurav Sinha
      Gaurav Sinha

      Yes this will be pretty useful.... and your mass start concept too  🙂

      Thanks for sharing Serge.

      Author's profile photo Henricus Bouten
      Henricus Bouten

      Nice blog Serge.

      I understand that you want to use the hdblcm batch mode over a unreliable network, but I don't like the idea that there are a username and password stored in a plain text configuration file.

      I understand why you need to do this, because the "nohup .... &" puts your session in the background and you loose in interactivity and then it becomes a bit difficult to type the password.

      But maybe it better to use screen. Screen give you a full shell that you can attach or detach. If detached it's sitting in the background. When you reattach you get the shell back and you can continue to use the keyboard. Screen also survives lost network connections, so it's very useful on  a unreliable network.

      Screen is part of the standard installed packages in SUSE SLES11.

      Author's profile photo Serge Muts
      Serge Muts
      Blog Post Author

      Hi Hay,

      Thanks for the feedback! I absolutely agree that screen is also a great option, a colleague suggested the same. As always it depends on the requirements. I use nohup a lot for preparations like Teched (now dCode) where we use 60 installed HANA instances (takes about 150 minutes). So security is less of a concern since OS access is very locked down. Another option would be hdbuserstore, but that is not possible as far as I know.



      Author's profile photo Henricus Bouten
      Henricus Bouten

      Ah, I understand. It was only for demo/education systems during SAP shows. And indeed if you need to install 60 systems then the hdblcm batch mode is a must. Using hdblcm with hdbuserstore is indeed not possible.

      Author's profile photo Srinivas Kakarla
      Srinivas Kakarla

      Thanks for theses inputs. Are very helpful in maintaining N HANA instances.

      Author's profile photo Zdenek Chládek
      Zdenek Chládek

      Instead of nohup I use tmux.