我需要创建一个 SCCM 2007 报告来检查特定集合的时区。我找到了可以执行此操作的方法,但是当我将其插入报表SQL语句时不起作用。
select SMS_R_System.Name, SMS_R_System.SMSAssignedSites, SMS_R_System.IPAddresses, SMS_R_System.IPSubnets, SMS_R_System.OperatingSystemNameandVersion, SMS_R_System.ResourceDomainORWorkgroup, SMS_R_System.LastLogonUserDomain, SMS_R_System.LastLogonUserName, SMS_R_System.SMSUniqueIdentifier, SMS_R_System.ResourceId, SMS_R_System.ResourceType, SMS_R_System.NetbiosName, SMS_G_System_COMPUTER_SYSTEM.CurrentTimeZone from SMS_R_System inner join SMS_G_System_COMPUTER_SYSTEM on SMS_G_System_COMPUTER_SYSTEM.ResourceID = SMS_R_System.ResourceId where SMS_G_System_COMPUTER_SYSTEM.CurrentTimeZone != -360 order by name
对于需要使用数据库视图的报告,请参阅下面的快速修改查询,该查询应执行所需的操作:
select
v_R_System.Name0,
v_GS_COMPUTER_SYSTEM.CurrentTimeZone0
from v_R_System
inner join v_GS_COMPUTER_SYSTEM on v_GS_COMPUTER_SYSTEM.ResourceID = v_R_System.ResourceId
join v_FullCollectionMembership ON v_FullCollectionMembership.ResourceID = v_R_System.ResourceID
where
v_GS_COMPUTER_SYSTEM.CurrentTimeZone0 != -360
AND v_FullCollectionMembership.CollectionID = '<yourcollectionid>'
order by Name0
只需将"<您的收藏 ID=">"替换为您要查询的 id。您的收藏>