Automatic Upgrade of SAP Host Agent

Upgrading the SAP Host Agent by extracting the SAR file in each server and executing ./saphostexec -upgrade command is tedious in case of a large landscape.

This bike won't update automatically like sap hostagent


You can use the DIR_TRANS folder which is network shared across all the systems in the landscape and the auto upgrade feature of SAP Host Agent to your advantage.

Add the following lines to the host_profile file:
hostexec/autoupgrade_delay=300
DIR_NEW = /usr/sap/trans/HOSTAGENT_UPDATE_FOLDER

In the above example case, the host agent checks the folder /usr/sap/trans/HOSTAGENT_UPDATE_FOLDER every 300 minutes (5 hours) to check if a newer version of host agent is available. You have to choose the upgrade delay and DIR_NEW values suitable to your environment.

When you want to upgrade the host agent

  1. Download the latest host agent SAR file. Do not extract it yet.
  2. Go to the folder specified in DIR_NEW and create a file .upgrading. The .upgrading file ensures that the host agent does not copy the files while the extraction is still going on.
  3. Extract the host agent SAR file to DIR_NEW
  4. Remove .upgrading file.


Accessing network shared DIR_NEW simultaneously on a very large system can be problematic. You can avoid a bottleneck by all host agents trying to access DIR_NEW simultaneously by creating a .delay file as suggested here.

Comments

Popular posts from this blog

OS/DB Migration - CMD. STR, TOC, EXT, R3load, DDLDBS.TPL and more

Fixing Inconsistent Table - Table activation fails due to inconsistency between DD and DB

301 Redirect Using SAP Web Dispatcher