3 Replies Latest reply on Mar 27, 2018 11:57 AM by ebradford

    How to access ncm_EntityPhysical table using SQL

    ebradford

      I'm hoping that some of you SQL gurus can assist. I am trying to access data in the EntityPhysical table. But I can't seem to access the data. The query below is just to access the data. Once I can access the data, I should be able use it for reports. This first code works:

      SELECT *

      FROM ncm_NodeProperties ncmp

      INNER JOIN Nodes n ON ncmp.CoreNodeID=n.NodeID

      WHERE n.Vendor='Cisco'

       

      This second code works:

      SELECT *

      FROM ncm_NodeProperties ncmp

      INNER JOIN ncm_ArpTables ep ON ncmp.NodeID=ep.NodeID

       

      One might think, delete the word ArpTables, and insert the word EntityPhysical, and it should work. But, it doesn't. This, and many variations I have tried doesn't work:

      SELECT *

      FROM ncm_Nodes ncmp

      INNER JOIN ncm_EntityPhysical ep ON ncmp.NodeID=ep.NodeID

       

      What is the magic to accessing the EntityPhysical table using SQL?

        • Re: How to access ncm_EntityPhysical table using SQL
          sirpaw

          Hi! I just checked and it seems there should be an underscore in between Entity and Physical, so ncm_entity_physical. Maybe you just missed it.

            • Re: How to access ncm_EntityPhysical table using SQL
              ebradford

              Sir Paw, Thank you for pointing that out. It worked. I would have not thought to put an underscore there. I will remember to try additional underscores in future fields when they don't work. This is from the OrionNCMAdministratorGuide.pdf I downloaded yesterday:

              No underscore there. I wonder how many more are in this manner. I'm marking your reply with a correct answer.

            • Re: How to access ncm_EntityPhysical table using SQL
              ebradford

              So, I went through the NCM manual looking at the table names with this query:
              select * from ncm_{tablename}


              Listed below are table names which required underscores not in the Admin Guide .pdf. I omitted table names which didn't require an undisclosed underscore.

               

              As listed in Guide:              Actual table name:

              ncm_CatalystCards            ncm_Catalyst_Cards

              ncm_CiscoCards                ncm_Cisco_Cards

              ncm_CiscoCdp                   ncm_Cisco_Cdp

              ncm_CiscoChassis             ncm_Cisco_Chassis

              ncm_CiscoFlash                 ncm_Cisco_Flash

              ncm_CiscoFlashFiles          ncm_Cisco_FlashFiles

              ncm_CiscoImageMIB          ncm_Cisco_ImageMIB

              ncm_CiscoMemoryPools     ncm_Cisco_MemoryPools

              ncm_EntityLogical               ncm_Entity_Logical

              ncm_EntityPhysical             ncm_Entity_Physical

              ncm_PortsTcp                     ncm_Ports_Tcp

              ncm_PortsUdp                     ncm_Ports_Udp

              1 of 1 people found this helpful