Hi guys,
I've searched and search and searched some more but can't find the table in which this setting is stored.
Does anyone know where the change is being made?
TIA
/Deltona
BUMP
The settings is stored in the NCM_NCMSettings table.
Jiri
Are you sure?
I am not getting the list of nodes when running SELECT * FROM NCM_NCMSettings
All I get is the location of NCMIndexCatalogPath, Support Account Limitation in NCM Jobs, Vuln Last Error/Run.
I don't know if there is an explicit column in a table that says that. However, you can figure it out quite easily. In the "Nodes" table (or view) in NPM, you have your NodeID. In the NCM_NodeProperties table you have a couple columns "NodeID" (which is specific to NCM) and "CoreNodeID" which would be the same as the NodeID is in the NPM Nodes table. If you do a left outer join on them, if there isn't a NCM_NodeProperties.NodeID in the resulting table you know its not in NCM...
SELECT TOP 100 N.NodeID, CASE WHEN NCM.NodeID IS NULL THEN 'False' ELSE 'True' END AS InNCM
FROM Nodes N LEFT OUTER JOIN NCM_NodeProperties NCM ON (N.NodeID = NCM.CoreNodeID)
This query should illustrate it, rather than having the second column be the NCM_NodeProperties.NodeID (or NULL) I converted it to a true/false with the "CASE" statement..
HTH!!
Hi Craig,
Thanks for the query. I have tested it and it works as explained.
Ultimately, what I'm after is a query that will add nodes to the NCM_NodePorperties table because NCM currently can't do this automatically.
It would be a SQL job that runs once a day. If a Node who's vendor = Cisco, and is not in the NCM_NodeProperties table, then the query would add that Node to NCM.
Does it make sense?
Ok, then I would do the following using Orion SDK:
Any chance this could be done using raw SQL queries?
Use of the SDK add a layer of complexity that I'd rather avoid.
Raw SQL is dangerous and not guaranteed to work when we change something in the product.
I would discourage you from doing that.
I am already discourage in using the SDK. I wouldn't know where to start and have no notion of how things work, get triggered etc.
Any pointers?
< not a programmer
Pointers? Find a programmer? Or at least someone comfortable with scripting... This isn't a simple flag your setting in an SQL row, you're creating rows in another table altogether based off the results of another query.
The SDK has a bunch of benefits over raw SQL as cvachovecj mentioned, this type of task wouldn't be recommended to do with raw sql, you could screw up your database enough that you might need to start over or at least restore it from an older point..
Alternatively use the GUI. It is quite powerful. In this case try going into "Settings" then "Manage Nodes". Tell it to "Group By:" and choose "Vendor". Then you will see all your Cisco devices in a group. Select that group and go to the NCM licensed column header and click on it once or twice. This will set it to sort by whether the node is NCM licensed or not, clicking again will change it from sorting ascending to descending. Select the nodes that are not licensed and go to the top and "Edit Properties". Go to the bottom and tell it to add all the nodes to NCM and what credentials to use and such. And there, your done - added all the missing nodes at once...
Another hint, once you have all the nodes sorted by whether they are in NCM or not, lets say you have 156 nodes that are not in NCM, but you have 250 nodes displayed on the page. Rather than individually selecting all of those, or selecting all and removing those that you don't want selected, adjust your "Page Size" to figure out the exact # of nodes and then select all when all you have are non-licensed NCM nodes being shown...
Very good reasoning.
For anyone who would like to start with Orion SDK I recommend the following links:
Hi @cvachovecj ,
Could you please let me know how to add multiple nodes in NCM using SDK.
Thanks
Prashant