‎11-03-2022 03:01 PM - last edited on ‎04-02-2024 10:38 AM by Mercedes_O
I have discovered a problem with switch and asset relationships. If an asset is discovered on a switchport and then the asset is moved to a different switchport or even to a different switch, the asset will still show on the switchport that the asset was originally discovered on.
Solved! Go to Solution.
‎11-03-2022 03:44 PM
Hello there!
If you have many switches in your network, this might indeed be a cumbersome task, so what you could also do is run a database script to clean up all your switches at once. We have provided a script below. This script will delete any MAC address in tblSNMPAssetMAC if the Lastseen date for the MAC is smaller than the Lastseen date of the switch. The script will delete this information for all switches, so it must only be run once. To run the script, follow the steps below:
DELETE tblSNMPAssetMac
FROM tblSNMPAssetMac
INNER JOIN tblAssets On tblSNMPAssetMac.AssetID = tblAssets.AssetID
WHERE tblAssets.Lastseen > tblSNMPAssetMac.LastSeen
‎11-03-2022 03:42 PM
That fixed the immediate problem.
Is there a way to automate this function?
‎11-03-2022 03:44 PM
Hello there!
If you have many switches in your network, this might indeed be a cumbersome task, so what you could also do is run a database script to clean up all your switches at once. We have provided a script below. This script will delete any MAC address in tblSNMPAssetMAC if the Lastseen date for the MAC is smaller than the Lastseen date of the switch. The script will delete this information for all switches, so it must only be run once. To run the script, follow the steps below:
DELETE tblSNMPAssetMac
FROM tblSNMPAssetMac
INNER JOIN tblAssets On tblSNMPAssetMac.AssetID = tblAssets.AssetID
WHERE tblAssets.Lastseen > tblSNMPAssetMac.LastSeen
‎11-03-2022 03:37 PM
Hello there!
You can clear old switch connections by clicking the Remove Disconnected Devices button in the left-hand pane of switch asset pages (see screenshot below). This button will clear all switch port connections that are older than the last successful scan time of the switch in question.
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now