2 Replies Latest reply on Oct 8, 2017 11:37 AM by cscoengineer

    Help with SQL and Report Writer


      Hello guys.


      I have ZERO SQL experience so anyone's help will be greatly appreciated. I need to create a SQL report with MAC Address, Port Description and the Hostname associated with that port. And can this SQL query narrow it down to a L2/L3 device? Kinda like Switchport Mapper. I just want to limit it to just one site.

        • Re: Help with SQL and Report Writer
          Daniel Brannagan



          Something like this? your need to create a custom query resource. and paste the below. sure you can group device or vendor etc..




          I.MAC AS [MAC ADD],

          N.Caption AS [NODE],

          Alias as Description,

          IfName AS [PORT]

          FROM Orion.NPM.Interfaces i

          INNER JOIN ORION.Nodes N ON I.NodeID = N.NodeID



              N.Caption LIKE '%${SEARCH_STRING}%'OR

              I.PhysicalAddress  LIKE'%${SEARCH_STRING}%'OR

              I.Alias  LIKE'%${SEARCH_STRING}%'