SAP Host Agent – update
Today will be a few words about how to update SAP Host Agent (I’ll be use shortcut: SHA). I’ll start with that SAP Host Agent is an agent that can accomplish several life-cycle management tasks, such as operating system monitoring, database monitoring, system instance control and provisioning, etc. Latest documentation to SHA You can find in this note.
Check current SHA version
->#/usr/sap/hostctrl/exe/saphostexec -version
*************************** Component ********************
/usr/sap/hostctrl/exe/saphostexec: 721, patch 1211, changelist 1901080, linuxx86_64, opt (Feb 2 2019, 04:21:23)
/usr/sap/hostctrl/exe/sapstartsrv: 721, patch 1211, changelist 1901080, linuxx86_64, opt (Feb 2 2019, 04:21:23)
/usr/sap/hostctrl/exe/saphostctrl: 721, patch 1211, changelist 1901080, linuxx86_64, opt (Feb 2 2019, 04:21:23)
....
/usr/sap/hostctrl/exe/SAPCAR: 721, patch 1112, changelist 1861428, linuxx86_64, opt (Jul 28 2018, 01:21:25)
**********************************************************
--------------------
SAPHOSTAGENT information
--------------------
kernel release 721
kernel make variant 721_REL
compiled on Linux GNU SLES-9 x86_64 cc4.1.2 for linuxx86_64
compiled for 64 BIT
compilation mode Non-Unicode
compile time Feb 2 2019 04:17:12
patch number 41
latest change number 1902110
---------------------
supported environment
---------------------
operating system
Linux 2.6
Linux 3
Linux
In above example we have SHA in version 721 witch patch 41.
Update SHA
First we need download the latest SAP Host Agent from the SAP Software Download Center:
In the navigation bar, choose:
-> SAP Software Download Center
-> Support Packages and Patches
-> Browse our Download Catalog
-> SAP Technology Components
-> SAP HOST AGENT
-> SAP HOST AGENT 7.22
-> <your operating system>
In this case I’ll be download the newest version at the moment, file: “SAPHOSTAGENT54_54-80004822.SAR“.
Next, follow the procedure below:
-- I downloaded file to directory: /mnt/nfs/SAPHostAgent/SAPHOSTAGENT54
-># ls
SAPHOSTAGENT54_54-80004822.SAR
-- In this directory, extract the SAPHOSTAGENT SAR file
-># [PATH_TO_SAPCAR]/SAPCAR -xvf SAPHOSTAGENT54_54-80004822.SAR
SAPCAR: processing archive SAPHOSTAGENT54_54-80004822.SAR (version 2.01)
x SAPCAR
x SHADBMETRICSDEF.SAR
x convertoscolfilter
x hostagent.lst
x hostagent.mf
x hostagent_acknowledgements.txt
x hostexecstart
x http.monitor
x installsapinit.sh
x ldappasswd
x ldapreg
x libSQLDBCHDB.so
x librfccm.so
x libsapacosprep.so
x libsapcrypto.so
x libsapdbadactrl.so
x libsapdbadapwrt.so
x libsapdbadasql.so
x libsapdbdb6ctrl.so
x libsapdbhdbctrl.so
x libsapdbhdbsql.so
x libsapdboractrl.so
x libsapdbsiqctrl.so
x libsapdbsybctrl.so
x libslcryptokernel.so
x libslcryptokernel.so.sha256
x lssap
x sapacosprep
x sapcimb
x sapcimc
x sapcontrol
x sapcpp47.so
x sapdbctrl
x sapdsigner
x sapgenpse
x saphostctrl
x saphostexec
x saphostv
x sapinit
x saposcol
x sapstartsrv
x sapuxuserchk
x sapuxusergetrtinfo
x sldreg
x xml71d.so
SAPCAR: 45 file(s) extracted
-- Now we can upgrade SAP Host Agent
-># ./saphostexec -upgrade
Upgrade service
[Thr 140137836193664] Sun Nov 28 00:02:08 2021
[Thr 140137836193664] SAPCryptoPath /usr/sap/hostctrl/exe/libsapcrypto.so
IsUpgradeNecessary: /mnt/nfs/SAPHostAgent/SAPHOSTAGENT54/saphostexec is newer than /usr/sap/hostctrl/exe/saphostexec
Upgrade saphostexec / saphostcontrol
Check Installation Path ...
saphostexec is already running (pid=2203). Stopping...ok
Copy Executable ...ok
Migrating ...ok
Install SYS-V service ...
Note: This output shows SysV services only and does not include native
systemd services. SysV configuration data might be overridden by native
systemd configuration.
If you want to list systemd services use 'systemctl list-unit-files'.
To see services enabled on particular target use
'systemctl list-dependencies [target]'.
ok
-> Start /usr/sap/hostctrl/exe/saphostexec pf=/usr/sap/hostctrl/exe/host_profile <-
start hostcontrol using profile /usr/sap/hostctrl/exe/host_profile
ok
[OK] SAPHostExec / SAPHostControl successfully upgraded
Executing: "/usr/sap/hostctrl/exe/SAPCAR" -xvf "./SHADBMETRICSDEF.SAR" -R "/usr/sap/hostctrl/exe/config.d"
SAPCAR: processing archive ./SHADBMETRICSDEF.SAR (version 2.01)
x dbmetric.definition.db4.cimobj
x dbmetric.definition.db6.cimobj
x dbmetric.definition.hdb.cimobj
x dbmetric.definition.mss.cimobj
x dbmetric.definition.ora.cimobj
x dbmetric.definition.sap.cimobj
x dbmetric.definition.siq.cimobj
x dbmetric.definition.syb.cimobj
x dbmetric.definition.tst.cimobj
x dbmetrics.d
x dbmetrics.d/00.general.hdb.cimobj
x dbmetrics.d/00.state.hdb.cimobj
x dbmetrics.d/10.host.capacity.hdb.cimobj
x dbmetrics.d/20.indexserver.hdb.cimobj
x dbmetrics.d/20.nameserver.hdb.cimobj
x dbmetrics.d/50.adhocsql.frun.hdb.cimobj
SAPCAR: 16 file(s) extracted
Finally, we check the version again:
->#/usr/sap/hostctrl/exe/saphostexec -version
...
--------------------
SAPHOSTAGENT information
--------------------
kernel release 722
kernel make variant 722_REL
compiled on Linux GNU SLES-9 x86_64 cc4.1.2 for linuxx86_64
compiled for 64 BIT
compilation mode Non-Unicode
compile time Oct 16 2021 02:19:15
patch number 54
latest change number 2096097
That’s all 😉