Submit a ticketCall us

Don’t fall victim to a ransomware attack
Backups are helpful, but sometimes that’s not enough to protect your business against ransomware. At our live webcast we will discuss how to protect against ransomware attacks with SolarWinds® Patch Manager and how to leverage log data to detect ransomware. Register now for our live webcast.

Home > Success Center > VoIP & Network Quality Manager (VNQM) > Duplicate phone count in VNQM

Duplicate phone count in VNQM

Created by Jeremy Holmes, last modified by Jeremy Holmes on Apr 20, 2017

Views: 30 Votes: 3 Revisions: 14

Overview

This article describes the issue when VNQM license shows a higher phone count than the actual number of phones in the environment.

Environment

  • VNQM version 4.X

Resolution

There are two ways to resolve this issue: 

 

Query to remove duplicates

Warning:

  • Consult your System Administrator before performing the following steps.
  • This procedure requires a full back up of the SQL Server database in case you need to roll back later. 
     
  1. Verify that your Cisco Unified Communications Manager (CUCM) phone tables are updated and that phones are not duplicated across the tables. Otherwise, the issue will recur on the next poll.
  2. Connect to the SQL Server using Remote Desktop Connection.
  3. Log in to the SQL Server Management Studio using a System Administrator account.
  4. Create a Full Database Backup (SQL Server)
    Note: VERY IMPORTANT – DO NOT SKIP THIS STEP.
  5. Expand the SQL Server and locate the SolarWinds database.
  6. Right-click the SolarWinds database and select New Query.
  7. Type the following query:

    BEGIN

    ​CREATE TABLE CcmPhonesDupIDs
    (
    ID int,
    nr int
    )

    INSERT INTO CcmPhonesDupIDs
    SELECT
    ID,
    row_number() OVER (PARTITION BY VoipCCMMonitoringID, MAC_Address ORDER BY VoipCCMMonitoringID, MAC_Address) AS
    nr
    FROM VoipCCMPhones

    DELETE FROM VoipCCMPhoneStats_Hourly WHERE VoipCCMPhonesID IN( SELECT ID FROM CcmPhonesDupIDs WHERE nr>1)
    DELETE FROM VoipCCMPhoneStats_Daily WHERE VoipCCMPhonesID IN( SELECT ID FROM CcmPhonesDupIDs WHERE nr>1)
    DELETE FROM VoipCCMPhoneStats_Detail WHERE VoipCCMPhonesID IN( SELECT ID FROM CcmPhonesDupIDs WHERE nr>1)
    DELETE FROM VoipCCMPhonesCiscoData WHERE VoipCCMPhonesID IN( SELECT ID FROM CcmPhonesDupIDs WHERE nr>1)
    DELETE FROM VoipCCMPhonesAvayaData WHERE VoipCCMPhonesID IN( SELECT ID FROM CcmPhonesDupIDs WHERE nr>1)
    DELETE FROM VoipCCMPhones WHERE ID IN( SELECT ID FROM CcmPhonesDupIDs WHERE nr>1)

    DROP TABLE CcmPhonesDupIDs

    END
    GO

  8. Click Execute. The phone count license should now reflect the actual number of phones across all your CUCMs.

 

Remove all phones

  1. Go to VNQM Settings > Manage Call Managers.
  2. Remove all the call managers in that cluster.
  3. Run the database maintenance.
  4. Add the call managers back in.
  5. Make sure that all phone records should be removed.

Cause 

This can occur when the CUCM phone tables have duplicates or if there are multiple CUCMs with existing phones. 

 

Last modified
07:07, 20 Apr 2017

Tags

Classifications

Public