I am trying to execute the following SWQL query:
SELECT n1.ip_address, i4.interfaceindex, i4.interfacename,RemoteSystemName
FROM Orion.NodeLldpEntry NLE inner join Orion.nodes N1
on NLE.nodeid=n1.nodeid
inner join Orion.nodes N2
on NLE.remotesystemname=n2.sysname
inner join Cirrus.Nodes n3
on n3.corenodeid=n1.nodeid
inner join Cirrus.Interfaces i3
on i3.interfaceindex = nle.localportnumber and i3.nodeid=n3.nodeid
inner join Cirrus.Interfaces i4
on i3.macaddress = i4.macaddress and i4.PhysicalInterface='Y'
left outer join Orion.NPM.Interfaces i
on i.interfaceindex = nle.localportnumber and i.nodeid=nle.nodeid
left outer join Orion.NPM.Interfaces i5
on i5.interfaceindex = i4.interfaceindex and i5.nodeid=nle.nodeid
where i.interfaceid is null and i5.interfaceindex is null
and n1.caption not like '%@%'
and nle.localportnumber != 0
[this query identifies unmonitored layer-2 interfaces between two monitored nodes.]
The information service is misconverting this into the following SQL:
SELECT [T1].[IP_Address] AS C1, [T2].[InterfaceIndex] AS C2, [T2].[InterfaceName] AS C3, [T3].[RemoteSystemName] AS C4
FROM [dbo].[NodeLldpEntries] AS T3
INNER JOIN [dbo].[Nodes] AS T1 ON ([T3].[NodeID] = [T1].[NodeID])
INNER JOIN [dbo].[Nodes] AS T6 ON ([T3].[RemoteSystemName] = [T6].[SysName])
INNER JOIN [Nodes] AS T7 ON ([T7].[CoreNodeID] = [T1].[NodeID])
INNER JOIN [Interfaces] AS T8 ON (([T8].[InterfaceIndex] = [T3].[LocalPortNumber]) AND ([T8].[NodeID] = [T7].[NodeID]))
INNER JOIN [Interfaces] AS T2 ON (([T8].[MACAddress] = [T2].[MACAddress]) AND ([T2].[PhysicalInterface] = N'Y'))
LEFT JOIN [dbo].[Interfaces] AS T4 ON (([T4].[InterfaceIndex] = [T3].[LocalPortNumber]) AND ([T4].[NodeID] = [T3].[NodeID]))
LEFT JOIN [dbo].[Interfaces] AS T5 ON (([T5].[InterfaceIndex] = [T2].[InterfaceIndex]) AND ([T5].[NodeID] = [T3].[NodeID]))
WHERE (((([T4].[InterfaceID] IS NULL) AND ([T5].[InterfaceIndex] IS NULL)) AND ([T1].[Caption] NOT LIKE N'%@%')) AND ([T3].[LocalPortNumber] <> 0))
notice the database selector for the Cirrus and Orion SWQL objects are missing.
Suggestions?