About the action agent function for VCS agent for DB2

Last published : Jun 11, 2026
The agent for DB2 supports the action function, which enables you to perform predefined actions or custom actions on a resource. To perform an action on a resource, type the following command:
\# hares -action res token [-actionargs arg1 ...]
[-sys system] [-clus cluster]
The agent supports the following predefined actions:
  • The VRTS_GetInstanceName token retrieves the DB2 instance name of the configured Db2udb resource.
  • The VRTS_GetRunningServices token retrieves the list of processes that the agent monitors for the Db2udb resource.
For example:
\# hares -action db2udb1 VRTS_GetInstanceName -sys systemNameVCS NOTICE V-16-13323 Resource (db2udb1): action
(VRTS_GetInstanceName) completed successfully. Output is:
db2inst1\# hares -action db2udb0 VRTS_GetRunningServices -sys systemNameVCS NOTICE V-16-13323 Resource (db2udb0): action
(VRTS_GetRunningServices) completed successfully. Output is:
PARTITION: 0PID TTY TIME CMD9800 ? 0:06 db2sysc