Quantcast
Viewing all articles
Browse latest Browse all 2021

Query to show Package Servers per site across hierarchy

I need a solution

I'm trying to write a sql query that will show me all active site servers and their associated site across hierarchy.

I came up with this:

 

SELECT 
comp2site.ParentResourceGuid as SiteServerGuid
,vc.Name
,s.Name
FROM ResourceAssociation comp2site 
JOIN vSite s ON s.Guid= comp2site.ChildResourceGuid  
JOIN vComputer vc ON vc.Guid = comp2site.ParentResourceGuid
WHERE comp2site.ResourceAssociationTypeGuid='5E8E3C61-A80C-4b0a-A228-DBF97607CEE4'--Computer To Site
 
The trouble with this is that while it returns a list of site server, the site associated is only what the parent NS thinks it site is, not what site the children NS thinks they are in.
 
We have a single parent NS with two Child NS's.
 
Thanks,
 
-C

Viewing all articles
Browse latest Browse all 2021

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>