Network Management

How to determine which device template is being assigned to NCM nodes

You can query the database to list all device templates for all NCM nodes in the environment.

First published date

2/25/2020 4:41 PM

Last published date

2/25/2020 4:41 PM

Overview

You can use SQL Management Studio or Orion Database Manager to query the database and determine which device templates are assigned to all nodes.

Product section

Network Configuration Manager

Resolution

 
  1. Check the templateID from Cli_DeviceTemplates table by searching the templatename. 
    For example:
    Select * from Cli_DeviceTemplates where TemplateName ='xxx'
  2. Check relation of template and node in Cli_DeviceTemplatesNodes table.
  3. Then according to the nodeid you find, check the nodesdata table for the device name and IP address.
  4. With above information, you will be able to get the list of devices that are being assigned to that particular template.
    For example, if the TemplateID found is 101, then the following query lists all nodes assigned to Template 101:

    Select * from Nodesdata where NodeID in (Select NodeID from Cli_DeviceTemplatesNodes where TemplateID = 101)

Disclaimer:

Scripts are not supported under any SolarWinds support program or service. Scripts are provided AS IS without warranty of any kind. SolarWinds further disclaims all warranties including, without limitation, any implied warranties of merchantability or of fitness for a particular purpose. The risk arising out of the use or performance of the scripts and documentation stays with you. In no event shall SolarWinds or anyone else involved in the creation, production, or delivery of the scripts be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the scripts or documentation.