new-device-sync into NPC not working

Document ID : KB000007162
Last Modified Date : 14/02/2018
Show Technical Document Details
Issue:

New-device-sync into NPC is not working.

Environment:
Windows, NV 7.0, 7.1 SP2, 7.1 SP3
Cause:

Background - within NVMC-nms2-db _owner fields reflect which service_manager.smgr_id the device/instance record came from, vs _mapping fields which reflect the local_id within that poller's nms2-db. So then within NV_P0n-nms2-db both _owner & _mapping fields are unused.

In this case a couple of devices within the MC-nms2 space had valid _owner values, but somehow ended up with _mapping=0 record values. Not valid. Presumably this could come from an unplanned topology-restart while the device/instance was just getting inserted into the nvmc-db.

Resolution:

Following was usesd as a mc-cleanup process, then 'discoverycontrol -resync ___nv_p0n___' was invoked for new devices which were still missing from certain pollers (only 1 poller in this case).

REM These are NVMC-commands!!
mysqldump nms2 properties > d:\savedata\properties.sql
mysqldump nms2 interfaces pollinst polltables devices > d:\savedata\inventory.sql
mysql nms2
delete from invalid using properties invalid join pollinst on pollinst_properties = property_set_id
where pollinst_mapping = 0;
delete from invalid using interfaces invalid join pollinst on interface_id = pollinst_id
where pollinst_mapping = 0;
delete from pollinst where pollinst_mapping = 0;
delete from polltables where polltable_mapping = 0;
delete from devices where dev_mapping = 0;
quit
discoverycontrol -stopService Topology
discoverycontrol -startService Topology
discoverycontrol -startService Polls
discoverycontrol -startService Ping
discoverycontrol -startService Notify