Here is a method using EIB SQL to get information with one SOAP call.
The distribution of a situation is controlled by entries in the TOBJACCL table. The important columns in the EIB table are OBJNAME and NODEL. OBJNAME is the situation name and NODEL is either a MSL name or Managed System Name. The TOBJACCL table will contain one row for each distribution target in the situation configuration. For example, if you configure a situation to be distributed to two MSLs and a specific Managed System, then there will be three rows in the table for the situation plus an entry for each managed system contained within the two Managed System Lists.
The next piece of the puzzle is the TNODELST table. This table maintains all of the Managed System Lists. For a more detailed description of this table read this Blog entry. This table will provide us with the actual hostname of the installed managed system. The columns we are interested in this table are NODE, NODELIST, and NODETYPE. The NODE column we will select in our SQL, and NODELIST will appear in our SQL WHERE clause to join the TOBJACCL table on the NODEL column. We will also use NODETYPE in the WHERE clause to only select the Managed System entries, not the MSLs.
Here is the SQL:
SELECT TOBJACCL.OBJNAME,TNODELST.NODE
FROM O4SRV.TNODELST,O4SRV.TOBJACCL
WHERE TNODELST.NODELIST=TOBJACCL.NODEL AND TNODELST.NODETYPE="V"
If we wanted to select for a specific situation we could add a condition to the WHERE clause: TOBJACCL.OBJNAME="SIT_NAME"
If we wanted to select for a specific host we could do this:
TNODELST.NODE ="HOSTNAME"
No comments:
Post a Comment