Monitoring, Management & Location Tracking

 View Only
last person joined: one year ago 

Articles relating to existing and legacy HPE Aruba Networking products and solutions including AirWave, Meridian Apps, ALE, Central / HPE Aruba Networking Central, and UXI / HPE Aruba Networking User Experience Insight

How to use Duplicate Database Entries to your advantage 

Jun 17, 2014 01:57 PM

There's a few cases where knowing how to find duplicates is to your advantage. The quickest way to find duplicates from the database is via the CLI. Here's a few example SQL commands:

If you want to get a list of just the unique types:
# SELECT type
FROM ap
GROUP BY type HAVING count(*)>1;
-here the SQL query is showing just the unique types (removing the duplicate)

If you're looking for unique group names:
# SELECT id, name
FROM ap_group
WHERE id IN (
SELECT ap_group_id
FROM ap
GROUP BY ap_group_id HAVING count(*)>1)
ORDER BY name;
-here the SQL query is showing just the unique group names (removing the duplicates)

If you want to get a list of the devices reporting duplicate IP addressss:
# SELECT id, name, apparent_ip
FROM ap
WHERE apparent_ip IN (
SELECT apparent_ip
FROM ap
GROUP BY apparent_ip HAVING count(*)>1)
ORDER BY apparent_ip;
-here the SQL query is going to only show the duplicate entries by IP address

If you want to get a list of the devices reporting duplicate MAC addresses:
# SELECT id, name, lan_mac
FROM ap
WHERE lan_mac IN (
SELECT lan_mac
FROM ap
GROUP BY lan_mac HAVING count(*)>1)
ORDER BY lan_mac;
-here the SQL query is going to only show the duplicate entries by MAC address

Thats a few ways to get data when a duplicate is being reported. We've seen duplicates come up when clicking the "apply" or "save" option multiple times while the AMP is processing the command. We've also seen duplicates when using the replace device option or when restoring a backup runs into a disk error.

Statistics
0 Favorited
2 Views
0 Files
0 Shares
0 Downloads

Related Entries and Links

No Related Resource entered.