Monitoring, Management & Location Tracking

How to use Duplicate Database Entries to your advantage

Aruba Employee

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.

Version history
Revision #:
1 of 1
Last update:
‎06-17-2014 10:57 AM
Updated by:
 
Contributors
Search Airheads
cancel
Showing results for 
Search instead for 
Did you mean: