Hello,
I need my existing customized computer summary report which has multiple information including the "Last Inventory sent" date and time column. Therefore, however, I need to know howto add the new query for showing the last date and time of when information being collected from all host servers.
Below is the initial computer summary SQL queries and output details for better understanding.
=========================================================================================================================
DECLARE @v1_TrusteeScope nvarchar(max)
SET @v1_TrusteeScope = N'%TrusteeScope%'
SELECT DISTINCT i.Guid,
CASE WHEN i.Domain = '' AND CHARINDEX('.', i.[Name]) <> 0 THEN SUBSTRING (i.[Name],0,CHARINDEX ('.',i.[Name])) ELSE i.[Name] END [Name],
CASE WHEN i.Domain = '' AND CHARINDEX('.', i.[Name]) <> 0 THEN REPLACE (i.[Name],SUBSTRING (i.[Name],0,CHARINDEX ('.',i.[Name]))+ '.','') ELSE i.Domain END [Domain],
i.[IP Address],
sn1.Manufacturer [Manufacturer],
sn1.[Model] [Computer Model],
cpu.[Max Clock Speed (Mega-hertz)] [CPU Frequency],
cpu.[Family] [CPU Type],
sn1.[Total Physical Memory (Bytes)] / (1024 * 1024) [Memory (MB)],
ISNULL (i.[OS Name],os.[Name]) [Operating System],
d.[OS Version] [OS Version],
CST.[Max Media Size (Kilobytes)] / (1024) [Disk Size(MB)],
ld.[Free Space (Bytes)] [Free Space(MB)],
sn1.[Identifying Number] [Serial Number]
FROM dbo.vComputer i
JOIN dbo.ScopeMembership sm
ON sm.[ResourceGuid] = i.Guid
AND sm.[ScopeCollectionGuid] IN (SELECT * FROM dbo.fnGetTrusteeScopeCollections (@v1_TrusteeScope))
LEFT JOIN dbo.Inv_AeX_AC_Identification d
ON d._ResourceGuid = i.Guid
JOIN dbo.CollectionMembership cm
ON cm.ResourceGuid = i.[Guid]
JOIN dbo.vCollection it
ON it.Guid = cm.CollectionGuid
LEFT JOIN dbo.vHWPhysicalMemory m1
ON m1.[_ResourceGuid] = i.Guid
JOIN dbo.vHWComputerSystem sn1
ON sn1.[_ResourceGuid] = i.Guid
LEFT JOIN dbo.Inv_HW_Processor cpu
ON cpu.[_ResourceGuid] = i.[Guid]
LEFT JOIN (SELECT SUM ([Free Space (Bytes)] / (1024 * 1024)) [Free Space (Bytes)], _ResourceGuid
FROM dbo.vHWLogicalDisk WHERE [Logical Disk Type] = 3 GROUP BY _ResourceGuid) ld
ON i.Guid = ld._ResourceGuid
LEFT JOIN dbo.vOSOperatingSystem os
ON os._ResourceGuid = i.Guid
JOIN (SELECT SUM ([Max Media Size (Kilobytes)]) [Max Media Size (Kilobytes)],
_ResourceGuid FROM vHWStorage
WHERE [Media Type] = 29
GROUP BY _ResourceGuid)CST
ON CST._ResourceGuid = i.Guid
WHERE 1 = 1
AND LOWER (i.[Name]) LIKE LOWER ('%ComputerName%')
AND i.Domain LIKE '%Domain%'
AND lower (it.[Guid]) LIKE lower ('%Filter%')
=========================================================================================================================
Guid | Name | Domain | IP Address | Manufacturer | Computer Model | CPU Frequency | CPU Type | Memory (MB) | Operating System | OS Version | Disk Size(MB) | Free Space(MB) | Serial Number |
17dafbe9-5920-4cba-a8eb-003f57365861 | WEBFUNDS | MLV | 10.129.43.20 | VMware, Inc. | VMware Virtual Platform | 2926 | 12 | 8192 | Windows Server 2008 R2 Standard | 6.1 | 153598 | 103945 | VMware-42 24 5f 6b a7 7a 00 55-ff 91 b1 88 81 4d d6 b2 |
a2e392bc-fb56-4d3f-ae37-00498f0c6e7a | MILHKMFCSIGN | WORKGROUP | 10.128.142.1 | VMware, Inc. | VMware Virtual Platform | 2926 | 2 | 4096 | Microsoft Windows Server 2003 | 5.2 | 43002 | 17409 | VMware-42 31 e0 48 f8 ee e8 e7-07 89 ce 25 2b 8f 69 3f |
92fa8e7c-2d8c-4146-b06b-004dbc492491 | MFCVORTOK012 | MLIDDOMAIN2 | 10.40.48.51 | VMware, Inc. | VMware Virtual Platform | 2926 | 12 | 8192 | Windows Server 2008 R2 Standard | 6.1 | 276462 | 234632 | VMware-42 14 dd 93 d1 49 12 aa-b5 42 00 99 98 b3 bf 27 |
00b56fe8-e619-40f8-9a40-0074c4e0973b | MILHKAWSLT01 | HK | 10.128.90.163 | Cisco Systems Inc | R200-1120402W | 2266 | 176 | 8192 | Microsoft Windows Server 2003 | 5.2 | 147448 | 34706 | QCI1517A3QC |
Symantec support has provided with some queries to be applied into the above report but the Last Inventory Sent didn't appeared once the changes has been saved without prompting errors. Kindly find enclosed my desired output below to be added at the last column of report. Please advise if anyone has come across with this experience.
=============================
Last Full Inventory sent to NS |
8/10/2014 20:36 |
8/12/2014 1:26 |
8/16/2014 22:23 |
8/26/2014 4:17 |
8/26/2014 11:56 |
=============================
Thank you for your kindly assistant in advance.
Regards,
Jeffrey