United Kingdom Endpoint Management User Group

 View Only

How to Add the Useful 7.5 vSiteServices View to a 7.1.x System? 

Feb 17, 2014 02:37 PM

SMP 7.5 includes a view called vSiteServices which maps the actual site servers computer guid to the site servers site services guid, allowing you to easily join this view to other database objects to provide a site server picture.

As this view is useful, how can it be added to a 7.1.x system?

The following SQL is that views create query which has been modified in order to work against a 7.1.x database:

****************************************

CREATE view [dbo].[vSiteServices]
            as
                SELECT        DISTINCT
                              ss.[Guid],
                              ss.ResourceTypeGuid,
                              vc.[Guid] AS [ComputerGuid],
                              tcp.[IP Address],
                              tcp.[Host Name],
                              tcp.[Primary DNS Suffix]
                    FROM      vSiteServiceResource    ss
                    JOIN      ResourceAssociation     ra  ON ra.ParentResourceGuid = ss.[Guid]
                                                         AND ra.ResourceAssociationTypeGuid = '5F00E96B-93F3-41F0-94A7-7DBBB8AEF841'
                    --JOIN      vComputerResourceEx     vc  ON vc.[Guid] = ra.ChildResourceGuid
                    JOIN      vComputer     vc  ON vc.[Guid] = ra.ChildResourceGuid
                    JOIN      Inv_AeX_AC_TCPIP        tcp ON tcp._ResourceGuid = vc.[Guid]
                    --LEFT JOIN Inv_AeX_AC_Network_Zone nz  ON nz._ResourceGuid = vc.[Guid]
                    WHERE     tcp.[Subnet Mask] != '255.255.255.255'          AND       tcp.[IP Address]  != '' -- ignore ip addresses reported for /32 subnets for VPN reasons
                    AND       vc.IsLocal = 1
                           --OR nz.IsOnInternet = 1  -- Windows CEM site server

*********************************************

As you can see, I have remarked out the line that targets the vComputerResourceEx view as that object does not exist in a 7.1.x database, and have replaced it with the vComputer view, as we need the IsLocal column.

I have also remarked out the Inv_AeX_AC_Network_Zone table along with its associated OR line, as they relate to CEM which 7.1.x does not have.

Simply execute the query and the view will be created.

Statistics
0 Favorited
0 Views
0 Files
0 Shares
0 Downloads

Tags and Keywords

Related Entries and Links

No Related Resource entered.