[ST OMU] Policies unassigned but still exist in node

In Operations Agent for Operations Manager for Unix/Linux (OUM/OML) policies have been unassigned but still exist in node.
Even deleted the policies folders and restart agent but still the same.


Database inconsistency on the Management Server.


Run script "check_templ_assign.sql" in order to be able to locate the assignments paths that may be needed to modify or delete policy assignments.

It should be copied into the $OV_CONF/OpC/mgmt_sv/reports/<LANG>/ directory of the Operations Manager for Unix (OMU) server; proper permissions and ownership should be assigned:
# chown root:opcgrp $OV_CONF/OpC/mgmt_sv/reports/<LANG>/check_templ_assign.sql
# chmod 440 $OV_CONF/OpC/mgmt_sv/reports/<LANG>/check_templ_assign.sql
Once copied, it can be launched with call_sqlplus.sh(1). The syntax is:
# call_sqlplus.sh check_templ_assign <node_name>
Which will generate a report with following format:
Actual templates assignment in opc_node_config table for node <node_name>
Template Name
Templates assigned directly to node <node_name>
Template Name
Templates groups assigned to node groups containing node <node_name>
Template group name      Node group name        Template Name
------------------------ ---------------------- ---------------------
<template_group_name>    <node_group_name>      <template_name>
Templates assigned to node groups containing node <node_name>
Node Group                             Template Name
-------------------------------------- ------------------------------
<node_group_name>                      <template_name>
Templates groups assigned to node <node_name>
Template Group                   Template Name
-------------------------------- ---------------------------------
<template_group_name>            <template_name>

If policies listed under section 'Actual template assignment in opc_node_config' do not match with policies
assignments paths listed below (on the report generated from the script), it means that there is a DB inconsistency. 

If there is an inconsistency at DB, it is needed to run the following command on the Management Server to fix the issue:
opcdbidx -config

Then redistribute policies with -force option.

As documented in the opcdbidx man page:

-config Recreate the content of the opc_node_config table. This
fixes problems where policies are still distributed to
managed nodes although they are no longer assigned. The
problems that lead to such inconsistencies have been
fixed with A.05.38 and A.06.03. This option allows to
fix old inconsistencies, that were caused before the
patch that fixes the problem was applied.


This is documented in the following KCS document: KM00889010